From 4359c08cef4a55d44e34a39b44778dfaa222211f Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 11:42:21 +0200 Subject: [PATCH 001/162] feat: add descriptions to GraphQL types --- packages/graphql/src/graphql/enums/SortDirection.ts | 1 + packages/graphql/src/graphql/objects/CartesianPoint.ts | 1 + packages/graphql/src/graphql/objects/CreateInfo.ts | 1 + packages/graphql/src/graphql/objects/DeleteInfo.ts | 1 + packages/graphql/src/graphql/objects/Point.ts | 1 + packages/graphql/src/graphql/objects/UpdateInfo.ts | 1 + 6 files changed, 6 insertions(+) diff --git a/packages/graphql/src/graphql/enums/SortDirection.ts b/packages/graphql/src/graphql/enums/SortDirection.ts index 05705f1f8d..8656e0d17e 100644 --- a/packages/graphql/src/graphql/enums/SortDirection.ts +++ b/packages/graphql/src/graphql/enums/SortDirection.ts @@ -21,6 +21,7 @@ import { GraphQLEnumType } from "graphql"; export const SortDirection = new GraphQLEnumType({ name: "SortDirection", + description: "SortDirection", values: { ASC: { value: "ASC", diff --git a/packages/graphql/src/graphql/objects/CartesianPoint.ts b/packages/graphql/src/graphql/objects/CartesianPoint.ts index e01a5dc6b9..3d5a4f80ce 100644 --- a/packages/graphql/src/graphql/objects/CartesianPoint.ts +++ b/packages/graphql/src/graphql/objects/CartesianPoint.ts @@ -21,6 +21,7 @@ import { GraphQLFloat, GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLStr export const CartesianPoint = new GraphQLObjectType({ name: "CartesianPoint", + description: "CartesianPoint type", fields: { x: { type: new GraphQLNonNull(GraphQLFloat), diff --git a/packages/graphql/src/graphql/objects/CreateInfo.ts b/packages/graphql/src/graphql/objects/CreateInfo.ts index 79ed9c5b60..be3740bb9e 100644 --- a/packages/graphql/src/graphql/objects/CreateInfo.ts +++ b/packages/graphql/src/graphql/objects/CreateInfo.ts @@ -21,6 +21,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const CreateInfo = new GraphQLObjectType({ name: "CreateInfo", + description: "CreateInfo", fields: { bookmark: { type: GraphQLString, diff --git a/packages/graphql/src/graphql/objects/DeleteInfo.ts b/packages/graphql/src/graphql/objects/DeleteInfo.ts index ede469dfc6..3f749ce5ee 100644 --- a/packages/graphql/src/graphql/objects/DeleteInfo.ts +++ b/packages/graphql/src/graphql/objects/DeleteInfo.ts @@ -21,6 +21,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const DeleteInfo = new GraphQLObjectType({ name: "DeleteInfo", + description: "DeleteInfo", fields: { bookmark: { type: GraphQLString, diff --git a/packages/graphql/src/graphql/objects/Point.ts b/packages/graphql/src/graphql/objects/Point.ts index d07222e825..11ab2ca334 100644 --- a/packages/graphql/src/graphql/objects/Point.ts +++ b/packages/graphql/src/graphql/objects/Point.ts @@ -21,6 +21,7 @@ import { GraphQLFloat, GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLStr export const Point = new GraphQLObjectType({ name: "Point", + description: "Point type", fields: { longitude: { type: new GraphQLNonNull(GraphQLFloat), diff --git a/packages/graphql/src/graphql/objects/UpdateInfo.ts b/packages/graphql/src/graphql/objects/UpdateInfo.ts index 3ba93ab413..c8a36ae9b2 100644 --- a/packages/graphql/src/graphql/objects/UpdateInfo.ts +++ b/packages/graphql/src/graphql/objects/UpdateInfo.ts @@ -21,6 +21,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const UpdateInfo = new GraphQLObjectType({ name: "UpdateInfo", + description: "UpdateInfo", fields: { bookmark: { type: GraphQLString, From 12f3fb5ac095cd4cd94443e12b74de891b1c1338 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:06:43 +0200 Subject: [PATCH 002/162] feat: set defaultValue type to DefaultAnnotationValue --- packages/graphql/src/types/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/types/index.ts b/packages/graphql/src/types/index.ts index 05bb1c35dc..8e142054bf 100644 --- a/packages/graphql/src/types/index.ts +++ b/packages/graphql/src/types/index.ts @@ -25,6 +25,7 @@ import type { ResolveTree } from "graphql-parse-resolve-info"; import type { JWTVerifyOptions, RemoteJWKSetOptions } from "jose"; import type { Integer } from "neo4j-driver"; import type { RelationshipNestedOperationsOption, RelationshipQueryDirectionOption } from "../constants"; +import type { DefaultAnnotationValue } from "../schema-model/annotation/DefaultAnnotation"; import type { JwtPayload } from "./jwt-payload"; import type { Neo4jGraphQLContext } from "./neo4j-graphql-context"; @@ -282,7 +283,7 @@ export interface CypherQueryOptions { } /** Input field for graphql-compose */ -export type InputField = { type: string; defaultValue?: string; directives?: Directive[] } | string; +export type InputField = { type: string; defaultValue?: DefaultAnnotationValue; directives?: Directive[] } | string; /** Raw event metadata returned from queries */ export type NodeSubscriptionMeta = { From bc38e99f9cef880555d1dd55369751bada6816e4 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:10:12 +0200 Subject: [PATCH 003/162] wip: use new makeAugmentedSchema --- packages/graphql/src/classes/Neo4jGraphQL.ts | 38 +- packages/graphql/src/schema/index.ts | 3 +- .../src/schema/make-augmented-schema.test.ts | 116 +- .../src/schema/make-augmented-schema.ts | 41 +- .../src/schema/new-make-augmented-schema.ts | 1508 +++++++++++++++++ .../validation/schema-validation.test.ts | 669 +++++--- 6 files changed, 2087 insertions(+), 288 deletions(-) create mode 100644 packages/graphql/src/schema/new-make-augmented-schema.ts diff --git a/packages/graphql/src/classes/Neo4jGraphQL.ts b/packages/graphql/src/classes/Neo4jGraphQL.ts index 69d73f8b84..c89e959309 100644 --- a/packages/graphql/src/classes/Neo4jGraphQL.ts +++ b/packages/graphql/src/classes/Neo4jGraphQL.ts @@ -342,7 +342,7 @@ class Neo4jGraphQL { // This can be run several times but it will always be the same result, // so we memoize the schemaModel. if (!this.schemaModel) { - this.schemaModel = generateModel(document); + return generateModel(document); } return this.schemaModel; } @@ -372,13 +372,17 @@ class Neo4jGraphQL { this.jwtFieldsMap = jwt.jwtFieldsMap; } - this.generateSchemaModel(document); + this.schemaModel = this.generateSchemaModel(document); - const { nodes, relationships, typeDefs, resolvers } = makeAugmentedSchema(document, { - features: this.features, - generateSubscriptions: Boolean(this.features?.subscriptions), - userCustomResolvers: this.resolvers, - }); + const { nodes, relationships, typeDefs, resolvers } = makeAugmentedSchema( + document, + { + features: this.features, + generateSubscriptions: Boolean(this.features?.subscriptions), + userCustomResolvers: this.resolvers, + }, + this.schemaModel + ); if (this.validate) { validateUserDefinition({ userDocument: document, augmentedDocument: typeDefs, jwt: jwt?.type }); @@ -433,14 +437,18 @@ class Neo4jGraphQL { this.jwtFieldsMap = jwt.jwtFieldsMap; } - const schemaModel = this.generateSchemaModel(document); + this.schemaModel = this.generateSchemaModel(document); - const { nodes, relationships, typeDefs, resolvers } = makeAugmentedSchema(document, { - features: this.features, - generateSubscriptions: Boolean(this.features?.subscriptions), - userCustomResolvers: this.resolvers, - subgraph, - }); + const { nodes, relationships, typeDefs, resolvers } = makeAugmentedSchema( + document, + { + features: this.features, + generateSubscriptions: Boolean(this.features?.subscriptions), + userCustomResolvers: this.resolvers, + subgraph, + }, + this.schemaModel + ); if (this.validate) { validateUserDefinition({ @@ -456,7 +464,7 @@ class Neo4jGraphQL { this._relationships = relationships; // TODO: Move into makeAugmentedSchema, add resolvers alongside other resolvers - const referenceResolvers = subgraph.getReferenceResolvers(this._nodes, schemaModel); + const referenceResolvers = subgraph.getReferenceResolvers(this._nodes, this.schemaModel); const schema = subgraph.buildSchema({ typeDefs, diff --git a/packages/graphql/src/schema/index.ts b/packages/graphql/src/schema/index.ts index eaaab93194..573ee1aa8b 100644 --- a/packages/graphql/src/schema/index.ts +++ b/packages/graphql/src/schema/index.ts @@ -17,4 +17,5 @@ * limitations under the License. */ -export { default as makeAugmentedSchema } from "./make-augmented-schema"; +// export { default as makeAugmentedSchema } from "./make-augmented-schema"; +export { default as makeAugmentedSchema } from "./new-make-augmented-schema"; diff --git a/packages/graphql/src/schema/make-augmented-schema.test.ts b/packages/graphql/src/schema/make-augmented-schema.test.ts index d699ce0e77..920946d46d 100644 --- a/packages/graphql/src/schema/make-augmented-schema.test.ts +++ b/packages/graphql/src/schema/make-augmented-schema.test.ts @@ -19,17 +19,20 @@ import camelCase from "camelcase"; import { - type ObjectTypeDefinitionNode, - type NamedTypeNode, + Kind, + type InputObjectTypeDefinitionNode, type ListTypeNode, + type NamedTypeNode, type NonNullTypeNode, - type InputObjectTypeDefinitionNode, - Kind, + type ObjectTypeDefinitionNode, } from "graphql"; import { pluralize } from "graphql-compose"; import { gql } from "graphql-tag"; -import makeAugmentedSchema from "./make-augmented-schema"; +// import makeAugmentedSchema from "./make-augmented-schema"; +import { mergeTypeDefs } from "@graphql-tools/merge"; import { Node } from "../classes"; +import { generateModel } from "../schema-model/generate-model"; +import makeAugmentedSchema from "./new-make-augmented-schema"; describe("makeAugmentedSchema", () => { test("should be a function", () => { @@ -49,7 +52,8 @@ describe("makeAugmentedSchema", () => { } `; - const neoSchema = makeAugmentedSchema(typeDefs); + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + const neoSchema = makeAugmentedSchema(typeDefs, {}, schemaModel); const document = neoSchema.typeDefs; const queryObject = document.definitions.find( (x) => x.kind === Kind.OBJECT_TYPE_DEFINITION && x.name.value === "Query" @@ -98,7 +102,8 @@ describe("makeAugmentedSchema", () => { } `; - const neoSchema = makeAugmentedSchema(typeDefs); + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + const neoSchema = makeAugmentedSchema(typeDefs, {}, schemaModel); const document = neoSchema.typeDefs; @@ -118,15 +123,20 @@ describe("makeAugmentedSchema", () => { } `; - const neoSchema = makeAugmentedSchema(typeDefs, { - features: { - filters: { - String: { - MATCHES: true, + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + const neoSchema = makeAugmentedSchema( + typeDefs, + { + features: { + filters: { + String: { + MATCHES: true, + }, }, }, }, - }); + schemaModel + ); const document = neoSchema.typeDefs; @@ -147,15 +157,20 @@ describe("makeAugmentedSchema", () => { } `; - const neoSchema = makeAugmentedSchema(typeDefs, { - features: { - filters: { - ID: { - MATCHES: true, + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + const neoSchema = makeAugmentedSchema( + typeDefs, + { + features: { + filters: { + ID: { + MATCHES: true, + }, }, }, }, - }); + schemaModel + ); const document = neoSchema.typeDefs; @@ -176,18 +191,23 @@ describe("makeAugmentedSchema", () => { } `; - const neoSchema = makeAugmentedSchema(typeDefs, { - features: { - filters: { - String: { - MATCHES: true, - }, - ID: { - MATCHES: false, + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + const neoSchema = makeAugmentedSchema( + typeDefs, + { + features: { + filters: { + String: { + MATCHES: true, + }, + ID: { + MATCHES: false, + }, }, }, }, - }); + schemaModel + ); const document = neoSchema.typeDefs; @@ -212,18 +232,23 @@ describe("makeAugmentedSchema", () => { } `; - const neoSchema = makeAugmentedSchema(typeDefs, { - features: { - filters: { - String: { - MATCHES: false, - }, - ID: { - MATCHES: true, + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + const neoSchema = makeAugmentedSchema( + typeDefs, + { + features: { + filters: { + String: { + MATCHES: false, + }, + ID: { + MATCHES: true, + }, }, }, }, - }); + schemaModel + ); const document = neoSchema.typeDefs; @@ -255,7 +280,8 @@ describe("makeAugmentedSchema", () => { } `; - const neoSchema = makeAugmentedSchema(typeDefs); + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + const neoSchema = makeAugmentedSchema(typeDefs, {}, schemaModel); const document = neoSchema.typeDefs; @@ -274,14 +300,15 @@ describe("makeAugmentedSchema", () => { } `; - expect(() => makeAugmentedSchema(typeDefs)).not.toThrow( + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + expect(() => makeAugmentedSchema(typeDefs, {}, schemaModel)).not.toThrow( 'Error: Type with name "ActionMapping" does not exists' ); }); }); describe("@unique", () => { - test("should throw error if @unique is used on relationship property", () => { + test.skip("should throw error if @unique is used on relationship property", () => { const typeDefs = gql` type Movie { actors: Actor! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -297,12 +324,14 @@ describe("makeAugmentedSchema", () => { } `; - expect(() => makeAugmentedSchema(typeDefs)).toThrow( + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + expect(() => makeAugmentedSchema(typeDefs, {}, schemaModel)).toThrow( "@unique directive cannot be used on interface type fields: ActedIn.id" ); }); - test("should throw error if @unique is used on interface field", () => { + // TODO: validation PR + test.skip("should throw error if @unique is used on interface field", () => { const typeDefs = gql` interface Production { id: ID! @unique @@ -315,7 +344,8 @@ describe("makeAugmentedSchema", () => { } `; - expect(() => makeAugmentedSchema(typeDefs)).toThrow( + const schemaModel = generateModel(mergeTypeDefs(typeDefs)); + expect(() => makeAugmentedSchema(typeDefs, {}, schemaModel)).toThrow( "@unique directive cannot be used on interface type fields: Production.id" ); }); diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index f8f966a528..74ed19703b 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -30,35 +30,35 @@ import { GraphQLID, GraphQLNonNull, Kind, parse, print } from "graphql"; import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, ObjectTypeComposer } from "graphql-compose"; import { SchemaComposer } from "graphql-compose"; import pluralize from "pluralize"; -import { cypherResolver } from "./resolvers/field/cypher"; -import { numericalResolver } from "./resolvers/field/numerical"; -import { aggregateResolver } from "./resolvers/query/aggregate"; -import { findResolver } from "./resolvers/query/read"; -import { rootConnectionResolver } from "./resolvers/query/root-connection"; -import { createResolver } from "./resolvers/mutation/create"; -import { deleteResolver } from "./resolvers/mutation/delete"; -import { updateResolver } from "./resolvers/mutation/update"; -import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; -import { augmentFulltextSchema } from "./augment/fulltext"; -import * as Scalars from "../graphql/scalars"; import type { Node } from "../classes"; import type Relationship from "../classes/Relationship"; +import * as Scalars from "../graphql/scalars"; +import { upperFirst } from "../utils/upper-first"; +import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; +import { augmentFulltextSchema } from "./augment/fulltext"; import createConnectionFields from "./create-connection-fields"; +import { ensureNonEmptyInput } from "./ensure-non-empty-input"; import getCustomResolvers from "./get-custom-resolvers"; +import { getDefinitionNodes } from "./get-definition-nodes"; import type { ObjectFields } from "./get-obj-field-meta"; import getObjFieldMeta from "./get-obj-field-meta"; import getSortableFields from "./get-sortable-fields"; +import getUniqueFields from "./get-unique-fields"; +import getWhereFields from "./get-where-fields"; +import { cypherResolver } from "./resolvers/field/cypher"; +import { numericalResolver } from "./resolvers/field/numerical"; +import { createResolver } from "./resolvers/mutation/create"; +import { deleteResolver } from "./resolvers/mutation/delete"; +import { updateResolver } from "./resolvers/mutation/update"; +import { aggregateResolver } from "./resolvers/query/aggregate"; +import { findResolver } from "./resolvers/query/read"; +import { rootConnectionResolver } from "./resolvers/query/root-connection"; import { graphqlDirectivesToCompose, objectFieldsToComposeFields, objectFieldsToCreateInputFields, objectFieldsToUpdateInputFields, } from "./to-compose"; -import getUniqueFields from "./get-unique-fields"; -import getWhereFields from "./get-where-fields"; -import { upperFirst } from "../utils/upper-first"; -import { ensureNonEmptyInput } from "./ensure-non-empty-input"; -import { getDefinitionNodes } from "./get-definition-nodes"; // GraphQL type imports import type { Subgraph } from "../classes/Subgraph"; @@ -75,16 +75,17 @@ import { DeleteInfo } from "../graphql/objects/DeleteInfo"; import { PageInfo } from "../graphql/objects/PageInfo"; import { Point } from "../graphql/objects/Point"; import { UpdateInfo } from "../graphql/objects/UpdateInfo"; +import type { Neo4jGraphQLSchemaModel } from "../schema-model/Neo4jGraphQLSchemaModel"; +import type { BaseField, Neo4jFeaturesSettings } from "../types"; import { addArrayMethodsToITC } from "./array-methods"; import { addGlobalNodeFields } from "./create-global-nodes"; +import createRelationshipFields from "./create-relationship-fields/create-relationship-fields"; import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; import { addMathOperatorsToITC } from "./math"; import { getSchemaConfigurationFlags, schemaConfigurationFromSchemaExtensions } from "./schema-configuration"; import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; -import type { BaseField, Neo4jFeaturesSettings } from "../types"; -import createRelationshipFields from "./create-relationship-fields/create-relationship-fields"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; @@ -102,7 +103,9 @@ function makeAugmentedSchema( generateSubscriptions?: boolean; userCustomResolvers?: IResolvers | Array; subgraph?: Subgraph; - } = {} + } = {}, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + schemaModel: Neo4jGraphQLSchemaModel ): { nodes: Node[]; relationships: Relationship[]; diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts new file mode 100644 index 0000000000..9026580d65 --- /dev/null +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -0,0 +1,1508 @@ +/* + * 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 { IResolvers } from "@graphql-tools/utils"; +import type { + DefinitionNode, + DirectiveNode, + DocumentNode, + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLInterfaceType, + GraphQLObjectType, + GraphQLScalarType, + InterfaceTypeDefinitionNode, + NameNode, + ObjectTypeDefinitionNode, + SchemaExtensionNode, +} from "graphql"; +import { GraphQLID, GraphQLNonNull, Kind, parse, print } from "graphql"; +import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, ObjectTypeComposer } from "graphql-compose"; +import { SchemaComposer } from "graphql-compose"; +import pluralize from "pluralize"; +import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; +import { augmentFulltextSchema } from "./augment/fulltext"; +import { cypherResolver } from "./resolvers/field/cypher"; +import { numericalResolver } from "./resolvers/field/numerical"; +import { createResolver } from "./resolvers/mutation/create"; +import { deleteResolver } from "./resolvers/mutation/delete"; +import { updateResolver } from "./resolvers/mutation/update"; +import { aggregateResolver } from "./resolvers/query/aggregate"; +import { findResolver } from "./resolvers/query/read"; +import { rootConnectionResolver } from "./resolvers/query/root-connection"; +// import * as constants from "../constants"; +import type { Node } from "../classes"; +import type Relationship from "../classes/Relationship"; +import * as Scalars from "../graphql/scalars"; +import { isRootType } from "../utils/is-root-type"; +import createConnectionFields from "./create-connection-fields"; +import { ensureNonEmptyInput } from "./ensure-non-empty-input"; +import getCustomResolvers from "./get-custom-resolvers"; +import type { DefinitionNodes } from "./get-definition-nodes"; +import { getDefinitionNodes } from "./get-definition-nodes"; +import type { ObjectFields } from "./get-obj-field-meta"; +import getObjFieldMeta from "./get-obj-field-meta"; +import getSortableFields from "./get-sortable-fields"; +import getWhereFields, { getWhereFieldsFromConcreteEntity } from "./get-where-fields"; +import { + concreteEntityToComposeFields, + concreteEntityToCreateInputFields, + concreteEntityToUpdateInputFields, + graphqlDirectivesToCompose, + objectFieldsToComposeFields, + objectFieldsToCreateInputFields, + objectFieldsToUpdateInputFields, +} from "./to-compose"; + +// GraphQL type imports +import type { Subgraph } from "../classes/Subgraph"; +import { DEPRECATED, FIELD_DIRECTIVES, OBJECT_DIRECTIVES, PROPAGATED_DIRECTIVES } from "../constants"; +import { SortDirection } from "../graphql/enums/SortDirection"; +import { CartesianPointDistance } from "../graphql/input-objects/CartesianPointDistance"; +import { CartesianPointInput } from "../graphql/input-objects/CartesianPointInput"; +import { FloatWhere } from "../graphql/input-objects/FloatWhere"; +import { PointDistance } from "../graphql/input-objects/PointDistance"; +import { PointInput } from "../graphql/input-objects/PointInput"; +import { QueryOptions } from "../graphql/input-objects/QueryOptions"; +import { CartesianPoint } from "../graphql/objects/CartesianPoint"; +import { CreateInfo } from "../graphql/objects/CreateInfo"; +import { DeleteInfo } from "../graphql/objects/DeleteInfo"; +import { PageInfo } from "../graphql/objects/PageInfo"; +import { Point } from "../graphql/objects/Point"; +import { UpdateInfo } from "../graphql/objects/UpdateInfo"; +import type { Neo4jGraphQLSchemaModel } from "../schema-model/Neo4jGraphQLSchemaModel"; +import { ConcreteEntity } from "../schema-model/entity/ConcreteEntity"; +import { InterfaceEntity } from "../schema-model/entity/InterfaceEntity"; +import type { UnionEntity } from "../schema-model/entity/UnionEntity"; +import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { BaseField, Neo4jFeaturesSettings } from "../types"; +import { isInArray } from "../utils/is-in-array"; +import { addArrayMethodsToITC, addArrayMethodsToITC2 } from "./array-methods"; +import { addGlobalNodeFields } from "./create-global-nodes"; +import createRelationshipFields, { + createRelationshipFieldsFromConcreteEntityAdapter, +} from "./create-relationship-fields/create-relationship-fields"; +import getNodes from "./get-nodes"; +import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; +import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; +import { addMathOperatorsToITC } from "./math"; +import { + getSchemaConfigurationFlags, + schemaConfigurationFromObjectTypeDefinition, + schemaConfigurationFromSchemaExtensions, +} from "./schema-configuration"; +import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; + +function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { + return "name" in x; +} + +class SchemaGeneratorModel { + // contains type names for now + static createInfoTypeName: string; + static updateInfoTypeName: string; + static deleteInfoTypeName: string; + static pageInfoTypeName: string; + static { + this.createInfoTypeName = "CreateInfo"; + this.updateInfoTypeName = "UpdateInfo"; + this.deleteInfoTypeName = "DeleteInfo"; + this.pageInfoTypeName = "PageInfo"; + } +} + +class AugmentedSchemaGenerator { + private composer: SchemaComposer; + + constructor( + private schemaModel: Neo4jGraphQLSchemaModel, + private definitionNodes: DefinitionNodes, + private rootTypesCustomResolvers: ObjectTypeDefinitionNode[] + ) { + this.composer = new SchemaComposer(); + } + + generate() { + let pointInTypeDefs = false; + let cartesianPointInTypeDefs = false; + let floatWhereInTypeDefs = false; + + for (const entity of this.schemaModel.entities.values()) { + const model = + entity instanceof ConcreteEntity + ? new ConcreteEntityAdapter(entity) + : entity instanceof InterfaceEntity + ? new InterfaceEntityAdapter(entity) + : new UnionEntityAdapter(entity as UnionEntity); // fixme + + // TODO: check if these can be created ad-hoc + if (model instanceof ConcreteEntityAdapter || model instanceof InterfaceEntityAdapter) { + for (const attribute of model.attributes.values()) { + if (attribute.isPoint()) { + pointInTypeDefs = true; + } + if (attribute.isCartesianPoint()) { + cartesianPointInTypeDefs = true; + } + } + if ("annotations" in model && model.annotations.fulltext) { + floatWhereInTypeDefs = true; + } + if (model instanceof ConcreteEntityAdapter) { + for (const relationship of model.relationships.values()) { + for (const attribute of relationship.attributes.values()) { + if (attribute.isPoint()) { + pointInTypeDefs = true; + } + if (attribute.isCartesianPoint()) { + cartesianPointInTypeDefs = true; + } + } + } + } + } + } + + // this.pipeDefs(); + this.addToComposer(this.getStaticTypes()); + this.addToComposer(this.getSpatialTypes(pointInTypeDefs, cartesianPointInTypeDefs)); + this.addToComposer(this.getTemporalTypes(floatWhereInTypeDefs)); + + // this.add(this.getEntityTypes()); + // const relationshipPropertiesTypes = this.getRelationshipProperties( + // this._definitionCollection.relationshipProperties + // ); + // this.add(relationshipPropertiesTypes); + + return this.composer; + } + + private pipeDefs() { + const pipedDefs = [ + ...this.definitionNodes.enumTypes, + ...this.definitionNodes.scalarTypes, + ...this.definitionNodes.inputObjectTypes, + ...this.definitionNodes.unionTypes, + ...this.definitionNodes.directives, + ...this.rootTypesCustomResolvers, + ].filter(Boolean); + if (pipedDefs.length) { + this.composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); + } + } + + private getStaticTypes() { + return { + objects: [CreateInfo, DeleteInfo, UpdateInfo, PageInfo], + inputs: [QueryOptions], + enums: [SortDirection], + scalars: Object.values(Scalars), + }; + } + + private getSpatialTypes( + pointInTypeDefs: boolean, + cartesianPointInTypeDefs: boolean + ): { + objects: GraphQLObjectType[]; + inputs: GraphQLInputObjectType[]; + } { + const objects: GraphQLObjectType[] = []; + const inputs: GraphQLInputObjectType[] = []; + if (pointInTypeDefs) { + objects.push(Point); + inputs.push(PointInput, PointDistance); + } + if (cartesianPointInTypeDefs) { + objects.push(CartesianPoint); + inputs.push(CartesianPointInput, CartesianPointDistance); + } + return { + objects, + inputs, + }; + } + + private getTemporalTypes(floatWhereInTypeDefs: boolean): { + inputs: GraphQLInputObjectType[]; + } { + const inputs: GraphQLInputObjectType[] = []; + if (floatWhereInTypeDefs) { + inputs.push(FloatWhere); + } + return { + inputs, + }; + } + + /* + private addGlobalNodeFields(concreteEntities: ConcreteEntity[], nodes: Node[]) { + const globalEntities = concreteEntities.filter((entity) => { + const model = new ConcreteEntityAdapter(entity); + return model.isGlobalNode(); + }); + const globalNodes = nodes.filter((n) => globalEntities.find((e) => e.name === n.name)); + + const fetchById = (id: string, context: Context, info: GraphQLResolveInfo) => { + const resolver = globalNodeResolver({ nodes: globalNodes }); + return resolver.resolve(null, { id }, context, info); + }; + + const resolveType = (obj: { [key: string]: unknown; __resolveType: string }) => obj.__resolveType; + + const { nodeInterface, nodeField } = nodeDefinitions(fetchById, resolveType); + + this._composer.createInterfaceTC(nodeInterface); + this._composer.Query.addFields({ + node: nodeField as ObjectTypeComposerFieldConfigAsObjectDefinition, + }); + } + + // TODO: alternatively, get these from Entity.Relationship + private getRelationshipProperties(relationshipPropertiesInterface: CompositeEntity) { + new ToComposer(relationshipPropertiesInterface) + .withInterfaceType() + .withSortInputType() + .withWhereInputType({ enabledFeatures }) + .withUpdateInputType({ addMathOperators: true, addArrayMethods: true }) + .withCreateInputType() + .build(this._composer); + } + + private getEntityTypes() { + // TODO: consider Factory + this.schemaModel.concreteEntities.forEach((concreteEntity) => { + new ToComposer(concreteEntity) + .withObjectType() + .withSortInputType() + .withWhereInputType({ enabledFeatures }) + .withUpdateInputType({ addMathOperators: true, addArrayMethods: true }) + .withCreateInputType() + .build(this._composer); + }); + } + +*/ + private addToComposer({ + objects = [], + inputs = [], + enums = [], + scalars = [], + interfaces = [], + }: { + objects?: GraphQLObjectType[]; + inputs?: GraphQLInputObjectType[]; + enums?: GraphQLEnumType[]; + scalars?: GraphQLScalarType[]; + interfaces?: GraphQLInterfaceType[]; + }) { + objects.forEach((x) => this.composer.createObjectTC(x)); + inputs.forEach((x) => this.composer.createInputTC(x)); + enums.forEach((x) => this.composer.createEnumTC(x)); + interfaces.forEach((x) => this.composer.createInterfaceTC(x)); + scalars.forEach((scalar) => this.composer.addTypeDefs(`scalar ${scalar.name}`)); + } +} + +// abstract ComposerBuilder +// ConcreteEntityBuilder extends ComposerBuilder +// CompositeEntityBuilder extends ComposerBuilder + +/* +class ToComposer { + _entity: ConcreteEntity | CompositeEntity; + _entityModel: ConcreteEntityAdapter | CompositeEntityAdapter; + _ts: TypeStorage; + + constructor(fromEntity: ConcreteEntity | CompositeEntity) { + this._entity = fromEntity; + this._entityModel = + this._entity instanceof ConcreteEntity + ? new ConcreteEntityAdapter(this._entity) + : new CompositeEntityAdapter(this._entity); + this._ts = new TypeStorage(); + } + + public withInterfaceType() { + // this._tempComposer.add(InterfaceTypeComposer.createTemp(this._currentType)); + this._ts.set( + this._entity.name, + InterfaceTypeComposer.createTemp({ + name: this._entity.name, + fields: ToComposer._attributesToComposeFields(Array.from(this._entityModel.attributes.values())), + }) + ); + return this; + } + + public withObjectType() { + this._ts.set( + this._entity.name, + ObjectTypeComposer.createTemp({ + name: this._entity.name, + fields: ToComposer._attributesToComposeFields(Array.from(this._entityModel.attributes.values())), + // TODO: add description field + // description: this._entity.description, + // TODO: discuss with Simone - create an AnnotationAdapter or logic straight in AttributeAdapter + // directives: graphqlDirectivesToCompose([...node.otherDirectives, ...node.propagatedDirectives]), + // TODO: discuss with Simone - add interfaces to ConcreteEntity + // interfaces: this._entity.interfaces.map((x) => x.name.value) + }) + ); + return this; + } + + public withSortInputType() { + const sortTypeName = `${this._entity.name}Sort`; + const currentType = this._ts.get(this._entity.name); + this._ts.set( + sortTypeName, + InputTypeComposer.createTemp({ + name: sortTypeName, + fields: currentType.getFieldNames().reduce((res, f) => { + return { ...res, [f]: "SortDirection" }; + }, {}), + }) + ); + return this; + } + + public withWhereInputType({ enabledFeatures }) { + const whereTypeName = `${this._entity.name}Where`; + this._ts.set( + whereTypeName, + InputTypeComposer.createTemp({ + name: whereTypeName, + fields: ToComposer._attributesToComposeFields(this._entityModel.getCreateInputTypeFields()), + // TODO: refactor getWhereFields + // getWhereFields({ typeName: relationship.name.value, fields: adapter.getWhereInputTypeFields(), enabledFeatures: features.filters }) + }) + ); + return this; + } + + public withUpdateInputType({ addMathOperators = true, addArrayMethods = true }) { + const updateTypeName = `${this._entity.name}UpdateInput`; + const updateInput = InputTypeComposer.createTemp({ + name: updateTypeName, + fields: ToComposer._attributesToComposeFields(this._entityModel.getUpdateInputTypeFields()), + }); + addMathOperators && addMathOperatorsToITC(updateInput); + addArrayMethods && addArrayMethodsToITC(updateInput, relFields.primitiveFields); + addArrayMethods && addArrayMethodsToITC(updateInput, relFields.pointFields); + this._ts.set(updateTypeName, updateInput); + + return this; + + // TODO: add these + // addMathOperatorsToITC(relationshipUpdateITC); + // addArrayMethodsToITC(relationshipUpdateITC, relFields.primitiveFields); + // addArrayMethodsToITC(relationshipUpdateITC, relFields.pointFields); + } + + public withCreateInputType() { + const createTypeName = `${this._entity.name}CreateInput`; + this._ts.set( + createTypeName, + InputTypeComposer.createTemp({ + name: createTypeName, + fields: ToComposer._attributesToComposeFields(this._entityModel.getCreateInputTypeFields()), + }) + ); + + return this; + } + + public build(_composer: SchemaComposer) { + // _composer.createInterfaceTC(x); + + this._ts.forEach((v) => { + _composer.add(v); + }); + + // _composer.merge(t); + } + + // ==== to compose + + private static _attributesToComposeFields(attributes: AttributeAdapter[]): { + [k: string]: ObjectTypeComposerFieldConfigAsObjectDefinition; + } { + return attributes.reduce((res, model) => { + if (!model.isReadable()) { + return res; + } + + const newField: ObjectTypeComposerFieldConfigAsObjectDefinition = { + type: model.type.getPretty(), + args: {}, + description: model.description, + }; + + if (Object.keys(model.getPropagatedAnnotations()).length) { + newField.directives = this._graphqlDirectivesToCompose(model.getPropagatedAnnotations()); + } + + if (["Int", "Float"].includes(model.type.getName())) { + newField.resolve = numericalResolver; + } + + if (model.type.getName() === "ID") { + newField.resolve = idResolver; + } + + if (model.attributeArguments) { + newField.args = this._graphqlArgsToCompose(model.attributeArguments); + } + + return { ...res, [model.name]: newField }; + }, {}); + } + + // TODO: add arguments on annotations + private static _graphqlDirectivesToCompose(annotations: Partial): Directive[] { + return Object.entries(annotations).map(([, annotation]) => ({ + args: (annotation.arguments || [])?.reduce( + (r: DirectiveArgs, d) => ({ ...r, [d.name.value]: parseValueNode(d.value) }), + {} + ), + name: annotation.name, + })); + } + + // TODO: check on Arguments class + private static _graphqlArgsToCompose(args: InputValue[]) { + return args.reduce((res, arg) => { + return { + ...res, + [arg.name]: { + type: arg.type.getPretty(), + description: arg.description, + ...(arg.defaultValue ? { defaultValue: arg.defaultValue } : {}), + }, + }; + }, {}); + } +} +*/ + +function makeAugmentedSchema( + document: DocumentNode, + { + features, + generateSubscriptions, + userCustomResolvers, + subgraph, + }: { + features?: Neo4jFeaturesSettings; + generateSubscriptions?: boolean; + userCustomResolvers?: IResolvers | Array; + subgraph?: Subgraph; + } = {}, + schemaModel: Neo4jGraphQLSchemaModel +): { + nodes: Node[]; + relationships: Relationship[]; + typeDefs: DocumentNode; + resolvers: IResolvers; +} { + const composer = new SchemaComposer(); + const callbacks = features?.populatedBy?.callbacks; + + let relationships: Relationship[] = []; + + const definitionNodes = getDefinitionNodes(document); + const customResolvers = getCustomResolvers(document); + const { + interfaceTypes, + scalarTypes, + objectTypes, + enumTypes, + // inputObjectTypes, + // directives, + unionTypes, + schemaExtensions, + } = definitionNodes; + + // TODO: use schemaModel.definitionCollection instead of definitionNodes? need to add inputObjectTypes and customResolvers + const schemaGenerator = new AugmentedSchemaGenerator( + schemaModel, + definitionNodes, + [customResolvers.customQuery, customResolvers.customMutation, customResolvers.customSubscription].filter( + (x): x is ObjectTypeDefinitionNode => Boolean(x) + ) + ); + const generatorComposer = schemaGenerator.generate(); + composer.merge(generatorComposer); + + // TODO: move these to SchemaGenerator once nodes are moved (in the meantime references to object types are causing errors because they are not present in the generated schema) + const pipedDefs = [ + ...definitionNodes.enumTypes, + ...definitionNodes.scalarTypes, + ...definitionNodes.inputObjectTypes, + ...definitionNodes.unionTypes, + ...definitionNodes.directives, + ...[customResolvers.customQuery, customResolvers.customMutation, customResolvers.customSubscription].filter( + (x): x is ObjectTypeDefinitionNode => Boolean(x) + ), + ].filter(Boolean); + if (pipedDefs.length) { + composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); + } + + // """createSomething""" + + // TODO: move deprecationMap out to separate file eventually + const deprecationMap = new Map< + string, + { + field: string; + reason: string; + deprecatedFromVersion: string; + toBeRemovedInVersion: string; + }[] + >([ + [ + SchemaGeneratorModel.createInfoTypeName, + [ + { + field: "bookmark", + reason: "This field has been deprecated because bookmarks are now handled by the driver.", + deprecatedFromVersion: "", + toBeRemovedInVersion: "", + }, + ], + ], + [ + SchemaGeneratorModel.updateInfoTypeName, + [ + { + field: "bookmark", + reason: "This field has been deprecated because bookmarks are now handled by the driver.", + deprecatedFromVersion: "", + toBeRemovedInVersion: "", + }, + ], + ], + [ + SchemaGeneratorModel.deleteInfoTypeName, + [ + { + field: "bookmark", + reason: "This field has been deprecated because bookmarks are now handled by the driver.", + deprecatedFromVersion: "", + toBeRemovedInVersion: "", + }, + ], + ], + ]); + + // Loop over all entries in the deprecation map and add field deprecations to all types in the map. + for (const [typeName, deprecatedFields] of deprecationMap) { + const typeComposer = composer.getOTC(typeName); + typeComposer.deprecateFields( + deprecatedFields.reduce((acc, { field, reason }) => ({ ...acc, [field]: reason }), {}) + ); + } + + // TODO: ideally move these in getSubgraphSchema() + if (subgraph) { + const shareable = subgraph.getFullyQualifiedDirectiveName("shareable"); + [ + SchemaGeneratorModel.createInfoTypeName, + SchemaGeneratorModel.updateInfoTypeName, + SchemaGeneratorModel.deleteInfoTypeName, + SchemaGeneratorModel.pageInfoTypeName, + ].forEach((typeName) => { + const typeComposer = composer.getOTC(typeName); + typeComposer.setDirectiveByName(shareable); + }); + } + + const aggregationTypesMapper = new AggregationTypesMapper(composer, subgraph); + + const globalSchemaConfiguration = schemaConfigurationFromSchemaExtensions(schemaExtensions); + + const getNodesResult = getNodes(definitionNodes, { callbacks, userCustomResolvers }); + + const { nodes, relationshipPropertyInterfaceNames, interfaceRelationshipNames } = getNodesResult; + + // graphql-compose will break if the Point and CartesianPoint types are created but not used, + // because it will purge the unused types but leave behind orphaned field resolvers + // + // These are flags to check whether the types are used and then create them if they are + // let { pointInTypeDefs, cartesianPointInTypeDefs } = getNodesResult; + + const hasGlobalNodes = addGlobalNodeFields(nodes, composer); + + const { relationshipProperties, interfaceRelationships, filteredInterfaceTypes } = filterInterfaceTypes( + interfaceTypes, + relationshipPropertyInterfaceNames, + interfaceRelationshipNames + ); + + const relationshipFields = new Map(); + const interfaceCommonFields = new Map(); + + relationshipProperties.forEach((relationship) => { + // const authDirective = (relationship.directives || []).find((x) => + // ["auth", "authorization", "authentication"].includes(x.name.value) + // ); + // if (authDirective) { + // throw new Error("Cannot have @auth directive on relationship properties interface"); + // } + + // relationship.fields?.forEach((field) => { + // constants.RESERVED_INTERFACE_FIELDS.forEach(([fieldName, message]) => { + // if (field.name.value === fieldName) { + // throw new Error(message); + // } + // }); + + // const forbiddenDirectives = ["auth", "authorization", "authentication", "relationship", "cypher"]; + // forbiddenDirectives.forEach((directive) => { + // const found = (field.directives || []).find((x) => x.name.value === directive); + // if (found) { + // throw new Error(`Cannot have @${directive} directive on relationship property`); + // } + // }); + // }); + + const relFields = getObjFieldMeta({ + enums: enumTypes, + interfaces: filteredInterfaceTypes, + objects: objectTypes, + scalars: scalarTypes, + unions: unionTypes, + obj: relationship, + callbacks, + }); + + relationshipFields.set(relationship.name.value, relFields); + + const baseFields: BaseField[][] = Object.values(relFields); + + const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); + + const propertiesInterface = composer.createInterfaceTC({ + name: relationship.name.value, + fields: objectComposeFields, + }); + + composer.createInputTC({ + name: `${relationship.name.value}Sort`, + fields: propertiesInterface.getFieldNames().reduce((res, f) => { + return { ...res, [f]: "SortDirection" }; + }, {}), + }); + + const relationshipUpdateITC = composer.createInputTC({ + name: `${relationship.name.value}UpdateInput`, + fields: objectFieldsToUpdateInputFields([ + ...relFields.primitiveFields.filter( + (field) => !field.autogenerate && !field.readonly && !field.callback + ), + ...relFields.scalarFields, + ...relFields.enumFields, + ...relFields.temporalFields.filter((field) => !field.timestamps), + ...relFields.pointFields, + ]), + }); + + addMathOperatorsToITC(relationshipUpdateITC); + + addArrayMethodsToITC(relationshipUpdateITC, relFields.primitiveFields); + addArrayMethodsToITC(relationshipUpdateITC, relFields.pointFields); + + const relationshipWhereFields = getWhereFields({ + typeName: relationship.name.value, + fields: { + scalarFields: relFields.scalarFields, + enumFields: relFields.enumFields, + temporalFields: relFields.temporalFields, + pointFields: relFields.pointFields, + primitiveFields: relFields.primitiveFields, + }, + features, + }); + + composer.createInputTC({ + name: `${relationship.name.value}Where`, + fields: relationshipWhereFields, + }); + + composer.createInputTC({ + name: `${relationship.name.value}CreateInput`, + fields: objectFieldsToCreateInputFields([ + ...relFields.primitiveFields.filter((field) => !field.autogenerate && !field.callback), + ...relFields.scalarFields, + ...relFields.enumFields, + ...relFields.temporalFields, + ...relFields.pointFields, + ]), + }); + }); + + interfaceRelationships.forEach((interfaceRelationship) => { + const implementations = objectTypes.filter((n) => + n.interfaces?.some((i) => i.name.value === interfaceRelationship.name.value) + ); + + const interfaceFields = getObjFieldMeta({ + enums: enumTypes, + interfaces: [...filteredInterfaceTypes, ...interfaceRelationships], + objects: objectTypes, + scalars: scalarTypes, + unions: unionTypes, + obj: interfaceRelationship, + callbacks, + }); + + const baseFields: BaseField[][] = Object.values(interfaceFields); + const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); + + const composeInterface = composer.createInterfaceTC({ + name: interfaceRelationship.name.value, + fields: objectComposeFields, + }); + + interfaceCommonFields.set(interfaceRelationship.name.value, interfaceFields); + + const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceRelationship.name.value}Options`, (tc) => { + tc.addFields({ + limit: "Int", + offset: "Int", + }); + }); + + const interfaceSortableFields = getSortableFields(interfaceFields).reduce( + (res, f) => ({ + ...res, + [f.fieldName]: { + type: "SortDirection", + directives: graphqlDirectivesToCompose( + f.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) + ), + }, + }), + {} + ); + + if (Object.keys(interfaceSortableFields).length) { + const interfaceSortInput = composer.getOrCreateITC(`${interfaceRelationship.name.value}Sort`, (tc) => { + tc.addFields(interfaceSortableFields); + tc.setDescription( + `Fields to sort ${pluralize( + interfaceRelationship.name.value + )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceRelationship.name.value}Sort`} object.` + ); + }); + + interfaceOptionsInput.addFields({ + sort: { + description: `Specify one or more ${`${interfaceRelationship.name.value}Sort`} objects to sort ${pluralize( + interfaceRelationship.name.value + )} by. The sorts will be applied in the order in which they are arranged in the array.`, + type: interfaceSortInput.List, + }, + }); + } + + const interfaceWhereFields = getWhereFields({ + typeName: interfaceRelationship.name.value, + fields: { + scalarFields: interfaceFields.scalarFields, + enumFields: interfaceFields.enumFields, + temporalFields: interfaceFields.temporalFields, + pointFields: interfaceFields.pointFields, + primitiveFields: interfaceFields.primitiveFields, + }, + isInterface: true, + features, + }); + + const [ + implementationsConnectInput, + implementationsDeleteInput, + implementationsDisconnectInput, + implementationsUpdateInput, + implementationsWhereInput, + ] = ["ConnectInput", "DeleteInput", "DisconnectInput", "UpdateInput", "Where"].map((suffix) => + composer.createInputTC({ + name: `${interfaceRelationship.name.value}Implementations${suffix}`, + fields: {}, + }) + ) as [InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer]; + + composer.createInputTC({ + name: `${interfaceRelationship.name.value}Where`, + fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, + }); + + const interfaceCreateInput = composer.createInputTC(`${interfaceRelationship.name.value}CreateInput`); + + const interfaceRelationshipITC = composer.getOrCreateITC( + `${interfaceRelationship.name.value}UpdateInput`, + (tc) => { + tc.addFields({ + ...objectFieldsToUpdateInputFields([ + ...interfaceFields.primitiveFields, + ...interfaceFields.scalarFields, + ...interfaceFields.enumFields, + ...interfaceFields.temporalFields.filter((field) => !field.timestamps), + ...interfaceFields.pointFields, + ]), + _on: implementationsUpdateInput, + }); + } + ); + + addMathOperatorsToITC(interfaceRelationshipITC); + + createRelationshipFields({ + relationshipFields: interfaceFields.relationFields, + schemaComposer: composer, + composeNode: composeInterface, + sourceName: interfaceRelationship.name.value, + nodes, + relationshipPropertyFields: relationshipFields, + subgraph, + }); + + relationships = [ + ...relationships, + ...createConnectionFields({ + connectionFields: interfaceFields.connectionFields, + schemaComposer: composer, + composeNode: composeInterface, + sourceName: interfaceRelationship.name.value, + nodes, + relationshipPropertyFields: relationshipFields, + }), + ]; + + implementations.forEach((implementation) => { + const node = nodes.find((n) => n.name === implementation.name.value) as Node; + + implementationsWhereInput.addFields({ + [implementation.name.value]: { + type: `${implementation.name.value}Where`, + }, + }); + + if (node.relationFields.length) { + implementationsConnectInput.addFields({ + [implementation.name.value]: { + type: `[${implementation.name.value}ConnectInput!]`, + }, + }); + + implementationsDeleteInput.addFields({ + [implementation.name.value]: { + type: `[${implementation.name.value}DeleteInput!]`, + }, + }); + + implementationsDisconnectInput.addFields({ + [implementation.name.value]: { + type: `[${implementation.name.value}DisconnectInput!]`, + }, + }); + } + + interfaceCreateInput.addFields({ + [implementation.name.value]: { + type: `${implementation.name.value}CreateInput`, + }, + }); + + implementationsUpdateInput.addFields({ + [implementation.name.value]: { + type: `${implementation.name.value}UpdateInput`, + }, + }); + }); + + if (implementationsConnectInput.getFieldNames().length) { + const interfaceConnectInput = composer.getOrCreateITC( + `${interfaceRelationship.name.value}ConnectInput`, + (tc) => { + tc.addFields({ _on: implementationsConnectInput }); + } + ); + interfaceConnectInput.setField("_on", implementationsConnectInput); + } + + if (implementationsDeleteInput.getFieldNames().length) { + const interfaceDeleteInput = composer.getOrCreateITC( + `${interfaceRelationship.name.value}DeleteInput`, + (tc) => { + tc.addFields({ _on: implementationsDeleteInput }); + } + ); + interfaceDeleteInput.setField("_on", implementationsDeleteInput); + } + + if (implementationsDisconnectInput.getFieldNames().length) { + const interfaceDisconnectInput = composer.getOrCreateITC( + `${interfaceRelationship.name.value}DisconnectInput`, + (tc) => { + tc.addFields({ _on: implementationsDisconnectInput }); + } + ); + interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); + } + + ensureNonEmptyInput(composer, `${interfaceRelationship.name.value}CreateInput`); + ensureNonEmptyInput(composer, `${interfaceRelationship.name.value}UpdateInput`); + [ + implementationsConnectInput, + implementationsDeleteInput, + implementationsDisconnectInput, + implementationsUpdateInput, + implementationsWhereInput, + ].forEach((c) => ensureNonEmptyInput(composer, c)); + }); + + nodes.forEach((node) => { + const concreteEntity = schemaModel.getEntity(node.name) as ConcreteEntity; + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); + + // We wanted to get the userDefinedDirectives + const definitionNode = definitionNodes.objectTypes.find( + (type) => type.name.value === concreteEntityAdapter.name + ); + if (!definitionNode) { + console.error(`Definition node not found for ${concreteEntityAdapter.name}`); + return; + } + + const userDefinedFieldDirectives = new Map(); + for (const field of definitionNode.fields || []) { + if (!field.directives) { + return; + } + + const matched = field.directives.filter((directive) => !isInArray(FIELD_DIRECTIVES, directive.name.value)); + if (matched.length) { + userDefinedFieldDirectives.set(field.name.value, matched); + } + } + + const nodeFields = concreteEntityToComposeFields( + concreteEntityAdapter.objectFields, + userDefinedFieldDirectives + ); + + const userDefinedObjectDirectives = + definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; + + const propagatedDirectives = + definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || + []; + + const composeNode = composer.createObjectTC({ + name: concreteEntity.name, + fields: nodeFields, + description: concreteEntityAdapter.description, + directives: graphqlDirectivesToCompose([...userDefinedObjectDirectives, ...propagatedDirectives]), + interfaces: definitionNode.interfaces?.map((x) => x.name.value), // TODO: we need to get the interfaces from somewhere else? + }); + + if (concreteEntityAdapter.isGlobalNode()) { + composeNode.setField("id", { + type: new GraphQLNonNull(GraphQLID), + resolve: (src) => { + const field = concreteEntityAdapter.globalIdField.name; + const value = src[field] as string | number; + return concreteEntityAdapter.toGlobalId(value.toString()); + }, + }); + + composeNode.addInterface("Node"); + } + + const sortFields = concreteEntityAdapter.sortableFields.reduce( + (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { + // TODO: make a nicer way of getting these user defined field directives + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; + return { + ...res, + [attributeAdapter.name]: { + type: "SortDirection", + directives: graphqlDirectivesToCompose( + userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) + ), + }, + }; + }, + {} + ); + + if (Object.keys(sortFields).length) { + const sortInput = composer.createInputTC({ + name: concreteEntityAdapter.operations.sortInputTypeName, + fields: sortFields, + description: `Fields to sort ${concreteEntityAdapter.upperFirstPlural} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${concreteEntityAdapter.operations.sortInputTypeName} object.`, + }); + + composer.createInputTC({ + name: concreteEntityAdapter.operations.optionsInputTypeName, + fields: { + sort: { + description: `Specify one or more ${concreteEntityAdapter.operations.sortInputTypeName} objects to sort ${concreteEntityAdapter.upperFirstPlural} by. The sorts will be applied in the order in which they are arranged in the array.`, + type: sortInput.NonNull.List, + }, + limit: "Int", + offset: "Int", + }, + }); + } else { + composer.createInputTC({ + name: concreteEntityAdapter.operations.optionsInputTypeName, + fields: { limit: "Int", offset: "Int" }, + }); + } + + composer.createObjectTC({ + name: concreteEntityAdapter.operations.aggregateTypeNames.selection, + fields: { + count: { + type: "Int!", + resolve: numericalResolver, + args: {}, + }, + ...concreteEntityAdapter.aggregableFields.reduce((res, field) => { + const objectTypeComposer = aggregationTypesMapper.getAggregationType({ + fieldName: field.getTypeName(), + nullable: !field.isRequired(), + }); + + if (objectTypeComposer) { + res[field.name] = objectTypeComposer.NonNull; + } + + return res; + }, {}), + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); + + // START WHERE FIELD ------------------- + + const queryFields = getWhereFieldsFromConcreteEntity({ + concreteEntityAdapter, + userDefinedFieldDirectives, + features, + }); + + composer.createInputTC({ + name: concreteEntityAdapter.operations.whereInputTypeName, + fields: concreteEntityAdapter.isGlobalNode() ? { id: "ID", ...queryFields } : queryFields, + }); + + // TODO: Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model + augmentFulltextSchema(node, composer, concreteEntityAdapter); + + composer.createInputTC({ + name: `${concreteEntityAdapter.name}UniqueWhere`, + fields: concreteEntityAdapter.uniqueFields.reduce((res, field) => { + return { + [field.name]: field.getFieldTypeName(), + ...res, + }; + }, {}), + }); + + // END WHERE FIELD ------------------- + + composer.createInputTC({ + name: concreteEntityAdapter.operations.createInputTypeName, + fields: concreteEntityToCreateInputFields( + concreteEntityAdapter.createInputFields, + userDefinedFieldDirectives + ), + }); + + const nodeUpdateITC = composer.createInputTC({ + name: concreteEntityAdapter.operations.updateMutationArgumentNames.update, + fields: concreteEntityToUpdateInputFields( + concreteEntityAdapter.updateInputFields, + userDefinedFieldDirectives + ), + }); + + addMathOperatorsToITC(nodeUpdateITC); + + addArrayMethodsToITC2(nodeUpdateITC, concreteEntityAdapter.arrayMethodFields); + + composer.createObjectTC({ + name: concreteEntityAdapter.operations.mutationResponseTypeNames.create, + fields: { + info: `CreateInfo!`, + [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); + + composer.createObjectTC({ + name: concreteEntityAdapter.operations.mutationResponseTypeNames.update, + fields: { + info: `UpdateInfo!`, + [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); + + // createRelationshipFields({ + // relationshipFields: node.relationFields, + // concreteEntityAdapter, + // schemaComposer: composer, + // composeNode, + // sourceName: concreteEntityAdapter.name, + // nodes, + // relationshipPropertyFields: relationshipFields, + // subgraph, + // }); + + createRelationshipFieldsFromConcreteEntityAdapter({ + concreteEntityAdapter, + schemaComposer: composer, + composeNode, + // sourceName: concreteEntityAdapter.name, + // relationshipPropertyFields: relationshipFields, + subgraph, + userDefinedFieldDirectives, + }); + + relationships = [ + ...relationships, + ...createConnectionFields({ + connectionFields: node.connectionFields, + schemaComposer: composer, + composeNode, + sourceName: concreteEntityAdapter.name, + nodes, + relationshipPropertyFields: relationshipFields, + }), + ]; + + ensureNonEmptyInput(composer, concreteEntityAdapter.operations.updateInputTypeName); + ensureNonEmptyInput(composer, concreteEntityAdapter.operations.createInputTypeName); + + // TODO: move this somewhere in the schema generator initialisation? + const schemaConfiguration = schemaConfigurationFromObjectTypeDefinition(definitionNode); + + const schemaConfigurationFlags = getSchemaConfigurationFlags({ + globalSchemaConfiguration, + nodeSchemaConfiguration: schemaConfiguration, + // TODO: Check if this is deprecated now + // excludeDirective: node.exclude, + }); + + if (schemaConfigurationFlags.read) { + composer.Query.addFields({ + [concreteEntityAdapter.operations.rootTypeFieldNames.read]: findResolver({ + node, + concreteEntityAdapter, + }), + }); + composer.Query.setFieldDirectives( + concreteEntityAdapter.operations.rootTypeFieldNames.read, + graphqlDirectivesToCompose(propagatedDirectives) + ); + composer.Query.addFields({ + [`${concreteEntityAdapter.plural}Connection`]: rootConnectionResolver({ + node, + composer, + concreteEntityAdapter, + propagatedDirectives, + }), + }); + composer.Query.setFieldDirectives( + `${concreteEntityAdapter.plural}Connection`, + graphqlDirectivesToCompose(propagatedDirectives) + ); + } + if (schemaConfigurationFlags.aggregate) { + composer.Query.addFields({ + [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver({ + node, + concreteEntityAdapter, + }), + }); + composer.Query.setFieldDirectives( + concreteEntityAdapter.operations.rootTypeFieldNames.aggregate, + graphqlDirectivesToCompose(propagatedDirectives) + ); + } + + if (schemaConfigurationFlags.create) { + composer.Mutation.addFields({ + [concreteEntityAdapter.operations.rootTypeFieldNames.create]: createResolver({ + node, + concreteEntityAdapter, + }), + }); + composer.Mutation.setFieldDirectives( + concreteEntityAdapter.operations.rootTypeFieldNames.create, + graphqlDirectivesToCompose(propagatedDirectives) + ); + } + + if (schemaConfigurationFlags.delete) { + composer.Mutation.addFields({ + [concreteEntityAdapter.operations.rootTypeFieldNames.delete]: deleteResolver({ + node, + composer, + concreteEntityAdapter, + }), + }); + composer.Mutation.setFieldDirectives( + concreteEntityAdapter.operations.rootTypeFieldNames.delete, + graphqlDirectivesToCompose(propagatedDirectives) + ); + } + + if (schemaConfigurationFlags.update) { + composer.Mutation.addFields({ + [concreteEntityAdapter.operations.rootTypeFieldNames.update]: updateResolver({ + node, + composer, + concreteEntityAdapter, + }), + }); + composer.Mutation.setFieldDirectives( + concreteEntityAdapter.operations.rootTypeFieldNames.update, + graphqlDirectivesToCompose(propagatedDirectives) + ); + } + }); + + unionTypes.forEach((union) => { + const unionEntity = schemaModel.getEntity(union.name.value); + if (unionEntity?.isCompositeEntity()) { + const fields = unionEntity.concreteEntities.reduce((f: Record, type) => { + return { ...f, [type.name]: `${type.name}Where` }; + }, {}); + + composer.createInputTC({ + name: `${unionEntity.name}Where`, + fields, + }); + } + }); + + if (generateSubscriptions && nodes.length) { + generateSubscriptionTypes({ + schemaComposer: composer, + nodes, + relationshipFields, + interfaceCommonFields, + globalSchemaConfiguration, + }); + } + + ["Mutation", "Query"].forEach((type) => { + const objectComposer: ObjectTypeComposer = composer[type]; + const cypherType: ObjectTypeDefinitionNode = customResolvers[`customCypher${type}`]; + + if (cypherType) { + const objectFields = getObjFieldMeta({ + obj: cypherType, + scalars: scalarTypes, + enums: enumTypes, + interfaces: filteredInterfaceTypes, + unions: unionTypes, + objects: objectTypes, + callbacks, + }); + + const objectComposeFields = objectFieldsToComposeFields([ + ...objectFields.enumFields, + ...objectFields.interfaceFields, + ...objectFields.primitiveFields, + ...objectFields.relationFields, + ...objectFields.scalarFields, + ...objectFields.unionFields, + ...objectFields.objectFields, + ...objectFields.temporalFields, + ]); + + objectComposer.addFields(objectComposeFields); + + objectFields.cypherFields.forEach((field) => { + const customResolver = cypherResolver({ + field, + statement: field.statement, + type: type as "Query" | "Mutation", + }); + + const composedField = objectFieldsToComposeFields([field])[field.fieldName]; + + objectComposer.addFields({ [field.fieldName]: { ...composedField, ...customResolver } }); + }); + } + }); + + filteredInterfaceTypes.forEach((inter) => { + const objectFields = getObjFieldMeta({ + obj: inter, + scalars: scalarTypes, + enums: enumTypes, + interfaces: filteredInterfaceTypes, + unions: unionTypes, + objects: objectTypes, + callbacks, + }); + + const baseFields: BaseField[][] = Object.values(objectFields); + const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); + + composer.createInterfaceTC({ + name: inter.name.value, + description: inter.description?.value, + fields: objectComposeFields, + directives: graphqlDirectivesToCompose( + (inter.directives || []).filter( + (x) => !["auth", "authorization", "authentication", "exclude"].includes(x.name.value) + ) + ), + }); + }); + + if (!Object.values(composer.Mutation.getFields()).length) { + composer.delete("Mutation"); + } + // TODO: why is this now needed? + if (!Object.values(composer.Subscription.getFields()).length) { + composer.delete("Subscription"); + } + + const generatedTypeDefs = composer.toSDL(); + + let parsedDoc = parse(generatedTypeDefs); + + const emptyObjectsInterfaces = parsedDoc.definitions + .filter( + (x): x is InterfaceTypeDefinitionNode | ObjectTypeDefinitionNode => + (x.kind === Kind.OBJECT_TYPE_DEFINITION && !isRootType(x)) || x.kind === Kind.INTERFACE_TYPE_DEFINITION + ) + .filter((x) => !x.fields?.length); + + if (emptyObjectsInterfaces.length) { + throw new Error( + `Objects and Interfaces must have one or more fields: ${emptyObjectsInterfaces + .map((x) => x.name.value) + .join(", ")}` + ); + } + + const documentNames = new Set(parsedDoc.definitions.filter(definitionNodeHasName).map((x) => x.name.value)); + const resolveMethods = getResolveAndSubscriptionMethods(composer); + + const generatedResolveMethods: Record = {}; + + for (const [key, value] of Object.entries(resolveMethods)) { + if (documentNames.has(key)) { + generatedResolveMethods[key] = value; + } + } + + const generatedResolvers = { + ...generatedResolveMethods, + ...Object.values(Scalars).reduce((res, scalar: GraphQLScalarType) => { + if (generatedTypeDefs.includes(`scalar ${scalar.name}\n`)) { + res[scalar.name] = scalar; + } + return res; + }, {}), + ...(hasGlobalNodes ? { Node: { __resolveType: (root) => root.__resolveType } } : {}), + }; + + unionTypes.forEach((union) => { + // It is possible to make union types "writeonly". In this case adding a resolver for them breaks schema generation. + const unionTypeInSchema = parsedDoc.definitions.find((def) => { + if (def.kind === Kind.UNION_TYPE_DEFINITION && def.name.value === union.name.value) return true; + return false; + }); + if (!generatedResolvers[union.name.value] && unionTypeInSchema) { + generatedResolvers[union.name.value] = { __resolveType: (root) => root.__resolveType }; + } + }); + + interfaceRelationships.forEach((i) => { + if (!generatedResolvers[i.name.value]) { + generatedResolvers[i.name.value] = { __resolveType: (root) => root.__resolveType }; + } + }); + + // do not propagate Neo4jGraphQL directives on schema extensions + const schemaExtensionsWithoutNeo4jDirectives = schemaExtensions.map((schemaExtension): SchemaExtensionNode => { + return { + kind: schemaExtension.kind, + loc: schemaExtension.loc, + operationTypes: schemaExtension.operationTypes, + directives: schemaExtension.directives?.filter( + (schemaDirective) => + !["query", "mutation", "subscription", "authentication"].includes(schemaDirective.name.value) + ), + }; + }); + const seen = {}; + parsedDoc = { + ...parsedDoc, + definitions: [ + ...parsedDoc.definitions.filter((definition) => { + // Filter out default scalars, they are not needed and can cause issues + if (definition.kind === Kind.SCALAR_TYPE_DEFINITION) { + if (["Boolean", "Float", "ID", "Int", "String"].includes(definition.name.value)) { + return false; + } + } + + if (!("name" in definition)) { + return true; + } + + const n = definition.name?.value as string; + + if (seen[n]) { + return false; + } + + seen[n] = n; + + return true; + }), + ...schemaExtensionsWithoutNeo4jDirectives, + ], + }; + + return { + nodes, + relationships, + typeDefs: parsedDoc, + resolvers: generatedResolvers, + }; +} + +export default makeAugmentedSchema; diff --git a/packages/graphql/src/schema/validation/schema-validation.test.ts b/packages/graphql/src/schema/validation/schema-validation.test.ts index 33c23b3450..8ff79bdca6 100644 --- a/packages/graphql/src/schema/validation/schema-validation.test.ts +++ b/packages/graphql/src/schema/validation/schema-validation.test.ts @@ -23,6 +23,7 @@ import { gql } from "graphql-tag"; import type { SDLValidationContext } from "graphql/validation/ValidationContext"; import { NoErrorThrownError, getError } from "../../../tests/utils/get-error"; import { Subgraph } from "../../classes/Subgraph"; +import { generateModel } from "../../schema-model/generate-model"; import makeAugmentedSchema from "../make-augmented-schema"; import { validateUserDefinition } from "./schema-validation"; @@ -45,7 +46,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -66,7 +68,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -86,7 +89,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -114,7 +118,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -134,7 +139,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -164,7 +170,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -185,7 +192,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -199,7 +207,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -219,7 +228,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -239,7 +249,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -253,7 +264,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); expect(errors).toHaveLength(1); @@ -288,7 +300,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); expect(errors).toHaveLength(1); @@ -323,7 +336,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); expect(errors).toHaveLength(1); @@ -358,7 +372,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); @@ -396,7 +411,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); @@ -434,7 +450,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); @@ -472,7 +489,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); @@ -510,7 +528,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -546,7 +565,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -579,9 +599,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -594,9 +619,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -614,9 +644,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -629,10 +664,15 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); + const schemaModel = generateModel(userDocument); // + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); + const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); // const errors = getError(executeValidate); expect(errors).toHaveLength(2); @@ -658,9 +698,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); @@ -676,9 +721,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -705,9 +755,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); @@ -721,10 +776,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -756,10 +815,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -779,10 +842,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -817,9 +884,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).toThrow( 'Directive "@subscriptionsAuthorization" may not be used on INTERFACE.' @@ -837,9 +909,14 @@ describe("schema validation", () => { extend type User @subscriptionsAuthorization(filter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -858,9 +935,14 @@ describe("schema validation", () => { extend type User @subscriptionsAuthorization(filter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -888,9 +970,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -918,9 +1005,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -942,9 +1034,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -970,9 +1067,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -993,9 +1095,14 @@ describe("schema validation", () => { extend type User @subscriptionsAuthorization(filter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1016,9 +1123,14 @@ describe("schema validation", () => { extend type User @subscriptionsAuthorization(wrongFilter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1046,10 +1158,14 @@ describe("schema validation", () => { @subscriptionsAuthorization(filter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1065,9 +1181,14 @@ describe("schema validation", () => { @subscriptionsAuthorization(wrongFilter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1104,9 +1225,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).toThrow( 'Directive "@subscriptionsAuthorization" may not be used on INTERFACE.' @@ -1143,9 +1269,14 @@ describe("schema validation", () => { @subscriptionsAuthorization(filter: [{ where: { node: { name: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1178,9 +1309,14 @@ describe("schema validation", () => { @subscriptionsAuthorization(filter: [{ where: { node: { name: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1217,10 +1353,14 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, @@ -1249,10 +1389,14 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, @@ -1281,10 +1425,14 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, @@ -1313,10 +1461,14 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, @@ -1358,10 +1510,14 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, @@ -1391,10 +1547,14 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); - + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, @@ -1429,7 +1589,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1442,7 +1603,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1460,7 +1622,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1473,7 +1636,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1493,7 +1657,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1516,7 +1681,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); @@ -1532,7 +1698,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1554,7 +1721,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); @@ -1568,7 +1736,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); @@ -1589,7 +1758,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1615,7 +1785,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); @@ -1636,7 +1807,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); @@ -1667,7 +1839,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1687,7 +1860,8 @@ describe("schema validation", () => { extend type User @authorization(filter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1706,7 +1880,8 @@ describe("schema validation", () => { extend type User @authorization(filter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1734,7 +1909,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1762,7 +1938,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1784,7 +1961,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1810,7 +1988,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1831,7 +2010,8 @@ describe("schema validation", () => { extend type User @authorization(filter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1852,7 +2032,8 @@ describe("schema validation", () => { extend type User @authorization(wrongFilter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1875,7 +2056,8 @@ describe("schema validation", () => { @authorization(filter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); @@ -1892,7 +2074,8 @@ describe("schema validation", () => { @authorization(wrongFilter: [{ where: { node: { id: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); expect(errors).toHaveLength(1); @@ -1922,7 +2105,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -1958,7 +2142,8 @@ describe("schema validation", () => { extend type Document @authorization(filter: [{ where: { node: { name: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -1987,7 +2172,8 @@ describe("schema validation", () => { extend type Document @authorization(filter: [{ where: { node: { name: "$jwt.sub" } } }]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); expect(errors).toHaveLength(1); @@ -2016,7 +2202,8 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2044,7 +2231,8 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2072,7 +2260,8 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2100,7 +2289,8 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2138,7 +2328,8 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2169,7 +2360,8 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2200,7 +2392,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); }); @@ -2219,7 +2412,8 @@ describe("schema validation", () => { } `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -2243,7 +2437,8 @@ describe("schema validation", () => { } `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -2256,7 +2451,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -2273,7 +2469,8 @@ describe("schema validation", () => { name: String! } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -2300,7 +2497,8 @@ describe("schema validation", () => { } `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); @@ -2320,7 +2518,8 @@ describe("schema validation", () => { } `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -2342,7 +2541,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); @@ -2356,7 +2556,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); @@ -2374,7 +2575,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -2400,7 +2602,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); expect(executeValidate).not.toThrow(); @@ -2421,7 +2624,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); @@ -2460,7 +2664,8 @@ describe("schema validation", () => { const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -2491,7 +2696,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -2519,7 +2725,8 @@ describe("schema validation", () => { const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -2554,7 +2761,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -2589,7 +2797,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -2618,7 +2827,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -2651,7 +2861,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -2672,7 +2883,8 @@ describe("schema validation", () => { extend type User @authentication(operations: [CREATE]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -2693,7 +2905,8 @@ describe("schema validation", () => { extend type User @authentication(ops: [CREATE]) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); @@ -2717,7 +2930,8 @@ describe("schema validation", () => { extend type User @plural(value: "Users") @authentication(operations: [CREATE], jwt: { sub: "test" }) `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); @@ -2732,7 +2946,8 @@ describe("schema validation", () => { extend type User @plural(value: "Users") @authentication(wrongField: { sub: "test" }) `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); const errors = getError(executeValidate); expect(errors).toHaveLength(1); @@ -2769,7 +2984,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); @@ -2815,7 +3031,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); expect(executeValidate).not.toThrow(); }); @@ -2851,7 +3068,8 @@ describe("schema validation", () => { `; const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument, jwt }); const errors = getError(executeValidate); expect(errors).toHaveLength(1); @@ -2884,7 +3102,8 @@ describe("schema validation", () => { const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2920,7 +3139,8 @@ describe("schema validation", () => { const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2956,7 +3176,8 @@ describe("schema validation", () => { const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -2985,7 +3206,8 @@ describe("schema validation", () => { `; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -3030,7 +3252,8 @@ describe("schema validation", () => { const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -3066,7 +3289,8 @@ describe("schema validation", () => { const jwt = parse(jwtType).definitions[0] as ObjectTypeDefinitionNode; const subgraph = new Subgraph(userDocument); const { directives, types } = subgraph.getValidationDefinitions(); - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -3094,7 +3318,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -3114,7 +3339,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ @@ -3128,9 +3354,9 @@ describe("schema validation", () => { const errors = getError(executeValidate); expect(errors).toHaveLength(2); expect(errors[0]).not.toBeInstanceOf(NoErrorThrownError); - expect(errors[0]).toHaveProperty("message", "Field cannot named keanu"); + expect(errors[0]).toHaveProperty("message", "Field cannot be named keanu"); expect(errors[1]).not.toBeInstanceOf(NoErrorThrownError); - expect(errors[1]).toHaveProperty("message", "Field cannot named keanu"); + expect(errors[1]).toHaveProperty("message", "Field cannot be named keanu"); }); }); @@ -3145,7 +3371,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3164,7 +3391,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3188,7 +3416,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3212,7 +3441,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3233,7 +3463,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3261,9 +3492,14 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, { - generateSubscriptions: true, - }); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema( + userDocument, + { + generateSubscriptions: true, + }, + schemaModel + ); const executeValidate = () => validateUserDefinition({ userDocument, augmentedDocument }); @@ -3284,7 +3520,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3310,7 +3547,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3341,7 +3579,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3383,7 +3622,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3413,7 +3653,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3432,7 +3673,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3457,7 +3699,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3482,7 +3725,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3503,7 +3747,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3529,7 +3774,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3555,7 +3801,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3595,7 +3842,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3638,7 +3886,8 @@ describe("schema validation", () => { } `; - const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument); + const schemaModel = generateModel(userDocument); + const { typeDefs: augmentedDocument } = makeAugmentedSchema(userDocument, {}, schemaModel); const executeValidate = () => validateUserDefinition({ userDocument, @@ -3673,7 +3922,7 @@ function noKeanuFields(context: SDLValidationContext): ASTVisitor { return { FieldDefinition(node: FieldDefinitionNode) { if (node.name.value === "keanu") { - context.reportError(new GraphQLError("Field cannot named keanu")); + context.reportError(new GraphQLError("Field cannot be named keanu")); } }, }; From 7caa8ac0cfb517c8161249c33dfa0f38e245d9e9 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:12:55 +0200 Subject: [PATCH 004/162] wip: add addArrayMethodsToITC2 --- packages/graphql/src/schema/array-methods.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/graphql/src/schema/array-methods.ts b/packages/graphql/src/schema/array-methods.ts index 74dd985867..0718facc4c 100644 --- a/packages/graphql/src/schema/array-methods.ts +++ b/packages/graphql/src/schema/array-methods.ts @@ -20,6 +20,7 @@ import { GraphQLInt } from "graphql"; import type { InputTypeComposer } from "graphql-compose"; import { SCALAR_TYPES } from "../constants"; +import type { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; import type { BaseField } from "../types"; export function addArrayMethodsToITC(itc: InputTypeComposer, fields: BaseField[]): void { @@ -35,3 +36,15 @@ export function addArrayMethodsToITC(itc: InputTypeComposer, fields: BaseField[] }); }); } + +export function addArrayMethodsToITC2(itc: InputTypeComposer, arrayMethodFields: AttributeAdapter[]): void { + // TODO: Did we need to consider the deprecated directives here? + // It wasn't done before + + arrayMethodFields.forEach((arrayField) => { + itc.addFields({ + [`${arrayField.name}_POP`]: GraphQLInt, + [`${arrayField.name}_PUSH`]: arrayField.getInputTypeNames().update.pretty, + }); + }); +} From 2c97f295f38163824838cdd87a61aac1a5d73c09 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:15:18 +0200 Subject: [PATCH 005/162] wip: update resolvers to use schema model --- .../src/schema/resolvers/mutation/create.ts | 52 ++++++++---- .../src/schema/resolvers/mutation/delete.ts | 25 ++++-- .../src/schema/resolvers/mutation/update.ts | 79 ++++++++++++------- .../src/schema/resolvers/query/aggregate.ts | 23 ++++-- .../src/schema/resolvers/query/read.ts | 27 ++++--- .../schema/resolvers/query/root-connection.ts | 49 +++++++----- .../authentication/check-authentication.ts | 8 +- 7 files changed, 169 insertions(+), 94 deletions(-) diff --git a/packages/graphql/src/schema/resolvers/mutation/create.ts b/packages/graphql/src/schema/resolvers/mutation/create.ts index 33e4b0d3db..d6331fedb2 100644 --- a/packages/graphql/src/schema/resolvers/mutation/create.ts +++ b/packages/graphql/src/schema/resolvers/mutation/create.ts @@ -18,16 +18,32 @@ */ import { Kind, type FieldNode, type GraphQLResolveInfo } from "graphql"; -import { execute } from "../../../utils"; -import { translateCreate } from "../../../translate"; import type { Node } from "../../../classes"; +import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { translateCreate } from "../../../translate"; +import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; +import { execute } from "../../../utils"; +import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; -import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; -export function createResolver({ node }: { node: Node }) { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { +export function createResolver({ + node, + concreteEntityAdapter, +}: { + node: Node; + concreteEntityAdapter: ConcreteEntityAdapter; +}) { + async function resolve( + _root: any, + args: any, + context: Neo4jGraphQLComposedContext, + info: GraphQLResolveInfo + ): Promise<{ + info: { + bookmark: string | null; + }; + }> { const resolveTree = getNeo4jResolveTree(info, { args }); (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; @@ -42,25 +58,31 @@ export function createResolver({ node }: { node: Node }) { info, }); - const nodeProjection = info.fieldNodes[0]?.selectionSet?.selections.find( - (selection) => selection.kind === Kind.FIELD && selection.name.value === node.plural - ) as FieldNode; - const nodeKey = nodeProjection?.alias ? nodeProjection.alias.value : nodeProjection?.name?.value; - publishEventsToSubscriptionMechanism(executeResult, context.features?.subscriptions, context.schemaModel); - return { + const nodeProjection = info.fieldNodes[0]?.selectionSet?.selections.find( + (selection): selection is FieldNode => + selection.kind === Kind.FIELD && selection.name.value === concreteEntityAdapter.plural + ); + + const resolveResult = { info: { bookmark: executeResult.bookmark, ...executeResult.statistics, }, - ...(nodeProjection ? { [nodeKey]: executeResult.records[0]?.data || [] } : {}), }; + + if (nodeProjection) { + const nodeKey = nodeProjection?.alias ? nodeProjection.alias.value : nodeProjection?.name?.value; + resolveResult[nodeKey] = executeResult.records[0]?.data || []; + } + + return resolveResult; } return { - type: `${node.mutationResponseTypeNames.create}!`, + type: `${concreteEntityAdapter.operations.mutationResponseTypeNames.create}!`, resolve, - args: { input: `[${node.name}CreateInput!]!` }, + args: concreteEntityAdapter.operations.createMutationArgumentNames, }; } diff --git a/packages/graphql/src/schema/resolvers/mutation/delete.ts b/packages/graphql/src/schema/resolvers/mutation/delete.ts index 54c60727a6..da0844e4ea 100644 --- a/packages/graphql/src/schema/resolvers/mutation/delete.ts +++ b/packages/graphql/src/schema/resolvers/mutation/delete.ts @@ -19,15 +19,24 @@ import type { GraphQLResolveInfo } from "graphql"; import type { SchemaComposer } from "graphql-compose"; -import { translateDelete } from "../../../translate"; import type { Node } from "../../../classes"; -import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; +import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { translateDelete } from "../../../translate"; +import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; import { execute } from "../../../utils"; -import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; -import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; +import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; +import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function deleteResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { +export function deleteResolver({ + node, + composer, + concreteEntityAdapter, +}: { + node: Node; + composer: SchemaComposer; + concreteEntityAdapter: ConcreteEntityAdapter; +}) { async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { const resolveTree = getNeo4jResolveTree(info, { args }); @@ -47,16 +56,16 @@ export function deleteResolver({ node, composer }: { node: Node; composer: Schem return { bookmark: executeResult.bookmark, ...executeResult.statistics }; } - const hasDeleteInput = composer.has(`${node.name}DeleteInput`); + const hasDeleteInput = composer.has(concreteEntityAdapter.operations.deleteInputTypeName); return { type: `DeleteInfo!`, resolve, args: { - where: `${node.name}Where`, + where: concreteEntityAdapter.operations.whereInputTypeName, ...(hasDeleteInput ? { - delete: `${node.name}DeleteInput`, + delete: concreteEntityAdapter.operations.deleteInputTypeName, } : {}), }, diff --git a/packages/graphql/src/schema/resolvers/mutation/update.ts b/packages/graphql/src/schema/resolvers/mutation/update.ts index 0c5bfebf92..b4fc139967 100644 --- a/packages/graphql/src/schema/resolvers/mutation/update.ts +++ b/packages/graphql/src/schema/resolvers/mutation/update.ts @@ -20,15 +20,34 @@ import { Kind, type FieldNode, 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 type { UpdateMutationArgumentNames } from "../../../schema-model/entity/model-adapters/ConcreteEntityOperations"; import { translateUpdate } from "../../../translate"; +import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; import { execute } from "../../../utils"; +import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; -import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; -export function updateResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { +export function updateResolver({ + node, + composer, + concreteEntityAdapter, +}: { + node: Node; + composer: SchemaComposer; + concreteEntityAdapter: ConcreteEntityAdapter; +}) { + async function resolve( + _root: any, + args: any, + context: Neo4jGraphQLComposedContext, + info: GraphQLResolveInfo + ): Promise<{ + info: { + bookmark: string | null; + }; + }> { const resolveTree = getNeo4jResolveTree(info, { args }); (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; @@ -45,50 +64,50 @@ export function updateResolver({ node, composer }: { node: Node; composer: Schem publishEventsToSubscriptionMechanism(executeResult, context.features?.subscriptions, context.schemaModel); const nodeProjection = info.fieldNodes[0]?.selectionSet?.selections.find( - (selection) => selection.kind === Kind.FIELD && selection.name.value === node.plural - ) as FieldNode; + (selection): selection is FieldNode => + selection.kind === Kind.FIELD && selection.name.value === concreteEntityAdapter.plural + ); - const nodeKey = nodeProjection?.alias ? nodeProjection.alias.value : nodeProjection?.name?.value; - - return { + // TODO: Ask why we are returning bookmark still + const resolveResult = { info: { bookmark: executeResult.bookmark, ...executeResult.statistics, }, - ...(nodeProjection ? { [nodeKey]: executeResult.records[0]?.data || [] } : {}), }; - } - const relationFields: Record = {}; + if (nodeProjection) { + const nodeKey = nodeProjection.alias ? nodeProjection.alias.value : nodeProjection.name.value; + resolveResult[nodeKey] = executeResult.records[0]?.data || []; + } + + return resolveResult; + } - const connectInput = `${node.name}ConnectInput`; - const disconnectInput = `${node.name}DisconnectInput`; - const createInput = `${node.name}RelationInput`; - const deleteInput = `${node.name}DeleteInput`; - const connectOrCreateInput = `${node.name}ConnectOrCreateInput`; + const relationFields: Partial = {}; - if (composer.has(connectInput)) { - relationFields.connect = connectInput; + if (composer.has(concreteEntityAdapter.operations.updateMutationArgumentNames.connect)) { + relationFields.connect = concreteEntityAdapter.operations.updateMutationArgumentNames.connect; } - if (composer.has(disconnectInput)) { - relationFields.disconnect = disconnectInput; + if (composer.has(concreteEntityAdapter.operations.updateMutationArgumentNames.disconnect)) { + relationFields.disconnect = concreteEntityAdapter.operations.updateMutationArgumentNames.disconnect; } - if (composer.has(createInput)) { - relationFields.create = createInput; + if (composer.has(concreteEntityAdapter.operations.updateMutationArgumentNames.create)) { + relationFields.create = concreteEntityAdapter.operations.updateMutationArgumentNames.create; } - if (composer.has(deleteInput)) { - relationFields.delete = deleteInput; + if (composer.has(concreteEntityAdapter.operations.updateMutationArgumentNames.delete)) { + relationFields.delete = concreteEntityAdapter.operations.updateMutationArgumentNames.delete; } - if (composer.has(connectOrCreateInput)) { - relationFields.connectOrCreate = connectOrCreateInput; + if (composer.has(concreteEntityAdapter.operations.updateMutationArgumentNames.connectOrCreate)) { + relationFields.connectOrCreate = concreteEntityAdapter.operations.updateMutationArgumentNames.connectOrCreate; } return { - type: `${node.mutationResponseTypeNames.update}!`, + type: `${concreteEntityAdapter.operations.mutationResponseTypeNames.update}!`, resolve, args: { - where: `${node.name}Where`, - update: `${node.name}UpdateInput`, + where: concreteEntityAdapter.operations.updateMutationArgumentNames.where, + update: concreteEntityAdapter.operations.updateMutationArgumentNames.update, ...relationFields, }, }; diff --git a/packages/graphql/src/schema/resolvers/query/aggregate.ts b/packages/graphql/src/schema/resolvers/query/aggregate.ts index bd939107ed..1d05232bb0 100644 --- a/packages/graphql/src/schema/resolvers/query/aggregate.ts +++ b/packages/graphql/src/schema/resolvers/query/aggregate.ts @@ -18,14 +18,21 @@ */ import type { GraphQLResolveInfo } from "graphql"; -import { execute } from "../../../utils"; import type { Node } from "../../../classes"; +import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { translateAggregate } from "../../../translate"; -import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; +import { execute } from "../../../utils"; +import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; +import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function aggregateResolver({ node }: { node: Node }) { +export function aggregateResolver({ + node, + concreteEntityAdapter, +}: { + node: Node; + concreteEntityAdapter: ConcreteEntityAdapter; +}) { async function resolve(_root: any, _args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { const resolveTree = getNeo4jResolveTree(info); @@ -51,14 +58,14 @@ export function aggregateResolver({ node }: { node: Node }) { } return { - type: `${node.aggregateTypeNames.selection}!`, + type: `${concreteEntityAdapter.operations.aggregateTypeNames.selection}!`, resolve, args: { - where: `${node.name}Where`, - ...(node.fulltextDirective + where: concreteEntityAdapter.operations.whereInputTypeName, + ...(concreteEntityAdapter.annotations.fulltext ? { fulltext: { - type: `${node.name}Fulltext`, + type: concreteEntityAdapter.operations.fullTextInputTypeName, description: "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", }, diff --git a/packages/graphql/src/schema/resolvers/query/read.ts b/packages/graphql/src/schema/resolvers/query/read.ts index 9636f9e729..477cafd98a 100644 --- a/packages/graphql/src/schema/resolvers/query/read.ts +++ b/packages/graphql/src/schema/resolvers/query/read.ts @@ -18,14 +18,21 @@ */ import type { GraphQLResolveInfo } from "graphql"; -import { execute } from "../../../utils"; -import { translateRead } from "../../../translate"; import type { Node } from "../../../classes"; -import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; +import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { translateRead } from "../../../translate"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; +import { execute } from "../../../utils"; +import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; +import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function findResolver({ node }: { node: Node }) { +export function findResolver({ + node, + concreteEntityAdapter, +}: { + node: Node; + concreteEntityAdapter: ConcreteEntityAdapter; +}) { async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { const resolveTree = getNeo4jResolveTree(info, { args }); @@ -45,15 +52,15 @@ export function findResolver({ node }: { node: Node }) { } return { - type: `[${node.name}!]!`, + type: `[${concreteEntityAdapter.name}!]!`, resolve, args: { - where: `${node.name}Where`, - options: `${node.name}Options`, - ...(node.fulltextDirective + where: concreteEntityAdapter.operations.whereInputTypeName, + options: concreteEntityAdapter.operations.optionsInputTypeName, + ...(concreteEntityAdapter.annotations.fulltext ? { fulltext: { - type: `${node.name}Fulltext`, + type: `${concreteEntityAdapter.name}Fulltext`, description: "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", }, diff --git a/packages/graphql/src/schema/resolvers/query/root-connection.ts b/packages/graphql/src/schema/resolvers/query/root-connection.ts index fb7242ec25..95c54b305f 100644 --- a/packages/graphql/src/schema/resolvers/query/root-connection.ts +++ b/packages/graphql/src/schema/resolvers/query/root-connection.ts @@ -17,26 +17,36 @@ * limitations under the License. */ -import type { GraphQLResolveInfo, SelectionSetNode } from "graphql"; +import type { DirectiveNode, GraphQLResolveInfo, SelectionSetNode } from "graphql"; import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; -import { upperFirst } from "graphql-compose"; import type { PageInfo } from "graphql-relay"; -import { execute } from "../../../utils"; -import { translateRead } from "../../../translate"; import type { Node } from "../../../classes"; +import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { translateRead } from "../../../translate"; +import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; +import { execute } from "../../../utils"; +import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { isNeoInt } from "../../../utils/utils"; import { createConnectionWithEdgeProperties } from "../../pagination"; import { graphqlDirectivesToCompose } from "../../to-compose"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; -import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; -export function rootConnectionResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { +export function rootConnectionResolver({ + node, + composer, + concreteEntityAdapter, + propagatedDirectives, +}: { + node: Node; + composer: SchemaComposer; + concreteEntityAdapter: ConcreteEntityAdapter; + propagatedDirectives: DirectiveNode[]; +}) { async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { const resolveTree = getNeo4jResolveTree(info, { args }); - const edgeTree = resolveTree.fieldsByTypeName[`${upperFirst(node.plural)}Connection`]?.edges; - const nodeTree = edgeTree?.fieldsByTypeName[`${node.name}Edge`]?.node; + const edgeTree = resolveTree.fieldsByTypeName[`${concreteEntityAdapter.upperFirstPlural}Connection`]?.edges; + const nodeTree = edgeTree?.fieldsByTypeName[`${concreteEntityAdapter.name}Edge`]?.node; const resolveTreeForContext = nodeTree || resolveTree; (context as Neo4jGraphQLTranslationContext).resolveTree = { @@ -78,6 +88,7 @@ export function rootConnectionResolver({ node, composer }: { node: Node; compose totalCount, }); + // TODO: Question why are these not taking into account the potential aliases? edges = connection.edges as any[]; pageInfo = connection.pageInfo as PageInfo; } @@ -90,28 +101,28 @@ export function rootConnectionResolver({ node, composer }: { node: Node; compose } const rootEdge = composer.createObjectTC({ - name: `${node.name}Edge`, + name: `${concreteEntityAdapter.name}Edge`, fields: { cursor: "String!", - node: `${node.name}!`, + node: `${concreteEntityAdapter.name}!`, }, - directives: graphqlDirectivesToCompose(node.propagatedDirectives), + directives: graphqlDirectivesToCompose(propagatedDirectives), }); const rootConnection = composer.createObjectTC({ - name: `${upperFirst(node.plural)}Connection`, + name: `${concreteEntityAdapter.upperFirstPlural}Connection`, fields: { totalCount: "Int!", pageInfo: "PageInfo!", edges: rootEdge.NonNull.List.NonNull, }, - directives: graphqlDirectivesToCompose(node.propagatedDirectives), + directives: graphqlDirectivesToCompose(propagatedDirectives), }); // since sort is not created when there is nothing to sort, we check for its existence let sortArg: InputTypeComposer | undefined; - if (composer.has(`${node.name}Sort`)) { - sortArg = composer.getITC(`${node.name}Sort`); + if (composer.has(`${concreteEntityAdapter.name}Sort`)) { + sortArg = composer.getITC(`${concreteEntityAdapter.name}Sort`); } return { @@ -120,12 +131,12 @@ export function rootConnectionResolver({ node, composer }: { node: Node; compose args: { first: "Int", after: "String", - where: `${node.name}Where`, + where: `${concreteEntityAdapter.name}Where`, ...(sortArg ? { sort: sortArg.List } : {}), - ...(node.fulltextDirective + ...(concreteEntityAdapter.annotations.fulltext ? { fulltext: { - type: `${node.name}Fulltext`, + type: `${concreteEntityAdapter.name}Fulltext`, description: "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", }, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication.ts b/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication.ts index 0eac5907be..40d83314de 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication.ts @@ -17,15 +17,15 @@ * limitations under the License. */ -import type { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEntity"; -import { filterByValues } from "../../../../translate/authorization/utils/filter-by-values"; +import { Neo4jGraphQLError } from "../../../../classes"; +import { AUTHORIZATION_UNAUTHENTICATED } from "../../../../constants"; import type { AuthenticationAnnotation, AuthenticationOperation, } from "../../../../schema-model/annotation/AuthenticationAnnotation"; import type { Attribute } from "../../../../schema-model/attribute/Attribute"; -import { Neo4jGraphQLError } from "../../../../classes"; -import { AUTHORIZATION_UNAUTHENTICATED } from "../../../../constants"; +import type { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEntity"; +import { filterByValues } from "../../../../translate/authorization/utils/filter-by-values"; import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; export function checkAuthentication({ From 0d2f6bf95fe22489de8db8f0faaffac854b740a9 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:17:28 +0200 Subject: [PATCH 006/162] wip: add getDirectedArgument2 and addDirectedArgument2 --- .../graphql/src/schema/directed-argument.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/packages/graphql/src/schema/directed-argument.ts b/packages/graphql/src/schema/directed-argument.ts index 629ad3cf5d..79157c7d57 100644 --- a/packages/graphql/src/schema/directed-argument.ts +++ b/packages/graphql/src/schema/directed-argument.ts @@ -18,6 +18,7 @@ */ import { RelationshipQueryDirectionOption } from "../constants"; +import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationField } from "../types"; export type DirectedArgument = { @@ -56,3 +57,35 @@ export function addDirectedArgument>( } return { ...args }; } + +export function getDirectedArgument2(relationshipAdapter: RelationshipAdapter): DirectedArgument | undefined { + let defaultValue: boolean; + switch (relationshipAdapter.queryDirection) { + case RelationshipQueryDirectionOption.DEFAULT_DIRECTED: + defaultValue = true; + break; + case RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED: + defaultValue = false; + break; + case RelationshipQueryDirectionOption.DIRECTED_ONLY: + case RelationshipQueryDirectionOption.UNDIRECTED_ONLY: + default: + return undefined; + } + + return { + type: "Boolean", + defaultValue, + }; +} + +export function addDirectedArgument2>( + args: T, + relationshipAdapter: RelationshipAdapter +): T & { directed?: DirectedArgument } { + const directedArg = getDirectedArgument2(relationshipAdapter); + if (directedArg) { + return { ...args, directed: directedArg }; + } + return { ...args }; +} From d172c88361f50eb081403538bc43f3492f0bc465 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:18:14 +0200 Subject: [PATCH 007/162] test: add getTypePrettyName tests for AttributeAdapter --- .../model-adapters/AttributeAdapter.test.ts | 54 +++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts index 87c52936ff..94fc206727 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts @@ -17,6 +17,9 @@ * limitations under the License. */ +import { CypherAnnotation } from "../../annotation/CypherAnnotation"; +import { UniqueAnnotation } from "../../annotation/UniqueAnnotation"; +import { Attribute } from "../Attribute"; import { EnumType, GraphQLBuiltInScalarType, @@ -31,13 +34,58 @@ import { UnionType, UserScalarType, } from "../AttributeType"; -import { Attribute } from "../Attribute"; import { AttributeAdapter } from "./AttributeAdapter"; -import { UniqueAnnotation } from "../../annotation/UniqueAnnotation"; -import { CypherAnnotation } from "../../annotation/CypherAnnotation"; describe("Attribute", () => { describe("type assertions", () => { + test("getTypePrettyName String", () => { + const attribute = new AttributeAdapter( + new Attribute({ + name: "test", + annotations: [], + type: new ScalarType(GraphQLBuiltInScalarType.String, false), + args: [], + }) + ); + + expect(attribute.getTypePrettyName()).toBe("String"); + }); + test("getTypePrettyName required String", () => { + const attribute = new AttributeAdapter( + new Attribute({ + name: "test", + annotations: [], + type: new ScalarType(GraphQLBuiltInScalarType.String, true), + args: [], + }) + ); + + expect(attribute.getTypePrettyName()).toBe("String!"); + }); + test("getTypePrettyName required String, required List", () => { + const attribute = new AttributeAdapter( + new Attribute({ + name: "test", + annotations: [], + type: new ListType(new ScalarType(GraphQLBuiltInScalarType.String, true), true), + args: [], + }) + ); + + expect(attribute.getTypePrettyName()).toBe("[String!]!"); + }); + test("getTypePrettyName non-required String, required List", () => { + const attribute = new AttributeAdapter( + new Attribute({ + name: "test", + annotations: [], + type: new ListType(new ScalarType(GraphQLBuiltInScalarType.String, false), true), + args: [], + }) + ); + + expect(attribute.getTypePrettyName()).toBe("[String]!"); + }); test("isID", () => { const attribute = new AttributeAdapter( new Attribute({ From 9e8eb47f80deb5092ff479938eb50a95d086cb21 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:18:29 +0200 Subject: [PATCH 008/162] wip: add fields to AttributeAdapter --- .../model-adapters/AttributeAdapter.ts | 402 +++++++++++++++++- 1 file changed, 385 insertions(+), 17 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index ceb4467762..d84c5397fd 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -17,15 +17,13 @@ * limitations under the License. */ -import { MathAdapter } from "./MathAdapter"; -import { AggregationAdapter } from "./AggregationAdapter"; -import { ListAdapter } from "./ListAdapter"; -import type { Attribute } from "../Attribute"; import type { Annotations } from "../../annotation/Annotation"; +import type { FullTextField } from "../../annotation/FullTextAnnotation"; +import type { Argument } from "../../argument/Argument"; +import type { Attribute } from "../Attribute"; import type { AttributeType } from "../AttributeType"; import { EnumType, - UserScalarType, GraphQLBuiltInScalarType, InterfaceType, ListType, @@ -34,11 +32,14 @@ import { Neo4jGraphQLSpatialType, Neo4jGraphQLTemporalType, Neo4jPointType, + ObjectType, ScalarType, UnionType, - ObjectType, + UserScalarType, } from "../AttributeType"; -import type { Argument } from "../../argument/Argument"; +import { AggregationAdapter } from "./AggregationAdapter"; +import { ListAdapter } from "./ListAdapter"; +import { MathAdapter } from "./MathAdapter"; export class AttributeAdapter { private _listModel: ListAdapter | undefined; @@ -93,11 +94,11 @@ export class AttributeAdapter { } isUnique(): boolean { - return this.annotations.unique ? true : false; + return !!this.annotations.unique || this.isGlobalIDAttribute() === true; } isCypher(): boolean { - return this.annotations.cypher ? true : false; + return !!this.annotations.cypher; } /** @@ -119,6 +120,205 @@ export class AttributeAdapter { ); } + /** + * Previously defined as: + * const nodeFields = objectFieldsToComposeFields([ + ...node.primitiveFields, + ...node.cypherFields, + ...node.enumFields, + ...node.scalarFields, + ...node.interfaceFields, + ...node.objectFields, + ...node.unionFields, + ...node.temporalFields, + ...node.pointFields, + ...node.customResolverFields, + ]); + */ + isObjectField(): boolean { + return ( + this.isGraphQLBuiltInScalar() || + this.isCypher() || + this.isEnum() || + this.isUserScalar() || + this.isInterface() || + this.isObject() || + this.isUnion() || + this.isTemporal() || + this.isPoint() || + this.isCartesianPoint() || + this.isBigInt() + // this.isCustomResolver() + ); + } + + /* + return [ + ...obj.primitiveFields, + ...obj.scalarFields, + ...obj.enumFields, + ...obj.temporalFields, + ...obj.pointFields, + ...obj.cypherFields.filter((field) => + [ + "Boolean", + "ID", + "Int", + "BigInt", + "Float", + "String", + "DateTime", + "LocalDateTime", + "Time", + "LocalTime", + "Date", + "Duration", + ].includes(field.typeMeta.name) + ), + ].filter((field) => !field.typeMeta.array); + */ + isSortableField(): boolean { + return ( + !this.isList() && + !this.isCustomResolvable() && + (this.isGraphQLBuiltInScalar() || + this.isUserScalar() || + this.isEnum() || + this.isTemporal() || + this.isPoint() || + this.isCartesianPoint() || + this.isBigInt() || + this.isCypher()) + ); + } + + /** + * + fields: { + temporalFields: node.temporalFields, + enumFields: node.enumFields, + pointFields: node.pointFields, + primitiveFields: node.primitiveFields, + scalarFields: node.scalarFields, + }, + */ + isWhereField(): boolean { + return ( + this.isGraphQLBuiltInScalar() || + this.isTemporal() || + this.isEnum() || + this.isPoint() || + this.isCartesianPoint() || + this.isUserScalar() || + this.isBigInt() + ); + } + + /** + * [ + * ...node.primitiveFields, + ...node.scalarFields, + ...node.enumFields, + ...node.pointFields, + ...node.temporalFields + ] + */ + isOnCreateField(): boolean { + return ( + this.isGraphQLBuiltInScalar() || + this.isTemporal() || + this.isEnum() || + this.isPoint() || + this.isCartesianPoint() || + this.isUserScalar() || + this.isBigInt() + ); + } + + /** + * + if ( + [ + "Float", + "Int", + "BigInt", + "DateTime", + "Date", + "LocalDateTime", + "Time", + "LocalTime", + "Duration", + ].includes(f.typeMeta.name) + ), + */ + isNumericalOrTemporal(): boolean { + return ( + this.isFloat() || + this.isInt() || + this.isBigInt() || + this.isDateTime() || + this.isDate() || + this.isLocalDateTime() || + this.isTime() || + this.isLocalTime() || + this.isDuration() + ); + } + + isTemporalField(): boolean { + // TODO: why is .isTemporal() not enough?? + return ( + this.isTemporal() || + this.isDateTime() || + this.isDate() || + this.isLocalDateTime() || + this.isTime() || + this.isLocalTime() || + this.isDuration() + ); + } + + isPrimitiveField(): boolean { + return this.isGraphQLBuiltInScalar() || this.isUserScalar() || this.isEnum() || this.isBigInt(); + } + + isAggregableField(): boolean { + return !this.isList() && (this.isPrimitiveField() || this.isTemporalField()) && this.isAggregable(); + } + + isAggregationWhereField(): boolean { + const isGraphQLBuiltInScalarWithoutBoolean = this.isGraphQLBuiltInScalar() && !this.isBoolean(); + const isTemporalWithoutDate = this.isTemporalField() && !this.isDate(); + return ( + !this.isList() && + (isGraphQLBuiltInScalarWithoutBoolean || isTemporalWithoutDate || this.isBigInt()) && + this.isAggregationFilterable() + ); + } + + isCreateInputField(): boolean { + return this.isNonGeneratedField() && this.annotations.settable?.onCreate !== false; + } + + isNonGeneratedField(): boolean { + return ( + this.isCypher() === false && + this.isCustomResolvable() === false && + (this.isPrimitiveField() || this.isScalar() || this.isSpatial()) && + !this.annotations.id && + !this.annotations.populatedBy && + !this.annotations.timestamp + ); + } + + isUpdateInputField(): boolean { + return this.isNonGeneratedField() && this.annotations.settable?.onUpdate !== false; + } + + isArrayMethodField(): boolean { + return this.isList() && !this.isUserScalar() && (this.isScalar() || this.isSpatial()); + } + /** * @throws {Error} if the attribute is not a list */ @@ -254,8 +454,9 @@ export class AttributeAdapter { return type instanceof UserScalarType; } - isRequired(): boolean { - return this.type.isRequired; + isTemporal(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type.name in Neo4jGraphQLTemporalType; } isListElementRequired(): boolean { @@ -265,8 +466,14 @@ export class AttributeAdapter { return this.type.ofType.isRequired; } + isRequired(): boolean { + return this.type.isRequired; + } + /** - * START of category assertions + * + * Schema Generator Stuff + * */ isGraphQLBuiltInScalar(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); @@ -278,11 +485,6 @@ export class AttributeAdapter { return type.name in Neo4jGraphQLSpatialType; } - isTemporal(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type.name in Neo4jGraphQLTemporalType; - } - isAbstract(options = this.assertionOptions): boolean { return this.isInterface(options) || this.isUnion(options); } @@ -305,4 +507,170 @@ export class AttributeAdapter { /** * END of category assertions */ + + isGlobalIDAttribute(): boolean { + return !!this.annotations.relayId; + } + + /** + * + * Schema Generator Stuff + * + */ + + getTypePrettyName(): string { + if (this.isList()) { + return `[${this.getTypeName()}${this.isListElementRequired() ? "!" : ""}]${this.isRequired() ? "!" : ""}`; + } + return `${this.getTypeName()}${this.isRequired() ? "!" : ""}`; + } + + getTypeName(): string { + return this.isList() ? this.type.ofType.name : this.type.name; + } + + getFieldTypeName(): string { + return this.isList() ? `[${this.getTypeName()}]` : this.getTypeName(); + } + + getInputTypeName(): string { + if (this.isSpatial()) { + if (this.getTypeName() === "Point") { + return "PointInput"; + } else { + return "CartesianPointInput"; + } + } + return this.getTypeName(); + } + + // TODO: We should probably have this live in a different, more specific adapter + getFilterableInputTypeName(): string { + return `[${this.getInputTypeName()}${this.isRequired() ? "!" : ""}]`; + } + + getInputTypeNames(): InputTypeNames { + const pretty = this.isList() + ? `[${this.getInputTypeName()}${this.isListElementRequired() ? "!" : ""}]` + : this.getInputTypeName(); + + return { + where: { type: this.getInputTypeName(), pretty }, + create: { + type: this.getTypeName(), + pretty: `${pretty}${this.isRequired() ? "!" : ""}`, + }, + update: { + type: this.getTypeName(), + pretty, + }, + }; + } + + getDefaultValue() { + return this.annotations.default?.value; + } + + isReadable(): boolean { + return this.annotations.selectable?.onRead !== false; + } + + isAggregable(): boolean { + return ( + this.annotations.selectable?.onAggregate !== false && + this.isCustomResolvable() === false && + this.isCypher() === false + ); + } + isAggregationFilterable(): boolean { + return ( + this.annotations.filterable?.byAggregate !== false && + this.isCustomResolvable() === false && + this.isCypher() === false + ); + } + + isFilterable(): boolean { + return this.annotations.filterable?.byValue !== false; + } + + isCustomResolvable(): boolean { + return !!this.annotations.customResolver; + } + + // TODO: Check if this is the right place for this + isFulltext(): boolean { + return !!this.annotations.fulltext; + } + + // TODO: Check if this is the right place for this + getFulltextIndexes(): FullTextField[] | undefined { + return this.annotations.fulltext?.indexes; + } + + getPropagatedAnnotations(): Partial { + // TODO: use constants + return Object.fromEntries( + Object.entries(this.annotations).filter( + ([name]) => + ![ + "relationship", + "cypher", + "id", + "authorization", + "authentication", + "readonly", + "writeonly", + "customResolver", + "default", + "coalesce", + "timestamp", + "alias", + "unique", + "callback", + "populatedBy", + "jwtClaim", + "selectable", + "settable", + "subscriptionsAuthorization", + "filterable", + ].includes(name) + ) + ); + } + + isPartOfUpdateInputType(): boolean { + if (this.isScalar() || this.isEnum() || this.isSpatial()) { + return true; + } + if (this.isGraphQLBuiltInScalar()) { + const isAutogenerated = !!this.annotations.id; + const isCallback = !!this.annotations.populatedBy; + return !isAutogenerated && !isCallback; // && !readonly + } + if (this.isTemporal()) { + return !this.annotations.timestamp; + } + return false; + } + + isPartOfCreateInputType(): boolean { + if (this.isScalar() || this.isEnum() || this.isSpatial() || this.isTemporal()) { + return true; + } + if (this.isGraphQLBuiltInScalar()) { + const isAutogenerated = !!this.annotations.id; + const isCallback = !!this.annotations.populatedBy; + return !isAutogenerated && !isCallback; + } + return false; + } + + isPartOfWhereInputType(): boolean { + return ( + this.isScalar() || this.isEnum() || this.isTemporal() || this.isSpatial() || this.isGraphQLBuiltInScalar() + ); + } } + +type InputTypeNames = Record<"where" | "create" | "update", { type: string; pretty: string }>; From 85ffeea20a236ac004fd6dc4e48c6f24404845ad Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:19:16 +0200 Subject: [PATCH 009/162] feat: add schema-model createConnectOrCreateField --- .../create-connect-or-create-field.ts | 120 ++++++++++++++++-- 1 file changed, 108 insertions(+), 12 deletions(-) diff --git a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts index a6319ab25b..fd3ad998ad 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts @@ -17,12 +17,15 @@ * limitations under the License. */ -import type { SchemaComposer, InputTypeComposer } from "graphql-compose"; +import type { DirectiveNode } from "graphql"; +import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationField } from "../../types"; import { upperFirst } from "../../utils/upper-first"; import { ensureNonEmptyInput } from "../ensure-non-empty-input"; -import { objectFieldsToCreateInputFields } from "../to-compose"; +import { concreteEntityToCreateInputFields, objectFieldsToCreateInputFields } from "../to-compose"; export function createConnectOrCreateField({ node, @@ -96,16 +99,6 @@ function createOnCreateITC({ }); } -function createWhereITC({ schemaComposer, node }: { schemaComposer: SchemaComposer; node: Node }): InputTypeComposer { - const connectOrCreateWhereName = `${node.name}ConnectOrCreateWhere`; - - return schemaComposer.getOrCreateITC(connectOrCreateWhereName, (tc) => { - tc.addFields({ - node: `${node.name}UniqueWhere!`, - }); - }); -} - function getOnCreateFields({ node, hasNonGeneratedProperties, @@ -143,3 +136,106 @@ function getOnCreateFields({ node: nodeCreateInputFieldName, }; } + +function createWhereITC({ schemaComposer, node }: { schemaComposer: SchemaComposer; node: Node }): InputTypeComposer { + const connectOrCreateWhereName = `${node.name}ConnectOrCreateWhere`; + + return schemaComposer.getOrCreateITC(connectOrCreateWhereName, (tc) => { + tc.addFields({ + node: `${node.name}UniqueWhere!`, + }); + }); +} + +export function createConnectOrCreateField2({ + relationshipAdapter, + targetEntityAdapter, // TODO: take this from relationshipAdapter.target in the end, currently here bc unions call this function for reach refNode + schemaComposer, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + targetEntityAdapter: ConcreteEntityAdapter; + schemaComposer: SchemaComposer; + userDefinedFieldDirectives: Map; +}): string | undefined { + const hasUniqueFields = targetEntityAdapter.uniqueFields.length > 0; + if (hasUniqueFields !== true) { + return undefined; + } + + const connectOrCreateName = relationshipAdapter.connectOrCreateFieldInputTypeName; + + createOnCreateITC2({ + schemaComposer, + relationshipAdapter, + targetEntityAdapter, + userDefinedFieldDirectives, + }); + + schemaComposer.getOrCreateITC(targetEntityAdapter.operations.connectOrCreateWhereInputTypeName, (tc) => { + tc.addFields(targetEntityAdapter.operations.connectOrCreateWhereInputFieldNames); + }); + + schemaComposer.getOrCreateITC(connectOrCreateName, (tc) => { + tc.addFields(relationshipAdapter.getConnectOrCreateInputFields(targetEntityAdapter) || {}); + }); + return relationshipAdapter.isList ? `[${connectOrCreateName}!]` : connectOrCreateName; +} + +function createOnCreateITC2({ + schemaComposer, + relationshipAdapter, + targetEntityAdapter, + userDefinedFieldDirectives, +}: { + schemaComposer: SchemaComposer; + relationshipAdapter: RelationshipAdapter; + targetEntityAdapter: ConcreteEntityAdapter; + userDefinedFieldDirectives: Map; +}): InputTypeComposer { + const onCreateName = relationshipAdapter.connectOrCreateOnCreateFieldInputTypeName; + + const onCreateFields = getOnCreateFields2({ + relationshipAdapter, + targetEntityAdapter, + schemaComposer, + userDefinedFieldDirectives, + }); + + return schemaComposer.getOrCreateITC(onCreateName, (tc) => { + tc.addFields(onCreateFields); + }); +} + +function getOnCreateFields2({ + relationshipAdapter, + targetEntityAdapter, + schemaComposer, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + targetEntityAdapter: ConcreteEntityAdapter; + schemaComposer: SchemaComposer; + userDefinedFieldDirectives: Map; +}): { node: string } | { node: string; edge: string } { + schemaComposer.getOrCreateITC(targetEntityAdapter.operations.onCreateInputTypeName, (tc) => { + const nodeFields = concreteEntityToCreateInputFields( + targetEntityAdapter.onCreateInputFields, + userDefinedFieldDirectives + ); + tc.addFields(nodeFields); + ensureNonEmptyInput(schemaComposer, tc); + }); + + const nodeCreateInputFieldName = `${targetEntityAdapter.operations.onCreateInputTypeName}!`; + // TODO: add relationshipAdapter.operations and return fields {edge, node} vs {node} from a method from operations + if (relationshipAdapter.nonGeneratedProperties.length > 0) { + return { + node: nodeCreateInputFieldName, + edge: relationshipAdapter.edgeCreateInputTypeName, + }; + } + return { + node: nodeCreateInputFieldName, + }; +} From fff48e398021fb4218c9f4e685058302f88712f6 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:23:57 +0200 Subject: [PATCH 010/162] feat: add uniqueFields to InterfaceEntityAdapter --- .../entity/model-adapters/InterfaceEntityAdapter.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts index 1fa622748f..2d3bfaad90 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts @@ -22,6 +22,7 @@ import type { Attribute } from "../../attribute/Attribute"; import { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapter"; import { RelationshipAdapter } from "../../relationship/model-adapters/RelationshipAdapter"; import type { Relationship } from "../../relationship/Relationship"; +import { getFromMap } from "../../utils/get-from-map"; import type { ConcreteEntity } from "../ConcreteEntity"; import type { InterfaceEntity } from "../InterfaceEntity"; import { ConcreteEntityAdapter } from "./ConcreteEntityAdapter"; @@ -32,6 +33,7 @@ export class InterfaceEntityAdapter { public readonly attributes: Map = new Map(); public readonly relationships: Map = new Map(); public readonly annotations: Partial; + private uniqueFieldsKeys: string[] = []; constructor(entity: InterfaceEntity) { this.name = entity.name; @@ -53,6 +55,9 @@ export class InterfaceEntityAdapter { for (const [attributeName, attribute] of attributes.entries()) { const attributeAdapter = new AttributeAdapter(attribute); this.attributes.set(attributeName, attributeAdapter); + if (attributeAdapter.isConstrainable() && attributeAdapter.isUnique()) { + this.uniqueFieldsKeys.push(attribute.name); + } } } @@ -61,4 +66,8 @@ export class InterfaceEntityAdapter { this.relationships.set(relationshipName, new RelationshipAdapter(relationship, this)); } } + + public get uniqueFields(): AttributeAdapter[] { + return this.uniqueFieldsKeys.map((key) => getFromMap(this.attributes, key)); + } } From 00de1715c20671fbb69c69d59e98aa4b12c711a2 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:25:13 +0200 Subject: [PATCH 011/162] wip: add fields to ConcreteEntityAdapter --- .../model-adapters/ConcreteEntityAdapter.ts | 90 ++++++++++++++++++- 1 file changed, 86 insertions(+), 4 deletions(-) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts index bc4ca47d48..21a9aebad4 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts @@ -17,14 +17,16 @@ * limitations under the License. */ +import { upperFirst } from "graphql-compose"; +import { toGlobalId } from "../../../utils/global-ids"; +import type { Annotations } from "../../annotation/Annotation"; +import type { Attribute } from "../../attribute/Attribute"; import { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapter"; import type { Relationship } from "../../relationship/Relationship"; +import { RelationshipAdapter } from "../../relationship/model-adapters/RelationshipAdapter"; import { getFromMap } from "../../utils/get-from-map"; -import { singular, plural } from "../../utils/string-manipulation"; +import { plural, singular } from "../../utils/string-manipulation"; import type { ConcreteEntity } from "../ConcreteEntity"; -import type { Attribute } from "../../attribute/Attribute"; -import { RelationshipAdapter } from "../../relationship/model-adapters/RelationshipAdapter"; -import type { Annotations } from "../../annotation/Annotation"; import { ConcreteEntityOperations } from "./ConcreteEntityOperations"; import type { InterfaceEntityAdapter } from "./InterfaceEntityAdapter"; import type { UnionEntityAdapter } from "./UnionEntityAdapter"; @@ -46,6 +48,7 @@ export class ConcreteEntityAdapter { private _singular: string | undefined; private _plural: string | undefined; + private _globalIdField: AttributeAdapter | undefined; // specialize models private _operations: ConcreteEntityOperations | undefined; @@ -57,6 +60,7 @@ export class ConcreteEntityAdapter { this.annotations = entity.annotations; this.initAttributes(entity.attributes); this.initRelationships(entity.relationships); + this.description = entity.description; } private initAttributes(attributes: Map) { @@ -73,6 +77,10 @@ export class ConcreteEntityAdapter { this.uniqueFieldsKeys.push(attribute.name); } } + + if (attributeAdapter.isGlobalIDAttribute()) { + this._globalIdField = attributeAdapter; + } } } @@ -101,6 +109,57 @@ export class ConcreteEntityAdapter { return this._relatedEntities; } + public get objectFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isObjectField()); + } + + public get sortableFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isSortableField()); + } + + public get whereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isWhereField()); + } + + public get primitiveFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isPrimitiveField()); + } + + public get aggregableFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregableField()); + } + + public get aggregationWhereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregationWhereField()); + } + + public get createInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isCreateInputField()); + } + + public get updateInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); + } + + public get arrayMethodFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isArrayMethodField()); + } + + public get onCreateInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isOnCreateField()); + } + // public get scalarFields(): AttributeAdapter[] { + // return Array.from(this.attributes.values()).filter((attribute) => attribute.isScalarField()); + // } + + // public get enumFields(): AttributeAdapter[] { + // return Array.from(this.attributes.values()).filter((attribute) => attribute.isEnumField()); + // } + + public get temporalFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isTemporalField()); + } + // TODO: identify usage of old Node.[getLabels | getLabelsString] and migrate them if needed public getLabels(): string[] { return Array.from(this.labels); @@ -128,6 +187,10 @@ export class ConcreteEntityAdapter { return this._plural; } + public get upperFirstPlural(): string { + return upperFirst(this.plural); + } + get operations(): ConcreteEntityOperations { if (!this._operations) { return new ConcreteEntityOperations(this); @@ -136,4 +199,23 @@ export class ConcreteEntityAdapter { } // TODO: Implement the Globals methods toGlobalId and fromGlobalId, getGlobalId etc... + get globalIdField() { + return this._globalIdField; + } + + public isGlobalNode(): this is this & { globalIdField: AttributeAdapter } { + return !!this._globalIdField; + } + + public toGlobalId(id: string | number): string { + if (!this.isGlobalNode()) { + throw new Error(`Entity ${this.name} is not a global node`); + } + + return toGlobalId({ + typeName: this.name, + field: this.globalIdField.name, + id, + }); + } } From 5e0c4131aa85c3c92d74c0bb71a734ff969c51bd Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:25:33 +0200 Subject: [PATCH 012/162] feat: add properties to ConcreteEntityOperations --- .../ConcreteEntityOperations.ts | 169 +++++++++++++++--- 1 file changed, 146 insertions(+), 23 deletions(-) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts index 5589625f52..ab0e57fb4b 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts @@ -19,38 +19,137 @@ import { upperFirst } from "../../../utils/upper-first"; import type { ConcreteEntityAdapter } from "./ConcreteEntityAdapter"; -import type { - AggregateTypeNames, - FulltextTypeNames, - MutationResponseTypeNames, - RootTypeFieldNames, - SubscriptionEvents, -} from "../../../classes/Node"; + +type RootTypeFieldNames = { + create: string; + read: string; + update: string; + delete: string; + aggregate: string; + subscribe: { + created: string; + updated: string; + deleted: string; + relationship_created: string; + relationship_deleted: string; + }; +}; + +type FulltextTypeNames = { + result: string; + where: string; + sort: string; +}; + +type AggregateTypeNames = { + selection: string; + input: string; +}; + +type MutationResponseTypeNames = { + create: string; + update: string; +}; + +type SubscriptionEvents = { + create: string; + update: string; + delete: string; + create_relationship: string; + delete_relationship: string; +}; + +export type UpdateMutationArgumentNames = { + connect: string; + disconnect: string; + create: string; + update: string; + delete: string; + connectOrCreate: string; + where: string; +}; + +export type CreateMutationArgumentNames = { + input: string; +}; export class ConcreteEntityOperations { - private readonly ConcreteEntityAdapter: ConcreteEntityAdapter; + private readonly concreteEntityAdapter: ConcreteEntityAdapter; private readonly pascalCasePlural: string; private readonly pascalCaseSingular: string; - constructor(ConcreteEntityAdapter: ConcreteEntityAdapter) { - this.ConcreteEntityAdapter = ConcreteEntityAdapter; - this.pascalCasePlural = upperFirst(this.ConcreteEntityAdapter.plural); - this.pascalCaseSingular = upperFirst(this.ConcreteEntityAdapter.singular); + constructor(concreteEntityAdapter: ConcreteEntityAdapter) { + this.concreteEntityAdapter = concreteEntityAdapter; + this.pascalCasePlural = upperFirst(this.concreteEntityAdapter.plural); + this.pascalCaseSingular = upperFirst(this.concreteEntityAdapter.singular); + } + + public get whereInputTypeName(): string { + return `${this.concreteEntityAdapter.name}Where`; + } + + public get uniqueWhereInputTypeName(): string { + // ConnectOrCreateWhere.node + return `${this.concreteEntityAdapter.name}UniqueWhere`; + } + + public get connectOrCreateWhereInputTypeName(): string { + return `${this.concreteEntityAdapter.name}ConnectOrCreateWhere`; + } + + public get createInputTypeName(): string { + return `${this.concreteEntityAdapter.name}CreateInput`; + } + + public get updateInputTypeName(): string { + return `${this.concreteEntityAdapter.name}UpdateInput`; + } + + public get deleteInputTypeName(): string { + return `${this.concreteEntityAdapter.name}DeleteInput`; + } + + public get optionsInputTypeName(): string { + return `${this.concreteEntityAdapter.name}Options`; + } + + public get fullTextInputTypeName(): string { + return `${this.concreteEntityAdapter.name}Fulltext`; + } + + public get sortInputTypeName(): string { + return `${this.concreteEntityAdapter.name}Sort`; + } + + public get relationInputTypeName(): string { + return `${this.concreteEntityAdapter.name}RelationInput`; + } + + public get connectInputTypeName(): string { + return `${this.concreteEntityAdapter.name}ConnectInput`; + } + + public get disconnectInputTypeName(): string { + return `${this.concreteEntityAdapter.name}DisconnectInput`; + } + + public get onCreateInputTypeName(): string { + return `${this.concreteEntityAdapter.name}OnCreateInput`; } public get rootTypeFieldNames(): RootTypeFieldNames { return { create: `create${this.pascalCasePlural}`, - read: this.ConcreteEntityAdapter.plural, + read: this.concreteEntityAdapter.plural, update: `update${this.pascalCasePlural}`, delete: `delete${this.pascalCasePlural}`, - aggregate: `${this.ConcreteEntityAdapter.plural}Aggregate`, + aggregate: `${this.concreteEntityAdapter.plural}Aggregate`, subscribe: { - created: `${this.ConcreteEntityAdapter.singular}Created`, - updated: `${this.ConcreteEntityAdapter.singular}Updated`, - deleted: `${this.ConcreteEntityAdapter.singular}Deleted`, - relationship_deleted: `${this.ConcreteEntityAdapter.singular}RelationshipDeleted`, - relationship_created: `${this.ConcreteEntityAdapter.singular}RelationshipCreated`, + created: `${this.concreteEntityAdapter.singular}Created`, + updated: `${this.concreteEntityAdapter.singular}Updated`, + deleted: `${this.concreteEntityAdapter.singular}Deleted`, + relationship_deleted: `${this.concreteEntityAdapter.singular}RelationshipDeleted`, + relationship_created: `${this.concreteEntityAdapter.singular}RelationshipCreated`, }, }; } @@ -65,8 +164,8 @@ export class ConcreteEntityOperations { public get aggregateTypeNames(): AggregateTypeNames { return { - selection: `${this.ConcreteEntityAdapter.name}AggregateSelection`, - input: `${this.ConcreteEntityAdapter.name}AggregateSelectionInput`, + selection: `${this.concreteEntityAdapter.name}AggregateSelection`, + input: `${this.concreteEntityAdapter.name}AggregateSelectionInput`, }; } @@ -92,8 +191,32 @@ export class ConcreteEntityOperations { create: `created${this.pascalCaseSingular}`, update: `updated${this.pascalCaseSingular}`, delete: `deleted${this.pascalCaseSingular}`, - create_relationship: `${this.ConcreteEntityAdapter.singular}`, - delete_relationship: `${this.ConcreteEntityAdapter.singular}`, + create_relationship: `${this.concreteEntityAdapter.singular}`, + delete_relationship: `${this.concreteEntityAdapter.singular}`, + }; + } + + public get updateMutationArgumentNames(): UpdateMutationArgumentNames { + return { + connect: `${this.concreteEntityAdapter.name}ConnectInput`, + disconnect: `${this.concreteEntityAdapter.name}DisconnectInput`, + create: this.relationInputTypeName, + update: this.updateInputTypeName, + delete: this.deleteInputTypeName, + connectOrCreate: `${this.concreteEntityAdapter.name}ConnectOrCreateInput`, + where: this.whereInputTypeName, + }; + } + + public get createMutationArgumentNames(): CreateMutationArgumentNames { + return { + input: `[${this.createInputTypeName}!]!`, + }; + } + + public get connectOrCreateWhereInputFieldNames() { + return { + node: `${this.uniqueWhereInputTypeName}!`, }; } } From eb9ddbe81cbdc793e7432370d166c9eebc84eea6 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:26:22 +0200 Subject: [PATCH 013/162] feat: add createAggregationTypeObject2 --- .../field-aggregation-composer.ts | 60 ++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts index edc50b2327..56e267a58c 100644 --- a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts +++ b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts @@ -18,11 +18,13 @@ */ import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; -import type { ObjectFields } from "../get-obj-field-meta"; import type { Node } from "../../classes"; +import type { Subgraph } from "../../classes/Subgraph"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { ObjectFields } from "../get-obj-field-meta"; import { numericalResolver } from "../resolvers/field/numerical"; import { AggregationTypesMapper } from "./aggregation-types-mapper"; -import type { Subgraph } from "../../classes/Subgraph"; export enum FieldAggregationSchemaTypes { field = "AggregationSelection", @@ -111,4 +113,58 @@ export class FieldAggregationComposer { } return undefined; } + + public createAggregationTypeObject2(relationshipAdapter: RelationshipAdapter): ObjectTypeComposer { + let aggregateSelectionEdge: ObjectTypeComposer | undefined; + + const aggregateSelectionNodeFields = this.getAggregationFields2( + relationshipAdapter.target as ConcreteEntityAdapter + ); // TODO: fix ts + const aggregateSelectionNodeName = relationshipAdapter.getAggregationFieldTypename("node"); + + const aggregateSelectionNode = this.createAggregationField( + aggregateSelectionNodeName, + aggregateSelectionNodeFields + ); + + if (relationshipAdapter.attributes.size > 0) { + const aggregateSelectionEdgeFields = this.getAggregationFields2(relationshipAdapter); + const aggregateSelectionEdgeName = relationshipAdapter.getAggregationFieldTypename("edge"); + + aggregateSelectionEdge = this.createAggregationField( + aggregateSelectionEdgeName, + aggregateSelectionEdgeFields + ); + } + + return this.composer.createObjectTC({ + name: relationshipAdapter.getAggregationFieldTypename(), + fields: { + count: { + type: "Int!", + resolve: numericalResolver, + args: {}, + }, + ...(aggregateSelectionNode ? { node: aggregateSelectionNode } : {}), + ...(aggregateSelectionEdge ? { edge: aggregateSelectionEdge } : {}), + }, + }); + } + + private getAggregationFields2( + entity: RelationshipAdapter | ConcreteEntityAdapter + ): Record { + return entity.aggregableFields.reduce((res, field) => { + const objectTypeComposer = this.aggregationTypesMapper.getAggregationType({ + fieldName: field.getTypeName(), + nullable: !field.isRequired(), + }); + + if (!objectTypeComposer) return res; + + res[field.name] = objectTypeComposer.NonNull; + + return res; + }, {}); + } } From e29b772f123b9ada2fdcfb436c0f1ac39eb7caf7 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:27:21 +0200 Subject: [PATCH 014/162] wip: add createAggregationInputFields2 --- .../create-aggregation-input-fields.ts | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) diff --git a/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts index d8fb54c2ce..35ae4170c9 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts @@ -21,6 +21,9 @@ import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; import { upperFirst } from "graphql-compose"; import { Node } from "../../classes"; import { AGGREGATION_COMPARISON_OPERATORS, WHERE_AGGREGATION_TYPES } from "../../constants"; +import type { AttributeAdapter } from "../../schema-model/attribute/model-adapters/AttributeAdapter"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { BaseField, RelationField } from "../../types"; import { DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS, DEPRECATE_INVALID_AGGREGATION_FILTERS } from "../constants"; import type { ObjectFields } from "../get-obj-field-meta"; @@ -177,3 +180,146 @@ function createIDAggregationInputFields(aggregationInput: InputTypeComposer, fie return; } + +export function createAggregationInputFields2( + entity: ConcreteEntityAdapter | RelationshipAdapter, + rel: RelationshipAdapter, + schemaComposer: SchemaComposer +): InputTypeComposer | undefined { + const aggregationFields = entity.aggregationWhereFields; + if (!aggregationFields.length) { + return; + } + + const aggregationInputName = rel.getAggregationWhereInputTypeName( + entity instanceof ConcreteEntityAdapter ? `Node` : `Edge` + ); + const aggregationInput = schemaComposer.createInputTC({ + name: aggregationInputName, + fields: { + AND: `[${aggregationInputName}!]`, + OR: `[${aggregationInputName}!]`, + NOT: aggregationInputName, + }, + }); + + for (const aggregationField of aggregationFields) { + switch (aggregationField.getTypeName()) { + case "ID": + createIDAggregationInputFields2(aggregationInput, aggregationField); + break; + + case "String": + createStringAggregationInputFields2(aggregationInput, aggregationField); + break; + + // Types that you can average + // https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-avg + // https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-avg-duration + // String uses avg(size()) + case "Int": + case "Float": + case "BigInt": + case "Duration": + createAverageAggregationInputFields2(aggregationInput, aggregationField); + break; + + default: + createComparisonAggregationInputFields2(aggregationInput, aggregationField); + break; + } + } + + return aggregationInput; +} + +function createComparisonAggregationInputFields2(aggregationInput: InputTypeComposer, field: AttributeAdapter) { + aggregationInput.addFields( + AGGREGATION_COMPARISON_OPERATORS.reduce( + (res, operator) => ({ + ...res, + [`${field.name}_${operator}`]: { + type: field.getTypeName(), + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }, + [`${field.name}_MIN_${operator}`]: field.getTypeName(), + [`${field.name}_MAX_${operator}`]: field.getTypeName(), + }), + {} + ) + ); +} + +function createAverageAggregationInputFields2(aggregationInput: InputTypeComposer, field: AttributeAdapter) { + aggregationInput.addFields( + AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { + let averageType = "Float"; + + if (field.getTypeName() === "BigInt") { + averageType = "BigInt"; + } + + if (field.getTypeName() === "Duration") { + averageType = "Duration"; + } + + return { + ...res, + [`${field.name}_${operator}`]: { + type: field.getTypeName(), + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }, + [`${field.name}_AVERAGE_${operator}`]: averageType, + [`${field.name}_MIN_${operator}`]: field.getTypeName(), + [`${field.name}_MAX_${operator}`]: field.getTypeName(), + ...(field.getTypeName() !== "Duration" + ? { [`${field.name}_SUM_${operator}`]: field.getTypeName() } + : {}), + }; + }, {}) + ); + + return; +} + +function createStringAggregationInputFields2(aggregationInput: InputTypeComposer, field: AttributeAdapter) { + aggregationInput.addFields( + AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { + return { + ...res, + [`${field.name}_${operator}`]: { + type: `${operator === "EQUAL" ? "String" : "Int"}`, + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }, + [`${field.name}_AVERAGE_${operator}`]: { + type: "Float", + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }, + [`${field.name}_LONGEST_${operator}`]: { + type: "Int", + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }, + [`${field.name}_SHORTEST_${operator}`]: { + type: "Int", + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }, + [`${field.name}_AVERAGE_LENGTH_${operator}`]: "Float", + [`${field.name}_LONGEST_LENGTH_${operator}`]: "Int", + [`${field.name}_SHORTEST_LENGTH_${operator}`]: "Int", + }; + }, {}) + ); + + return; +} + +function createIDAggregationInputFields2(aggregationInput: InputTypeComposer, field: AttributeAdapter) { + aggregationInput.addFields({ + [`${field.name}_EQUAL`]: { + type: `ID`, + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }, + }); + + return; +} From 74aeb756b4778e7cc08a68aad845ec5737a1fdcb Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:27:33 +0200 Subject: [PATCH 015/162] wip: add createTopLevelConnectOrCreateInput2 --- ...reate-top-level-connect-or-create-input.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts b/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts index a62feafca6..2b9e8f3f2b 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts @@ -19,6 +19,7 @@ import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; import { upperFirst } from "graphql-compose"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationField } from "../../types"; export function createTopLevelConnectOrCreateInput({ @@ -44,3 +45,25 @@ export function createTopLevelConnectOrCreateInput({ : nodeFieldConnectOrCreateInputName, }); } + +export function createTopLevelConnectOrCreateInput2({ + schemaComposer, + sourceName, + relationshipAdapter, +}: { + schemaComposer: SchemaComposer; + sourceName: string; + relationshipAdapter: RelationshipAdapter; +}): void { + const nodeConnectOrCreateInput: InputTypeComposer = schemaComposer.getOrCreateITC( + `${sourceName}ConnectOrCreateInput` + ); + + const nodeFieldConnectOrCreateInputName = relationshipAdapter.connectOrCreateFieldInputTypeName; + + nodeConnectOrCreateInput.addFields({ + [relationshipAdapter.name]: relationshipAdapter.isList + ? `[${nodeFieldConnectOrCreateInputName}!]` + : nodeFieldConnectOrCreateInputName, + }); +} From 8bf1020b5dbb32c6da47c7d4aac36c5c5b20f272 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:27:49 +0200 Subject: [PATCH 016/162] wip: add createRelationshipUnionFields2 --- .../create-relationship-union-fields.ts | 415 +++++++++++++++++- 1 file changed, 413 insertions(+), 2 deletions(-) diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts index 7bd8430d93..d0de5431ec 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts @@ -17,15 +17,20 @@ * limitations under the License. */ +import type { DirectiveNode } from "graphql"; import type { InputTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import { InterfaceTypeComposer, upperFirst } from "graphql-compose"; import type { Node } from "../../classes"; import { RelationshipNestedOperationsOption } from "../../constants"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import type { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationField } from "../../types"; import { DEPRECATE_NOT } from "../constants"; -import { addDirectedArgument } from "../directed-argument"; +import { addDirectedArgument, addDirectedArgument2 } from "../directed-argument"; import { graphqlDirectivesToCompose } from "../to-compose"; -import { createConnectOrCreateField } from "./create-connect-or-create-field"; +import { createConnectOrCreateField, createConnectOrCreateField2 } from "./create-connect-or-create-field"; export function createRelationshipUnionFields({ nodes, @@ -424,3 +429,409 @@ export function createRelationshipUnionFields({ }); } } + +export function createRelationshipUnionFields2({ + relationship, + composeNode, + schemaComposer, + hasNonGeneratedProperties, + hasNonNullNonGeneratedProperties, + userDefinedFieldDirectives, +}: { + relationship: RelationshipAdapter; + composeNode: ObjectTypeComposer | InterfaceTypeComposer; + schemaComposer: SchemaComposer; + hasNonGeneratedProperties: boolean; + hasNonNullNonGeneratedProperties: boolean; + userDefinedFieldDirectives: Map; +}) { + const refNodes = (relationship.target as UnionEntityAdapter).concreteEntities; + + const sourceAdapter = relationship.source as ConcreteEntityAdapter | InterfaceEntityAdapter; + const nestedOperations = new Set(relationship.nestedOperations); + const nodeCreateInput = schemaComposer.getITC(`${sourceAdapter.name}CreateInput`); + // const refNodes = nodes.filter((x) => rel.union?.nodes?.includes(x.name));fNodes.find((n) => n.uniqueFields.length); + + const onlyConnectOrCreateAndNoUniqueFieldsInAllRefTypes = + nestedOperations.size === 1 && + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + !refNodes.find((n) => n.uniqueFields.length); + + if (relationship.isReadable()) { + const baseNodeFieldArgs = { + options: "QueryOptions", + where: `${relationship.target.name}Where`, + }; + const nodeFieldArgs = addDirectedArgument2(baseNodeFieldArgs, relationship); + + composeNode.addFields({ + [relationship.name]: { + type: relationship.getTargetTypePrettyName(), + args: nodeFieldArgs, + description: relationship.description, + directives: graphqlDirectivesToCompose(userDefinedFieldDirectives.get(relationship.name) ?? []), + }, + }); + } + + const upperFieldName = upperFirst(relationship.name); + const upperNodeName = upperFirst(sourceAdapter.name); + const typePrefix = `${upperNodeName}${upperFieldName}`; + + const unionConnectInput = nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) + ? schemaComposer.createInputTC({ + name: `${typePrefix}ConnectInput`, + fields: {}, + }) + : undefined; + const unionDeleteInput = nestedOperations.has(RelationshipNestedOperationsOption.DELETE) + ? schemaComposer.createInputTC({ + name: `${typePrefix}DeleteInput`, + fields: {}, + }) + : undefined; + const unionDisconnectInput = nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT) + ? schemaComposer.createInputTC({ + name: `${typePrefix}DisconnectInput`, + fields: {}, + }) + : undefined; + let unionCreateInput: InputTypeComposer | undefined; + + const connectOrCreateAndUniqueFieldsInRefTypes = + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + refNodes.find((n) => n.uniqueFields.length); + + if ( + nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || + connectOrCreateAndUniqueFieldsInRefTypes + ) { + unionCreateInput = schemaComposer.createInputTC({ + name: `${typePrefix}CreateInput`, + fields: {}, + }); + } + + const unionUpdateInput = schemaComposer.createInputTC({ + name: `${typePrefix}UpdateInput`, + fields: {}, + }); + + const unionCreateFieldInput = schemaComposer.createInputTC({ + name: `${typePrefix}CreateFieldInput`, + fields: {}, + }); + + refNodes.forEach((unionMemberEntity) => { + const unionPrefix = `${sourceAdapter.name}${upperFieldName}${unionMemberEntity.name}`; + const updateField = `${unionMemberEntity.name}UpdateInput`; + const nodeFieldInputName = `${unionPrefix}FieldInput`; + const whereName = `${unionPrefix}ConnectionWhere`; + + const deleteName = `${unionPrefix}DeleteFieldInput`; + const deleteField = relationship.isList ? `[${deleteName}!]` : `${deleteName}`; + + const disconnectName = `${unionPrefix}DisconnectFieldInput`; + const disconnect = relationship.isList ? `[${disconnectName}!]` : `${disconnectName}`; + + const connectionUpdateInputName = `${unionPrefix}UpdateConnectionInput`; + + const connectAndCreateAndUniqueFields = + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + unionMemberEntity.uniqueFields.length; + const onlyConnectOrCreateAndNoUniqueFields = + nestedOperations.size === 1 && + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + !unionMemberEntity.uniqueFields.length; + + let updateFields: Record | undefined; + if (nestedOperations.size !== 0 && !onlyConnectOrCreateAndNoUniqueFields) { + updateFields = { + where: whereName, + }; + } + + let fieldInputFields: Record | undefined; + if ( + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || + nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || + connectAndCreateAndUniqueFields + ) { + // Created as {} because the connect/create fields are added later + fieldInputFields = {}; + } + + const createName = `${sourceAdapter.name}${upperFirst(relationship.name)}${ + unionMemberEntity.name + }CreateFieldInput`; + if (!schemaComposer.has(createName)) { + schemaComposer.getOrCreateITC(createName, (tc) => { + tc.addFields({ node: `${unionMemberEntity.name}CreateInput!` }); + + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: `${relationship.propertiesTypeName}CreateInput${ + hasNonNullNonGeneratedProperties ? `!` : "" + }`, + }); + } + }); + + if ( + unionCreateInput && + (nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || + connectAndCreateAndUniqueFields) + ) { + unionCreateInput.addFields({ + [unionMemberEntity.name]: nodeFieldInputName, + }); + } + + unionCreateFieldInput.addFields({ + [unionMemberEntity.name]: relationship.isList ? `[${createName}!]` : createName, + }); + } + if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE) && (updateFields || fieldInputFields)) { + const create = relationship.isList ? `[${createName}!]` : createName; + if (updateFields) { + updateFields.create = create; + } + if (fieldInputFields) { + fieldInputFields.create = create; + } + } + + if (unionConnectInput && (updateFields || fieldInputFields)) { + const connectWhereName = `${unionMemberEntity.name}ConnectWhere`; + if (!schemaComposer.has(connectWhereName)) { + schemaComposer.createInputTC({ + name: connectWhereName, + fields: { + node: `${unionMemberEntity.name}Where!`, + }, + }); + } + + const connectName = `${unionPrefix}ConnectFieldInput`; + const connect = relationship.isList ? `[${connectName}!]` : `${connectName}`; + if (!schemaComposer.has(connectName)) { + schemaComposer.getOrCreateITC(connectName, (tc) => { + tc.addFields({ where: connectWhereName }); + + if (unionMemberEntity.relationships.size) { + tc.addFields({ + connect: relationship.isList + ? `[${unionMemberEntity.name}ConnectInput!]` + : `${unionMemberEntity.name}ConnectInput`, + }); + } + + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: `${relationship.propertiesTypeName}CreateInput${ + hasNonNullNonGeneratedProperties ? `!` : "" + }`, + }); + } + }); + + unionConnectInput.addFields({ + [unionMemberEntity.name]: connect, + }); + + if (updateFields) { + updateFields.connect = connect; + } + if (fieldInputFields) { + fieldInputFields.connect = connect; + } + } + } + + if ( + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + (updateFields || fieldInputFields) + ) { + const connectOrCreate = createConnectOrCreateField2({ + relationshipAdapter: relationship, + targetEntityAdapter: unionMemberEntity, + schemaComposer, + userDefinedFieldDirectives, + }); + + if (connectOrCreate) { + if (updateFields) { + updateFields.connectOrCreate = connectOrCreate; + } + if (fieldInputFields) { + fieldInputFields.connectOrCreate = connectOrCreate; + } + } + } + + if (unionDeleteInput && updateFields) { + if (!schemaComposer.has(deleteName)) { + schemaComposer.getOrCreateITC(deleteName, (tc) => { + tc.addFields({ where: whereName }); + + if (unionMemberEntity.relationships.size) { + tc.addFields({ + delete: `${unionMemberEntity.name}DeleteInput`, + }); + } + }); + + unionDeleteInput.addFields({ + [unionMemberEntity.name]: deleteField, + }); + } + + updateFields.delete = relationship.isList ? `[${deleteName}!]` : deleteName; + } + + if (unionDisconnectInput && updateFields) { + if (!schemaComposer.has(disconnectName)) { + schemaComposer.getOrCreateITC(disconnectName, (tc) => { + tc.addFields({ where: whereName }); + + if (unionMemberEntity.relationships.size) { + tc.addFields({ + disconnect: `${unionMemberEntity.name}DisconnectInput`, + }); + } + }); + + unionDisconnectInput.addFields({ + [unionMemberEntity.name]: disconnect, + }); + + updateFields.disconnect = relationship.isList ? `[${disconnectName}!]` : disconnectName; + } + } + + if (updateFields) { + const updateName = `${unionPrefix}UpdateFieldInput`; + const update = relationship.isList ? `[${updateName}!]` : updateName; + if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { + updateFields.update = connectionUpdateInputName; + } + if (!schemaComposer.has(updateName)) { + schemaComposer.createInputTC({ + name: updateName, + fields: updateFields, + }); + + unionUpdateInput.addFields({ + [unionMemberEntity.name]: update, + }); + } + + schemaComposer.getOrCreateITC(connectionUpdateInputName, (tc) => { + tc.addFields({ node: updateField }); + + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: `${relationship.propertiesTypeName}UpdateInput`, + }); + } + }); + } + + if (fieldInputFields) { + schemaComposer.createInputTC({ + name: nodeFieldInputName, + fields: fieldInputFields, + }); + } + + schemaComposer.getOrCreateITC(whereName, (tc) => { + tc.addFields({ + node: `${unionMemberEntity.name}Where`, + node_NOT: { + type: `${unionMemberEntity.name}Where`, + directives: [DEPRECATE_NOT], + }, + AND: `[${whereName}!]`, + OR: `[${whereName}!]`, + NOT: whereName, + }); + + if (relationship.propertiesTypeName) { + tc.addFields({ + edge: `${relationship.propertiesTypeName}Where`, + edge_NOT: { + type: `${relationship.propertiesTypeName}Where`, + directives: [DEPRECATE_NOT], + }, + }); + } + }); + + if (connectAndCreateAndUniqueFields) { + // TODO: merge with createTopLevelConnectOrCreateInput + const nodeConnectOrCreateInput: InputTypeComposer = schemaComposer.getOrCreateITC( + `${sourceAdapter.name}ConnectOrCreateInput` + ); + + const nodeRelationConnectOrCreateInput: InputTypeComposer = schemaComposer.getOrCreateITC( + `${sourceAdapter.name}${upperFirst(relationship.name)}ConnectOrCreateInput` + ); + + nodeConnectOrCreateInput.addFields({ + [relationship.name]: nodeRelationConnectOrCreateInput, + }); + + const nodeFieldConnectOrCreateInputName = `${sourceAdapter.name}${upperFirst(relationship.name)}${ + unionMemberEntity.name + }ConnectOrCreateFieldInput`; + + nodeRelationConnectOrCreateInput.addFields({ + [unionMemberEntity.name]: relationship.isList + ? `[${nodeFieldConnectOrCreateInputName}!]` + : nodeFieldConnectOrCreateInputName, + }); + } + }); + + if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { + const nodeRelationInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}RelationInput`); + nodeRelationInput.addFields({ + [relationship.name]: unionCreateFieldInput, + }); + } + if (relationship.isCreatable() && !(composeNode instanceof InterfaceTypeComposer) && unionCreateInput) { + nodeCreateInput.addFields({ + [relationship.name]: unionCreateInput, + }); + } + if ( + relationship.isUpdatable() && + nestedOperations.size !== 0 && + !onlyConnectOrCreateAndNoUniqueFieldsInAllRefTypes + ) { + const nodeUpdateInput = schemaComposer.getITC(`${sourceAdapter.name}UpdateInput`); + nodeUpdateInput.addFields({ + [relationship.name]: unionUpdateInput, + }); + } + if (unionConnectInput) { + const nodeConnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}ConnectInput`); + nodeConnectInput.addFields({ + [relationship.name]: unionConnectInput, + }); + } + if (unionDeleteInput) { + const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}DeleteInput`); + nodeDeleteInput.addFields({ + [relationship.name]: unionDeleteInput, + }); + } + if (unionDisconnectInput) { + const nodeDisconnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}DisconnectInput`); + nodeDisconnectInput.addFields({ + [relationship.name]: unionDisconnectInput, + }); + } +} From 748eb6819cc411020e03572e552e40a61096be11 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:28:41 +0200 Subject: [PATCH 017/162] wip: changes to Relationship and RelationshipAdapter --- .../schema-model/relationship/Relationship.ts | 43 ++++- .../RelationshipAdapter.test.ts | 13 +- .../model-adapters/RelationshipAdapter.ts | 164 +++++++++++++++++- 3 files changed, 210 insertions(+), 10 deletions(-) diff --git a/packages/graphql/src/schema-model/relationship/Relationship.ts b/packages/graphql/src/schema-model/relationship/Relationship.ts index e0f90a9bd6..b37c1b0889 100644 --- a/packages/graphql/src/schema-model/relationship/Relationship.ts +++ b/packages/graphql/src/schema-model/relationship/Relationship.ts @@ -18,13 +18,18 @@ */ import { Neo4jGraphQLSchemaValidationError } from "../../classes"; +import type { RelationshipQueryDirectionOption, RelationshipNestedOperationsOption } from "../../constants"; import { upperFirst } from "../../utils/upper-first"; +import type { Annotation, Annotations } from "../annotation/Annotation"; +import { annotationToKey } from "../annotation/Annotation"; import type { Attribute } from "../attribute/Attribute"; import type { Entity } from "../entity/Entity"; export type RelationshipDirection = "IN" | "OUT"; -export type QueryDirection = "DEFAULT_DIRECTED" | "DEFAULT_UNDIRECTED" | "DIRECTED_ONLY" | "UNDIRECTED_ONLY"; -export type NestedOperation = "CREATE" | "UPDATE" | "DELETE" | "CONNECT" | "DISCONNECT" | "CONNECT_OR_CREATE"; +export type QueryDirection = keyof typeof RelationshipQueryDirectionOption; +// "DEFAULT_DIRECTED" | "DEFAULT_UNDIRECTED" | "DIRECTED_ONLY" | "UNDIRECTED_ONLY"; +export type NestedOperation = keyof typeof RelationshipNestedOperationsOption; +// "CREATE" | "UPDATE" | "DELETE" | "CONNECT" | "DISCONNECT" | "CONNECT_OR_CREATE"; export class Relationship { public readonly name: string; // name of the relationship field, e.g. friends @@ -37,6 +42,10 @@ export class Relationship { public readonly queryDirection: QueryDirection; public readonly nestedOperations: NestedOperation[]; public readonly aggregate: boolean; + public readonly isNullable: boolean; + public readonly description: string; + public readonly annotations: Partial = {}; + public readonly propertiesTypeName: string | undefined; // TODO: Remove connectionFieldTypename and relationshipFieldTypename and delegate to the adapter /**Note: Required for now to infer the types without ResolveTree */ @@ -60,6 +69,10 @@ export class Relationship { queryDirection, nestedOperations, aggregate, + isNullable, + description, + annotations = [], + propertiesTypeName, }: { name: string; type: string; @@ -71,6 +84,10 @@ export class Relationship { queryDirection: QueryDirection; nestedOperations: NestedOperation[]; aggregate: boolean; + isNullable: boolean; + description: string; + annotations: Annotation[]; + propertiesTypeName?: string; }) { this.type = type; this.source = source; @@ -81,10 +98,17 @@ export class Relationship { this.queryDirection = queryDirection; this.nestedOperations = nestedOperations; this.aggregate = aggregate; + this.isNullable = isNullable; + this.description = description; + this.propertiesTypeName = propertiesTypeName; for (const attribute of attributes) { this.addAttribute(attribute); } + + for (const annotation of annotations) { + this.addAnnotation(annotation); + } } public clone(): Relationship { @@ -99,9 +123,24 @@ export class Relationship { queryDirection: this.queryDirection, nestedOperations: this.nestedOperations, aggregate: this.aggregate, + isNullable: this.isNullable, + description: this.description, + annotations: Object.values(this.annotations), + propertiesTypeName: this.propertiesTypeName, }); } + private addAnnotation(annotation: Annotation): void { + const annotationKey = annotationToKey(annotation); + if (this.annotations[annotationKey]) { + throw new Neo4jGraphQLSchemaValidationError(`Annotation ${annotationKey} already exists in ${this.name}`); + } + + // We cast to any because we aren't narrowing the Annotation type here. + // There's no reason to narrow either, since we care more about performance. + this.annotations[annotationKey] = annotation as any; + } + private addAttribute(attribute: Attribute): void { if (this.attributes.has(attribute.name)) { throw new Neo4jGraphQLSchemaValidationError(`Attribute ${attribute.name} already exists in ${this.name}.`); 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 617660ec23..124d298786 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 @@ -17,9 +17,10 @@ * limitations under the License. */ +import { SelectableAnnotation } from "../../annotation/SelectableAnnotation"; +import { UniqueAnnotation } from "../../annotation/UniqueAnnotation"; import { Attribute } from "../../attribute/Attribute"; import { GraphQLBuiltInScalarType, ScalarType } from "../../attribute/AttributeType"; -import { UniqueAnnotation } from "../../annotation/UniqueAnnotation"; import { ConcreteEntity } from "../../entity/ConcreteEntity"; import { ConcreteEntityAdapter } from "../../entity/model-adapters/ConcreteEntityAdapter"; import { Relationship } from "../Relationship"; @@ -77,6 +78,8 @@ describe("RelationshipAdapter", () => { args: [], }); + const selectable = new SelectableAnnotation({ onRead: false, onAggregate: true }); + relationship = new Relationship({ name: "accounts", type: "HAS_ACCOUNT", @@ -88,6 +91,8 @@ describe("RelationshipAdapter", () => { queryDirection: "DEFAULT_DIRECTED", nestedOperations: ["CREATE", "UPDATE", "DELETE", "CONNECT", "DISCONNECT", "CONNECT_OR_CREATE"], aggregate: false, + description: "", + annotations: [selectable], }); userEntity.addRelationship(relationship); @@ -132,4 +137,10 @@ describe("RelationshipAdapter", () => { const relationshipAdapter = userAdapter.relationships.get("accounts"); expect(relationshipAdapter?.relationshipFieldTypename).toBe("UserAccountsRelationship"); }); + + test("should parse selectable", () => { + const relationshipAdapter = userAdapter.relationships.get("accounts"); + expect(relationshipAdapter?.isAggregable()).toBeTrue(); + expect(relationshipAdapter?.isReadable()).toBeFalse(); + }); }); 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 5fc2877e6e..2d1241d0ad 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -18,16 +18,17 @@ */ import { upperFirst } from "graphql-compose"; -import type { Entity } from "../../entity/Entity"; -import { ConcreteEntityAdapter } from "../../entity/model-adapters/ConcreteEntityAdapter"; -import type { NestedOperation, QueryDirection, Relationship, RelationshipDirection } from "../Relationship"; -import { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapter"; +import type { Annotations } from "../../annotation/Annotation"; import type { Attribute } from "../../attribute/Attribute"; +import { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapter"; import { ConcreteEntity } from "../../entity/ConcreteEntity"; +import type { Entity } from "../../entity/Entity"; import { InterfaceEntity } from "../../entity/InterfaceEntity"; import { UnionEntity } from "../../entity/UnionEntity"; -import { UnionEntityAdapter } from "../../entity/model-adapters/UnionEntityAdapter"; +import { ConcreteEntityAdapter } from "../../entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../../entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../entity/model-adapters/UnionEntityAdapter"; +import type { NestedOperation, QueryDirection, Relationship, RelationshipDirection } from "../Relationship"; export class RelationshipAdapter { public readonly name: string; @@ -40,16 +41,100 @@ export class RelationshipAdapter { public readonly queryDirection: QueryDirection; public readonly nestedOperations: NestedOperation[]; public readonly aggregate: boolean; + public readonly isNullable: boolean; + public readonly description: string; + public readonly propertiesTypeName: string | undefined; public readonly isList: boolean; + public readonly annotations: Partial; + + public get prefixForTypename(): string { + // TODO: if relationship field is inherited by source (part of a implemented Interface, not necessarily annotated as rel) + // then return this.interface.name + // TODO: how to get implemented interfaces here?? + return this.source.name; + } /**Note: Required for now to infer the types without ResolveTree */ public get connectionFieldTypename(): string { - return `${this.source.name}${upperFirst(this.name)}Connection`; + return `${this.prefixForTypename}${upperFirst(this.name)}Connection`; } /**Note: Required for now to infer the types without ResolveTree */ public get relationshipFieldTypename(): string { - return `${this.source.name}${upperFirst(this.name)}Relationship`; + return `${this.prefixForTypename}${upperFirst(this.name)}Relationship`; + } + + public get fieldInputTypeName(): string { + return `${this.prefixForTypename}${upperFirst(this.name)}FieldInput`; + } + + public get updateFieldInputTypeName(): string { + return `${this.prefixForTypename}${upperFirst(this.name)}UpdateFieldInput`; + } + + public get createFieldInputTypeName(): string { + return `${this.prefixForTypename}${upperFirst(this.name)}CreateFieldInput`; + } + + public get deleteFieldInputTypeName(): string { + return `${this.prefixForTypename}${upperFirst(this.name)}DeleteFieldInput`; + } + + public get connectFieldInputTypeName(): string { + return `${this.prefixForTypename}${upperFirst(this.name)}ConnectFieldInput`; + } + public get disconnectFieldInputTypeName(): string { + return `${this.prefixForTypename}${upperFirst(this.name)}DisconnectFieldInput`; + } + public get connectOrCreateFieldInputTypeName(): string { + if (this.target instanceof UnionEntity) { + return `${this.prefixForTypename}${upperFirst(this.name)}${this.target.name}ConnectOrCreateFieldInput`; + } + return `${this.prefixForTypename}${upperFirst(this.name)}ConnectOrCreateFieldInput`; + } + + public get connectOrCreateOnCreateFieldInputTypeName(): string { + return `${this.connectOrCreateFieldInputTypeName}OnCreate`; + } + + public get connectionFieldName(): string { + return `${this.name}Connection`; + } + + public get connectionWhereTypename(): string { + return `${this.prefixForTypename}${upperFirst(this.name)}ConnectionWhere`; + } + public get updateConnectionInputTypename(): string { + return `${this.prefixForTypename}${upperFirst(this.name)}UpdateConnectionInput`; + } + + public get aggregateInputTypeName(): string { + return `${this.source.name}${upperFirst(this.name)}AggregateInput`; + } + + public getAggregationWhereInputTypeName(isA: "Node" | "Edge"): string { + return `${this.source.name}${upperFirst(this.name)}${isA}AggregationWhereInput`; + } + + public get edgeCreateInputTypeName(): string { + return `${this.propertiesTypeName}CreateInput${this.hasNonNullNonGeneratedProperties ? `!` : ""}`; + } + + public get edgeUpdateInputTypeName(): string { + return `${this.propertiesTypeName}UpdateInput`; + } + + public getConnectOrCreateInputFields(target: ConcreteEntityAdapter) { + // TODO: use this._target in the end; currently passed-in as argument because unions need this per refNode + // const target = this._target; + // if (!(target instanceof ConcreteEntityAdapter)) { + // // something is wrong + // return;= + // } + return { + where: `${target.operations.connectOrCreateWhereInputTypeName}!`, + onCreate: `${this.connectOrCreateOnCreateFieldInputTypeName}!`, + }; } /**Note: Required for now to infer the types without ResolveTree */ @@ -76,6 +161,10 @@ export class RelationshipAdapter { queryDirection, nestedOperations, aggregate, + isNullable, + description, + annotations, + propertiesTypeName, } = relationship; this.name = name; this.type = type; @@ -97,8 +186,12 @@ export class RelationshipAdapter { this.queryDirection = queryDirection; this.nestedOperations = nestedOperations; this.aggregate = aggregate; + this.isNullable = isNullable; this.rawEntity = target; this.initAttributes(attributes); + this.description = description; + this.annotations = annotations; + this.propertiesTypeName = propertiesTypeName; } private initAttributes(attributes: Map) { @@ -159,4 +252,61 @@ export class RelationshipAdapter { } return this._target; } + + getTargetTypePrettyName(): string { + if (this.isList) { + return `[${this.target.name}!]${this.isNullable === false ? "!" : ""}`; + } + return `${this.target.name}${this.isNullable === false ? "!" : ""}`; + } + + isReadable(): boolean { + return this.annotations.selectable?.onRead !== false; + } + + isFilterableByValue(): boolean { + return this.annotations.filterable?.byValue !== false; + } + + isFilterableByAggregate(): boolean { + return this.annotations.filterable?.byAggregate !== false; + } + + isAggregable(): boolean { + return this.annotations.selectable?.onAggregate !== false; + } + + isCreatable(): boolean { + return this.annotations.settable?.onCreate !== false; + } + + isUpdatable(): boolean { + return this.annotations.settable?.onUpdate !== false; + } + + /* + const nonGeneratedProperties = [ + ...objectFields.primitiveFields.filter((field) => !field.autogenerate), + ...objectFields.scalarFields, + ...objectFields.enumFields, + ...objectFields.temporalFields.filter((field) => !field.timestamps), + ...objectFields.pointFields, + ]; + result.hasNonGeneratedProperties = nonGeneratedProperties.length > 0; + */ + public get nonGeneratedProperties(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isNonGeneratedField()); + } + + public get hasNonNullNonGeneratedProperties(): boolean { + return this.nonGeneratedProperties.some((property) => property.isRequired()); + } + + public get aggregableFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregableField()); + } + + public get aggregationWhereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregationWhereField()); + } } From 053cd02b48459efd7ca3b27a388613979c24b93e Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:28:56 +0200 Subject: [PATCH 018/162] doc: add todo --- .../schema/validation/validate-duplicate-relationship-fields.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/graphql/src/schema/validation/validate-duplicate-relationship-fields.ts b/packages/graphql/src/schema/validation/validate-duplicate-relationship-fields.ts index 8e22f6c037..6db56dd2c6 100644 --- a/packages/graphql/src/schema/validation/validate-duplicate-relationship-fields.ts +++ b/packages/graphql/src/schema/validation/validate-duplicate-relationship-fields.ts @@ -52,6 +52,7 @@ export function validateDuplicateRelationshipFields(objType: ObjectTypeDefinitio throw new Error("@relationship direction expects an enum"); } + // TODO: remove reference to getFieldTypeMeta const typeMeta = getFieldTypeMeta(field.type); if (relationshipUsages.has(`${typeMeta.name}__${typeArg.value.value}__${directionArg.value.value}`)) { From 89c5d42babf32a45aa3c7f632ed1c97624822473 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:29:23 +0200 Subject: [PATCH 019/162] wip: use schema-model in augmentFulltextSchema --- .../graphql/src/schema/augment/fulltext.ts | 131 +++++++++--------- 1 file changed, 68 insertions(+), 63 deletions(-) diff --git a/packages/graphql/src/schema/augment/fulltext.ts b/packages/graphql/src/schema/augment/fulltext.ts index 4a07f8d8f3..7f504b5330 100644 --- a/packages/graphql/src/schema/augment/fulltext.ts +++ b/packages/graphql/src/schema/augment/fulltext.ts @@ -22,81 +22,86 @@ import type { SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; import { SCORE_FIELD } from "../../graphql/directives/fulltext"; import { FloatWhere } from "../../graphql/input-objects/FloatWhere"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { upperFirst } from "../../utils/upper-first"; import { fulltextResolver } from "../resolvers/query/fulltext"; export function augmentFulltextSchema( node: Node, composer: SchemaComposer, - nodeWhereTypeName: string, - nodeSortTypeName: string + concreteEntityAdapter: ConcreteEntityAdapter ) { - if (node.fulltextDirective) { - const fields = node.fulltextDirective.indexes.reduce((res, index) => { - const indexName = index.indexName || index.name; - if (indexName === undefined) { - throw new Error("The name of the fulltext index should be defined using the indexName argument."); - } - return { - ...res, - [indexName]: composer.createInputTC({ - name: `${node.name}${upperFirst(indexName)}Fulltext`, - fields: { - phrase: new GraphQLNonNull(GraphQLString), - }, - }), - }; - }, {}); + if (!node.fulltextDirective) { + return; + } - const fulltextResultDescription = `The result of a fulltext search on an index of ${node.name}`; - const fulltextWhereDescription = `The input for filtering a fulltext query on an index of ${node.name}`; - const fulltextSortDescription = `The input for sorting a fulltext query on an index of ${node.name}`; + const fields = node.fulltextDirective.indexes.reduce((res, index) => { + const indexName = index.indexName || index.name; + if (indexName === undefined) { + throw new Error("The name of the fulltext index should be defined using the indexName argument."); + } + return { + ...res, + [indexName]: composer.createInputTC({ + name: `${concreteEntityAdapter.name}${upperFirst(indexName)}Fulltext`, + fields: { + phrase: new GraphQLNonNull(GraphQLString), + }, + }), + }; + }, {}); - composer.createInputTC({ - name: `${node.name}Fulltext`, - fields, - }); + const fulltextResultDescription = `The result of a fulltext search on an index of ${concreteEntityAdapter.name}`; + const fulltextWhereDescription = `The input for filtering a fulltext query on an index of ${concreteEntityAdapter.name}`; + const fulltextSortDescription = `The input for sorting a fulltext query on an index of ${concreteEntityAdapter.name}`; - composer.createInputTC({ - name: node.fulltextTypeNames.sort, - description: fulltextSortDescription, - fields: { - [SCORE_FIELD]: "SortDirection", - [node.singular]: nodeSortTypeName, - }, - }); + composer.createInputTC({ + name: concreteEntityAdapter.operations.fullTextInputTypeName, + fields, + }); - composer.createInputTC({ - name: node.fulltextTypeNames.where, - description: fulltextWhereDescription, - fields: { - [SCORE_FIELD]: FloatWhere.name, - [node.singular]: nodeWhereTypeName, - }, - }); + composer.createInputTC({ + name: node.fulltextTypeNames.sort, + description: fulltextSortDescription, + fields: { + [SCORE_FIELD]: "SortDirection", + [node.singular]: concreteEntityAdapter.operations.sortInputTypeName, + }, + }); - composer.createObjectTC({ - name: node.fulltextTypeNames.result, - description: fulltextResultDescription, - fields: { - [SCORE_FIELD]: new GraphQLNonNull(GraphQLFloat), - [node.singular]: `${node.name}!`, - }, - }); + composer.createInputTC({ + name: node.fulltextTypeNames.where, + description: fulltextWhereDescription, + fields: { + [SCORE_FIELD]: FloatWhere.name, + [node.singular]: concreteEntityAdapter.operations.whereInputTypeName, + }, + }); + + composer.createObjectTC({ + name: node.fulltextTypeNames.result, + description: fulltextResultDescription, + fields: { + [SCORE_FIELD]: new GraphQLNonNull(GraphQLFloat), + [node.singular]: `${node.name}!`, + }, + }); - node.fulltextDirective.indexes.forEach((index) => { - // TODO: remove indexName assignment and undefined check once the name argument has been removed. - const indexName = index.indexName || index.name; - if (indexName === undefined) { - throw new Error("The name of the fulltext index should be defined using the indexName argument."); - } - let queryName = `${node.plural}Fulltext${upperFirst(indexName)}`; - if (index.queryName) { - queryName = index.queryName; - } - composer.Query.addFields({ - [queryName]: fulltextResolver({ node }, index), - }); + // TODO: to move this over to the concreteEntityAdapter we need to check what the use of + // the queryType and scoreVariable properties are in FulltextContext + // and determine if we can remove them + node.fulltextDirective.indexes.forEach((index) => { + // TODO: remove indexName assignment and undefined check once the name argument has been removed. + const indexName = index.indexName || index.name; + if (indexName === undefined) { + throw new Error("The name of the fulltext index should be defined using the indexName argument."); + } + let queryName = `${node.plural}Fulltext${upperFirst(indexName)}`; + if (index.queryName) { + queryName = index.queryName; + } + composer.Query.addFields({ + [queryName]: fulltextResolver({ node }, index), }); - } + }); } From bd8c45895bcdae3192f73f6b7f602bfc91530c51 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:29:49 +0200 Subject: [PATCH 020/162] refactor: remove anyNonNullRelProperties from ObjectFieldsInspectionResult --- .../create-relationship-fields/inspect-object-fields.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/graphql/src/schema/create-relationship-fields/inspect-object-fields.ts b/packages/graphql/src/schema/create-relationship-fields/inspect-object-fields.ts index c07331f23c..2a63bf4293 100644 --- a/packages/graphql/src/schema/create-relationship-fields/inspect-object-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/inspect-object-fields.ts @@ -21,7 +21,6 @@ import type { ObjectFields } from "../get-obj-field-meta"; type ObjectFieldsInspectionResult = { hasNonGeneratedProperties: boolean; - anyNonNullRelProperties: boolean; hasNonNullNonGeneratedProperties: boolean; }; @@ -29,7 +28,6 @@ export function inspectObjectFields(objectFields?: ObjectFields): ObjectFieldsIn const result: ObjectFieldsInspectionResult = { hasNonGeneratedProperties: false, hasNonNullNonGeneratedProperties: false, - anyNonNullRelProperties: false, }; if (!objectFields) { @@ -45,13 +43,6 @@ export function inspectObjectFields(objectFields?: ObjectFields): ObjectFieldsIn ]; result.hasNonGeneratedProperties = nonGeneratedProperties.length > 0; result.hasNonNullNonGeneratedProperties = nonGeneratedProperties.some((field) => field.typeMeta.required); - result.anyNonNullRelProperties = [ - ...objectFields.primitiveFields, - ...objectFields.scalarFields, - ...objectFields.enumFields, - ...objectFields.temporalFields, - ...objectFields.pointFields, - ].some((field) => field.typeMeta.required); return result; } From 107ef73e032c00d18824f422a8730fd85922e24c Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 12:30:14 +0200 Subject: [PATCH 021/162] wip: add createRelationshipInterfaceFields2 --- .../create-relationship-interface-fields.ts | 210 +++++++++++++++++- 1 file changed, 204 insertions(+), 6 deletions(-) diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts index 3770ba3e52..448e96a489 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts @@ -17,12 +17,16 @@ * limitations under the License. */ +import type { DirectiveNode } from "graphql"; import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import { InterfaceTypeComposer, upperFirst } from "graphql-compose"; import type { Node } from "../../classes"; import { RelationshipNestedOperationsOption } from "../../constants"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationField } from "../../types"; -import { addDirectedArgument } from "../directed-argument"; +import { addDirectedArgument, addDirectedArgument2 } from "../directed-argument"; import { graphqlDirectivesToCompose } from "../to-compose"; export function createRelationshipInterfaceFields({ @@ -32,7 +36,7 @@ export function createRelationshipInterfaceFields({ schemaComposer, sourceName, hasNonGeneratedProperties, - anyNonNullRelProperties, + hasNonNullNonGeneratedProperties, }: { nodes: Node[]; rel: RelationField; @@ -40,7 +44,7 @@ export function createRelationshipInterfaceFields({ schemaComposer: SchemaComposer; sourceName: string; hasNonGeneratedProperties: boolean; - anyNonNullRelProperties: boolean; + hasNonNullNonGeneratedProperties: boolean; }) { const refNodes = nodes.filter((x) => rel.interface?.implementations?.includes(x.name)); const upperFieldName = upperFirst(rel.fieldName); @@ -60,7 +64,7 @@ export function createRelationshipInterfaceFields({ } if (hasNonGeneratedProperties) { - tc.addFields({ edge: `${rel.properties}CreateInput${anyNonNullRelProperties ? `!` : ""}` }); + tc.addFields({ edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}` }); } tc.addFields({ where: connectWhere }); @@ -91,7 +95,7 @@ export function createRelationshipInterfaceFields({ }); if (hasNonGeneratedProperties) { tc.addFields({ - edge: `${rel.properties}CreateInput${anyNonNullRelProperties ? `!` : ""}`, + edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, }); } }); @@ -211,7 +215,9 @@ export function createRelationshipInterfaceFields({ tc.addFields({ node: `${n.name}CreateInput!` }); if (hasNonGeneratedProperties) { - tc.addFields({ edge: `${rel.properties}CreateInput${anyNonNullRelProperties ? `!` : ""}` }); + tc.addFields({ + edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, + }); } }); } @@ -225,3 +231,195 @@ export function createRelationshipInterfaceFields({ } } } + +export function createRelationshipInterfaceFields2({ + relationship, + composeNode, + schemaComposer, + hasNonGeneratedProperties, + userDefinedFieldDirectives, +}: { + relationship: RelationshipAdapter; + composeNode: ObjectTypeComposer | InterfaceTypeComposer; + schemaComposer: SchemaComposer; + hasNonGeneratedProperties: boolean; + userDefinedFieldDirectives: Map; +}) { + const refNodes = (relationship.target as InterfaceEntityAdapter).concreteEntities; + + // TODO: We need to add operations to InterfaceEntityAdapter + const sourceAdapter = relationship.source as ConcreteEntityAdapter | InterfaceEntityAdapter; + const nestedOperations = new Set(relationship.nestedOperations); + const sourceCreateInput = schemaComposer.getITC(`${sourceAdapter.name}CreateInput`); + const sourceUpdateInput = schemaComposer.getITC(`${sourceAdapter.name}UpdateInput`); + + const connectWhere = schemaComposer.getOrCreateITC(`${relationship.target.name}ConnectWhere`, (tc) => { + tc.addFields({ + node: `${relationship.target.name}Where!`, + }); + }); + + const connectFieldInput = schemaComposer.getOrCreateITC(relationship.connectFieldInputTypeName, (tc) => { + if (schemaComposer.has(`${relationship.target.name}ConnectInput`)) { + tc.addFields({ connect: `${relationship.target.name}ConnectInput` }); + } + + if (hasNonGeneratedProperties) { + tc.addFields({ edge: relationship.edgeCreateInputTypeName }); + } + + tc.addFields({ where: connectWhere }); + }); + + const deleteFieldInput = schemaComposer.getOrCreateITC(relationship.deleteFieldInputTypeName, (tc) => { + if (schemaComposer.has(`${relationship.target.name}DeleteInput`)) { + tc.addFields({ delete: `${relationship.target.name}DeleteInput` }); + } + + tc.addFields({ where: relationship.connectionWhereTypename }); + }); + + const disconnectFieldInput = schemaComposer.getOrCreateITC(relationship.disconnectFieldInputTypeName, (tc) => { + if (schemaComposer.has(`${relationship.target.name}DisconnectInput`)) { + tc.addFields({ disconnect: `${relationship.target.name}DisconnectInput` }); + } + + tc.addFields({ where: relationship.connectionWhereTypename }); + }); + + const createFieldInput = schemaComposer.getOrCreateITC(relationship.createFieldInputTypeName, (tc) => { + tc.addFields({ + node: `${relationship.target.name}CreateInput!`, + }); + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationship.edgeCreateInputTypeName, + }); + } + }); + + const updateConnectionFieldInput = schemaComposer.getOrCreateITC( + relationship.updateConnectionInputTypename, + (tc) => { + if (hasNonGeneratedProperties) { + tc.addFields({ edge: relationship.edgeUpdateInputTypeName }); + } + tc.addFields({ node: `${relationship.target.name}UpdateInput` }); + } + ); + + if ( + nestedOperations.size !== 0 && + !(nestedOperations.size === 1 && nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) + ) { + const updateFieldInput = schemaComposer.getOrCreateITC(relationship.updateFieldInputTypeName); + + if (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { + const nodeConnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}ConnectInput`); + nodeConnectInput.addFields({ + [relationship.name]: relationship.isList ? connectFieldInput.NonNull.List : connectFieldInput, + }); + updateFieldInput.addFields({ + connect: relationship.isList ? connectFieldInput.NonNull.List : connectFieldInput, + }); + } + if (nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { + const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}DeleteInput`); + nodeDeleteInput.addFields({ + [relationship.name]: relationship.isList ? deleteFieldInput.NonNull.List : deleteFieldInput, + }); + updateFieldInput.addFields({ + delete: relationship.isList ? deleteFieldInput.NonNull.List : deleteFieldInput, + }); + } + if (nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { + const nodeDisconnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}DisconnectInput`); + nodeDisconnectInput.addFields({ + [relationship.name]: relationship.isList ? disconnectFieldInput.NonNull.List : disconnectFieldInput, + }); + updateFieldInput.addFields({ + disconnect: relationship.isList ? disconnectFieldInput.NonNull.List : disconnectFieldInput, + }); + } + if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { + const nodeRelationInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}RelationInput`); + nodeRelationInput.addFields({ + [relationship.name]: relationship.isList ? createFieldInput.NonNull.List : createFieldInput, + }); + updateFieldInput.addFields({ + create: relationship.isList ? createFieldInput.NonNull.List : createFieldInput, + }); + } + if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { + updateFieldInput.addFields({ + update: updateConnectionFieldInput, + }); + } + + updateFieldInput.addFields({ + where: relationship.connectionWhereTypename, + }); + + if (relationship.isUpdatable()) { + sourceUpdateInput.addFields({ + [relationship.name]: relationship.isList ? updateFieldInput.NonNull.List : updateFieldInput, + }); + } + } + + if (relationship.isReadable()) { + const baseNodeFieldArgs = { + options: `${relationship.target.name}Options`, + where: `${relationship.target.name}Where`, + }; + const nodeFieldArgs = addDirectedArgument2(baseNodeFieldArgs, relationship); + + composeNode.addFields({ + [relationship.name]: { + type: relationship.getTargetTypePrettyName(), + args: nodeFieldArgs, + description: relationship.description, + directives: graphqlDirectivesToCompose(userDefinedFieldDirectives.get(relationship.name) ?? []), + }, + }); + } + + if ( + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || + nestedOperations.has(RelationshipNestedOperationsOption.CREATE) + ) { + const nodeFieldInput = schemaComposer.getOrCreateITC(relationship.fieldInputTypeName, (tc) => { + if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { + tc.addFields({ + create: relationship.isList ? createFieldInput.NonNull.List : createFieldInput, + }); + } + if (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { + tc.addFields({ + connect: relationship.isList ? connectFieldInput.NonNull.List : connectFieldInput, + }); + } + }); + + refNodes.forEach((n) => { + if (!schemaComposer.has(relationship.createFieldInputTypeName)) { + schemaComposer.getOrCreateITC(relationship.createFieldInputTypeName, (tc) => { + tc.addFields({ node: `${n.name}CreateInput!` }); + + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationship.edgeCreateInputTypeName, + }); + } + }); + } + }); + // Interface CreateInput does not require relationship input fields + // These are specified on the concrete nodes. + if (relationship.isCreatable() && !(composeNode instanceof InterfaceTypeComposer)) { + sourceCreateInput.addFields({ + [relationship.name]: nodeFieldInput, + }); + } + } +} From 6679a99ff85b398dfd6ebe43407933d9e23e603e Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 13:49:11 +0200 Subject: [PATCH 022/162] wip: changes to generate-model --- .../src/schema-model/generate-model.ts | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/packages/graphql/src/schema-model/generate-model.ts b/packages/graphql/src/schema-model/generate-model.ts index b2dd140a77..2f75c9ef2b 100644 --- a/packages/graphql/src/schema-model/generate-model.ts +++ b/packages/graphql/src/schema-model/generate-model.ts @@ -239,11 +239,15 @@ function hydrateRelationships( if (relationshipFieldsMap.has(fieldDefinition.name.value)) { continue; } + const mergedDirectives = mergedFields + .filter((f) => f.name.value === fieldDefinition.name.value) + .flatMap((f) => f.directives || []); const relationshipField = generateRelationshipField( fieldDefinition, schema, entityWithRelationships, - definitionCollection + definitionCollection, + mergedDirectives ); if (relationshipField) { relationshipFieldsMap.set(fieldDefinition.name.value, relationshipField); @@ -259,8 +263,10 @@ function generateRelationshipField( field: FieldDefinitionNode, schema: Neo4jGraphQLSchemaModel, source: ConcreteEntity | InterfaceEntity, - definitionCollection: DefinitionCollection + definitionCollection: DefinitionCollection, + mergedDirectives: DirectiveNode[] ): Relationship | undefined { + // TODO: remove reference to getFieldTypeMeta const fieldTypeMeta = getFieldTypeMeta(field.type); const relationshipUsage = findDirective(field.directives, "relationship"); if (!relationshipUsage) return undefined; @@ -275,6 +281,7 @@ function generateRelationshipField( ); let attributes: Attribute[] = []; + let propertiesTypeName: string | undefined = undefined; if (properties && typeof properties === "string") { const propertyInterface = definitionCollection.relationshipProperties.get(properties); if (!propertyInterface) { @@ -282,6 +289,7 @@ function generateRelationshipField( `The \`@relationshipProperties\` directive could not be found on the \`${properties}\` interface` ); } + propertiesTypeName = properties; const inheritedFields = propertyInterface.interfaces?.flatMap((interfaceNamedNode) => { @@ -297,6 +305,10 @@ function generateRelationshipField( attributes = filterTruthy(fields) as Attribute[]; } + + const annotations = parseAnnotations(mergedDirectives); + + // TODO: add property interface name return new Relationship({ name: fieldName, type: type as string, @@ -308,6 +320,10 @@ function generateRelationshipField( queryDirection: queryDirection as QueryDirection, nestedOperations: nestedOperations as NestedOperation[], aggregate: aggregate as boolean, + isNullable: !fieldTypeMeta.required, + description: field.description?.value || "", + annotations: annotations, + propertiesTypeName, }); } @@ -333,10 +349,12 @@ function generateConcreteEntity( return parseAttribute(fieldDefinition, inheritedField, definitionCollection); }); - const annotations = createEntityAnnotations(definition.directives || []); + const inheritedDirectives = inheritedFields?.flatMap((f) => f.directives || []) || []; + const annotations = createEntityAnnotations((definition.directives || []).concat(inheritedDirectives)); return new ConcreteEntity({ name: definition.name.value, + description: definition.description?.value, labels: getLabels(definition), attributes: filterTruthy(fields) as Attribute[], annotations, From a592cddeb0654a1787f16254d429bb025bcff6a4 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 14:57:46 +0200 Subject: [PATCH 023/162] test: update tests --- .../schema/directives/filterable.test.ts | 213 +++++++++++++----- 1 file changed, 162 insertions(+), 51 deletions(-) diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 87ddf31008..5404d474e4 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -17,11 +17,11 @@ * limitations under the License. */ -import { gql } from "graphql-tag"; -import { Neo4jGraphQL } from "../../../src"; +import { printSchemaWithDirectives } from "@graphql-tools/utils"; import type { GraphQLInputObjectType } from "graphql"; import { lexicographicSortSchema } from "graphql"; -import { printSchemaWithDirectives } from "@graphql-tools/utils"; +import { gql } from "graphql-tag"; +import { Neo4jGraphQL } from "../../../src"; import { TestSubscriptionsEngine } from "../../utils/TestSubscriptionsEngine"; describe("@filterable directive", () => { @@ -98,47 +98,7 @@ describe("@filterable directive", () => { "ActorMoviesNodeAggregationWhereInput" ) as GraphQLInputObjectType; - expect(aggregationWhereInput).toBeDefined(); - - const aggregationWhereInputFields = aggregationWhereInput.getFields(); - - const title_AVERAGE_LENGTH_EQUAL = aggregationWhereInputFields["title_AVERAGE_LENGTH_EQUAL"]; - const title_LONGEST_LENGTH_EQUAL = aggregationWhereInputFields["title_LONGEST_LENGTH_EQUAL"]; - const title_SHORTEST_LENGTH_EQUAL = aggregationWhereInputFields["title_SHORTEST_LENGTH_EQUAL"]; - const title_AVERAGE_LENGTH_GT = aggregationWhereInputFields["title_AVERAGE_LENGTH_GT"]; - const title_LONGEST_LENGTH_GT = aggregationWhereInputFields["title_LONGEST_LENGTH_GT"]; - const title_SHORTEST_LENGTH_GT = aggregationWhereInputFields["title_SHORTEST_LENGTH_GT"]; - const title_AVERAGE_LENGTH_GTE = aggregationWhereInputFields["title_AVERAGE_LENGTH_GTE"]; - const title_LONGEST_LENGTH_GTE = aggregationWhereInputFields["title_LONGEST_LENGTH_GTE"]; - const title_SHORTEST_LENGTH_GTE = aggregationWhereInputFields["title_SHORTEST_LENGTH_GTE"]; - const title_AVERAGE_LENGTH_LT = aggregationWhereInputFields["title_AVERAGE_LENGTH_LT"]; - const title_LONGEST_LENGTH_LT = aggregationWhereInputFields["title_LONGEST_LENGTH_LT"]; - const title_SHORTEST_LENGTH_LT = aggregationWhereInputFields["title_SHORTEST_LENGTH_LT"]; - const title_AVERAGE_LENGTH_LTE = aggregationWhereInputFields["title_AVERAGE_LENGTH_LTE"]; - const title_LONGEST_LENGTH_LTE = aggregationWhereInputFields["title_LONGEST_LENGTH_LTE"]; - const title_SHORTEST_LENGTH_LTE = aggregationWhereInputFields["title_SHORTEST_LENGTH_LTE"]; - - const aggregationFilters = [ - title_AVERAGE_LENGTH_EQUAL, - title_LONGEST_LENGTH_EQUAL, - title_SHORTEST_LENGTH_EQUAL, - title_AVERAGE_LENGTH_GT, - title_LONGEST_LENGTH_GT, - title_SHORTEST_LENGTH_GT, - title_AVERAGE_LENGTH_GTE, - title_LONGEST_LENGTH_GTE, - title_SHORTEST_LENGTH_GTE, - title_AVERAGE_LENGTH_LT, - title_LONGEST_LENGTH_LT, - title_SHORTEST_LENGTH_LT, - title_AVERAGE_LENGTH_LTE, - title_LONGEST_LENGTH_LTE, - title_SHORTEST_LENGTH_LTE, - ]; - - for (const aggregationFilter of aggregationFilters) { - expect(aggregationFilter).toBeUndefined(); - } + expect(aggregationWhereInput).toBeUndefined(); }); test("enable value and aggregation filters", async () => { @@ -957,11 +917,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -1037,7 +1001,6 @@ describe("@filterable directive", () => { count_GTE: Int count_LT: Int count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput } input ActorMoviesConnectFieldInput { @@ -1090,12 +1053,6 @@ describe("@filterable directive", () => { create: [ActorMoviesCreateFieldInput!] } - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - } - type ActorMoviesRelationship { cursor: String! node: Movie! @@ -1280,6 +1237,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1291,6 +1249,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1305,10 +1264,13 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -1694,6 +1656,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1729,6 +1692,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1772,11 +1736,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -2130,6 +2098,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2141,6 +2110,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2155,10 +2125,13 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -2544,6 +2517,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2579,6 +2553,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2622,11 +2597,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -2970,6 +2949,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2981,6 +2961,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2995,10 +2976,13 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -3356,6 +3340,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3391,6 +3376,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3437,11 +3423,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -3795,6 +3785,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3806,6 +3797,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3820,10 +3812,13 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -4120,6 +4115,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -4155,6 +4151,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4200,11 +4197,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -4558,6 +4559,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4569,6 +4571,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4583,10 +4586,13 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -4972,6 +4978,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5007,6 +5014,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5052,11 +5060,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -5410,6 +5422,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5421,6 +5434,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5435,10 +5449,13 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -5796,6 +5813,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5831,6 +5849,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5876,11 +5895,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -6234,6 +6257,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6245,6 +6269,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6259,10 +6284,13 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -6559,6 +6587,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -6594,6 +6623,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6644,11 +6674,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor implements Person { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -6998,6 +7032,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7009,6 +7044,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7023,9 +7059,12 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -7402,6 +7441,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -7437,6 +7477,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7487,11 +7528,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor implements Person { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -7841,6 +7886,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7852,6 +7898,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7866,9 +7913,12 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -8245,6 +8295,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -8280,6 +8331,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8330,11 +8382,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor implements Person { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -8684,6 +8740,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8695,6 +8752,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -8709,9 +8767,12 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -9088,6 +9149,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -9123,6 +9185,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9177,11 +9240,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -9530,11 +9597,15 @@ describe("@filterable directive", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Appearance { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -9893,6 +9964,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9904,6 +9976,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -9918,9 +9991,12 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -10293,11 +10369,13 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -10343,6 +10421,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10397,11 +10476,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -10750,11 +10833,15 @@ describe("@filterable directive", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Appearance { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -11113,6 +11200,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -11124,6 +11212,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -11138,9 +11227,12 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -11513,11 +11605,13 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -11563,6 +11657,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -11617,11 +11712,15 @@ describe("@filterable directive", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -11970,11 +12069,15 @@ describe("@filterable directive", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Appearance { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -12333,6 +12436,7 @@ describe("@filterable directive", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -12344,6 +12448,7 @@ describe("@filterable directive", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -12358,9 +12463,12 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -12733,11 +12841,13 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -12783,6 +12893,7 @@ describe("@filterable directive", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From ccf6b4c8879b0fd338eefc86de3a2d164e5a40f7 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 15:09:26 +0200 Subject: [PATCH 024/162] feat: use DEPRECATED constant in place of string --- .../schema/augment/add-relationship-array-filters.ts | 5 +++-- packages/graphql/src/schema/constants.ts | 8 +++++--- .../graphql/src/schema/create-connection-fields.ts | 12 ++++++------ .../create-relationship-fields.ts | 4 ++-- packages/graphql/src/schema/get-where-fields.ts | 5 +++-- packages/graphql/src/schema/math.ts | 3 ++- packages/graphql/src/schema/to-compose.ts | 7 ++++--- 7 files changed, 25 insertions(+), 19 deletions(-) diff --git a/packages/graphql/src/schema/augment/add-relationship-array-filters.ts b/packages/graphql/src/schema/augment/add-relationship-array-filters.ts index 4307ec42d9..999da9c93d 100644 --- a/packages/graphql/src/schema/augment/add-relationship-array-filters.ts +++ b/packages/graphql/src/schema/augment/add-relationship-array-filters.ts @@ -19,6 +19,7 @@ import type { Directive, InputTypeComposer } from "graphql-compose"; import pluralize from "pluralize"; +import { DEPRECATED } from "../../constants"; export function addRelationshipArrayFilters({ whereInput, @@ -52,11 +53,11 @@ export function addRelationshipArrayFilters({ ) ); - whereInput.setFieldDirectiveByName(fieldName, "deprecated", { + whereInput.setFieldDirectiveByName(fieldName, DEPRECATED, { reason: `Use \`${fieldName}_SOME\` instead.`, }); - whereInput.setFieldDirectiveByName(`${fieldName}_NOT`, "deprecated", { + whereInput.setFieldDirectiveByName(`${fieldName}_NOT`, DEPRECATED, { reason: `Use \`${fieldName}_NONE\` instead.`, }); } diff --git a/packages/graphql/src/schema/constants.ts b/packages/graphql/src/schema/constants.ts index 35f6ece30f..432967371a 100644 --- a/packages/graphql/src/schema/constants.ts +++ b/packages/graphql/src/schema/constants.ts @@ -17,22 +17,24 @@ * limitations under the License. */ +import { DEPRECATED } from "../constants"; + export const DEPRECATE_NOT = { - name: "deprecated", + name: DEPRECATED, args: { reason: "Negation filters will be deprecated, use the NOT operator to achieve the same behavior", }, }; export const DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS = { - name: "deprecated", + name: DEPRECATED, args: { reason: "Please use the explicit _LENGTH version for string aggregation.", }, }; export const DEPRECATE_INVALID_AGGREGATION_FILTERS = { - name: "deprecated", + name: DEPRECATED, args: { reason: "Aggregation filters that are not relying on an aggregating function will be deprecated.", }, diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index 41757c14f6..549b68591a 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -21,14 +21,15 @@ import type { GraphQLResolveInfo } from "graphql"; import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../classes"; import { Relationship } from "../classes"; +import { DEPRECATED } from "../constants"; import type { ConnectionField, ConnectionQueryArgs } from "../types"; +import { addRelationshipArrayFilters } from "./augment/add-relationship-array-filters"; +import { DEPRECATE_NOT } from "./constants"; +import { addDirectedArgument } from "./directed-argument"; import type { ObjectFields } from "./get-obj-field-meta"; import getSortableFields from "./get-sortable-fields"; -import { addDirectedArgument } from "./directed-argument"; import { connectionFieldResolver } from "./pagination"; import { graphqlDirectivesToCompose } from "./to-compose"; -import { DEPRECATE_NOT } from "./constants"; -import { addRelationshipArrayFilters } from "./augment/add-relationship-array-filters"; function createConnectionFields({ connectionFields, @@ -57,7 +58,7 @@ function createConnectionFields({ }); }); const deprecatedDirectives = graphqlDirectivesToCompose( - connectionField.otherDirectives.filter((directive) => directive.name.value === "deprecated") + connectionField.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) ); const connectionWhereName = `${connectionField.typeMeta.name}Where`; @@ -101,7 +102,6 @@ function createConnectionFields({ }, }); } - // n..m Relationships if (connectionField.relationship.typeMeta.array && connectionField.relationship.filterableOptions.byValue) { @@ -245,7 +245,7 @@ function createConnectionFields({ if (!connectionField.relationship.writeonly && connectionField.selectableOptions.onRead) { const deprecatedDirectives = graphqlDirectivesToCompose( - connectionField.otherDirectives.filter((directive) => directive.name.value === "deprecated") + connectionField.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) ); composeNode.addFields({ [connectionField.fieldName]: { 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 6097c36862..30b9a09dfb 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 @@ -21,7 +21,7 @@ import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compo import { InterfaceTypeComposer, ObjectTypeComposer } from "graphql-compose"; import type { Node } from "../../classes"; import type { Subgraph } from "../../classes/Subgraph"; -import { RelationshipNestedOperationsOption } from "../../constants"; +import { DEPRECATED, RelationshipNestedOperationsOption } from "../../constants"; import type { RelationField } from "../../types"; import { upperFirst } from "../../utils/upper-first"; import { FieldAggregationComposer } from "../aggregations/field-aggregation-composer"; @@ -101,7 +101,7 @@ function createRelationshipFields({ } const deprecatedDirectives = graphqlDirectivesToCompose( - rel.otherDirectives.filter((directive) => directive.name.value === "deprecated") + rel.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) ); const nestedOperations = new Set(rel.nestedOperations); const nodeCreateInput = schemaComposer.getITC(`${sourceName}CreateInput`); diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index 18865264b7..941b287d55 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -17,6 +17,7 @@ * limitations under the License. */ +import { DEPRECATED } from "../constants"; import type { CustomEnumField, CustomScalarField, @@ -25,8 +26,8 @@ import type { PrimitiveField, TemporalField, } from "../types"; -import { graphqlDirectivesToCompose } from "./to-compose"; import { DEPRECATE_NOT } from "./constants"; +import { graphqlDirectivesToCompose } from "./to-compose"; interface Fields { scalarFields: CustomScalarField[]; @@ -61,7 +62,7 @@ function getWhereFields({ } const deprecatedDirectives = graphqlDirectivesToCompose( - f.otherDirectives.filter((directive) => directive.name.value === "deprecated") + f.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) ); res[f.fieldName] = { diff --git a/packages/graphql/src/schema/math.ts b/packages/graphql/src/schema/math.ts index 181c7f9e93..04fcd6b098 100644 --- a/packages/graphql/src/schema/math.ts +++ b/packages/graphql/src/schema/math.ts @@ -18,6 +18,7 @@ */ import type { InputTypeComposer } from "graphql-compose"; +import { DEPRECATED } from "../constants"; export function addMathOperatorsToITC(itc: InputTypeComposer): void { // Add mathematical operators for Int/BigInt/Float fields @@ -25,7 +26,7 @@ export function addMathOperatorsToITC(itc: InputTypeComposer): void { const fieldType = itc.getFieldTypeName(fieldName); const deprecatedDirectives = itc .getFieldDirectives(fieldName) - .filter((directive) => directive.name === "deprecated"); + .filter((directive) => directive.name === DEPRECATED); const fieldDefinition = { type: fieldType, directives: deprecatedDirectives, diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index 0e9a69203d..47c9e3e130 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -19,10 +19,11 @@ import type { DirectiveNode, InputValueDefinitionNode } from "graphql"; import type { Directive, DirectiveArgs, ObjectTypeComposerFieldConfigAsObjectDefinition } from "graphql-compose"; +import { DEPRECATED } from "../constants"; +import { parseValueNode } from "../schema-model/parser/parse-value-node"; import type { BaseField, InputField, PrimitiveField, TemporalField } from "../types"; import { DEPRECATE_NOT } from "./constants"; import getFieldTypeMeta from "./get-field-type-meta"; -import { parseValueNode } from "../schema-model/parser/parse-value-node"; import { idResolver } from "./resolvers/field/id"; import { numericalResolver } from "./resolvers/field/numerical"; @@ -98,7 +99,7 @@ export function objectFieldsToCreateInputFields(fields: BaseField[]): Record directive.name.value === "deprecated") + f.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) ); if (defaultValue !== undefined) { @@ -192,7 +193,7 @@ export function objectFieldsToSubscriptionsWhereInputFields( export function objectFieldsToUpdateInputFields(fields: BaseField[]): Record { return fields.reduce((res, f) => { const deprecatedDirectives = graphqlDirectivesToCompose( - f.otherDirectives.filter((directive) => directive.name.value === "deprecated") + f.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) ); const staticField = f.readonly || (f as PrimitiveField)?.autogenerate; From 30ac90d2d6e03aab9e67c494620bb0da10ed9d60 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 15:09:54 +0200 Subject: [PATCH 025/162] wip: add schema-model to-compose functions --- packages/graphql/src/schema/to-compose.ts | 106 ++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index 47c9e3e130..6e90b9a51d 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -20,6 +20,9 @@ import type { DirectiveNode, InputValueDefinitionNode } from "graphql"; import type { Directive, DirectiveArgs, ObjectTypeComposerFieldConfigAsObjectDefinition } from "graphql-compose"; import { DEPRECATED } from "../constants"; +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 { BaseField, InputField, PrimitiveField, TemporalField } from "../types"; import { DEPRECATE_NOT } from "./constants"; @@ -42,6 +45,21 @@ export function graphqlArgsToCompose(args: InputValueDefinitionNode[]) { }, {}); } +export function graphqlArgsToCompose2(args: Argument[]) { + return args.reduce((res, arg) => { + const inputValueAdapter = new ArgumentAdapter(arg); + + return { + ...res, + [arg.name]: { + type: inputValueAdapter.getTypePrettyName(), + description: inputValueAdapter.description, + ...(inputValueAdapter.defaultValue ? { defaultValue: inputValueAdapter.defaultValue } : {}), + }, + }; + }, {}); +} + export function graphqlDirectivesToCompose(directives: DirectiveNode[]): Directive[] { return directives.map((directive) => ({ args: (directive.arguments || [])?.reduce( @@ -86,6 +104,45 @@ export function objectFieldsToComposeFields(fields: BaseField[]): { }, {}); } +export function concreteEntityToComposeFields( + objectFields: AttributeAdapter[], + userDefinedFieldDirectives: Map +) { + const composeFields: Record> = {}; + for (const field of objectFields) { + if (field.isReadable() === false) { + continue; + } + + const newField: ObjectTypeComposerFieldConfigAsObjectDefinition = { + type: field.getTypePrettyName(), + args: {}, + description: field.description, + }; + + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(field.name); + if (userDefinedDirectivesOnField) { + newField.directives = graphqlDirectivesToCompose(userDefinedDirectivesOnField); + } + + if (field.isInt() || field.isFloat()) { + newField.resolve = numericalResolver; + } + + if (field.isID()) { + newField.resolve = idResolver; + } + + if (field.args) { + newField.args = graphqlArgsToCompose2(field.args); + } + + composeFields[field.name] = newField; + } + + return composeFields; +} + export function objectFieldsToCreateInputFields(fields: BaseField[]): Record { return fields .filter((f) => { @@ -119,6 +176,31 @@ export function objectFieldsToCreateInputFields(fields: BaseField[]): Record +) { + const createInputFields: Record = {}; + for (const field of objectFields) { + const newInputField: InputField = { + type: field.getInputTypeNames().create.pretty, + defaultValue: field.getDefaultValue(), + directives: [], + }; + + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(field.name); + if (userDefinedDirectivesOnField) { + newInputField.directives = graphqlDirectivesToCompose( + userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) + ); + } + + createInputFields[field.name] = newInputField; + } + + return createInputFields; +} + export function objectFieldsToSubscriptionsWhereInputFields( typeName: string, fields: BaseField[] @@ -212,3 +294,27 @@ export function objectFieldsToUpdateInputFields(fields: BaseField[]): Record +) { + const updateInputFields: Record = {}; + for (const field of objectFields) { + const newInputField: InputField = { + type: field.getInputTypeNames().update.pretty, + directives: [], + }; + + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(field.name); + if (userDefinedDirectivesOnField) { + newInputField.directives = graphqlDirectivesToCompose( + userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) + ); + } + + updateInputFields[field.name] = newInputField; + } + + return updateInputFields; +} From 08b888af102a15fbc24c26f2fa3497c9d36e440b Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 15:10:19 +0200 Subject: [PATCH 026/162] wip: add schema-model get-where-fields function --- .../graphql/src/schema/get-where-fields.ts | 148 +++++++++++++++++- 1 file changed, 147 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index 941b287d55..0280111342 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -17,7 +17,9 @@ * limitations under the License. */ +import type { DirectiveNode } from "graphql"; import { DEPRECATED } from "../constants"; +import type { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { CustomEnumField, CustomScalarField, @@ -47,7 +49,7 @@ function getWhereFields({ fields: Fields; isInterface?: boolean; features?: Neo4jFeaturesSettings; -}): { [k: string]: string } { +}) { return { ...(isInterface ? {} : { OR: `[${typeName}Where!]`, AND: `[${typeName}Where!]`, NOT: `${typeName}Where` }), ...[ @@ -165,3 +167,147 @@ function getWhereFields({ } export default getWhereFields; + +export function getWhereFieldsFromConcreteEntity({ + concreteEntityAdapter, + userDefinedFieldDirectives, + features, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; + userDefinedFieldDirectives: Map; + features?: Neo4jFeaturesSettings; +}): Record { + // Add the default where fields + const result = { + OR: `[${concreteEntityAdapter.name}Where!]`, + AND: `[${concreteEntityAdapter.name}Where!]`, + NOT: `${concreteEntityAdapter.name}Where`, + }; + + // Add the where fields for each attribute + for (const field of concreteEntityAdapter.attributes.values()) { + // If the field is not a where field, skip it + if (field.isWhereField() === false) { + continue; + } + + // If the attribute is not filterable, skip it + if (field.isFilterable() === false) { + continue; + } + + // If the field has a custom resolver, skip it + if (field.isCustomResolvable()) { + continue; + } + + // If the field is a custom cypher field, skip it + if (field.isCypher()) { + continue; + } + + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(field.name); + const deprecatedDirectives = graphqlDirectivesToCompose( + (userDefinedDirectivesOnField || []).filter((directive) => directive.name.value === DEPRECATED) + ); + + result[field.name] = { + type: field.getInputTypeNames().where.pretty, + directives: deprecatedDirectives, + }; + + result[`${field.name}_NOT`] = { + type: field.getInputTypeNames().where.pretty, + directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_NOT], + }; + + // If the field is a boolean, skip it + // This is done here because the previous additions are still added for boolean fields + if (field.isBoolean()) { + continue; + } + + // If the field is an array, add the includes and not includes fields + // if (field.isArray()) { + if (field.isList()) { + result[`${field.name}_INCLUDES`] = { + type: field.getInputTypeNames().where.type, + directives: deprecatedDirectives, + }; + result[`${field.name}_NOT_INCLUDES`] = { + type: field.getInputTypeNames().where.type, + directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_NOT], + }; + continue; + } + + // If the field is not an array, add the in and not in fields + result[`${field.name}_IN`] = { + type: field.getFilterableInputTypeName(), + directives: deprecatedDirectives, + }; + + result[`${field.name}_NOT_IN`] = { + type: field.getFilterableInputTypeName(), + directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_NOT], + }; + + // If the field is a number or temporal, add the comparison operators + if (field.isNumericalOrTemporal()) { + ["_LT", "_LTE", "_GT", "_GTE"].forEach((comparator) => { + result[`${field.name}${comparator}`] = { + type: field.getInputTypeNames().where.type, + directives: deprecatedDirectives, + }; + }); + continue; + } + + // If the field is spatial, add the point comparison operators + if (field.isSpatial()) { + ["_DISTANCE", "_LT", "_LTE", "_GT", "_GTE"].forEach((comparator) => { + result[`${field.name}${comparator}`] = { + type: `${field.getTypeName()}Distance`, + directives: deprecatedDirectives, + }; + }); + continue; + } + + // If the field is a string, add the string comparison operators + if (field.isString() || field.isID()) { + const stringWhereOperators: Array<{ comparator: string; typeName: string }> = [ + { comparator: "_CONTAINS", typeName: field.getInputTypeNames().where.type }, + { comparator: "_STARTS_WITH", typeName: field.getInputTypeNames().where.type }, + { comparator: "_ENDS_WITH", typeName: field.getInputTypeNames().where.type }, + ]; + + Object.entries(features?.filters?.[field.getInputTypeNames().where.type] || {}).forEach( + ([filter, enabled]) => { + if (enabled) { + if (filter === "MATCHES") { + stringWhereOperators.push({ comparator: `_${filter}`, typeName: "String" }); + } else { + stringWhereOperators.push({ + comparator: `_${filter}`, + typeName: field.getInputTypeNames().where.type, + }); + } + } + } + ); + stringWhereOperators.forEach(({ comparator, typeName }) => { + result[`${field.name}${comparator}`] = { type: typeName, directives: deprecatedDirectives }; + }); + + ["_NOT_CONTAINS", "_NOT_STARTS_WITH", "_NOT_ENDS_WITH"].forEach((comparator) => { + result[`${field.name}${comparator}`] = { + type: field.getInputTypeNames().where.type, + directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_NOT], + }; + }); + } + } + + return result; +} From 9dfd645e80150faf80fa059650e5e5843b965bdf Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 15:10:44 +0200 Subject: [PATCH 027/162] wip: add schema-model createRelationshipFields --- .../create-relationship-fields.ts | 612 ++++++++++++++++-- 1 file changed, 554 insertions(+), 58 deletions(-) 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 30b9a09dfb..52cda74fb4 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 @@ -17,28 +17,39 @@ * limitations under the License. */ +import type { DirectiveNode } from "graphql"; import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compose"; import { InterfaceTypeComposer, ObjectTypeComposer } from "graphql-compose"; import type { Node } from "../../classes"; import type { Subgraph } from "../../classes/Subgraph"; import { DEPRECATED, RelationshipNestedOperationsOption } from "../../constants"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationField } from "../../types"; import { upperFirst } from "../../utils/upper-first"; import { FieldAggregationComposer } from "../aggregations/field-aggregation-composer"; import { addRelationshipArrayFilters } from "../augment/add-relationship-array-filters"; -import { addDirectedArgument } from "../directed-argument"; +import { addDirectedArgument, addDirectedArgument2 } from "../directed-argument"; import type { ObjectFields } from "../get-obj-field-meta"; import { graphqlDirectivesToCompose } from "../to-compose"; -import { createAggregationInputFields } from "./create-aggregation-input-fields"; -import { createConnectOrCreateField } from "./create-connect-or-create-field"; -import { createRelationshipInterfaceFields } from "./create-relationship-interface-fields"; -import { createRelationshipUnionFields } from "./create-relationship-union-fields"; -import { createTopLevelConnectOrCreateInput } from "./create-top-level-connect-or-create-input"; +import { createAggregationInputFields, createAggregationInputFields2 } from "./create-aggregation-input-fields"; +import { createConnectOrCreateField, createConnectOrCreateField2 } from "./create-connect-or-create-field"; +import { + createRelationshipInterfaceFields, + createRelationshipInterfaceFields2, +} from "./create-relationship-interface-fields"; +import { createRelationshipUnionFields, createRelationshipUnionFields2 } from "./create-relationship-union-fields"; +import { + createTopLevelConnectOrCreateInput, + createTopLevelConnectOrCreateInput2, +} from "./create-top-level-connect-or-create-input"; import { overwrite } from "./fields/overwrite"; import { inspectObjectFields } from "./inspect-object-fields"; interface CreateRelationshipFieldsArgs { relationshipFields: RelationField[]; + concreteEntityAdapter?: ConcreteEntityAdapter; schemaComposer: SchemaComposer; composeNode: ObjectTypeComposer | InterfaceTypeComposer; sourceName: string; @@ -49,6 +60,7 @@ interface CreateRelationshipFieldsArgs { function createRelationshipFields({ relationshipFields, + concreteEntityAdapter, schemaComposer, // TODO: Ideally we come up with a solution where we don't have to pass the following into these kind of functions composeNode, @@ -63,9 +75,26 @@ function createRelationshipFields({ relationshipFields.forEach((rel) => { const relFields = relationshipPropertyFields.get(rel.properties || ""); + let hasNonGeneratedProperties = false; + let hasNonNullNonGeneratedProperties = false; - const { hasNonGeneratedProperties, anyNonNullRelProperties, hasNonNullNonGeneratedProperties } = - inspectObjectFields(relFields); + if (concreteEntityAdapter) { + const relationshipAdapter = concreteEntityAdapter.relationships.get(rel.fieldName); + + if (!relationshipAdapter) { + return; + } + + hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + hasNonNullNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.some((attribute) => + attribute.isRequired() + ); + } else { + const { hasNonGeneratedProperties: first, hasNonNullNonGeneratedProperties: second } = + inspectObjectFields(relFields); + hasNonGeneratedProperties = first; + hasNonNullNonGeneratedProperties = second; + } if (rel.interface) { createRelationshipInterfaceFields({ @@ -75,7 +104,7 @@ function createRelationshipFields({ schemaComposer, sourceName, hasNonGeneratedProperties, - anyNonNullRelProperties, + hasNonNullNonGeneratedProperties, }); return; @@ -199,64 +228,64 @@ function createRelationshipFields({ }); } - if (!rel.writeonly) { - const relationshipField: { type: string; description?: string; directives: Directive[]; args?: any } = { - type: rel.typeMeta.pretty, - description: rel.description, - directives: graphqlDirectivesToCompose(rel.otherDirectives), - }; + // if (!rel.writeonly) { + const relationshipField: { type: string; description?: string; directives: Directive[]; args?: any } = { + type: rel.typeMeta.pretty, + description: rel.description, + directives: graphqlDirectivesToCompose(rel.otherDirectives), + }; - let generateRelFieldArgs = true; + let generateRelFieldArgs = true; - // Subgraph schemas do not support arguments on relationship fields (singular) - if (subgraph) { - if (!rel.typeMeta.array) { - generateRelFieldArgs = false; - } + // Subgraph schemas do not support arguments on relationship fields (singular) + if (subgraph) { + if (!rel.typeMeta.array) { + generateRelFieldArgs = false; } + } - if (generateRelFieldArgs) { - const nodeFieldsBaseArgs = { - where: `${rel.typeMeta.name}Where`, - options: `${rel.typeMeta.name}Options`, - }; - const nodeFieldsArgs = addDirectedArgument(nodeFieldsBaseArgs, rel); - relationshipField.args = nodeFieldsArgs; - } + if (generateRelFieldArgs) { + const nodeFieldsBaseArgs = { + where: `${rel.typeMeta.name}Where`, + options: `${rel.typeMeta.name}Options`, + }; + const nodeFieldsArgs = addDirectedArgument(nodeFieldsBaseArgs, rel); + relationshipField.args = nodeFieldsArgs; + } + + if (rel.selectableOptions.onRead) { + composeNode.addFields({ + [rel.fieldName]: relationshipField, + }); + } + + if (composeNode instanceof ObjectTypeComposer) { + const baseTypeName = `${sourceName}${node.name}${upperFieldName}`; + const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); + + const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject( + baseTypeName, + node, + relFields + ); + + const aggregationFieldsBaseArgs = { + where: `${rel.typeMeta.name}Where`, + }; + + const aggregationFieldsArgs = addDirectedArgument(aggregationFieldsBaseArgs, rel); - if (rel.selectableOptions.onRead) { + if (rel.aggregate) { composeNode.addFields({ - [rel.fieldName]: relationshipField, + [`${rel.fieldName}Aggregate`]: { + type: aggregationTypeObject, + args: aggregationFieldsArgs, + directives: deprecatedDirectives, + }, }); } - - if (composeNode instanceof ObjectTypeComposer) { - const baseTypeName = `${sourceName}${node.name}${upperFieldName}`; - const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); - - const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject( - baseTypeName, - node, - relFields - ); - - const aggregationFieldsBaseArgs = { - where: `${rel.typeMeta.name}Where`, - }; - - const aggregationFieldsArgs = addDirectedArgument(aggregationFieldsBaseArgs, rel); - - if (rel.aggregate) { - composeNode.addFields({ - [`${rel.fieldName}Aggregate`]: { - type: aggregationTypeObject, - args: aggregationFieldsArgs, - directives: deprecatedDirectives, - }, - }); - } - } } + // } if (rel.settableOptions.onCreate) { // Interface CreateInput does not require relationship input fields @@ -470,5 +499,472 @@ function nodeHasRelationshipWithNestedOperation( ): boolean { return node.relationFields.some((relationField) => relationField.nestedOperations.includes(nestedOperation)); } +function relationshipTargetHasRelationshipWithNestedOperation( + target: ConcreteEntityAdapter | InterfaceEntityAdapter, + nestedOperation: RelationshipNestedOperationsOption +): boolean { + return Array.from(target.relationships.values()).some((rel) => rel.nestedOperations.includes(nestedOperation)); +} export default createRelationshipFields; + +export function createRelationshipFieldsFromConcreteEntityAdapter({ + concreteEntityAdapter, + schemaComposer, + // TODO: Ideally we come up with a solution where we don't have to pass the following into these kind of functions + composeNode, + // relationshipPropertyFields, + subgraph, + userDefinedFieldDirectives, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; + schemaComposer: SchemaComposer; + composeNode: ObjectTypeComposer | InterfaceTypeComposer; + // relationshipPropertyFields: Map; + subgraph?: Subgraph; + userDefinedFieldDirectives: Map; +}): void { + if (!concreteEntityAdapter.relatedEntities.length) { + return; + } + + concreteEntityAdapter.relationships.forEach((relationshipAdapter) => { + const relFields = relationshipAdapter.attributes; + const sourceName = concreteEntityAdapter.name; + + if (!relationshipAdapter) { + return; + } + + // const relFields = relationshipPropertyFields.get(rel.properties || ""); + + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + const hasNonNullNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.some((attribute) => + attribute.isRequired() + ); + + if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + createRelationshipInterfaceFields2({ + relationship: relationshipAdapter, + composeNode, + schemaComposer, + hasNonGeneratedProperties, + userDefinedFieldDirectives, + }); + + return; + } + + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + createRelationshipUnionFields2({ + relationship: relationshipAdapter, + composeNode, + schemaComposer, + hasNonGeneratedProperties, + hasNonNullNonGeneratedProperties, + userDefinedFieldDirectives, + }); + + return; + } + + // // If the related type is not in the schema, don't generate the relationship field + // const relationshipAdapter.target = nodes.find((x) => x.name === relationshipAdapter.target.name); + // if (!relationshipAdapter.target) { + // return; + // } + + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(relationshipAdapter.name); + let deprecatedDirectives: Directive[] = []; + if (userDefinedDirectivesOnField) { + deprecatedDirectives = graphqlDirectivesToCompose( + userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) + ); + } + + const nestedOperations = new Set(relationshipAdapter.nestedOperations); + const nodeCreateInput = schemaComposer.getITC(concreteEntityAdapter.operations.createInputTypeName); + const nodeUpdateInput = schemaComposer.getITC(concreteEntityAdapter.operations.updateInputTypeName); + + // Don't generate empty input type + let nodeFieldInput: InputTypeComposer | undefined; + if ( + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || + nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || + // The connectOrCreate field is not generated if the related type does not have a unique field + (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + relationshipAdapter.target.uniqueFields.length) + ) { + nodeFieldInput = schemaComposer.getOrCreateITC(relationshipAdapter.fieldInputTypeName); + } + // Don't generate an empty input type + let nodeFieldUpdateInput: InputTypeComposer | undefined; + // If the only nestedOperation is connectOrCreate, it won't be generated if there are no unique fields on the related type + const onlyConnectOrCreateAndNoUniqueFields = + nestedOperations.size === 1 && + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + !relationshipAdapter.target.uniqueFields.length; + + if (nestedOperations.size !== 0 && !onlyConnectOrCreateAndNoUniqueFields) { + nodeFieldUpdateInput = schemaComposer.getOrCreateITC(relationshipAdapter.updateFieldInputTypeName); + // Add where fields + nodeFieldUpdateInput.addFields({ + where: relationshipAdapter.connectionWhereTypename, + }); + } + + const nodeWhereAggregationInput = createAggregationInputFields2( + relationshipAdapter.target, + relationshipAdapter, + schemaComposer + ); + const edgeWhereAggregationInput = + relFields && createAggregationInputFields2(relationshipAdapter, relationshipAdapter, schemaComposer); + + const whereAggregateInput = schemaComposer.getOrCreateITC(relationshipAdapter.aggregateInputTypeName, (tc) => { + tc.addFields({ + count: "Int", + count_LT: "Int", + count_LTE: "Int", + count_GT: "Int", + count_GTE: "Int", + AND: `[${relationshipAdapter.aggregateInputTypeName}!]`, + OR: `[${relationshipAdapter.aggregateInputTypeName}!]`, + NOT: relationshipAdapter.aggregateInputTypeName, + }); + + if (nodeWhereAggregationInput) { + tc.addFields({ + node: nodeWhereAggregationInput, + }); + } + + if (edgeWhereAggregationInput) { + tc.addFields({ + edge: edgeWhereAggregationInput, + }); + } + }); + + const whereInput = schemaComposer.getITC(concreteEntityAdapter.operations.whereInputTypeName); + + if (relationshipAdapter.isFilterableByValue()) { + whereInput.addFields({ + [relationshipAdapter.name]: { + type: `${relationshipAdapter.target.name}Where`, + }, + [`${relationshipAdapter.name}_NOT`]: { + type: `${relationshipAdapter.target.name}Where`, + }, + }); + } + + if (relationshipAdapter.isFilterableByAggregate()) { + whereInput.addFields({ + [`${relationshipAdapter.name}Aggregate`]: { + type: whereAggregateInput, + directives: deprecatedDirectives, + }, + }); + } + + // n..m Relationships + + if (relationshipAdapter.isList && relationshipAdapter.isFilterableByValue()) { + addRelationshipArrayFilters({ + whereInput, + fieldName: relationshipAdapter.name, + sourceName: concreteEntityAdapter.name, + relatedType: relationshipAdapter.target.name, + whereType: `${relationshipAdapter.target.name}Where`, + directives: deprecatedDirectives, + }); + } + + const relationshipField: { type: string; description?: string; directives: Directive[]; args?: any } = { + type: relationshipAdapter.getTargetTypePrettyName(), + description: relationshipAdapter.description, + directives: graphqlDirectivesToCompose(userDefinedFieldDirectives.get(relationshipAdapter.name) || []), + }; + + let generateRelFieldArgs = true; + + // Subgraph schemas do not support arguments on relationship fields (singular) + if (subgraph) { + if (!relationshipAdapter.isList) { + generateRelFieldArgs = false; + } + } + + if (generateRelFieldArgs) { + const nodeFieldsBaseArgs = { + where: `${relationshipAdapter.target.name}Where`, + options: `${relationshipAdapter.target.name}Options`, + }; + const nodeFieldsArgs = addDirectedArgument2(nodeFieldsBaseArgs, relationshipAdapter); + relationshipField.args = nodeFieldsArgs; + } + + if (relationshipAdapter.isReadable()) { + composeNode.addFields({ + [relationshipAdapter.name]: relationshipField, + }); + } + + if (composeNode instanceof ObjectTypeComposer) { + const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); + + const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject2(relationshipAdapter); + + const aggregationFieldsBaseArgs = { + where: `${relationshipAdapter.target.name}Where`, + }; + + const aggregationFieldsArgs = addDirectedArgument2(aggregationFieldsBaseArgs, relationshipAdapter); + + if (relationshipAdapter.aggregate) { + composeNode.addFields({ + [`${relationshipAdapter.name}Aggregate`]: { + type: aggregationTypeObject, + args: aggregationFieldsArgs, + directives: deprecatedDirectives, + }, + }); + } + } + + if (relationshipAdapter.isCreatable()) { + // Interface CreateInput does not require relationship input fields + // These are specified on the concrete nodes. + if (!(composeNode instanceof InterfaceTypeComposer) && nodeFieldInput) { + nodeCreateInput.addFields({ + [relationshipAdapter.name]: { + type: nodeFieldInput, + directives: deprecatedDirectives, + }, + }); + } + } + + if ( + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + (nodeFieldInput || nodeFieldUpdateInput) + ) { + // createConnectOrCreateField return undefined if the node has no uniqueFields + const connectOrCreate = createConnectOrCreateField2({ + relationshipAdapter, + schemaComposer, + userDefinedFieldDirectives, + targetEntityAdapter: relationshipAdapter.target, + }); + + if (connectOrCreate) { + if (nodeFieldUpdateInput) { + nodeFieldUpdateInput.addFields({ + connectOrCreate, + }); + } + + if (nodeFieldInput) { + nodeFieldInput.addFields({ + connectOrCreate, + }); + } + + createTopLevelConnectOrCreateInput2({ + schemaComposer, + sourceName: concreteEntityAdapter.name, + relationshipAdapter, + }); + } + } + + if ( + nestedOperations.has(RelationshipNestedOperationsOption.CREATE) && + (nodeFieldInput || nodeFieldUpdateInput) + ) { + const createName = relationshipAdapter.createFieldInputTypeName; + const create = relationshipAdapter.isList ? `[${createName}!]` : createName; + schemaComposer.getOrCreateITC(createName, (tc) => { + tc.addFields({ node: `${relationshipAdapter.target.name}CreateInput!` }); + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationshipAdapter.edgeCreateInputTypeName, + }); + } + }); + + if (nodeFieldUpdateInput) { + nodeFieldUpdateInput.addFields({ + create, + }); + } + + if (nodeFieldInput) { + nodeFieldInput.addFields({ + create, + }); + } + + const nodeRelationInput = schemaComposer.getOrCreateITC( + concreteEntityAdapter.operations.relationInputTypeName + ); + nodeRelationInput.addFields({ + [relationshipAdapter.name]: { + type: create, + directives: deprecatedDirectives, + }, + }); + } + + if ( + nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) && + (nodeFieldInput || nodeFieldUpdateInput) + ) { + const connectName = relationshipAdapter.connectFieldInputTypeName; + const connect = relationshipAdapter.isList ? `[${connectName}!]` : connectName; + const connectWhereName = `${relationshipAdapter.target.name}ConnectWhere`; + + schemaComposer.getOrCreateITC(connectWhereName, (tc) => { + tc.addFields({ node: `${relationshipAdapter.target.name}Where!` }); + }); + + schemaComposer.getOrCreateITC(connectName, (tc) => { + tc.addFields({ where: connectWhereName }); + + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipAdapter.target as ConcreteEntityAdapter | InterfaceEntityAdapter, + RelationshipNestedOperationsOption.CONNECT + ) + ) { + tc.addFields({ + connect: relationshipAdapter.isList + ? `[${relationshipAdapter.target.name}ConnectInput!]` + : `${relationshipAdapter.target.name}ConnectInput`, + }); + } + + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationshipAdapter.edgeCreateInputTypeName, + }); + } + + tc.addFields({ overwrite }); + tc.makeFieldNonNull("overwrite"); + }); + + if (nodeFieldUpdateInput) { + nodeFieldUpdateInput.addFields({ connect }); + } + + if (nodeFieldInput) { + nodeFieldInput.addFields({ connect }); + } + + const nodeConnectInput = schemaComposer.getOrCreateITC( + concreteEntityAdapter.operations.connectInputTypeName + ); + nodeConnectInput.addFields({ + [relationshipAdapter.name]: { + type: connect, + directives: deprecatedDirectives, + }, + }); + } + + if (relationshipAdapter.isUpdatable() && nodeFieldUpdateInput) { + const connectionUpdateInputName = relationshipAdapter.updateConnectionInputTypename; + + nodeUpdateInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.isList + ? `[${nodeFieldUpdateInput.getTypeName()}!]` + : nodeFieldUpdateInput.getTypeName(), + directives: deprecatedDirectives, + }, + }); + + schemaComposer.getOrCreateITC(connectionUpdateInputName, (tc) => { + tc.addFields({ node: `${relationshipAdapter.target.name}UpdateInput` }); + + if (hasNonGeneratedProperties) { + tc.addFields({ edge: relationshipAdapter.edgeUpdateInputTypeName }); + } + }); + + if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { + nodeFieldUpdateInput.addFields({ update: connectionUpdateInputName }); + } + } + + if (nestedOperations.has(RelationshipNestedOperationsOption.DELETE) && nodeFieldUpdateInput) { + const nodeFieldDeleteInputName = relationshipAdapter.deleteFieldInputTypeName; + + nodeFieldUpdateInput.addFields({ + delete: relationshipAdapter.isList ? `[${nodeFieldDeleteInputName}!]` : nodeFieldDeleteInputName, + }); + + if (!schemaComposer.has(nodeFieldDeleteInputName)) { + schemaComposer.getOrCreateITC(nodeFieldDeleteInputName, (tc) => { + tc.addFields({ where: relationshipAdapter.connectionWhereTypename }); + + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipAdapter.target as ConcreteEntityAdapter | InterfaceEntityAdapter, + RelationshipNestedOperationsOption.DELETE + ) + ) { + tc.addFields({ delete: `${relationshipAdapter.target.name}DeleteInput` }); + } + }); + } + + const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceName}DeleteInput`); + nodeDeleteInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.isList ? `[${nodeFieldDeleteInputName}!]` : nodeFieldDeleteInputName, + directives: deprecatedDirectives, + }, + }); + } + + if (nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT) && nodeFieldUpdateInput) { + const nodeFieldDisconnectInputName = relationshipAdapter.disconnectFieldInputTypeName; + + if (!schemaComposer.has(nodeFieldDisconnectInputName)) { + schemaComposer.getOrCreateITC(nodeFieldDisconnectInputName, (tc) => { + tc.addFields({ where: relationshipAdapter.connectionWhereTypename }); + + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipAdapter.target as ConcreteEntityAdapter | InterfaceEntityAdapter, + RelationshipNestedOperationsOption.DISCONNECT + ) + ) { + tc.addFields({ disconnect: `${relationshipAdapter.target.name}DisconnectInput` }); + } + }); + } + + nodeFieldUpdateInput.addFields({ + disconnect: relationshipAdapter.isList + ? `[${nodeFieldDisconnectInputName}!]` + : nodeFieldDisconnectInputName, + }); + + const nodeDisconnectInput = schemaComposer.getOrCreateITC( + concreteEntityAdapter.operations.disconnectInputTypeName + ); + nodeDisconnectInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.isList + ? `[${nodeFieldDisconnectInputName}!]` + : nodeFieldDisconnectInputName, + directives: deprecatedDirectives, + }, + }); + } + }); +} From 20c8b45da18d538155243c3b47318fb5308f9ea0 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 14:12:47 +0100 Subject: [PATCH 028/162] test: update test snapshots to add empty descriptions --- .../tests/schema/array-methods.test.ts | 2 ++ .../tests/schema/authorization.test.ts | 2 ++ .../graphql/tests/schema/comments.test.ts | 1 + .../tests/schema/connect-or-create-id.test.ts | 3 +++ .../tests/schema/connect-or-create.test.ts | 2 ++ .../tests/schema/connections/sort.test.ts | 2 ++ .../tests/schema/connections/unions.test.ts | 3 +++ .../tests/schema/directives/alias.test.ts | 1 + .../relationship-nested-operations.test.ts | 11 ++++++++++ .../relationship-properties.test.ts | 6 ++++++ .../schema/directives/relationship.test.ts | 3 +++ .../tests/schema/directives/settable.test.ts | 14 +++++++++++++ .../graphql/tests/schema/federation.test.ts | 3 +++ .../graphql/tests/schema/issues/1182.test.ts | 1 + .../graphql/tests/schema/issues/162.test.ts | 2 ++ .../graphql/tests/schema/issues/2187.test.ts | 2 ++ .../graphql/tests/schema/issues/2969.test.ts | 11 ++++++++++ .../graphql/tests/schema/issues/2981.test.ts | 3 +++ .../graphql/tests/schema/issues/2993.test.ts | 1 + .../graphql/tests/schema/issues/3428.test.ts | 2 ++ .../graphql/tests/schema/issues/3439.test.ts | 4 ++++ .../graphql/tests/schema/issues/3541.test.ts | 2 ++ .../graphql/tests/schema/issues/3816.test.ts | 20 +++++++++++++++++++ .../graphql/tests/schema/issues/872.test.ts | 2 ++ .../tests/schema/query-direction.test.ts | 3 +++ .../tests/schema/string-comparators.test.ts | 2 ++ .../tests/schema/subscriptions.test.ts | 13 ++++++++++++ packages/graphql/tests/schema/unions.test.ts | 1 + 28 files changed, 122 insertions(+) diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index bb702c8647..7242bf7e00 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -79,6 +79,7 @@ describe("Arrays Methods", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! @@ -352,6 +353,7 @@ describe("Arrays Methods", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index 5767705273..94a423417b 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -92,6 +92,7 @@ describe("Authorization", () => { } type Post { + \\"\\"\\"\\"\\"\\" author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! @@ -362,6 +363,7 @@ describe("Authorization", () => { type User { id: ID! name: String! + \\"\\"\\"\\"\\"\\" posts(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! postsAggregate(directed: Boolean = true, where: UserWhere): UserUserPostsAggregationSelection postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 8209c9077c..e4106e3997 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -1337,6 +1337,7 @@ describe("Comments", () => { type Movie { id: ID + \\"\\"\\"\\"\\"\\" search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search diff --git a/packages/graphql/tests/schema/connect-or-create-id.test.ts b/packages/graphql/tests/schema/connect-or-create-id.test.ts index 9b905d2df8..76adb87b2d 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -45,6 +45,7 @@ describe("connect or create with id", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -547,6 +548,7 @@ describe("connect or create with id", () => { type Post { content: String! createdAt: DateTime! + \\"\\"\\"\\"\\"\\" creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCreatorConnectionSort!], where: PostCreatorConnectionWhere): PostCreatorConnection! @@ -861,6 +863,7 @@ describe("connect or create with id", () => { type User { id: ID! name: String! + \\"\\"\\"\\"\\"\\" posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index 3653c607be..c9f5a95b21 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -45,6 +45,7 @@ describe("Connect Or Create", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -573,6 +574,7 @@ describe("Connect Or Create", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 752cf27f49..d93091f033 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -76,6 +76,7 @@ describe("Sort", () => { type Node1 { property: String! + \\"\\"\\"\\"\\"\\" relatedTo(directed: Boolean = true, options: Node2Options, where: Node2Where): [Node2!]! relatedToAggregate(directed: Boolean = true, where: Node2Where): Node1Node2RelatedToAggregationSelection relatedToConnection(after: String, directed: Boolean = true, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! @@ -264,6 +265,7 @@ describe("Sort", () => { } type Node2 { + \\"\\"\\"\\"\\"\\" relatedTo(directed: Boolean = true, options: Node1Options, where: Node1Where): [Node1!]! relatedToAggregate(directed: Boolean = true, where: Node1Where): Node2Node1RelatedToAggregationSelection relatedToConnection(after: String, directed: Boolean = true, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 7819ff0615..964bfbbed6 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -57,6 +57,7 @@ describe("Unions", () => { type Author { name: String! + \\"\\"\\"\\"\\"\\" publications(directed: Boolean = true, options: QueryOptions, where: PublicationWhere): [Publication!]! publicationsConnection(after: String, directed: Boolean = true, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! } @@ -309,6 +310,7 @@ describe("Unions", () => { } type Book { + \\"\\"\\"\\"\\"\\" author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! authorAggregate(directed: Boolean = true, where: AuthorWhere): BookAuthorAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! @@ -627,6 +629,7 @@ describe("Unions", () => { } type Journal { + \\"\\"\\"\\"\\"\\" author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! authorAggregate(directed: Boolean = true, where: AuthorWhere): JournalAuthorAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index c2d3ff62fb..8a61d074ed 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -51,6 +51,7 @@ describe("Alias", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! 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 9ec2ff23f5..e162c98028 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -3999,6 +3999,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -4370,6 +4371,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -4788,6 +4790,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -5214,6 +5217,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -5609,6 +5613,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -6013,6 +6018,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -6418,6 +6424,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -7276,9 +7283,11 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID + \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! } @@ -7854,9 +7863,11 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID + \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! } diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index ed61d2336a..14b5a2563f 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -101,6 +101,7 @@ describe("Relationship-properties", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -419,6 +420,7 @@ describe("Relationship-properties", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -844,6 +846,7 @@ describe("Relationship-properties", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -1190,6 +1193,7 @@ describe("Relationship-properties", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -1612,6 +1616,7 @@ describe("Relationship-properties", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -1921,6 +1926,7 @@ describe("Relationship-properties", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index 0e218f0d99..76c5e402ea 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -135,6 +135,7 @@ describe("Relationship", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -447,6 +448,7 @@ describe("Relationship", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -680,6 +682,7 @@ describe("Relationship", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index aeea414127..2e1d862d00 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -592,6 +592,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! @@ -1041,6 +1042,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! @@ -1481,6 +1483,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! @@ -1765,6 +1768,7 @@ describe("@settable", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -2104,6 +2108,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! @@ -2396,6 +2401,7 @@ describe("@settable", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -2744,6 +2750,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! @@ -3256,6 +3263,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! @@ -3751,6 +3759,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! @@ -3981,6 +3990,7 @@ describe("@settable", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -4429,6 +4439,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! @@ -4675,6 +4686,7 @@ describe("@settable", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -5129,6 +5141,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! @@ -5632,6 +5645,7 @@ describe("@settable", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index fc369e97b3..d243cbe06c 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -109,6 +109,7 @@ describe("Apollo Federation", () => { } type Post { + \\"\\"\\"\\"\\"\\" author: User! authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! @@ -366,6 +367,7 @@ describe("Apollo Federation", () => { type User @shareable { name: String! + \\"\\"\\"\\"\\"\\" posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! @@ -712,6 +714,7 @@ describe("Apollo Federation", () => { } type Post { + \\"\\"\\"\\"\\"\\" author: User! authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index bd9fa6de3e..ab2ffacb49 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -200,6 +200,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index fbae9c1f3b..154ef23152 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -150,6 +150,7 @@ describe("162", () => { type TigerJawLevel2 { id: ID + \\"\\"\\"\\"\\"\\" part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! part1Aggregate(directed: Boolean = true, where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection part1Connection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! @@ -193,6 +194,7 @@ describe("162", () => { type TigerJawLevel2Part1 { id: ID + \\"\\"\\"\\"\\"\\" tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! tigerAggregate(directed: Boolean = true, where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection tigerConnection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index 571967ba43..d6c80a071a 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -78,6 +78,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { } type Genre { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! @@ -377,6 +378,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { } type Movie { + \\"\\"\\"\\"\\"\\" genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use genre\\") diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index 7a390df0de..7057692849 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -45,6 +45,7 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -61,6 +62,7 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -89,10 +91,13 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { startCursor: String } + \\"\\"\\"\\"\\"\\" type Post { + \\"\\"\\"\\"\\"\\" author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + \\"\\"\\"\\"\\"\\" content: String! } @@ -316,6 +321,7 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -328,6 +334,7 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -346,9 +353,13 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String! + \\"\\"\\"\\"\\"\\" posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index 2a8b9d61f7..ea8f33841a 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -55,6 +55,7 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { type Book { isbn: String! originalTitle: String! + \\"\\"\\"\\"\\"\\" translatedTitle(directed: Boolean = true, options: QueryOptions, where: BookTitleWhere): BookTitle translatedTitleConnection(after: String, directed: Boolean = true, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! } @@ -133,6 +134,7 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { } type BookTitle_EN { + \\"\\"\\"\\"\\"\\" book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_ENBookBookAggregationSelection bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! @@ -379,6 +381,7 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { } type BookTitle_SV { + \\"\\"\\"\\"\\"\\" book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_SVBookBookAggregationSelection bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 99baf4fd74..20bf5dae6e 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -234,6 +234,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } type User implements Profile { + \\"\\"\\"\\"\\"\\" following(directed: Boolean = true, options: ProfileOptions, where: ProfileWhere): [Profile!]! followingConnection(after: String, directed: Boolean = true, first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! id: ID! diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 84a108c1fc..64e8d26224 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -77,6 +77,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -445,6 +446,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, 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 10f678a828..634ea159a7 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -111,6 +111,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Genre { name: String! + \\"\\"\\"\\"\\"\\" product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } @@ -511,6 +512,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Movie implements INode & IProduct { + \\"\\"\\"\\"\\"\\" genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! @@ -883,6 +885,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Series implements INode & IProduct { + \\"\\"\\"\\"\\"\\" genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection genreConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! @@ -2528,6 +2531,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Genre { name: String! + \\"\\"\\"\\"\\"\\" product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index 4354b60727..5660803aa4 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -118,6 +118,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type Movie @key(fields: \\"title\\") @shareable { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -473,6 +474,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! diff --git a/packages/graphql/tests/schema/issues/3816.test.ts b/packages/graphql/tests/schema/issues/3816.test.ts index 475c0f194c..3982caa119 100644 --- a/packages/graphql/tests/schema/issues/3816.test.ts +++ b/packages/graphql/tests/schema/issues/3816.test.ts @@ -50,6 +50,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -61,16 +62,20 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -306,10 +311,13 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -523,6 +531,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -540,6 +549,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -582,6 +592,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -593,16 +604,20 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -832,10 +847,13 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1015,6 +1033,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1032,6 +1051,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index 5a699c66a3..a82829c6fe 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -50,6 +50,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -57,6 +58,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type Actor2 { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): Actor2MovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index 73d4c069ee..d191fda48d 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -103,6 +103,7 @@ describe("Query Direction", () => { } type User { + \\"\\"\\"\\"\\"\\" friends(directed: Boolean = false, options: UserOptions, where: UserWhere): [User!]! friendsAggregate(directed: Boolean = false, where: UserWhere): UserUserFriendsAggregationSelection friendsConnection(after: String, directed: Boolean = false, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! @@ -423,6 +424,7 @@ describe("Query Direction", () => { } type User { + \\"\\"\\"\\"\\"\\" friends(options: UserOptions, where: UserWhere): [User!]! friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! @@ -743,6 +745,7 @@ describe("Query Direction", () => { } type User { + \\"\\"\\"\\"\\"\\" friends(options: UserOptions, where: UserWhere): [User!]! friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index 9478524b0e..e3d9b27272 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -546,6 +546,7 @@ describe("String Comparators", () => { } type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! @@ -866,6 +867,7 @@ describe("String Comparators", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index d5cde47a44..791de88cf9 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -213,6 +213,7 @@ describe("Subscriptions", () => { type Movie { actorCount: Int + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -691,6 +692,7 @@ describe("Subscriptions", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -1031,6 +1033,7 @@ describe("Subscriptions", () => { type Movie { actorCount: Int + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -1509,6 +1512,7 @@ describe("Subscriptions", () => { type Movie { actorCount: Int + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float @@ -1898,6 +1902,7 @@ describe("Subscriptions", () => { } type Person { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! @@ -2206,6 +2211,7 @@ describe("Subscriptions", () => { } type Star { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! @@ -2620,6 +2626,7 @@ describe("Subscriptions", () => { } type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! @@ -2967,6 +2974,7 @@ describe("Subscriptions", () => { type Movie { actorCount: Int + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -3596,6 +3604,7 @@ describe("Subscriptions", () => { type Movie { actorCount: Int + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -3959,6 +3968,7 @@ describe("Subscriptions", () => { type Agreement { id: Int! name: String + \\"\\"\\"\\"\\"\\" owner(directed: Boolean = true, options: UserOptions, where: UserWhere): User ownerAggregate(directed: Boolean = true, where: UserWhere): AgreementUserOwnerAggregationSelection ownerConnection(after: String, directed: Boolean = true, first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! @@ -4616,6 +4626,7 @@ describe("Subscriptions", () => { type Movie { actorCount: Int + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float @@ -5005,6 +5016,7 @@ describe("Subscriptions", () => { } type Person { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! @@ -5313,6 +5325,7 @@ describe("Subscriptions", () => { } type Star { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 56565314ad..5fd343b64d 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -139,6 +139,7 @@ describe("Unions", () => { type Movie { id: ID + \\"\\"\\"\\"\\"\\" search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search From bd9ad71acd1328fe3412deb1f26660f0d0c98218 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 13:55:40 +0100 Subject: [PATCH 029/162] ignore autogenerated fields from OnCreateInput type --- .../model-adapters/AttributeAdapter.ts | 16 ++++---- .../relationship-nested-operations.test.ts | 40 ++++++++++++++++++- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index d84c5397fd..ba984a530e 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -225,13 +225,14 @@ export class AttributeAdapter { */ isOnCreateField(): boolean { return ( - this.isGraphQLBuiltInScalar() || - this.isTemporal() || - this.isEnum() || - this.isPoint() || - this.isCartesianPoint() || - this.isUserScalar() || - this.isBigInt() + this.isNonGeneratedField() && + (this.isGraphQLBuiltInScalar() || + this.isTemporal() || + this.isEnum() || + this.isPoint() || + this.isCartesianPoint() || + this.isUserScalar() || + this.isBigInt()) ); } @@ -583,6 +584,7 @@ export class AttributeAdapter { ); } isAggregationFilterable(): boolean { + console.log("isAggregationFilterable", this.annotations.filterable?.byAggregate); return ( this.annotations.filterable?.byAggregate !== false && this.isCustomResolvable() === false && 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 e162c98028..aa7ade5171 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -18,10 +18,10 @@ */ import { printSchemaWithDirectives } from "@graphql-tools/utils"; +import type { GraphQLNamedInputType } from "graphql"; import { gql } from "graphql-tag"; import { lexicographicSortSchema } from "graphql/utilities"; import { Neo4jGraphQL } from "../../../src"; -import type { GraphQLNamedInputType } from "graphql"; describe("Relationship nested operations", () => { describe("Related to a concrete type", () => { @@ -78,6 +78,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -420,6 +421,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -753,6 +755,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -769,6 +772,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -780,10 +784,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -1003,7 +1010,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -1070,6 +1079,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1082,6 +1092,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1150,6 +1161,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -1502,6 +1514,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -1858,6 +1871,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -2215,6 +2229,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -2564,6 +2579,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -2930,6 +2946,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2946,6 +2963,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2957,11 +2975,15 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! @@ -3341,7 +3363,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -3408,6 +3432,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3420,6 +3445,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3489,10 +3515,12 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID + \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! @@ -8378,6 +8406,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -8779,6 +8808,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -9204,6 +9234,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -9628,6 +9659,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -10049,6 +10081,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -10464,6 +10497,7 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID @@ -10880,9 +10914,11 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID + \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } @@ -11408,9 +11444,11 @@ describe("Relationship nested operations", () => { } type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID + \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } From 4c385fe95f8f5652123bfe5c82dd4cb3393462de Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 15:25:19 +0200 Subject: [PATCH 030/162] refactor: keep old resolvers to assist in testing until resolver refactor --- .../src/schema/new-make-augmented-schema.ts | 24 ++-- .../src/schema/resolvers/mutation/create.ts | 41 ++++++- .../src/schema/resolvers/mutation/delete.ts | 38 ++++++- .../src/schema/resolvers/mutation/update.ts | 69 ++++++++++- .../src/schema/resolvers/query/aggregate.ts | 45 +++++++- .../src/schema/resolvers/query/read.ts | 40 ++++++- .../schema/resolvers/query/root-connection.ts | 107 +++++++++++++++++- 7 files changed, 346 insertions(+), 18 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 9026580d65..a3144c1137 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -40,12 +40,12 @@ import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper" import { augmentFulltextSchema } from "./augment/fulltext"; import { cypherResolver } from "./resolvers/field/cypher"; import { numericalResolver } from "./resolvers/field/numerical"; -import { createResolver } from "./resolvers/mutation/create"; -import { deleteResolver } from "./resolvers/mutation/delete"; -import { updateResolver } from "./resolvers/mutation/update"; -import { aggregateResolver } from "./resolvers/query/aggregate"; -import { findResolver } from "./resolvers/query/read"; -import { rootConnectionResolver } from "./resolvers/query/root-connection"; +import { createResolver2 } from "./resolvers/mutation/create"; +import { deleteResolver2 } from "./resolvers/mutation/delete"; +import { updateResolver2 } from "./resolvers/mutation/update"; +import { aggregateResolver2 } from "./resolvers/query/aggregate"; +import { findResolver2 } from "./resolvers/query/read"; +import { rootConnectionResolver2 } from "./resolvers/query/root-connection"; // import * as constants from "../constants"; import type { Node } from "../classes"; import type Relationship from "../classes/Relationship"; @@ -1220,7 +1220,7 @@ function makeAugmentedSchema( if (schemaConfigurationFlags.read) { composer.Query.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.read]: findResolver({ + [concreteEntityAdapter.operations.rootTypeFieldNames.read]: findResolver2({ node, concreteEntityAdapter, }), @@ -1230,7 +1230,7 @@ function makeAugmentedSchema( graphqlDirectivesToCompose(propagatedDirectives) ); composer.Query.addFields({ - [`${concreteEntityAdapter.plural}Connection`]: rootConnectionResolver({ + [`${concreteEntityAdapter.plural}Connection`]: rootConnectionResolver2({ node, composer, concreteEntityAdapter, @@ -1244,7 +1244,7 @@ function makeAugmentedSchema( } if (schemaConfigurationFlags.aggregate) { composer.Query.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver({ + [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver2({ node, concreteEntityAdapter, }), @@ -1257,7 +1257,7 @@ function makeAugmentedSchema( if (schemaConfigurationFlags.create) { composer.Mutation.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.create]: createResolver({ + [concreteEntityAdapter.operations.rootTypeFieldNames.create]: createResolver2({ node, concreteEntityAdapter, }), @@ -1270,7 +1270,7 @@ function makeAugmentedSchema( if (schemaConfigurationFlags.delete) { composer.Mutation.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.delete]: deleteResolver({ + [concreteEntityAdapter.operations.rootTypeFieldNames.delete]: deleteResolver2({ node, composer, concreteEntityAdapter, @@ -1284,7 +1284,7 @@ function makeAugmentedSchema( if (schemaConfigurationFlags.update) { composer.Mutation.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.update]: updateResolver({ + [concreteEntityAdapter.operations.rootTypeFieldNames.update]: updateResolver2({ node, composer, concreteEntityAdapter, diff --git a/packages/graphql/src/schema/resolvers/mutation/create.ts b/packages/graphql/src/schema/resolvers/mutation/create.ts index d6331fedb2..d824c0e8c9 100644 --- a/packages/graphql/src/schema/resolvers/mutation/create.ts +++ b/packages/graphql/src/schema/resolvers/mutation/create.ts @@ -27,7 +27,46 @@ import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function createResolver({ +export function createResolver({ node }: { node: Node }) { + async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { + const resolveTree = getNeo4jResolveTree(info, { args }); + + (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; + + const { cypher, params } = await translateCreate({ context: context as Neo4jGraphQLTranslationContext, node }); + + const executeResult = await execute({ + cypher, + params, + defaultAccessMode: "WRITE", + context, + info, + }); + + const nodeProjection = info.fieldNodes[0]?.selectionSet?.selections.find( + (selection) => selection.kind === Kind.FIELD && selection.name.value === node.plural + ) as FieldNode; + const nodeKey = nodeProjection?.alias ? nodeProjection.alias.value : nodeProjection?.name?.value; + + publishEventsToSubscriptionMechanism(executeResult, context.features?.subscriptions, context.schemaModel); + + return { + info: { + bookmark: executeResult.bookmark, + ...executeResult.statistics, + }, + ...(nodeProjection ? { [nodeKey]: executeResult.records[0]?.data || [] } : {}), + }; + } + + return { + type: `${node.mutationResponseTypeNames.create}!`, + resolve, + args: { input: `[${node.name}CreateInput!]!` }, + }; +} + +export function createResolver2({ node, concreteEntityAdapter, }: { diff --git a/packages/graphql/src/schema/resolvers/mutation/delete.ts b/packages/graphql/src/schema/resolvers/mutation/delete.ts index da0844e4ea..d66e1a2d19 100644 --- a/packages/graphql/src/schema/resolvers/mutation/delete.ts +++ b/packages/graphql/src/schema/resolvers/mutation/delete.ts @@ -28,7 +28,43 @@ import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function deleteResolver({ +export function deleteResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { + async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { + const resolveTree = getNeo4jResolveTree(info, { args }); + + (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; + + const { cypher, params } = translateDelete({ context: context as Neo4jGraphQLTranslationContext, node }); + const executeResult = await execute({ + cypher, + params, + defaultAccessMode: "WRITE", + context, + info, + }); + + publishEventsToSubscriptionMechanism(executeResult, context.features?.subscriptions, context.schemaModel); + + return { bookmark: executeResult.bookmark, ...executeResult.statistics }; + } + + const hasDeleteInput = composer.has(`${node.name}DeleteInput`); + + return { + type: `DeleteInfo!`, + resolve, + args: { + where: `${node.name}Where`, + ...(hasDeleteInput + ? { + delete: `${node.name}DeleteInput`, + } + : {}), + }, + }; +} + +export function deleteResolver2({ node, composer, concreteEntityAdapter, diff --git a/packages/graphql/src/schema/resolvers/mutation/update.ts b/packages/graphql/src/schema/resolvers/mutation/update.ts index b4fc139967..1ada2e8a62 100644 --- a/packages/graphql/src/schema/resolvers/mutation/update.ts +++ b/packages/graphql/src/schema/resolvers/mutation/update.ts @@ -29,7 +29,74 @@ import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function updateResolver({ +export function updateResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { + async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { + const resolveTree = getNeo4jResolveTree(info, { args }); + + (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; + + const [cypher, params] = await translateUpdate({ context: context as Neo4jGraphQLTranslationContext, node }); + const executeResult = await execute({ + cypher, + params, + defaultAccessMode: "WRITE", + context, + info, + }); + + publishEventsToSubscriptionMechanism(executeResult, context.features?.subscriptions, context.schemaModel); + + const nodeProjection = info.fieldNodes[0]?.selectionSet?.selections.find( + (selection) => selection.kind === Kind.FIELD && selection.name.value === node.plural + ) as FieldNode; + + const nodeKey = nodeProjection?.alias ? nodeProjection.alias.value : nodeProjection?.name?.value; + + return { + info: { + bookmark: executeResult.bookmark, + ...executeResult.statistics, + }, + ...(nodeProjection ? { [nodeKey]: executeResult.records[0]?.data || [] } : {}), + }; + } + + const relationFields: Record = {}; + + const connectInput = `${node.name}ConnectInput`; + const disconnectInput = `${node.name}DisconnectInput`; + const createInput = `${node.name}RelationInput`; + const deleteInput = `${node.name}DeleteInput`; + const connectOrCreateInput = `${node.name}ConnectOrCreateInput`; + + if (composer.has(connectInput)) { + relationFields.connect = connectInput; + } + if (composer.has(disconnectInput)) { + relationFields.disconnect = disconnectInput; + } + if (composer.has(createInput)) { + relationFields.create = createInput; + } + if (composer.has(deleteInput)) { + relationFields.delete = deleteInput; + } + if (composer.has(connectOrCreateInput)) { + relationFields.connectOrCreate = connectOrCreateInput; + } + + return { + type: `${node.mutationResponseTypeNames.update}!`, + resolve, + args: { + where: `${node.name}Where`, + update: `${node.name}UpdateInput`, + ...relationFields, + }, + }; +} + +export function updateResolver2({ node, composer, concreteEntityAdapter, diff --git a/packages/graphql/src/schema/resolvers/query/aggregate.ts b/packages/graphql/src/schema/resolvers/query/aggregate.ts index 1d05232bb0..17a2f1b8dc 100644 --- a/packages/graphql/src/schema/resolvers/query/aggregate.ts +++ b/packages/graphql/src/schema/resolvers/query/aggregate.ts @@ -26,7 +26,50 @@ import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function aggregateResolver({ +export function aggregateResolver({ node }: { node: Node }) { + async function resolve(_root: any, _args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { + const resolveTree = getNeo4jResolveTree(info); + + (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; + + const [aggregateCypher, aggregateParams] = translateAggregate({ + context: context as Neo4jGraphQLTranslationContext, + node, + }); + + const { cypher, params: builtParams } = aggregateCypher.build(); + const params = { ...aggregateParams, ...builtParams }; + + const executeResult = await execute({ + cypher, + params, + defaultAccessMode: "READ", + context, + info, + }); + + return Object.values(executeResult.records[0] || {})[0]; + } + + return { + type: `${node.aggregateTypeNames.selection}!`, + resolve, + args: { + where: `${node.name}Where`, + ...(node.fulltextDirective + ? { + fulltext: { + type: `${node.name}Fulltext`, + description: + "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", + }, + } + : {}), + }, + }; +} + +export function aggregateResolver2({ node, concreteEntityAdapter, }: { diff --git a/packages/graphql/src/schema/resolvers/query/read.ts b/packages/graphql/src/schema/resolvers/query/read.ts index 477cafd98a..1aeabf9701 100644 --- a/packages/graphql/src/schema/resolvers/query/read.ts +++ b/packages/graphql/src/schema/resolvers/query/read.ts @@ -26,7 +26,45 @@ import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function findResolver({ +export function findResolver({ node }: { node: Node }) { + async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { + const resolveTree = getNeo4jResolveTree(info, { args }); + + (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; + + const { cypher, params } = translateRead({ context: context as Neo4jGraphQLTranslationContext, node }); + + const executeResult = await execute({ + cypher, + params, + defaultAccessMode: "READ", + context, + info, + }); + + return executeResult.records.map((x) => x.this); + } + + return { + type: `[${node.name}!]!`, + resolve, + args: { + where: `${node.name}Where`, + options: `${node.name}Options`, + ...(node.fulltextDirective + ? { + fulltext: { + type: `${node.name}Fulltext`, + description: + "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", + }, + } + : {}), + }, + }; +} + +export function findResolver2({ node, concreteEntityAdapter, }: { diff --git a/packages/graphql/src/schema/resolvers/query/root-connection.ts b/packages/graphql/src/schema/resolvers/query/root-connection.ts index 95c54b305f..152f39e49c 100644 --- a/packages/graphql/src/schema/resolvers/query/root-connection.ts +++ b/packages/graphql/src/schema/resolvers/query/root-connection.ts @@ -19,6 +19,7 @@ import type { DirectiveNode, GraphQLResolveInfo, SelectionSetNode } from "graphql"; import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import { upperFirst } from "graphql-compose"; import type { PageInfo } from "graphql-relay"; import type { Node } from "../../../classes"; import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; @@ -31,7 +32,111 @@ import { createConnectionWithEdgeProperties } from "../../pagination"; import { graphqlDirectivesToCompose } from "../../to-compose"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function rootConnectionResolver({ +export function rootConnectionResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { + async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { + const resolveTree = getNeo4jResolveTree(info, { args }); + + const edgeTree = resolveTree.fieldsByTypeName[`${upperFirst(node.plural)}Connection`]?.edges; + const nodeTree = edgeTree?.fieldsByTypeName[`${node.name}Edge`]?.node; + const resolveTreeForContext = nodeTree || resolveTree; + + (context as Neo4jGraphQLTranslationContext).resolveTree = { + ...resolveTreeForContext, + args: resolveTree.args, + }; + + const { cypher, params } = translateRead({ + context: context as Neo4jGraphQLTranslationContext, + node, + isRootConnectionField: true, + }); + + const executeResult = await execute({ + cypher, + params, + defaultAccessMode: "READ", + context, + }); + + let totalCount = 0; + let edges: any[] = []; + let pageInfo: PageInfo = { + hasNextPage: false, + hasPreviousPage: false, + startCursor: null, + endCursor: null, + }; + + if (executeResult.records[0]) { + const record = executeResult.records[0].this; + + totalCount = isNeoInt(record.totalCount) ? record.totalCount.toNumber() : record.totalCount; + + const connection = createConnectionWithEdgeProperties({ + selectionSet: resolveTree as unknown as SelectionSetNode, + source: { edges: record.edges }, + args: { first: args.first, after: args.after }, + totalCount, + }); + + edges = connection.edges as any[]; + pageInfo = connection.pageInfo as PageInfo; + } + + return { + totalCount, + edges, + pageInfo, + }; + } + + const rootEdge = composer.createObjectTC({ + name: `${node.name}Edge`, + fields: { + cursor: "String!", + node: `${node.name}!`, + }, + directives: graphqlDirectivesToCompose(node.propagatedDirectives), + }); + + const rootConnection = composer.createObjectTC({ + name: `${upperFirst(node.plural)}Connection`, + fields: { + totalCount: "Int!", + pageInfo: "PageInfo!", + edges: rootEdge.NonNull.List.NonNull, + }, + directives: graphqlDirectivesToCompose(node.propagatedDirectives), + }); + + // since sort is not created when there is nothing to sort, we check for its existence + let sortArg: InputTypeComposer | undefined; + if (composer.has(`${node.name}Sort`)) { + sortArg = composer.getITC(`${node.name}Sort`); + } + + return { + type: rootConnection.NonNull, + resolve, + args: { + first: "Int", + after: "String", + where: `${node.name}Where`, + ...(sortArg ? { sort: sortArg.List } : {}), + ...(node.fulltextDirective + ? { + fulltext: { + type: `${node.name}Fulltext`, + description: + "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", + }, + } + : {}), + }, + }; +} + +export function rootConnectionResolver2({ node, composer, concreteEntityAdapter, From a17bdd62af55c256f037ef56d7b4ad7af5bd70e8 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 8 Sep 2023 15:28:48 +0200 Subject: [PATCH 031/162] refactor: keep old augmentFulltextSchema for testing --- .../graphql/src/schema/augment/fulltext.ts | 76 +++++++++++++++++++ .../src/schema/new-make-augmented-schema.ts | 4 +- 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/packages/graphql/src/schema/augment/fulltext.ts b/packages/graphql/src/schema/augment/fulltext.ts index 7f504b5330..a4f215276e 100644 --- a/packages/graphql/src/schema/augment/fulltext.ts +++ b/packages/graphql/src/schema/augment/fulltext.ts @@ -27,6 +27,82 @@ import { upperFirst } from "../../utils/upper-first"; import { fulltextResolver } from "../resolvers/query/fulltext"; export function augmentFulltextSchema( + node: Node, + composer: SchemaComposer, + nodeWhereTypeName: string, + nodeSortTypeName: string +) { + if (node.fulltextDirective) { + const fields = node.fulltextDirective.indexes.reduce((res, index) => { + const indexName = index.indexName || index.name; + if (indexName === undefined) { + throw new Error("The name of the fulltext index should be defined using the indexName argument."); + } + return { + ...res, + [indexName]: composer.createInputTC({ + name: `${node.name}${upperFirst(indexName)}Fulltext`, + fields: { + phrase: new GraphQLNonNull(GraphQLString), + }, + }), + }; + }, {}); + + const fulltextResultDescription = `The result of a fulltext search on an index of ${node.name}`; + const fulltextWhereDescription = `The input for filtering a fulltext query on an index of ${node.name}`; + const fulltextSortDescription = `The input for sorting a fulltext query on an index of ${node.name}`; + + composer.createInputTC({ + name: `${node.name}Fulltext`, + fields, + }); + + composer.createInputTC({ + name: node.fulltextTypeNames.sort, + description: fulltextSortDescription, + fields: { + [SCORE_FIELD]: "SortDirection", + [node.singular]: nodeSortTypeName, + }, + }); + + composer.createInputTC({ + name: node.fulltextTypeNames.where, + description: fulltextWhereDescription, + fields: { + [SCORE_FIELD]: FloatWhere.name, + [node.singular]: nodeWhereTypeName, + }, + }); + + composer.createObjectTC({ + name: node.fulltextTypeNames.result, + description: fulltextResultDescription, + fields: { + [SCORE_FIELD]: new GraphQLNonNull(GraphQLFloat), + [node.singular]: `${node.name}!`, + }, + }); + + node.fulltextDirective.indexes.forEach((index) => { + // TODO: remove indexName assignment and undefined check once the name argument has been removed. + const indexName = index.indexName || index.name; + if (indexName === undefined) { + throw new Error("The name of the fulltext index should be defined using the indexName argument."); + } + let queryName = `${node.plural}Fulltext${upperFirst(indexName)}`; + if (index.queryName) { + queryName = index.queryName; + } + composer.Query.addFields({ + [queryName]: fulltextResolver({ node }, index), + }); + }); + } +} + +export function augmentFulltextSchema2( node: Node, composer: SchemaComposer, concreteEntityAdapter: ConcreteEntityAdapter diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index a3144c1137..b2cabd92f3 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -37,7 +37,7 @@ import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, Obje import { SchemaComposer } from "graphql-compose"; import pluralize from "pluralize"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; -import { augmentFulltextSchema } from "./augment/fulltext"; +import { augmentFulltextSchema2 } from "./augment/fulltext"; import { cypherResolver } from "./resolvers/field/cypher"; import { numericalResolver } from "./resolvers/field/numerical"; import { createResolver2 } from "./resolvers/mutation/create"; @@ -1120,7 +1120,7 @@ function makeAugmentedSchema( }); // TODO: Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model - augmentFulltextSchema(node, composer, concreteEntityAdapter); + augmentFulltextSchema2(node, composer, concreteEntityAdapter); composer.createInputTC({ name: `${concreteEntityAdapter.name}UniqueWhere`, From f21f7aad0c207d01ed913a762c7e81ca14fd1f8a Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 14:30:35 +0100 Subject: [PATCH 032/162] update test snapshots to add empty descriptions --- .../graphql/tests/schema/aggregations.test.ts | 34 +++++++ .../tests/schema/array-methods.test.ts | 10 ++ packages/graphql/tests/schema/arrays.test.ts | 8 ++ .../tests/schema/authorization.test.ts | 10 ++ .../schema/directives/autogenerate.test.ts | 7 ++ .../tests/schema/directives/cypher.test.ts | 19 ++++ .../tests/schema/directives/default.test.ts | 14 +++ .../directives/relationship-aggregate.test.ts | 66 +++++++++++++ .../schema/directives/selectable.test.ts | 95 +++++++++++++++++++ .../schema/directives/timestamps.test.ts | 8 ++ .../graphql/tests/schema/fulltext.test.ts | 7 ++ packages/graphql/tests/schema/inputs.test.ts | 6 ++ .../graphql/tests/schema/issues/1038.test.ts | 10 ++ .../graphql/tests/schema/issues/1182.test.ts | 16 ++++ .../graphql/tests/schema/issues/162.test.ts | 10 ++ .../graphql/tests/schema/issues/200.test.ts | 9 ++ .../graphql/tests/schema/issues/2377.test.ts | 14 +++ .../graphql/tests/schema/issues/2981.test.ts | 12 +++ .../graphql/tests/schema/issues/3428.test.ts | 20 ++++ .../graphql/tests/schema/issues/609.test.ts | 6 ++ packages/graphql/tests/schema/simple.test.ts | 9 ++ .../graphql/tests/schema/types/bigint.test.ts | 7 ++ .../graphql/tests/schema/types/date.test.ts | 7 ++ .../tests/schema/types/datetime.test.ts | 7 ++ .../tests/schema/types/duration.test.ts | 7 ++ .../tests/schema/types/localdatetime.test.ts | 7 ++ .../graphql/tests/schema/types/time.test.ts | 7 ++ 27 files changed, 432 insertions(+) diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index 627f73df7d..dd7a4286c7 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -60,6 +60,7 @@ describe("Aggregations", () => { sum: BigInt } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -79,6 +80,7 @@ describe("Aggregations", () => { min: DateTime } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -130,17 +132,29 @@ describe("Aggregations", () => { min: LocalTime } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" createdAt: DateTime + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" imdbRating: Float + \\"\\"\\"\\"\\"\\" isbn: String! + \\"\\"\\"\\"\\"\\" screenTime: Duration + \\"\\"\\"\\"\\"\\" someBigInt: BigInt + \\"\\"\\"\\"\\"\\" someInt: Int + \\"\\"\\"\\"\\"\\" someLocalDateTime: LocalDateTime + \\"\\"\\"\\"\\"\\" someLocalTime: LocalTime + \\"\\"\\"\\"\\"\\" someTime: Time + \\"\\"\\"\\"\\"\\" title: String } @@ -352,6 +366,7 @@ describe("Aggregations", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -377,6 +392,7 @@ describe("Aggregations", () => { min: Time } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -446,6 +462,7 @@ describe("Aggregations", () => { sum: BigInt } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -470,6 +487,7 @@ describe("Aggregations", () => { min: DateTime } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -688,10 +706,13 @@ describe("Aggregations", () => { startCursor: String } + \\"\\"\\"\\"\\"\\" type Post { + \\"\\"\\"\\"\\"\\" likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! likesAggregate(directed: Boolean = true, where: UserWhere): PostUserLikesAggregationSelection likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -1323,6 +1344,7 @@ describe("Aggregations", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1343,6 +1365,7 @@ describe("Aggregations", () => { min: Time } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1361,16 +1384,27 @@ describe("Aggregations", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" someBigInt: BigInt + \\"\\"\\"\\"\\"\\" someDateTime: DateTime + \\"\\"\\"\\"\\"\\" someDuration: Duration + \\"\\"\\"\\"\\"\\" someFloat: Float + \\"\\"\\"\\"\\"\\" someId: ID + \\"\\"\\"\\"\\"\\" someInt: Int + \\"\\"\\"\\"\\"\\" someLocalDateTime: LocalDateTime + \\"\\"\\"\\"\\"\\" someLocalTime: LocalTime + \\"\\"\\"\\"\\"\\" someString: String + \\"\\"\\"\\"\\"\\" someTime: Time } diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index 7242bf7e00..fe9c9c383b 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -78,11 +78,13 @@ describe("Arrays Methods", () => { pay_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String } @@ -323,6 +325,7 @@ describe("Arrays Methods", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -334,6 +337,7 @@ describe("Arrays Methods", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -352,13 +356,17 @@ describe("Arrays Methods", () => { shortest: ID! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" averageRating: Float! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" ratings: [Float!]! } @@ -652,6 +660,7 @@ describe("Arrays Methods", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -669,6 +678,7 @@ describe("Arrays Methods", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index 4bff44f1de..cd70d24cf4 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -40,6 +40,7 @@ describe("Arrays", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -51,6 +52,7 @@ describe("Arrays", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -69,9 +71,13 @@ describe("Arrays", () => { shortest: ID! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" averageRating: Float! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" ratings: [Float!]! } @@ -175,6 +181,7 @@ describe("Arrays", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -182,6 +189,7 @@ describe("Arrays", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index 94a423417b..08b54f0e2d 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -47,6 +47,7 @@ describe("Authorization", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -63,6 +64,7 @@ describe("Authorization", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -91,12 +93,15 @@ describe("Authorization", () => { startCursor: String } + \\"\\"\\"\\"\\"\\" type Post { \\"\\"\\"\\"\\"\\" author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String! } @@ -330,6 +335,7 @@ describe("Authorization", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -342,6 +348,7 @@ describe("Authorization", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -360,8 +367,11 @@ describe("Authorization", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String! \\"\\"\\"\\"\\"\\" posts(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index ca425cf0b7..fd194d5105 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -39,6 +39,7 @@ describe("Autogenerate", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -50,6 +51,7 @@ describe("Autogenerate", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -61,8 +63,11 @@ describe("Autogenerate", () => { shortest: ID! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String! } @@ -154,6 +159,7 @@ describe("Autogenerate", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -166,6 +172,7 @@ describe("Autogenerate", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index 36edd51e5f..d3bfe80e32 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -51,7 +51,9 @@ describe("Cypher", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String } @@ -116,6 +118,7 @@ describe("Cypher", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -127,6 +130,7 @@ describe("Cypher", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -138,8 +142,11 @@ describe("Cypher", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(title: String): [Actor] + \\"\\"\\"\\"\\"\\" id: ID } @@ -225,6 +232,7 @@ describe("Cypher", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -242,6 +250,7 @@ describe("Cypher", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -293,8 +302,11 @@ describe("Cypher", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" totalScreenTime: Int! } @@ -360,6 +372,7 @@ describe("Cypher", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -371,6 +384,7 @@ describe("Cypher", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -382,8 +396,11 @@ describe("Cypher", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(title: String): [Actor] + \\"\\"\\"\\"\\"\\" id: ID } @@ -469,6 +486,7 @@ describe("Cypher", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -486,6 +504,7 @@ describe("Cypher", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index b68be97ed4..c709475e93 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -57,6 +57,7 @@ describe("@default directive", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -76,6 +77,7 @@ describe("@default directive", () => { min: DateTime! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -127,6 +129,7 @@ describe("@default directive", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -139,6 +142,7 @@ describe("@default directive", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -152,15 +156,25 @@ describe("@default directive", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User implements UserInterface { + \\"\\"\\"\\"\\"\\" fromInterface: String! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" location: Location! + \\"\\"\\"\\"\\"\\" name: String! + \\"\\"\\"\\"\\"\\" numberOfFriends: Int! + \\"\\"\\"\\"\\"\\" rating: Float! + \\"\\"\\"\\"\\"\\" toBeOverridden: String! + \\"\\"\\"\\"\\"\\" verified: Boolean! + \\"\\"\\"\\"\\"\\" verifiedDate: DateTime! } diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index d54bddffbe..cdd6324a53 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -227,8 +227,11 @@ describe("@relationship directive, aggregate argument", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -311,6 +314,7 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -322,15 +326,19 @@ describe("@relationship directive, aggregate argument", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -612,6 +620,7 @@ describe("@relationship directive, aggregate argument", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -634,6 +643,7 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -671,8 +681,11 @@ describe("@relationship directive, aggregate argument", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -755,6 +768,7 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -766,16 +780,20 @@ describe("@relationship directive, aggregate argument", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -1067,6 +1085,7 @@ describe("@relationship directive, aggregate argument", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1089,6 +1108,7 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1132,8 +1152,11 @@ describe("@relationship directive, aggregate argument", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor implements Person { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -1212,6 +1235,7 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1223,15 +1247,19 @@ describe("@relationship directive, aggregate argument", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -1478,6 +1506,7 @@ describe("@relationship directive, aggregate argument", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1500,6 +1529,7 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1541,8 +1571,11 @@ describe("@relationship directive, aggregate argument", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor implements Person { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -1621,6 +1654,7 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1632,15 +1666,19 @@ describe("@relationship directive, aggregate argument", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -1887,6 +1925,7 @@ describe("@relationship directive, aggregate argument", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1909,6 +1948,7 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1954,8 +1994,11 @@ describe("@relationship directive, aggregate argument", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -2045,6 +2088,7 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2061,15 +2105,19 @@ describe("@relationship directive, aggregate argument", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -2321,7 +2369,9 @@ describe("@relationship directive, aggregate argument", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String! } @@ -2391,11 +2441,13 @@ describe("@relationship directive, aggregate argument", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2418,6 +2470,7 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2465,8 +2518,11 @@ describe("@relationship directive, aggregate argument", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -2556,6 +2612,7 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2572,15 +2629,19 @@ describe("@relationship directive, aggregate argument", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -2832,7 +2893,9 @@ describe("@relationship directive, aggregate argument", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String! } @@ -2902,11 +2965,13 @@ describe("@relationship directive, aggregate argument", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2929,6 +2994,7 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 4a6b93b5bc..64a4bf5b0c 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -45,6 +45,7 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -56,13 +57,16 @@ describe("@selectable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String! } @@ -156,6 +160,7 @@ describe("@selectable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -173,6 +178,7 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -203,6 +209,7 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -214,14 +221,18 @@ describe("@selectable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -314,6 +325,7 @@ describe("@selectable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -326,6 +338,7 @@ describe("@selectable", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -356,6 +369,7 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -367,13 +381,16 @@ describe("@selectable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String! } @@ -466,6 +483,7 @@ describe("@selectable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -478,6 +496,7 @@ describe("@selectable", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -509,6 +528,7 @@ describe("@selectable", () => { subscription: Subscription } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -520,6 +540,7 @@ describe("@selectable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -534,7 +555,9 @@ describe("@selectable", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String! } @@ -677,6 +700,7 @@ describe("@selectable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -700,6 +724,7 @@ describe("@selectable", () => { movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -738,8 +763,10 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + \\"\\"\\"\\"\\"\\" name: String! } @@ -995,6 +1022,7 @@ describe("@selectable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1006,14 +1034,18 @@ describe("@selectable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -1117,6 +1149,7 @@ describe("@selectable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1139,6 +1172,7 @@ describe("@selectable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1175,10 +1209,13 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1449,6 +1486,7 @@ describe("@selectable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1460,14 +1498,18 @@ describe("@selectable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -1571,6 +1613,7 @@ describe("@selectable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1593,6 +1636,7 @@ describe("@selectable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1639,7 +1683,9 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String! } @@ -1859,6 +1905,7 @@ describe("@selectable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1875,14 +1922,18 @@ describe("@selectable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -1992,8 +2043,11 @@ describe("@selectable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" name: String! } @@ -2071,6 +2125,7 @@ describe("@selectable", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2093,6 +2148,7 @@ describe("@selectable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2141,9 +2197,12 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -2374,6 +2433,7 @@ describe("@selectable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2390,14 +2450,18 @@ describe("@selectable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -2514,13 +2578,17 @@ describe("@selectable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"\\"\\"\\" type Series { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" name: String! } @@ -2598,6 +2666,7 @@ describe("@selectable", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2620,6 +2689,7 @@ describe("@selectable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2674,7 +2744,9 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String! } @@ -2817,6 +2889,7 @@ describe("@selectable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2833,14 +2906,18 @@ describe("@selectable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -3000,8 +3077,11 @@ describe("@selectable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -3075,6 +3155,7 @@ describe("@selectable", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3097,6 +3178,7 @@ describe("@selectable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3148,9 +3230,12 @@ describe("@selectable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -3308,6 +3393,7 @@ describe("@selectable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3324,14 +3410,18 @@ describe("@selectable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -3508,8 +3598,11 @@ describe("@selectable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -3583,6 +3676,7 @@ describe("@selectable", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3605,6 +3699,7 @@ describe("@selectable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index bb6eb2da70..8bca6d28b4 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -40,6 +40,7 @@ describe("Timestamps", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -59,6 +60,7 @@ describe("Timestamps", () => { min: DateTime! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -70,9 +72,13 @@ describe("Timestamps", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" createdAt: DateTime! + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" updatedAt: DateTime! } @@ -172,6 +178,7 @@ describe("Timestamps", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -179,6 +186,7 @@ describe("Timestamps", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index e38c4f87e6..d1e869e33b 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -46,6 +46,7 @@ describe("@fulltext schema", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -57,6 +58,7 @@ describe("@fulltext schema", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -69,8 +71,11 @@ describe("@fulltext schema", () => { min: Float } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String } @@ -225,6 +230,7 @@ describe("@fulltext schema", () => { moviesFulltextMovieTitle(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -237,6 +243,7 @@ describe("@fulltext schema", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index 3aa464b15a..195bc05b42 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -46,6 +46,7 @@ describe("Inputs", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -57,6 +58,7 @@ describe("Inputs", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -68,7 +70,9 @@ describe("Inputs", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID } @@ -153,6 +157,7 @@ describe("Inputs", () => { name(input: NodeInput): String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -160,6 +165,7 @@ describe("Inputs", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/1038.test.ts b/packages/graphql/tests/schema/issues/1038.test.ts index 1c345456e1..e452d57eb4 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -44,8 +44,11 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type AWSAccount { + \\"\\"\\"\\"\\"\\" accountName: String + \\"\\"\\"\\"\\"\\" code: String } @@ -129,14 +132,18 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } + \\"\\"\\"\\"\\"\\" type DNSZone { + \\"\\"\\"\\"\\"\\" awsId: String + \\"\\"\\"\\"\\"\\" zoneType: String } @@ -204,6 +211,7 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { zoneType_STARTS_WITH: String } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -242,6 +250,7 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort], where: DNSZoneWhere): DnsZonesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -264,6 +273,7 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index ab2ffacb49..da1f5987f4 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -47,10 +47,15 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" dob: DateTime! + \\"\\"\\"\\"\\"\\" homeAddress: Point! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String! } @@ -83,6 +88,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { input ActorOnCreateInput { dob: DateTime! homeAddress: PointInput! + id: ID! name: String! } @@ -169,6 +175,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -188,6 +195,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { min: DateTime! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -199,12 +207,15 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { shortest: ID! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" title: String! } @@ -496,6 +507,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { startCursor: String } + \\"\\"\\"Point type\\"\\"\\" type Point { crs: String! height: Float @@ -504,12 +516,14 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { srid: Int! } + \\"\\"\\"\\"\\"\\" input PointDistance { \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" distance: Float! point: PointInput! } + \\"\\"\\"\\"\\"\\" input PointInput { height: Float latitude: Float! @@ -525,6 +539,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -542,6 +557,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index 154ef23152..1cc297b2d3 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -48,6 +48,7 @@ describe("162", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -69,6 +70,7 @@ describe("162", () => { tigers: [Tiger!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -119,6 +121,7 @@ describe("162", () => { tigersConnection(after: String, first: Int, sort: [TigerSort], where: TigerWhere): TigersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -126,7 +129,9 @@ describe("162", () => { DESC } + \\"\\"\\"\\"\\"\\" type Tiger { + \\"\\"\\"\\"\\"\\" x: Int } @@ -148,7 +153,9 @@ describe("162", () => { node: Tiger! } + \\"\\"\\"\\"\\"\\" type TigerJawLevel2 { + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! @@ -192,7 +199,9 @@ describe("162", () => { sort: [TigerJawLevel2Sort!] } + \\"\\"\\"\\"\\"\\" type TigerJawLevel2Part1 { + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! @@ -573,6 +582,7 @@ describe("162", () => { totalCount: Int! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index 0a58adb50a..72c515be4e 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -47,10 +47,15 @@ describe("200", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Category { + \\"\\"\\"\\"\\"\\" categoryId: ID! + \\"\\"\\"\\"\\"\\" description: String! + \\"\\"\\"\\"\\"\\" exampleImageLocations: [String!] + \\"\\"\\"\\"\\"\\" name: String! } @@ -143,12 +148,14 @@ describe("200", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -180,6 +187,7 @@ describe("200", () => { categoriesConnection(after: String, first: Int, sort: [CategorySort], where: CategoryWhere): CategoriesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -197,6 +205,7 @@ describe("200", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index af9644ad01..a095e46227 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -84,6 +84,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -103,6 +104,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { min: DateTime! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -140,6 +142,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { resourcesConnection(after: String, first: Int, sort: [ResourceSort], where: ResourceWhere): ResourcesConnection! } + \\"\\"\\"\\"\\"\\" type Resource implements ResourceEntity { \\"\\"\\" Resources encapsulating the given resource (e.g., a github org contains a repo) @@ -147,14 +150,21 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { containedBy(directed: Boolean = true, options: ResourceOptions, where: ResourceWhere): [Resource!]! containedByAggregate(directed: Boolean = true, where: ResourceWhere): ResourceResourceContainedByAggregationSelection containedByConnection(after: String, directed: Boolean = true, first: Int, sort: [ResourceContainedByConnectionSort!], where: ResourceContainedByConnectionWhere): ResourceContainedByConnection! + \\"\\"\\"\\"\\"\\" createdAt: DateTime! + \\"\\"\\"\\"\\"\\" externalIds: [ID!] + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" properties: [Property!] \\"\\"\\"Globally tracked tags for this resource\\"\\"\\" tags: [Tag!] + \\"\\"\\"\\"\\"\\" type: ResourceType! + \\"\\"\\"\\"\\"\\" updatedAt: DateTime! } @@ -375,12 +385,14 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { } input ResourceOnCreateInput { + createdAt: DateTime! externalIds: [ID!] id: ID! name: String properties: [Property!] tags: [Tag!] type: ResourceType! + updatedAt: DateTime! } input ResourceOptions { @@ -534,6 +546,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { totalCount: Int! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -552,6 +565,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { TagC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index ea8f33841a..7da8a78081 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -52,8 +52,11 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Book { + \\"\\"\\"\\"\\"\\" isbn: String! + \\"\\"\\"\\"\\"\\" originalTitle: String! \\"\\"\\"\\"\\"\\" translatedTitle(directed: Boolean = true, options: QueryOptions, where: BookTitleWhere): BookTitle @@ -133,11 +136,13 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { BookTitle_SV: BookTitle_SVWhere } + \\"\\"\\"\\"\\"\\" type BookTitle_EN { \\"\\"\\"\\"\\"\\" book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_ENBookBookAggregationSelection bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! + \\"\\"\\"\\"\\"\\" value: String! } @@ -380,11 +385,13 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { value_STARTS_WITH: String } + \\"\\"\\"\\"\\"\\" type BookTitle_SV { \\"\\"\\"\\"\\"\\" book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_SVBookBookAggregationSelection bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! + \\"\\"\\"\\"\\"\\" value: String! } @@ -818,12 +825,14 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -862,11 +871,13 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -894,6 +905,7 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 64e8d26224..19bcf8bcc5 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -44,6 +44,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -60,6 +61,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -76,11 +78,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -279,8 +283,11 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String } @@ -355,6 +362,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -367,6 +375,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -413,6 +422,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -434,6 +444,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -445,10 +456,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -580,7 +593,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -640,7 +655,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -717,11 +734,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -734,6 +753,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/609.test.ts b/packages/graphql/tests/schema/issues/609.test.ts index 3f0998ad00..85fd314d0d 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -43,19 +43,23 @@ describe("609", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Deprecated { + \\"\\"\\"\\"\\"\\" deprecatedField: String @deprecated } @@ -135,6 +139,7 @@ describe("609", () => { deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort], where: DeprecatedWhere): DeprecatedsConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -152,6 +157,7 @@ describe("609", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index 3260b20f23..cbf538a59a 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -41,6 +41,7 @@ describe("Simple", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -52,6 +53,7 @@ describe("Simple", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -77,10 +79,15 @@ describe("Simple", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actorCount: Int + \\"\\"\\"\\"\\"\\" averageRating: Float + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" isActive: Boolean } @@ -195,6 +202,7 @@ describe("Simple", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -202,6 +210,7 @@ describe("Simple", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index af0c8c3ee4..70057b8615 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -56,20 +56,25 @@ describe("Bigint", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type File { + \\"\\"\\"\\"\\"\\" name: String! + \\"\\"\\"\\"\\"\\" size: BigInt! } @@ -163,6 +168,7 @@ describe("Bigint", () => { filesConnection(after: String, first: Int, sort: [FileSort], where: FileWhere): FilesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -180,6 +186,7 @@ describe("Bigint", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index 8c9416953e..1d71779245 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -39,6 +39,7 @@ describe("Date", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -53,6 +54,7 @@ describe("Date", () => { \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" scalar Date + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -64,8 +66,11 @@ describe("Date", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" date: Date + \\"\\"\\"\\"\\"\\" id: ID } @@ -156,6 +161,7 @@ describe("Date", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -163,6 +169,7 @@ describe("Date", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index b464e47419..6549717293 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -39,6 +39,7 @@ describe("Datetime", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -58,6 +59,7 @@ describe("Datetime", () => { min: DateTime } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -69,8 +71,11 @@ describe("Datetime", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" datetime: DateTime + \\"\\"\\"\\"\\"\\" id: ID } @@ -162,6 +167,7 @@ describe("Datetime", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -169,6 +175,7 @@ describe("Datetime", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index 3d9f0be206..67d8881ba0 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -39,6 +39,7 @@ describe("Duration", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -50,6 +51,7 @@ describe("Duration", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -69,8 +71,11 @@ describe("Duration", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" duration: Duration + \\"\\"\\"\\"\\"\\" id: ID } @@ -162,6 +167,7 @@ describe("Duration", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -169,6 +175,7 @@ describe("Duration", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index fe3c07529a..6dcc9ada70 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -39,6 +39,7 @@ describe("Localdatetime", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -50,6 +51,7 @@ describe("Localdatetime", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -69,8 +71,11 @@ describe("Localdatetime", () => { min: LocalDateTime } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" localDT: LocalDateTime } @@ -162,6 +167,7 @@ describe("Localdatetime", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -169,6 +175,7 @@ describe("Localdatetime", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index 973552d9e8..2dafa3a6c7 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -39,6 +39,7 @@ describe("Time", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -50,6 +51,7 @@ describe("Time", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -61,8 +63,11 @@ describe("Time", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" time: Time } @@ -154,6 +159,7 @@ describe("Time", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -169,6 +175,7 @@ describe("Time", () => { min: Time } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From dd2442255141e0c88e1b2528d362320a2bc02dfa Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 15:15:01 +0100 Subject: [PATCH 033/162] update test snapshots to add empty descriptions --- .../tests/schema/connect-or-create-id.test.ts | 20 +++++++++ .../tests/schema/connect-or-create.test.ts | 18 ++++++++ .../tests/schema/connections/sort.test.ts | 7 +++ .../tests/schema/connections/unions.test.ts | 11 +++++ .../tests/schema/custom-mutations.test.ts | 6 +++ .../tests/schema/directives/alias.test.ts | 10 +++++ .../schema/directives/customResolver.test.ts | 10 +++++ .../tests/schema/directives/plural.test.ts | 45 +++++++++++++++++++ .../schema/directives/relationship.test.ts | 16 +++++++ packages/graphql/tests/schema/enum.test.ts | 6 +++ packages/graphql/tests/schema/extend.test.ts | 7 +++ .../graphql/tests/schema/federation.test.ts | 16 +++++++ .../graphql/tests/schema/issues/2187.test.ts | 10 +++++ .../graphql/tests/schema/issues/2993.test.ts | 7 +++ .../graphql/tests/schema/issues/3541.test.ts | 14 ++++++ .../graphql/tests/schema/issues/872.test.ts | 11 +++++ packages/graphql/tests/schema/null.test.ts | 21 +++++++++ .../tests/schema/query-direction.test.ts | 18 ++++++++ packages/graphql/tests/schema/scalar.test.ts | 9 ++++ .../tests/schema/string-comparators.test.ts | 26 +++++++++++ .../tests/schema/types/localtime.test.ts | 7 +++ .../graphql/tests/schema/types/point.test.ts | 32 +++++++++++++ packages/graphql/tests/schema/unions.test.ts | 10 +++++ 23 files changed, 337 insertions(+) diff --git a/packages/graphql/tests/schema/connect-or-create-id.test.ts b/packages/graphql/tests/schema/connect-or-create-id.test.ts index 76adb87b2d..229deaf2ac 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -44,11 +44,13 @@ describe("connect or create with id", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -300,6 +302,7 @@ describe("connect or create with id", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -311,6 +314,7 @@ describe("connect or create with id", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -322,8 +326,11 @@ describe("connect or create with id", () => { shortest: ID! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" title: String! } @@ -437,6 +444,7 @@ describe("connect or create with id", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -454,6 +462,7 @@ describe("connect or create with id", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -493,6 +502,7 @@ describe("connect or create with id", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -517,6 +527,7 @@ describe("connect or create with id", () => { min: DateTime! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -545,13 +556,17 @@ describe("connect or create with id", () => { startCursor: String } + \\"\\"\\"\\"\\"\\" type Post { + \\"\\"\\"\\"\\"\\" content: String! + \\"\\"\\"\\"\\"\\" createdAt: DateTime! \\"\\"\\"\\"\\"\\" creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCreatorConnectionSort!], where: PostCreatorConnectionWhere): PostCreatorConnection! + \\"\\"\\"\\"\\"\\" id: ID! } @@ -830,6 +845,7 @@ describe("connect or create with id", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -842,6 +858,7 @@ describe("connect or create with id", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -860,8 +877,11 @@ describe("connect or create with id", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String! \\"\\"\\"\\"\\"\\" posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index c9f5a95b21..9f06861f05 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -44,11 +44,13 @@ describe("Connect Or Create", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -334,6 +336,7 @@ describe("Connect Or Create", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -345,14 +348,18 @@ describe("Connect Or Create", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" isan: String! + \\"\\"\\"\\"\\"\\" title: String! } @@ -469,6 +476,7 @@ describe("Connect Or Create", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -486,6 +494,7 @@ describe("Connect Or Create", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -573,11 +582,13 @@ describe("Connect Or Create", () => { screentime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -945,6 +956,7 @@ describe("Connect Or Create", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -956,6 +968,7 @@ describe("Connect Or Create", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -969,8 +982,11 @@ describe("Connect Or Create", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" isan: String! + \\"\\"\\"\\"\\"\\" title: String! } @@ -1087,6 +1103,7 @@ describe("Connect Or Create", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1109,6 +1126,7 @@ describe("Connect Or Create", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index d93091f033..5a5fada30c 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -43,6 +43,7 @@ describe("Sort", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -59,6 +60,7 @@ describe("Sort", () => { node2s: [Node2!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -74,7 +76,9 @@ describe("Sort", () => { updateNode2s(connect: Node2ConnectInput, create: Node2RelationInput, delete: Node2DeleteInput, disconnect: Node2DisconnectInput, update: Node2UpdateInput, where: Node2Where): UpdateNode2sMutationResponse! } + \\"\\"\\"\\"\\"\\" type Node1 { + \\"\\"\\"\\"\\"\\" property: String! \\"\\"\\"\\"\\"\\" relatedTo(directed: Boolean = true, options: Node2Options, where: Node2Where): [Node2!]! @@ -264,6 +268,7 @@ describe("Sort", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Node2 { \\"\\"\\"\\"\\"\\" relatedTo(directed: Boolean = true, options: Node1Options, where: Node1Where): [Node1!]! @@ -497,6 +502,7 @@ describe("Sort", () => { node2sConnection(after: String, first: Int, where: Node2Where): Node2sConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -509,6 +515,7 @@ describe("Sort", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 964bfbbed6..690a373ebd 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -55,7 +55,9 @@ describe("Unions", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Author { + \\"\\"\\"\\"\\"\\" name: String! \\"\\"\\"\\"\\"\\" publications(directed: Boolean = true, options: QueryOptions, where: PublicationWhere): [Publication!]! @@ -309,11 +311,13 @@ describe("Unions", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Book { \\"\\"\\"\\"\\"\\" author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! authorAggregate(directed: Boolean = true, where: AuthorWhere): BookAuthorAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -604,6 +608,7 @@ describe("Unions", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -615,6 +620,7 @@ describe("Unions", () => { journals: [Journal!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -628,11 +634,13 @@ describe("Unions", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Journal { \\"\\"\\"\\"\\"\\" author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! authorAggregate(directed: Boolean = true, where: AuthorWhere): JournalAuthorAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! + \\"\\"\\"\\"\\"\\" subject: String! } @@ -952,11 +960,13 @@ describe("Unions", () => { journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -979,6 +989,7 @@ describe("Unions", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index cd65700da6..66509b6c01 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -58,6 +58,7 @@ describe("Custom-mutations", () => { subscription: Subscription } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -69,6 +70,7 @@ describe("Custom-mutations", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -84,7 +86,9 @@ describe("Custom-mutations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID } @@ -168,6 +172,7 @@ describe("Custom-mutations", () => { testQuery(input: ExampleInput): String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -179,6 +184,7 @@ describe("Custom-mutations", () => { testSubscription(input: ExampleInput): String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 8a61d074ed..be59adc882 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -50,12 +50,15 @@ describe("Alias", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" city: String + \\"\\"\\"\\"\\"\\" name: String! } @@ -457,6 +460,7 @@ describe("Alias", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -468,6 +472,7 @@ describe("Alias", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -488,8 +493,11 @@ describe("Alias", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" rating: Float + \\"\\"\\"\\"\\"\\" title: String! } @@ -595,6 +603,7 @@ describe("Alias", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -617,6 +626,7 @@ describe("Alias", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 8224a613b3..72942153bc 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -54,6 +54,7 @@ describe("@customResolver directive", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -65,6 +66,7 @@ describe("@customResolver directive", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -96,6 +98,7 @@ describe("@customResolver directive", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -108,6 +111,7 @@ describe("@customResolver directive", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -121,11 +125,17 @@ describe("@customResolver directive", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User implements UserInterface { + \\"\\"\\"\\"\\"\\" customResolver: String + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" nickname: String! + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index 3b0d11c25c..3a788c1be5 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -42,6 +42,7 @@ describe("Plural option", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -53,6 +54,7 @@ describe("Plural option", () => { techs: [Tech!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -79,6 +81,7 @@ describe("Plural option", () => { techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -91,8 +94,11 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"\\"\\"\\" type Tech { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" value: String } @@ -166,6 +172,7 @@ describe("Plural option", () => { totalCount: Int! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -200,6 +207,7 @@ describe("Plural option", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -211,6 +219,7 @@ describe("Plural option", () => { techs: [Tech!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -237,6 +246,7 @@ describe("Plural option", () => { techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -249,8 +259,11 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"\\"\\"\\" type Tech { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" value: String } @@ -324,6 +337,7 @@ describe("Plural option", () => { totalCount: Int! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -358,6 +372,7 @@ describe("Plural option", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -369,6 +384,7 @@ describe("Plural option", () => { technologies: [Tech!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -395,6 +411,7 @@ describe("Plural option", () => { technologiesConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechnologiesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -407,8 +424,11 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"\\"\\"\\" type Tech { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" value: String } @@ -482,6 +502,7 @@ describe("Plural option", () => { totalCount: Int! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -516,6 +537,7 @@ describe("Plural option", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -527,6 +549,7 @@ describe("Plural option", () => { techs: [Techs!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -553,6 +576,7 @@ describe("Plural option", () => { techsConnection(after: String, first: Int, sort: [TechsSort], where: TechsWhere): TechsConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -565,7 +589,9 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"\\"\\"\\" type Techs { + \\"\\"\\"\\"\\"\\" value: String } @@ -625,6 +651,7 @@ describe("Plural option", () => { value_STARTS_WITH: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -659,6 +686,7 @@ describe("Plural option", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -670,6 +698,7 @@ describe("Plural option", () => { techs: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -696,6 +725,7 @@ describe("Plural option", () => { techsConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): TechsConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -714,6 +744,7 @@ describe("Plural option", () => { totalCount: Int! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -727,7 +758,9 @@ describe("Plural option", () => { techs: [User!]! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" value: String } @@ -802,6 +835,7 @@ describe("Plural option", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -813,6 +847,7 @@ describe("Plural option", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -839,6 +874,7 @@ describe("Plural option", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -851,6 +887,7 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -864,7 +901,9 @@ describe("Plural option", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" value: String } @@ -945,6 +984,7 @@ describe("Plural option", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -956,6 +996,7 @@ describe("Plural option", () => { users: [Users!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -982,6 +1023,7 @@ describe("Plural option", () => { usersConnection(after: String, first: Int, sort: [UsersSort], where: UsersWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -994,6 +1036,7 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1007,7 +1050,9 @@ describe("Plural option", () => { users: [Users!]! } + \\"\\"\\"\\"\\"\\" type Users { + \\"\\"\\"\\"\\"\\" value: String } diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index 76c5e402ea..7184f65a1e 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -43,7 +43,9 @@ describe("Relationship", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String } @@ -112,6 +114,7 @@ describe("Relationship", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -123,6 +126,7 @@ describe("Relationship", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -134,11 +138,13 @@ describe("Relationship", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -394,6 +400,7 @@ describe("Relationship", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -411,6 +418,7 @@ describe("Relationship", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -447,11 +455,13 @@ describe("Relationship", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String } @@ -659,6 +669,7 @@ describe("Relationship", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -670,6 +681,7 @@ describe("Relationship", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -681,11 +693,13 @@ describe("Relationship", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -948,6 +962,7 @@ describe("Relationship", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -965,6 +980,7 @@ describe("Relationship", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/enum.test.ts b/packages/graphql/tests/schema/enum.test.ts index 5736597eaf..39f81a745b 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -44,6 +44,7 @@ describe("Enum", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -55,13 +56,16 @@ describe("Enum", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" status: Status } @@ -134,6 +138,7 @@ describe("Enum", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -147,6 +152,7 @@ describe("Enum", () => { PENDING } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index 9e1e844f74..c48e09808b 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -42,6 +42,7 @@ describe("Extend", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -53,6 +54,7 @@ describe("Extend", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -64,8 +66,11 @@ describe("Extend", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" name: String } @@ -159,6 +164,7 @@ describe("Extend", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -171,6 +177,7 @@ describe("Extend", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index d243cbe06c..439e7c5606 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -69,6 +69,7 @@ describe("Apollo Federation", () => { directive @shareable on FIELD_DEFINITION | OBJECT + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -85,6 +86,7 @@ describe("Apollo Federation", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -108,11 +110,13 @@ describe("Apollo Federation", () => { startCursor: String } + \\"\\"\\"\\"\\"\\" type Post { \\"\\"\\"\\"\\"\\" author: User! authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + \\"\\"\\"\\"\\"\\" content: String! } @@ -335,6 +339,7 @@ describe("Apollo Federation", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! @shareable } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -347,6 +352,7 @@ describe("Apollo Federation", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -365,7 +371,9 @@ describe("Apollo Federation", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User @shareable { + \\"\\"\\"\\"\\"\\" name: String! \\"\\"\\"\\"\\"\\" posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! @@ -674,6 +682,7 @@ describe("Apollo Federation", () => { directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo @federation__shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -690,6 +699,7 @@ describe("Apollo Federation", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo @federation__shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -713,11 +723,13 @@ describe("Apollo Federation", () => { startCursor: String } + \\"\\"\\"\\"\\"\\" type Post { \\"\\"\\"\\"\\"\\" author: User! authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + \\"\\"\\"\\"\\"\\" content: String! } @@ -934,6 +946,7 @@ describe("Apollo Federation", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -946,6 +959,7 @@ describe("Apollo Federation", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo @federation__shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -964,7 +978,9 @@ describe("Apollo Federation", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User @key(fields: \\"name\\", resolvable: false) { + \\"\\"\\"\\"\\"\\" name: String! } diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index d6c80a071a..a2f0f45606 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -53,6 +53,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -64,6 +65,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -77,11 +79,13 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { sum: Float } + \\"\\"\\"\\"\\"\\" type Genre { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String } @@ -377,13 +381,17 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") genresConnection(after: String, directed: Boolean = true, 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 } @@ -676,6 +684,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -693,6 +702,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 20bf5dae6e..a394765c8d 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -50,6 +50,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -64,6 +65,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" scalar DateTime + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -208,6 +210,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -220,6 +223,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -233,11 +237,14 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User implements Profile { \\"\\"\\"\\"\\"\\" following(directed: Boolean = true, options: ProfileOptions, where: ProfileWhere): [Profile!]! followingConnection(after: String, directed: Boolean = true, first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" userName: String! } diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index 5660803aa4..0abc4396ce 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -65,7 +65,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { directive @shareable on FIELD_DEFINITION | OBJECT + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String! } @@ -117,11 +119,13 @@ describe("Extending the schema in when using getSubgraphSchema", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Movie @key(fields: \\"title\\") @shareable { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -306,6 +310,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! @shareable } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -387,7 +392,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { directive @shareable on FIELD_DEFINITION | OBJECT + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String! } @@ -456,6 +463,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -467,18 +475,22 @@ describe("Extending the schema in when using getSubgraphSchema", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" title: String! } @@ -713,6 +725,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -730,6 +743,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index a82829c6fe..387b659b31 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -49,19 +49,23 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } + \\"\\"\\"\\"\\"\\" type Actor2 { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): Actor2MovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -561,6 +565,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -572,6 +577,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -583,8 +589,11 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { shortest: ID! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" title: String! } @@ -704,6 +713,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -726,6 +736,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index 50631bf94c..99d08565da 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -50,6 +50,7 @@ describe("Null", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -69,6 +70,7 @@ describe("Null", () => { min: DateTime! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -94,19 +96,33 @@ describe("Null", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actorCount: Int! + \\"\\"\\"\\"\\"\\" actorCounts: [Int!]! + \\"\\"\\"\\"\\"\\" averageRating: Float! + \\"\\"\\"\\"\\"\\" averageRatings: [Float!]! + \\"\\"\\"\\"\\"\\" createdAt: DateTime! + \\"\\"\\"\\"\\"\\" createdAts: [DateTime!]! + \\"\\"\\"\\"\\"\\" filmedAt: Point! + \\"\\"\\"\\"\\"\\" filmedAts: [Point!]! + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" ids: [ID!]! + \\"\\"\\"\\"\\"\\" isActives: [Boolean!]! + \\"\\"\\"\\"\\"\\" name: String! + \\"\\"\\"\\"\\"\\" names: [String!]! } @@ -302,6 +318,7 @@ describe("Null", () => { startCursor: String } + \\"\\"\\"Point type\\"\\"\\" type Point { crs: String! height: Float @@ -310,12 +327,14 @@ describe("Null", () => { srid: Int! } + \\"\\"\\"\\"\\"\\" input PointDistance { \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" distance: Float! point: PointInput! } + \\"\\"\\"\\"\\"\\" input PointInput { height: Float latitude: Float! @@ -328,6 +347,7 @@ describe("Null", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -340,6 +360,7 @@ describe("Null", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index d191fda48d..cbbdaf1f94 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -40,6 +40,7 @@ describe("Query Direction", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -51,6 +52,7 @@ describe("Query Direction", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -77,6 +79,7 @@ describe("Query Direction", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -89,6 +92,7 @@ describe("Query Direction", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -102,11 +106,13 @@ describe("Query Direction", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { \\"\\"\\"\\"\\"\\" friends(directed: Boolean = false, options: UserOptions, where: UserWhere): [User!]! friendsAggregate(directed: Boolean = false, where: UserWhere): UserUserFriendsAggregationSelection friendsConnection(after: String, directed: Boolean = false, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -361,6 +367,7 @@ describe("Query Direction", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -372,6 +379,7 @@ describe("Query Direction", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -398,6 +406,7 @@ describe("Query Direction", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -410,6 +419,7 @@ describe("Query Direction", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -423,11 +433,13 @@ describe("Query Direction", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { \\"\\"\\"\\"\\"\\" friends(options: UserOptions, where: UserWhere): [User!]! friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -682,6 +694,7 @@ describe("Query Direction", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -693,6 +706,7 @@ describe("Query Direction", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -719,6 +733,7 @@ describe("Query Direction", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -731,6 +746,7 @@ describe("Query Direction", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -744,11 +760,13 @@ describe("Query Direction", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { \\"\\"\\"\\"\\"\\" friends(options: UserOptions, where: UserWhere): [User!]! friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + \\"\\"\\"\\"\\"\\" name: String! } diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index 718c998c54..b40546f33d 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -43,6 +43,7 @@ describe("Scalar", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -56,6 +57,7 @@ describe("Scalar", () => { scalar CustomScalar + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -67,10 +69,15 @@ describe("Scalar", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" myCustomArrayScalar: [CustomScalar!] + \\"\\"\\"\\"\\"\\" myCustomScalar: CustomScalar + \\"\\"\\"\\"\\"\\" myRequiredCustomArrayScalar: [CustomScalar!]! } @@ -169,6 +176,7 @@ describe("Scalar", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -176,6 +184,7 @@ describe("Scalar", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index e3d9b27272..58045a5209 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -50,6 +50,7 @@ describe("String Comparators", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -61,13 +62,16 @@ describe("String Comparators", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String } @@ -151,6 +155,7 @@ describe("String Comparators", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -163,6 +168,7 @@ describe("String Comparators", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -195,6 +201,7 @@ describe("String Comparators", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -206,13 +213,16 @@ describe("String Comparators", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String } @@ -292,6 +302,7 @@ describe("String Comparators", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -304,6 +315,7 @@ describe("String Comparators", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -345,6 +357,7 @@ describe("String Comparators", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -356,13 +369,16 @@ describe("String Comparators", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String } @@ -444,6 +460,7 @@ describe("String Comparators", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -456,6 +473,7 @@ describe("String Comparators", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -545,11 +563,13 @@ describe("String Comparators", () => { screenTime_STARTS_WITH: String } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String } @@ -849,6 +869,7 @@ describe("String Comparators", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -860,17 +881,20 @@ describe("String Comparators", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -1191,6 +1215,7 @@ describe("String Comparators", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1208,6 +1233,7 @@ describe("String Comparators", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index 8a1ce095c0..38daede86f 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -39,6 +39,7 @@ describe("Localtime", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -50,6 +51,7 @@ describe("Localtime", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -71,8 +73,11 @@ describe("Localtime", () => { min: LocalTime } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" time: LocalTime } @@ -164,6 +169,7 @@ describe("Localtime", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -171,6 +177,7 @@ describe("Localtime", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index 4b7ace67b5..aec7a0dcc5 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -38,6 +38,7 @@ describe("Point", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -49,13 +50,16 @@ describe("Point", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" filmedAt: Point! } @@ -127,6 +131,7 @@ describe("Point", () => { startCursor: String } + \\"\\"\\"Point type\\"\\"\\" type Point { crs: String! height: Float @@ -135,12 +140,14 @@ describe("Point", () => { srid: Int! } + \\"\\"\\"\\"\\"\\" input PointDistance { \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" distance: Float! point: PointInput! } + \\"\\"\\"\\"\\"\\" input PointInput { height: Float latitude: Float! @@ -153,6 +160,7 @@ describe("Point", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -160,6 +168,7 @@ describe("Point", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -190,6 +199,7 @@ describe("Point", () => { mutation: Mutation } + \\"\\"\\"CartesianPoint type\\"\\"\\" type CartesianPoint { crs: String! srid: Int! @@ -198,17 +208,20 @@ describe("Point", () => { z: Float } + \\"\\"\\"\\"\\"\\" input CartesianPointDistance { distance: Float! point: CartesianPointInput! } + \\"\\"\\"\\"\\"\\" input CartesianPointInput { x: Float! y: Float! z: Float } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -220,13 +233,16 @@ describe("Point", () => { machines: [Machine!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Machine { + \\"\\"\\"\\"\\"\\" partLocation: CartesianPoint! } @@ -304,6 +320,7 @@ describe("Point", () => { machinesConnection(after: String, first: Int, sort: [MachineSort], where: MachineWhere): MachinesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -311,6 +328,7 @@ describe("Point", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -341,6 +359,7 @@ describe("Point", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -352,13 +371,16 @@ describe("Point", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" filmedAt: [Point!]! } @@ -416,6 +438,7 @@ describe("Point", () => { startCursor: String } + \\"\\"\\"Point type\\"\\"\\" type Point { crs: String! height: Float @@ -424,6 +447,7 @@ describe("Point", () => { srid: Int! } + \\"\\"\\"\\"\\"\\" input PointInput { height: Float latitude: Float! @@ -436,6 +460,7 @@ describe("Point", () => { moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -466,6 +491,7 @@ describe("Point", () => { mutation: Mutation } + \\"\\"\\"CartesianPoint type\\"\\"\\" type CartesianPoint { crs: String! srid: Int! @@ -474,12 +500,14 @@ describe("Point", () => { z: Float } + \\"\\"\\"\\"\\"\\" input CartesianPointInput { x: Float! y: Float! z: Float } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -491,13 +519,16 @@ describe("Point", () => { machines: [Machine!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Machine { + \\"\\"\\"\\"\\"\\" partLocations: [CartesianPoint!]! } @@ -561,6 +592,7 @@ describe("Point", () => { machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 5fd343b64d..40212cc390 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -51,6 +51,7 @@ describe("Unions", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -62,13 +63,16 @@ describe("Unions", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" id: ID } @@ -137,11 +141,14 @@ describe("Unions", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + \\"\\"\\"\\"\\"\\" searchNoDirective: Search } @@ -400,6 +407,7 @@ describe("Unions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -412,6 +420,7 @@ describe("Unions", () => { Movie: MovieWhere } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -424,6 +433,7 @@ describe("Unions", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From 2ecf4c0f6bbf766cd7afaf48eaa5c8005d1ae411 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 15:26:00 +0100 Subject: [PATCH 034/162] fix faulty updated tests --- packages/graphql/tests/schema/issues/1182.test.ts | 1 - packages/graphql/tests/schema/issues/2377.test.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index da1f5987f4..5db4abaac4 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -88,7 +88,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { input ActorOnCreateInput { dob: DateTime! homeAddress: PointInput! - id: ID! name: String! } diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index a095e46227..0acd9bed63 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -385,14 +385,12 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { } input ResourceOnCreateInput { - createdAt: DateTime! externalIds: [ID!] id: ID! name: String properties: [Property!] tags: [Tag!] type: ResourceType! - updatedAt: DateTime! } input ResourceOptions { From 8dd179f44e81d0b93263c25abbab126f94964a8a Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 15:39:57 +0100 Subject: [PATCH 035/162] fix union ConnectOrCreateFieldInput type does not exist --- .../model-adapters/RelationshipAdapter.ts | 17 +- .../create-connect-or-create-field.ts | 4 +- ...reate-top-level-connect-or-create-input.ts | 2 +- .../relationship-nested-operations.test.ts | 266 ++++++++++++++++++ 4 files changed, 280 insertions(+), 9 deletions(-) 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 2d1241d0ad..e0ed37a64b 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -86,15 +86,20 @@ export class RelationshipAdapter { public get disconnectFieldInputTypeName(): string { return `${this.prefixForTypename}${upperFirst(this.name)}DisconnectFieldInput`; } - public get connectOrCreateFieldInputTypeName(): string { - if (this.target instanceof UnionEntity) { - return `${this.prefixForTypename}${upperFirst(this.name)}${this.target.name}ConnectOrCreateFieldInput`; + public getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter?: ConcreteEntityAdapter): string { + if (this.target instanceof UnionEntityAdapter) { + if (!concreteTargetEntityAdapter) { + throw new Error("missing concreteTargetEntityAdapter"); + } + return `${this.prefixForTypename}${upperFirst(this.name)}${ + concreteTargetEntityAdapter.name + }ConnectOrCreateFieldInput`; } return `${this.prefixForTypename}${upperFirst(this.name)}ConnectOrCreateFieldInput`; } - public get connectOrCreateOnCreateFieldInputTypeName(): string { - return `${this.connectOrCreateFieldInputTypeName}OnCreate`; + public getConnectOrCreateOnCreateFieldInputTypeName(concreteTargetEntityAdapter: ConcreteEntityAdapter): string { + return `${this.getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter)}OnCreate`; } public get connectionFieldName(): string { @@ -133,7 +138,7 @@ export class RelationshipAdapter { // } return { where: `${target.operations.connectOrCreateWhereInputTypeName}!`, - onCreate: `${this.connectOrCreateOnCreateFieldInputTypeName}!`, + onCreate: `${this.getConnectOrCreateOnCreateFieldInputTypeName(target)}!`, }; } diff --git a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts index fd3ad998ad..1959f5a030 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts @@ -163,7 +163,7 @@ export function createConnectOrCreateField2({ return undefined; } - const connectOrCreateName = relationshipAdapter.connectOrCreateFieldInputTypeName; + const connectOrCreateName = relationshipAdapter.getConnectOrCreateFieldInputTypeName(targetEntityAdapter); createOnCreateITC2({ schemaComposer, @@ -193,7 +193,7 @@ function createOnCreateITC2({ targetEntityAdapter: ConcreteEntityAdapter; userDefinedFieldDirectives: Map; }): InputTypeComposer { - const onCreateName = relationshipAdapter.connectOrCreateOnCreateFieldInputTypeName; + const onCreateName = relationshipAdapter.getConnectOrCreateOnCreateFieldInputTypeName(targetEntityAdapter); const onCreateFields = getOnCreateFields2({ relationshipAdapter, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts b/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts index 2b9e8f3f2b..7bc0c1c522 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts @@ -59,7 +59,7 @@ export function createTopLevelConnectOrCreateInput2({ `${sourceName}ConnectOrCreateInput` ); - const nodeFieldConnectOrCreateInputName = relationshipAdapter.connectOrCreateFieldInputTypeName; + const nodeFieldConnectOrCreateInputName = relationshipAdapter.getConnectOrCreateFieldInputTypeName(); nodeConnectOrCreateInput.addFields({ [relationshipAdapter.name]: relationshipAdapter.isList 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 aa7ade5171..faa9b671f4 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -50,6 +50,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -66,6 +67,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -77,11 +79,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -278,7 +282,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -341,6 +347,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -353,6 +360,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -393,6 +401,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -409,6 +418,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -420,11 +430,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -640,7 +652,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -703,6 +717,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -715,6 +730,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1133,6 +1149,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1149,6 +1166,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1160,11 +1178,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -1371,7 +1391,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -1434,6 +1456,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1446,6 +1469,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1486,6 +1510,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1502,6 +1527,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1513,11 +1539,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -1728,7 +1756,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -1791,6 +1821,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1803,6 +1834,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1843,6 +1875,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1859,6 +1892,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1870,11 +1904,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -2085,7 +2121,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -2148,6 +2186,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2160,6 +2199,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2201,6 +2241,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2217,6 +2258,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2228,11 +2270,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -2429,7 +2473,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -2492,6 +2538,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2504,6 +2551,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2546,6 +2594,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2562,6 +2611,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2578,11 +2628,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -2805,8 +2857,11 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String } @@ -2893,6 +2948,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2905,6 +2961,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3487,6 +3544,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3503,6 +3561,7 @@ describe("Relationship nested operations", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3514,11 +3573,13 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! @@ -3866,7 +3927,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -3929,6 +3992,7 @@ describe("Relationship nested operations", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3941,6 +4005,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3994,6 +4059,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4015,6 +4081,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4026,10 +4093,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -4161,7 +4230,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -4221,7 +4292,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -4298,11 +4371,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -4315,6 +4390,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4366,6 +4442,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4387,6 +4464,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4398,10 +4476,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -4580,7 +4660,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -4640,7 +4722,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -4717,11 +4801,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -4734,6 +4820,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4785,6 +4872,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4806,6 +4894,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4817,10 +4906,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -4999,7 +5090,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -5063,7 +5156,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -5144,11 +5239,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5161,6 +5258,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5212,6 +5310,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5233,6 +5332,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5244,10 +5344,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -5403,7 +5505,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -5463,7 +5567,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -5540,11 +5646,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5557,6 +5665,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5608,6 +5717,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5629,6 +5739,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5640,10 +5751,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -5808,7 +5921,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -5868,7 +5983,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -5945,11 +6062,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5962,6 +6081,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6013,6 +6133,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6034,6 +6155,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6045,10 +6167,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -6213,7 +6337,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -6273,7 +6399,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -6350,11 +6478,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -6367,6 +6497,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6419,6 +6550,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6440,6 +6572,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6451,10 +6584,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -6586,7 +6721,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -6646,7 +6783,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -6723,11 +6862,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -6740,6 +6881,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6794,6 +6936,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6815,6 +6958,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6831,9 +6975,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -7022,8 +7169,11 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String } @@ -7107,8 +7257,11 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -7209,11 +7362,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -7226,6 +7381,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7278,6 +7434,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7299,6 +7456,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7310,10 +7468,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! @@ -7644,7 +7804,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -7708,7 +7870,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -7789,11 +7953,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -7806,6 +7972,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7858,6 +8025,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7879,6 +8047,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7890,10 +8059,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! @@ -8158,7 +8329,9 @@ describe("Relationship nested operations", () => { union Person = PersonOne | PersonTwo + \\"\\"\\"\\"\\"\\" type PersonOne { + \\"\\"\\"\\"\\"\\" name: String } @@ -8218,7 +8391,9 @@ describe("Relationship nested operations", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type PersonTwo { + \\"\\"\\"\\"\\"\\" nameTwo: String } @@ -8295,11 +8470,13 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -8312,6 +8489,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8373,6 +8551,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8394,6 +8573,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -8405,10 +8585,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -8538,8 +8720,11 @@ describe("Relationship nested operations", () => { PersonTwo: PersonTwoWhere } + \\"\\"\\"\\"\\"\\" type PersonOne implements Person { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" someExtraProp: [Int!]! } @@ -8623,7 +8808,9 @@ describe("Relationship nested operations", () => { name: SortDirection } + \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -8709,6 +8896,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -8721,6 +8909,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8775,6 +8964,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8796,6 +8986,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -8807,10 +8998,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -8964,8 +9157,11 @@ describe("Relationship nested operations", () => { PersonTwo: PersonTwoWhere } + \\"\\"\\"\\"\\"\\" type PersonOne implements Person { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" someExtraProp: [Int!]! } @@ -9049,7 +9245,9 @@ describe("Relationship nested operations", () => { name: SortDirection } + \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -9135,6 +9333,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -9147,6 +9346,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9201,6 +9401,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9222,6 +9423,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -9233,10 +9435,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -9389,8 +9593,11 @@ describe("Relationship nested operations", () => { PersonTwo: PersonTwoWhere } + \\"\\"\\"\\"\\"\\" type PersonOne implements Person { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" someExtraProp: [Int!]! } @@ -9474,7 +9681,9 @@ describe("Relationship nested operations", () => { name: SortDirection } + \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -9560,6 +9769,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -9572,6 +9782,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9626,6 +9837,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9647,6 +9859,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -9658,10 +9871,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -9806,8 +10021,11 @@ describe("Relationship nested operations", () => { PersonTwo: PersonTwoWhere } + \\"\\"\\"\\"\\"\\" type PersonOne implements Person { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" someExtraProp: [Int!]! } @@ -9891,7 +10109,9 @@ describe("Relationship nested operations", () => { name: SortDirection } + \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -9982,6 +10202,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -9994,6 +10215,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10048,6 +10270,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10069,6 +10292,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -10080,10 +10304,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -10227,8 +10453,11 @@ describe("Relationship nested operations", () => { PersonTwo: PersonTwoWhere } + \\"\\"\\"\\"\\"\\" type PersonOne implements Person { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" someExtraProp: [Int!]! } @@ -10312,7 +10541,9 @@ describe("Relationship nested operations", () => { name: SortDirection } + \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -10398,6 +10629,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -10410,6 +10642,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10464,6 +10697,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10485,6 +10719,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -10496,10 +10731,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -10643,8 +10880,11 @@ describe("Relationship nested operations", () => { PersonTwo: PersonTwoWhere } + \\"\\"\\"\\"\\"\\" type PersonOne implements Person { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" someExtraProp: [Int!]! } @@ -10728,7 +10968,9 @@ describe("Relationship nested operations", () => { name: SortDirection } + \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -10814,6 +11056,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -10826,6 +11069,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10881,6 +11125,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10902,6 +11147,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -10913,10 +11159,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! @@ -11167,8 +11415,11 @@ describe("Relationship nested operations", () => { PersonTwo: PersonTwoWhere } + \\"\\"\\"\\"\\"\\" type PersonOne implements Person { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" someExtraProp: [Int!]! } @@ -11252,7 +11503,9 @@ describe("Relationship nested operations", () => { name: SortDirection } + \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -11343,6 +11596,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -11355,6 +11609,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -11411,6 +11666,7 @@ describe("Relationship nested operations", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -11432,6 +11688,7 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -11443,10 +11700,12 @@ describe("Relationship nested operations", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! @@ -11667,8 +11926,11 @@ describe("Relationship nested operations", () => { PersonTwo: PersonTwoWhere } + \\"\\"\\"\\"\\"\\" type PersonOne implements Person { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" someExtraProp: [Int!]! } @@ -11752,7 +12014,9 @@ describe("Relationship nested operations", () => { name: SortDirection } + \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -11838,6 +12102,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -11850,6 +12115,7 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From 3b428a8057ee96eaba9917601ee755c987ac15cd Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 17:39:11 +0100 Subject: [PATCH 036/162] update test snapshots to add empty descriptions --- .../graphql/tests/schema/comments.test.ts | 37 +++++ .../schema/connect-or-create-unions.test.ts | 14 ++ .../tests/schema/connections/enums.test.ts | 10 ++ .../tests/schema/directive-preserve.test.ts | 31 ++++ .../schema/directives/populatedBy.test.ts | 36 +++++ .../relationship-properties.test.ts | 24 ++++ .../tests/schema/directives/settable.test.ts | 133 ++++++++++++++++++ .../schema/interface-relationships.test.ts | 13 ++ .../graphql/tests/schema/issues/3439.test.ts | 26 ++++ .../graphql/tests/schema/issues/3537.test.ts | 24 ++++ packages/graphql/tests/schema/math.test.ts | 53 +++++++ .../schema/pluralize-consistency.test.ts | 29 ++-- .../tests/schema/subscriptions.test.ts | 76 ++++++++++ 13 files changed, 496 insertions(+), 10 deletions(-) diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index e4106e3997..bb5a41d76e 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -65,6 +65,7 @@ describe("Comments", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -79,6 +80,7 @@ describe("Comments", () => { \\"\\"\\"A custom scalar.\\"\\"\\" scalar CustomScalar + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -117,8 +119,11 @@ describe("Comments", () => { actorCount: Int \\"\\"\\"The average rating for the movie.\\"\\"\\" averageRating: Float + \\"\\"\\"\\"\\"\\" customScalar: CustomScalar + \\"\\"\\"\\"\\"\\" genre: Genre + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\" Is the movie active? @@ -253,6 +258,7 @@ describe("Comments", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -260,6 +266,7 @@ describe("Comments", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -297,7 +304,9 @@ describe("Comments", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String } @@ -366,6 +375,7 @@ describe("Comments", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -377,6 +387,7 @@ describe("Comments", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -388,11 +399,13 @@ describe("Comments", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"Actors in Movie\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -648,6 +661,7 @@ describe("Comments", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -665,6 +679,7 @@ describe("Comments", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -747,10 +762,12 @@ describe("Comments", () => { screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"Acted in Production\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -915,6 +932,7 @@ describe("Comments", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -931,6 +949,7 @@ describe("Comments", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -944,8 +963,11 @@ describe("Comments", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" runtime: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -1109,8 +1131,11 @@ describe("Comments", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" episodes: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -1184,6 +1209,7 @@ describe("Comments", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1201,6 +1227,7 @@ describe("Comments", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1249,6 +1276,7 @@ describe("Comments", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1260,13 +1288,16 @@ describe("Comments", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" id: ID } @@ -1335,11 +1366,14 @@ describe("Comments", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID \\"\\"\\"\\"\\"\\" search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + \\"\\"\\"\\"\\"\\" searchNoDirective: Search } @@ -1598,6 +1632,7 @@ describe("Comments", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -1610,6 +1645,7 @@ describe("Comments", () => { Movie: MovieWhere } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1622,6 +1658,7 @@ describe("Comments", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index f968712442..b86c786522 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -87,9 +87,12 @@ describe("Connect Or Create", () => { screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -368,6 +371,7 @@ describe("Connect Or Create", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -384,14 +388,18 @@ describe("Connect Or Create", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" isan: String! + \\"\\"\\"\\"\\"\\" title: String! } @@ -521,13 +529,17 @@ describe("Connect Or Create", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"\\"\\"\\" type Series { + \\"\\"\\"\\"\\"\\" isan: String! + \\"\\"\\"\\"\\"\\" title: String! } @@ -618,6 +630,7 @@ describe("Connect Or Create", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -635,6 +648,7 @@ describe("Connect Or Create", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index a67c997fbd..220490cc3c 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -79,10 +79,13 @@ describe("Enums", () => { roleType_NOT_IN: [RoleType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -331,6 +334,7 @@ describe("Enums", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -342,16 +346,20 @@ describe("Enums", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -626,6 +634,7 @@ describe("Enums", () => { SUPPORTING } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -643,6 +652,7 @@ describe("Enums", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index e15f2c8d94..6811cae3c8 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -45,6 +45,7 @@ describe("Directive-preserve", () => { directive @preservedTopLevel(boolean: Boolean, float: Float, int: Int, string: String) on OBJECT + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -56,6 +57,7 @@ describe("Directive-preserve", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -67,7 +69,9 @@ describe("Directive-preserve", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie @preservedTopLevel { + \\"\\"\\"\\"\\"\\" id: ID @preservedFieldLevel(string: \\"str\\", int: 12, float: 1.2, boolean: true) } @@ -147,6 +151,7 @@ describe("Directive-preserve", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -154,6 +159,7 @@ describe("Directive-preserve", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -197,6 +203,7 @@ describe("Directive-preserve", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -208,6 +215,7 @@ describe("Directive-preserve", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -221,10 +229,13 @@ describe("Directive-preserve", () => { sum: Float } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String } @@ -520,12 +531,17 @@ describe("Directive-preserve", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use\\") + \\"\\"\\"\\"\\"\\" imdbRating: Float + \\"\\"\\"\\"\\"\\" title: String + \\"\\"\\"\\"\\"\\" year: Int } @@ -818,6 +834,7 @@ describe("Directive-preserve", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -835,6 +852,7 @@ describe("Directive-preserve", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2813,10 +2831,13 @@ describe("Directive-preserve", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Blog { + \\"\\"\\"\\"\\"\\" posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! postsAggregate(directed: Boolean = true, where: PostWhere): BlogPostPostsAggregationSelection postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! + \\"\\"\\"\\"\\"\\" title: String } @@ -3062,6 +3083,7 @@ describe("Directive-preserve", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3078,6 +3100,7 @@ describe("Directive-preserve", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3104,7 +3127,9 @@ describe("Directive-preserve", () => { startCursor: String } + \\"\\"\\"\\"\\"\\" type Post { + \\"\\"\\"\\"\\"\\" content: String @deprecated(reason: \\"Do not use post.content\\") } @@ -3180,11 +3205,13 @@ describe("Directive-preserve", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3202,6 +3229,7 @@ describe("Directive-preserve", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3220,9 +3248,12 @@ describe("Directive-preserve", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason: \\"Do not use user.content\\") contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\"\\"\\"\\" name: String } diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 61493631c2..486b7e1408 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -162,6 +162,7 @@ describe("@populatedBy tests", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -173,6 +174,7 @@ describe("@populatedBy tests", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -184,10 +186,15 @@ describe("@populatedBy tests", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" callback1: String! + \\"\\"\\"\\"\\"\\" callback2: String! + \\"\\"\\"\\"\\"\\" callback3: String! + \\"\\"\\"\\"\\"\\" id: ID } @@ -303,6 +310,7 @@ describe("@populatedBy tests", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -315,6 +323,7 @@ describe("@populatedBy tests", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -365,6 +374,7 @@ describe("@populatedBy tests", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -376,6 +386,7 @@ describe("@populatedBy tests", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -394,10 +405,15 @@ describe("@populatedBy tests", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" callback1: Int! + \\"\\"\\"\\"\\"\\" callback2: Int! + \\"\\"\\"\\"\\"\\" callback3: Int! + \\"\\"\\"\\"\\"\\" id: ID } @@ -507,6 +523,7 @@ describe("@populatedBy tests", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -514,6 +531,7 @@ describe("@populatedBy tests", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -713,6 +731,7 @@ describe("@populatedBy tests", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -724,13 +743,16 @@ describe("@populatedBy tests", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" id: ID! } @@ -804,10 +826,13 @@ describe("@populatedBy tests", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -1228,6 +1253,7 @@ describe("@populatedBy tests", () => { id_STARTS_WITH: ID } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1245,6 +1271,7 @@ describe("@populatedBy tests", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1309,6 +1336,7 @@ describe("@populatedBy tests", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1320,13 +1348,16 @@ describe("@populatedBy tests", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" id: ID! } @@ -1407,10 +1438,13 @@ describe("@populatedBy tests", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -1795,6 +1829,7 @@ describe("@populatedBy tests", () => { id_STARTS_WITH: ID } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1807,6 +1842,7 @@ describe("@populatedBy tests", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index 14b5a2563f..7a98eb01e0 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -100,11 +100,13 @@ describe("Relationship-properties", () => { startDate_NOT_IN: [Date!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -392,6 +394,7 @@ describe("Relationship-properties", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -406,6 +409,7 @@ describe("Relationship-properties", () => { \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" scalar Date + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -419,11 +423,13 @@ describe("Relationship-properties", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -732,6 +738,7 @@ describe("Relationship-properties", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -749,6 +756,7 @@ describe("Relationship-properties", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -845,11 +853,13 @@ describe("Relationship-properties", () => { timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1155,6 +1165,7 @@ describe("Relationship-properties", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1174,6 +1185,7 @@ describe("Relationship-properties", () => { min: DateTime! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1192,11 +1204,13 @@ describe("Relationship-properties", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -1523,6 +1537,7 @@ describe("Relationship-properties", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1540,6 +1555,7 @@ describe("Relationship-properties", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1615,11 +1631,13 @@ describe("Relationship-properties", () => { timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1895,6 +1913,7 @@ describe("Relationship-properties", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1914,6 +1933,7 @@ describe("Relationship-properties", () => { min: DateTime! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1925,11 +1945,13 @@ describe("Relationship-properties", () => { shortest: ID! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -2226,6 +2248,7 @@ describe("Relationship-properties", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2243,6 +2266,7 @@ describe("Relationship-properties", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 2e1d862d00..c403e16b57 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -45,6 +45,7 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -56,14 +57,18 @@ describe("@settable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -156,6 +161,7 @@ describe("@settable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -173,6 +179,7 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -203,6 +210,7 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -214,14 +222,18 @@ describe("@settable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -314,6 +326,7 @@ describe("@settable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -331,6 +344,7 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -362,6 +376,7 @@ describe("@settable", () => { subscription: Subscription } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -373,6 +388,7 @@ describe("@settable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -387,8 +403,11 @@ describe("@settable", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -530,6 +549,7 @@ describe("@settable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -553,6 +573,7 @@ describe("@settable", () => { movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -591,11 +612,13 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -860,6 +883,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -871,14 +895,18 @@ describe("@settable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -982,6 +1010,7 @@ describe("@settable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1004,6 +1033,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1041,11 +1071,13 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1302,6 +1334,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1313,14 +1346,18 @@ describe("@settable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -1424,6 +1461,7 @@ describe("@settable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1446,6 +1484,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1482,11 +1521,13 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1750,6 +1791,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1761,18 +1803,22 @@ describe("@settable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -2049,6 +2095,7 @@ describe("@settable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2071,6 +2118,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2107,11 +2155,13 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -2383,6 +2433,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2394,18 +2445,22 @@ describe("@settable", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -2682,6 +2737,7 @@ describe("@settable", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2704,6 +2760,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2749,10 +2806,12 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -2967,6 +3026,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2983,14 +3043,18 @@ describe("@settable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -3107,13 +3171,17 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"\\"\\"\\" type Series { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" name: String! } @@ -3191,6 +3259,7 @@ describe("@settable", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3213,6 +3282,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3262,10 +3332,12 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -3464,6 +3536,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3480,14 +3553,18 @@ describe("@settable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -3604,13 +3681,17 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"\\"\\"\\" type Series { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" name: String! } @@ -3688,6 +3769,7 @@ describe("@settable", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3710,6 +3792,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3758,10 +3841,12 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -3967,6 +4052,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3983,18 +4069,22 @@ describe("@settable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -4284,13 +4374,17 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"\\"\\"\\" type Series { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" name: String! } @@ -4368,6 +4462,7 @@ describe("@settable", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -4390,6 +4485,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4438,10 +4534,12 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -4663,6 +4761,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4679,18 +4778,22 @@ describe("@settable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -4980,13 +5083,17 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"\\"\\"\\" type Series { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" name: String! } @@ -5064,6 +5171,7 @@ describe("@settable", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5086,6 +5194,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5140,10 +5249,12 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -5295,6 +5406,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5311,14 +5423,18 @@ describe("@settable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -5495,8 +5611,11 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -5570,6 +5689,7 @@ describe("@settable", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5592,6 +5712,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5644,10 +5765,12 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -5791,6 +5914,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5807,14 +5931,18 @@ describe("@settable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -5980,8 +6108,11 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -6055,6 +6186,7 @@ describe("@settable", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -6077,6 +6209,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index feaa7d550c..91e1d43486 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -89,9 +89,12 @@ describe("Interface Relationships", () => { screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -256,6 +259,7 @@ describe("Interface Relationships", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -272,6 +276,7 @@ describe("Interface Relationships", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -285,8 +290,11 @@ describe("Interface Relationships", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" runtime: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -450,8 +458,11 @@ describe("Interface Relationships", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" episodes: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -525,6 +536,7 @@ describe("Interface Relationships", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -542,6 +554,7 @@ describe("Interface Relationships", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 634ea159a7..439bdf27d3 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -79,6 +79,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -95,6 +96,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -109,7 +111,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" name: String! \\"\\"\\"\\"\\"\\" product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! @@ -511,12 +515,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_STARTS_WITH: String } + \\"\\"\\"\\"\\"\\" type Movie implements INode & IProduct { \\"\\"\\"\\"\\"\\" genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } @@ -884,12 +891,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements INode & IProduct { \\"\\"\\"\\"\\"\\" genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection genreConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1225,6 +1235,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1260,6 +1271,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2499,6 +2511,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2515,6 +2528,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2529,7 +2543,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" name: String! \\"\\"\\"\\"\\"\\" product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! @@ -2881,9 +2897,13 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_STARTS_WITH: String } + \\"\\"\\"\\"\\"\\" type Movie implements IProduct { + \\"\\"\\"\\"\\"\\" genre: Genre! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } @@ -3039,9 +3059,13 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements IProduct { + \\"\\"\\"\\"\\"\\" genre: Genre! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } @@ -3165,6 +3189,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3196,6 +3221,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index 5aed41f029..8168fdee71 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -69,8 +69,11 @@ describe("Extending the schema in when using getSubgraphSchema", () => { directive @shareable on FIELD_DEFINITION | OBJECT + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -143,6 +146,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -154,13 +158,16 @@ describe("Extending the schema in when using getSubgraphSchema", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String } @@ -240,6 +247,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -252,6 +260,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -332,8 +341,11 @@ describe("Extending the schema in when using getSubgraphSchema", () => { directive @shareable on FIELD_DEFINITION | OBJECT + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -397,7 +409,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String } @@ -467,6 +481,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -554,8 +569,11 @@ describe("Extending the schema in when using getSubgraphSchema", () => { directive @shareable on FIELD_DEFINITION | OBJECT + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -672,6 +690,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -683,6 +702,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -697,7 +717,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" title: String } @@ -811,6 +833,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -838,6 +861,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index e0e59e541b..f7863d7d47 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -38,6 +38,7 @@ describe("Algebraic", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -49,6 +50,7 @@ describe("Algebraic", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -67,8 +69,11 @@ describe("Algebraic", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" viewers: Int! } @@ -162,6 +167,7 @@ describe("Algebraic", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -169,6 +175,7 @@ describe("Algebraic", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -211,6 +218,7 @@ describe("Algebraic", () => { sum: BigInt! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -222,6 +230,7 @@ describe("Algebraic", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -233,8 +242,11 @@ describe("Algebraic", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" viewers: BigInt! } @@ -328,6 +340,7 @@ describe("Algebraic", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -335,6 +348,7 @@ describe("Algebraic", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -366,6 +380,7 @@ describe("Algebraic", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -377,6 +392,7 @@ describe("Algebraic", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -395,8 +411,11 @@ describe("Algebraic", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" viewers: Float! } @@ -492,6 +511,7 @@ describe("Algebraic", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -499,6 +519,7 @@ describe("Algebraic", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -540,6 +561,7 @@ describe("Algebraic", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -551,16 +573,20 @@ describe("Algebraic", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Director { + \\"\\"\\"\\"\\"\\" directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! directsAggregate(directed: Boolean = true, where: MovieWhere): DirectorMovieDirectsAggregationSelection directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! + \\"\\"\\"\\"\\"\\" lastName: String! } @@ -801,11 +827,15 @@ describe("Algebraic", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director directedByAggregate(directed: Boolean = true, where: DirectorWhere): MovieDirectorDirectedByAggregationSelection directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" viewers: Int! } @@ -1058,6 +1088,7 @@ describe("Algebraic", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1075,6 +1106,7 @@ describe("Algebraic", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1115,6 +1147,7 @@ describe("Algebraic", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1131,6 +1164,7 @@ describe("Algebraic", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1149,9 +1183,13 @@ describe("Algebraic", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" viewers: Int! + \\"\\"\\"\\"\\"\\" workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! workersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonWorkersAggregationSelection workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! @@ -1423,8 +1461,11 @@ describe("Algebraic", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" name: String! + \\"\\"\\"\\"\\"\\" worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! } @@ -1667,6 +1708,7 @@ describe("Algebraic", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1679,6 +1721,7 @@ describe("Algebraic", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1769,6 +1812,7 @@ describe("Algebraic", () => { roles_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1785,6 +1829,7 @@ describe("Algebraic", () => { people: [Person!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1798,10 +1843,13 @@ describe("Algebraic", () => { sum: Float } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -2106,10 +2154,13 @@ describe("Algebraic", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { + \\"\\"\\"\\"\\"\\" actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! actedInMoviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieActedInMoviesAggregationSelection actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -2394,6 +2445,7 @@ describe("Algebraic", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2406,6 +2458,7 @@ describe("Algebraic", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index 02bd57fc58..f476b8b994 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -43,6 +43,7 @@ describe("Pluralize consistency", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -59,6 +60,7 @@ describe("Pluralize consistency", () => { superUsers: [super_user!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -91,6 +93,7 @@ describe("Pluralize consistency", () => { superUsersConnection(after: String, first: Int, sort: [super_userSort], where: super_userWhere): SuperUsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -115,6 +118,7 @@ describe("Pluralize consistency", () => { totalCount: Int! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -133,7 +137,9 @@ describe("Pluralize consistency", () => { superUsers: [super_user!]! } + \\"\\"\\"\\"\\"\\" type super_friend { + \\"\\"\\"\\"\\"\\" name: String! } @@ -191,10 +197,13 @@ describe("Pluralize consistency", () => { name_STARTS_WITH: String } + \\"\\"\\"\\"\\"\\" type super_user { + \\"\\"\\"\\"\\"\\" my_friend(directed: Boolean = true, options: super_friendOptions, where: super_friendWhere): [super_friend!]! - my_friendAggregate(directed: Boolean = true, where: super_friendWhere): super_usersuper_friendMy_friendAggregationSelection + my_friendAggregate(directed: Boolean = true, where: super_friendWhere): super_userSuper_friendMy_friendAggregationSelection my_friendConnection(after: String, directed: Boolean = true, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -359,6 +368,15 @@ describe("Pluralize consistency", () => { name: SortDirection } + type super_userSuper_friendMy_friendAggregationSelection { + count: Int! + node: super_userSuper_friendMy_friendNodeAggregateSelection + } + + type super_userSuper_friendMy_friendNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + input super_userUpdateInput { my_friend: [super_userMy_friendUpdateFieldInput!] name: String @@ -415,15 +433,6 @@ describe("Pluralize consistency", () => { name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") name_STARTS_WITH: String - } - - type super_usersuper_friendMy_friendAggregationSelection { - count: Int! - node: super_usersuper_friendMy_friendNodeAggregateSelection - } - - type super_usersuper_friendMy_friendNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! }" `); }); diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 791de88cf9..12abc4f99f 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -59,7 +59,9 @@ describe("Subscriptions", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String! } @@ -167,6 +169,7 @@ describe("Subscriptions", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -178,6 +181,7 @@ describe("Subscriptions", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -211,14 +215,19 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actorCount: Int \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" averageRating: Float + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" isActive: Boolean } @@ -617,6 +626,7 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -645,6 +655,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -691,6 +702,7 @@ describe("Subscriptions", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! @@ -987,6 +999,7 @@ describe("Subscriptions", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -998,6 +1011,7 @@ describe("Subscriptions", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1031,14 +1045,19 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actorCount: Int \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" averageRating: Float + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" isActive: Boolean } @@ -1373,6 +1392,7 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1398,6 +1418,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1456,6 +1477,7 @@ describe("Subscriptions", () => { Star: StarWhere } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1477,6 +1499,7 @@ describe("Subscriptions", () => { stars: [Star!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1510,13 +1533,18 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actorCount: Int \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" averageRating: Float + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" isActive: Boolean } @@ -1901,6 +1929,7 @@ describe("Subscriptions", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! @@ -2198,11 +2227,13 @@ describe("Subscriptions", () => { starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2210,6 +2241,7 @@ describe("Subscriptions", () => { DESC } + \\"\\"\\"\\"\\"\\" type Star { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! @@ -2519,6 +2551,7 @@ describe("Subscriptions", () => { starUpdated: StarUpdatedEvent! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2625,6 +2658,7 @@ describe("Subscriptions", () => { screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! @@ -2921,6 +2955,7 @@ describe("Subscriptions", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2932,6 +2967,7 @@ describe("Subscriptions", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2972,14 +3008,19 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actorCount: Int \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" averageRating: Float + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" isActive: Boolean } @@ -3381,6 +3422,7 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3406,6 +3448,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3450,7 +3493,9 @@ describe("Subscriptions", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" name: String! } @@ -3558,6 +3603,7 @@ describe("Subscriptions", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3569,6 +3615,7 @@ describe("Subscriptions", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3602,14 +3649,19 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actorCount: Int \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" averageRating: Float + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" isActive: Boolean } @@ -3900,6 +3952,7 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3923,6 +3976,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3965,8 +4019,11 @@ describe("Subscriptions", () => { subscription: Subscription } + \\"\\"\\"\\"\\"\\" type Agreement { + \\"\\"\\"\\"\\"\\" id: Int! + \\"\\"\\"\\"\\"\\" name: String \\"\\"\\"\\"\\"\\" owner(directed: Boolean = true, options: UserOptions, where: UserWhere): User @@ -4327,12 +4384,14 @@ describe("Subscriptions", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4377,6 +4436,7 @@ describe("Subscriptions", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -4407,6 +4467,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4415,8 +4476,11 @@ describe("Subscriptions", () => { relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" username: String! } @@ -4570,6 +4634,7 @@ describe("Subscriptions", () => { Star: StarWhere } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4591,6 +4656,7 @@ describe("Subscriptions", () => { stars: [Star!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4624,13 +4690,18 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"\\"\\"\\" type Movie { + \\"\\"\\"\\"\\"\\" actorCount: Int \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + \\"\\"\\"\\"\\"\\" averageRating: Float + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" isActive: Boolean } @@ -5015,6 +5086,7 @@ describe("Subscriptions", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! @@ -5312,11 +5384,13 @@ describe("Subscriptions", () => { starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } + \\"\\"\\"\\"\\"\\" input QueryOptions { limit: Int offset: Int } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5324,6 +5398,7 @@ describe("Subscriptions", () => { DESC } + \\"\\"\\"\\"\\"\\" type Star { \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! @@ -5571,6 +5646,7 @@ describe("Subscriptions", () => { personUpdated: PersonUpdatedEvent! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From c7bcb6dc4435437aa25214fa19f3f6678476c5d3 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 17:39:58 +0100 Subject: [PATCH 037/162] add RelayID annotation to fix globalID failing test --- .../graphql/tests/schema/global-node.test.ts | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index dd7689c266..a0228de8df 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -26,7 +26,8 @@ describe("Node Interface Types", () => { test("nodes should implement the Node Interface and generate a top-level node query", async () => { const typeDefs = gql` type Movie { - title: String! @relayId + title: String! + imdb: ID! @relayId } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); @@ -38,6 +39,7 @@ describe("Node Interface Types", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -49,23 +51,35 @@ describe("Node Interface Types", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + \\"\\"\\"\\"\\"\\" type Movie implements Node { id: ID! + \\"\\"\\"\\"\\"\\" + imdb: ID! + \\"\\"\\"\\"\\"\\" title: String! } type MovieAggregateSelection { count: Int! + imdb: IDAggregateSelectionNonNullable! title: StringAggregateSelectionNonNullable! } input MovieCreateInput { + imdb: ID! title: String! } @@ -87,10 +101,12 @@ describe("Node Interface Types", () => { 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 { + imdb: SortDirection title: SortDirection } input MovieUpdateInput { + imdb: ID title: String } @@ -99,6 +115,16 @@ describe("Node Interface Types", () => { NOT: MovieWhere OR: [MovieWhere!] id: ID + imdb: ID + imdb_CONTAINS: ID + imdb_ENDS_WITH: ID + imdb_IN: [ID!] + imdb_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_STARTS_WITH: ID title: String title_CONTAINS: String title_ENDS_WITH: String @@ -148,6 +174,7 @@ describe("Node Interface Types", () => { ): Node } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -160,6 +187,7 @@ describe("Node Interface Types", () => { shortest: String! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From 25cdf838d7e5feee2ce7dc7f0b4a790c93279f7e Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 8 Sep 2023 17:40:19 +0100 Subject: [PATCH 038/162] add missing isNullable to test --- .../relationship/model-adapters/RelationshipAdapter.test.ts | 1 + 1 file changed, 1 insertion(+) 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 124d298786..b6cd56a857 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 @@ -93,6 +93,7 @@ describe("RelationshipAdapter", () => { aggregate: false, description: "", annotations: [selectable], + isNullable: true, }); userEntity.addRelationship(relationship); From d1686fe25d0917773e73683a6b76c8052aa8ee2a Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 11:59:35 +0100 Subject: [PATCH 039/162] improve getUserDefinedDirectives fn to include inherited directives --- .../src/schema/new-make-augmented-schema.ts | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index b2cabd92f3..1aa35b2786 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -22,6 +22,7 @@ import type { DefinitionNode, DirectiveNode, DocumentNode, + FieldDefinitionNode, GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, @@ -51,7 +52,7 @@ import type { Node } from "../classes"; import type Relationship from "../classes/Relationship"; import * as Scalars from "../graphql/scalars"; import { isRootType } from "../utils/is-root-type"; -import createConnectionFields from "./create-connection-fields"; +import { createConnectionFields } from "./create-connection-fields"; import { ensureNonEmptyInput } from "./ensure-non-empty-input"; import getCustomResolvers from "./get-custom-resolvers"; import type { DefinitionNodes } from "./get-definition-nodes"; @@ -504,6 +505,38 @@ class ToComposer { } */ +function getUserDefinedFieldDirectivesForDefinition( + definitionNode: ObjectTypeDefinitionNode, + definitionNodes: DefinitionNodes +): Map { + const userDefinedFieldDirectives = new Map(); + + const allFields: Array = [...(definitionNode.fields || [])]; + if (definitionNode.interfaces) { + for (const inheritsFrom of definitionNode.interfaces) { + const interfaceDefinition = definitionNodes.interfaceTypes.find( + (type) => type.name.value === inheritsFrom.name.value + ); + const inheritedFields = interfaceDefinition?.fields; + if (inheritedFields) { + allFields.push(...inheritedFields); + } + } + } + for (const field of allFields) { + if (!field.directives) { + return userDefinedFieldDirectives; + } + + const matched = field.directives.filter((directive) => !isInArray(FIELD_DIRECTIVES, directive.name.value)); + if (matched.length) { + userDefinedFieldDirectives.set(field.name.value, matched); + } + } + + return userDefinedFieldDirectives; +} + function makeAugmentedSchema( document: DocumentNode, { @@ -995,17 +1028,7 @@ function makeAugmentedSchema( return; } - const userDefinedFieldDirectives = new Map(); - for (const field of definitionNode.fields || []) { - if (!field.directives) { - return; - } - - const matched = field.directives.filter((directive) => !isInArray(FIELD_DIRECTIVES, directive.name.value)); - if (matched.length) { - userDefinedFieldDirectives.set(field.name.value, matched); - } - } + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); const nodeFields = concreteEntityToComposeFields( concreteEntityAdapter.objectFields, From d4aa6afb16b074a085e391d9724b4cc46ab36d20 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 12:02:10 +0100 Subject: [PATCH 040/162] ignore private fields and add inheritsFrom field to Relationship for connectionPrefix logic --- .../src/schema-model/generate-model.ts | 72 +++++++++++++++++-- .../schema-model/relationship/Relationship.ts | 5 ++ 2 files changed, 70 insertions(+), 7 deletions(-) diff --git a/packages/graphql/src/schema-model/generate-model.ts b/packages/graphql/src/schema-model/generate-model.ts index 2f75c9ef2b..bbe7142e56 100644 --- a/packages/graphql/src/schema-model/generate-model.ts +++ b/packages/graphql/src/schema-model/generate-model.ts @@ -39,7 +39,7 @@ import type { DefinitionCollection } from "./parser/definition-collection"; import { getDefinitionCollection } from "./parser/definition-collection"; import { Operation } from "./Operation"; import { parseAttribute, parseField } from "./parser/parse-attribute"; -import { nodeDirective, relationshipDirective } from "../graphql/directives"; +import { nodeDirective, privateDirective, relationshipDirective } from "../graphql/directives"; import { parseKeyAnnotation } from "./parser/annotations-parser/key-annotation"; import { parseAnnotations } from "./parser/parse-annotation"; import { InterfaceEntity } from "./entity/InterfaceEntity"; @@ -158,6 +158,13 @@ function generateInterfaceEntity( const inheritedField = inheritedFields?.filter( (inheritedField) => inheritedField.name.value === fieldDefinition.name.value ); + const isPrivateAttribute = findDirective(fieldDefinition.directives, privateDirective.name); + const isInheritedPrivateAttribute = inheritedField?.some((inheritedField) => + findDirective(inheritedField.directives, privateDirective.name) + ); + if (isPrivateAttribute || isInheritedPrivateAttribute) { + return; + } const isRelationshipAttribute = findDirective(fieldDefinition.directives, relationshipDirective.name); const isInheritedRelationshipAttribute = inheritedField?.some((inheritedField) => findDirective(inheritedField.directives, relationshipDirective.name) @@ -230,6 +237,7 @@ function hydrateRelationships( const interfaceName = interfaceNamedNode.name.value; return definitionCollection.interfaceTypes.get(interfaceName)?.fields || []; }) || []; + // TODO: directives on definition have priority over interfaces const mergedFields = (definition.fields || []).concat(inheritedFields); const relationshipFieldsMap = new Map(); @@ -247,7 +255,8 @@ function hydrateRelationships( schema, entityWithRelationships, definitionCollection, - mergedDirectives + mergedDirectives, + getInterfaceNameIfInheritedField(definition, fieldDefinition.name.value, definitionCollection) ); if (relationshipField) { relationshipFieldsMap.set(fieldDefinition.name.value, relationshipField); @@ -259,12 +268,41 @@ function hydrateRelationships( } } +function getInterfaceNameIfInheritedField( + definition: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, + fieldName: string, + definitionCollection: DefinitionCollection +): string | undefined { + // TODO: potentially use this instead + // const fieldNameToSourceNameMap = definition.interfaces?.reduce((acc, interfaceNamedNode) => { + // const interfaceName = interfaceNamedNode.name.value; + // const fields = definitionCollection.interfaceTypes.get(interfaceName)?.fields || []; + // fields.forEach((f) => { + // const exists = acc.has(f.name.value); + // if (!exists) { + // acc.set(f.name.value, interfaceName); + // } + // }); + // return acc; + // }, new Map()); + + // deliberately using the first interface ONLY + const fieldNameToSourceNameMap = new Map(); + const firstInterfaceName = definition.interfaces?.[0]?.name.value; + if (firstInterfaceName) { + const fields = definitionCollection.interfaceTypes.get(firstInterfaceName)?.fields || []; + fields.forEach((field) => fieldNameToSourceNameMap.set(field.name.value, firstInterfaceName)); + } + return fieldNameToSourceNameMap?.get(fieldName); +} + function generateRelationshipField( field: FieldDefinitionNode, schema: Neo4jGraphQLSchemaModel, source: ConcreteEntity | InterfaceEntity, definitionCollection: DefinitionCollection, - mergedDirectives: DirectiveNode[] + mergedDirectives: DirectiveNode[], + inheritedFrom: string | undefined ): Relationship | undefined { // TODO: remove reference to getFieldTypeMeta const fieldTypeMeta = getFieldTypeMeta(field.type); @@ -300,6 +338,13 @@ function generateRelationshipField( const inheritedField = inheritedFields?.filter( (inheritedField) => inheritedField.name.value === fieldDefinition.name.value ); + const isPrivateAttribute = findDirective(fieldDefinition.directives, privateDirective.name); + const isInheritedPrivateAttribute = inheritedField?.some((inheritedField) => + findDirective(inheritedField.directives, privateDirective.name) + ); + if (isPrivateAttribute || isInheritedPrivateAttribute) { + return; + } return parseAttribute(fieldDefinition, inheritedField, definitionCollection); }); @@ -324,6 +369,7 @@ function generateRelationshipField( description: field.description?.value || "", annotations: annotations, propertiesTypeName, + inheritedFrom, }); } @@ -331,14 +377,26 @@ function generateConcreteEntity( definition: ObjectTypeDefinitionNode, definitionCollection: DefinitionCollection ): ConcreteEntity { - const inheritedFields = definition.interfaces?.flatMap((interfaceNamedNode) => { + const inheritsFrom = definition.interfaces?.map((interfaceNamedNode) => { const interfaceName = interfaceNamedNode.name.value; - return definitionCollection.interfaceTypes.get(interfaceName)?.fields || []; + return definitionCollection.interfaceTypes.get(interfaceName); }); + const fields = (definition.fields || []).map((fieldDefinition) => { + const inheritedFields = inheritsFrom?.flatMap((i) => i?.fields || []); const inheritedField = inheritedFields?.filter( (inheritedField) => inheritedField.name.value === fieldDefinition.name.value ); + + // If the attribute is the private directive then + const isPrivateAttribute = findDirective(fieldDefinition.directives, privateDirective.name); + const isInheritedPrivateAttribute = inheritedField?.some((inheritedField) => + findDirective(inheritedField.directives, privateDirective.name) + ); + if (isPrivateAttribute || isInheritedPrivateAttribute) { + return; + } + const isRelationshipAttribute = findDirective(fieldDefinition.directives, relationshipDirective.name); const isInheritedRelationshipAttribute = inheritedField?.some((inheritedField) => findDirective(inheritedField.directives, relationshipDirective.name) @@ -349,8 +407,8 @@ function generateConcreteEntity( return parseAttribute(fieldDefinition, inheritedField, definitionCollection); }); - const inheritedDirectives = inheritedFields?.flatMap((f) => f.directives || []) || []; - const annotations = createEntityAnnotations((definition.directives || []).concat(inheritedDirectives)); + const inheritedDirectives = inheritsFrom?.flatMap((i) => i?.directives || []); + const annotations = createEntityAnnotations((definition.directives || []).concat(inheritedDirectives || [])); return new ConcreteEntity({ name: definition.name.value, diff --git a/packages/graphql/src/schema-model/relationship/Relationship.ts b/packages/graphql/src/schema-model/relationship/Relationship.ts index b37c1b0889..1a10313428 100644 --- a/packages/graphql/src/schema-model/relationship/Relationship.ts +++ b/packages/graphql/src/schema-model/relationship/Relationship.ts @@ -46,6 +46,7 @@ export class Relationship { public readonly description: string; public readonly annotations: Partial = {}; public readonly propertiesTypeName: string | undefined; + public readonly inheritedFrom: string | undefined; // TODO: Remove connectionFieldTypename and relationshipFieldTypename and delegate to the adapter /**Note: Required for now to infer the types without ResolveTree */ @@ -73,6 +74,7 @@ export class Relationship { description, annotations = [], propertiesTypeName, + inheritedFrom, }: { name: string; type: string; @@ -88,6 +90,7 @@ export class Relationship { description: string; annotations: Annotation[]; propertiesTypeName?: string; + inheritedFrom?: string; }) { this.type = type; this.source = source; @@ -101,6 +104,7 @@ export class Relationship { this.isNullable = isNullable; this.description = description; this.propertiesTypeName = propertiesTypeName; + this.inheritedFrom = inheritedFrom; for (const attribute of attributes) { this.addAttribute(attribute); @@ -127,6 +131,7 @@ export class Relationship { description: this.description, annotations: Object.values(this.annotations), propertiesTypeName: this.propertiesTypeName, + inheritedFrom: this.inheritedFrom, }); } From 9b12369e2c343a052f3402759da98efb6348d049 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 12:03:05 +0100 Subject: [PATCH 041/162] update connectionPrefix logic to use sourceName for FieldInput types regardless of inheritsFrom value - for relationships to Interface types --- .../model-adapters/RelationshipAdapter.ts | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) 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 e0ed37a64b..228b71da66 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -44,6 +44,7 @@ export class RelationshipAdapter { public readonly isNullable: boolean; public readonly description: string; public readonly propertiesTypeName: string | undefined; + public readonly inheritedFrom: string | undefined; public readonly isList: boolean; public readonly annotations: Partial; @@ -51,7 +52,17 @@ export class RelationshipAdapter { // TODO: if relationship field is inherited by source (part of a implemented Interface, not necessarily annotated as rel) // then return this.interface.name // TODO: how to get implemented interfaces here?? - return this.source.name; + // console.log(this.inheritedFrom, this.source.name, this.name); + + return this.inheritedFrom || this.source.name; + } + + public get fieldInputPrefixForTypename(): string { + const isTargetInterface = this.target instanceof InterfaceEntityAdapter; + if (isTargetInterface) { + return this.source.name; + } + return this.prefixForTypename; } /**Note: Required for now to infer the types without ResolveTree */ @@ -69,23 +80,24 @@ export class RelationshipAdapter { } public get updateFieldInputTypeName(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}UpdateFieldInput`; + return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}UpdateFieldInput`; } public get createFieldInputTypeName(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}CreateFieldInput`; + return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}CreateFieldInput`; } public get deleteFieldInputTypeName(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}DeleteFieldInput`; + return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}DeleteFieldInput`; } - public get connectFieldInputTypeName(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}ConnectFieldInput`; + return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}ConnectFieldInput`; } + public get disconnectFieldInputTypeName(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}DisconnectFieldInput`; + return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}DisconnectFieldInput`; } + public getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter?: ConcreteEntityAdapter): string { if (this.target instanceof UnionEntityAdapter) { if (!concreteTargetEntityAdapter) { @@ -110,7 +122,7 @@ export class RelationshipAdapter { return `${this.prefixForTypename}${upperFirst(this.name)}ConnectionWhere`; } public get updateConnectionInputTypename(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}UpdateConnectionInput`; + return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}UpdateConnectionInput`; } public get aggregateInputTypeName(): string { @@ -170,6 +182,7 @@ export class RelationshipAdapter { description, annotations, propertiesTypeName, + inheritedFrom, } = relationship; this.name = name; this.type = type; @@ -197,6 +210,7 @@ export class RelationshipAdapter { this.description = description; this.annotations = annotations; this.propertiesTypeName = propertiesTypeName; + this.inheritedFrom = inheritedFrom; } private initAttributes(attributes: Map) { From b8dbd2b87127bf315a75f32531b318be4819862c Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 12:04:06 +0100 Subject: [PATCH 042/162] update tests with descriptions --- .../tests/schema/directive-preserve.test.ts | 30 +++++++++++ .../tests/schema/directives/private.test.ts | 6 +++ .../tests/schema/directives/settable.test.ts | 30 +++++++++++ .../schema/interface-relationships.test.ts | 54 +++++++++++++++++++ .../graphql/tests/schema/interfaces.test.ts | 9 ++++ .../graphql/tests/schema/issues/3439.test.ts | 15 ++++++ .../tests/schema/subscriptions.test.ts | 20 +++++-- 7 files changed, 159 insertions(+), 5 deletions(-) diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 6811cae3c8..8282b1664c 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -939,9 +939,12 @@ describe("Directive-preserve", () => { role_STARTS_WITH: String } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1113,6 +1116,7 @@ describe("Directive-preserve", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1129,6 +1133,7 @@ describe("Directive-preserve", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1142,11 +1147,15 @@ describe("Directive-preserve", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + \\"\\"\\"\\"\\"\\" runtime: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -1565,11 +1574,15 @@ describe("Directive-preserve", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" episodes: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -1799,6 +1812,7 @@ describe("Directive-preserve", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1816,6 +1830,7 @@ describe("Directive-preserve", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1905,9 +1920,12 @@ describe("Directive-preserve", () => { role_STARTS_WITH: String } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -2079,6 +2097,7 @@ describe("Directive-preserve", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2095,6 +2114,7 @@ describe("Directive-preserve", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2108,11 +2128,15 @@ describe("Directive-preserve", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + \\"\\"\\"\\"\\"\\" runtime: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -2531,11 +2555,15 @@ describe("Directive-preserve", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + \\"\\"\\"\\"\\"\\" episodes: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -2765,6 +2793,7 @@ describe("Directive-preserve", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2782,6 +2811,7 @@ describe("Directive-preserve", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index 55c9ea88a5..97e92a42ae 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -45,6 +45,7 @@ describe("@private directive", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -56,6 +57,7 @@ describe("@private directive", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -87,6 +89,7 @@ describe("@private directive", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -94,6 +97,7 @@ describe("@private directive", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -107,7 +111,9 @@ describe("@private directive", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User implements UserInterface { + \\"\\"\\"\\"\\"\\" id: ID } diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index c403e16b57..5037bd6c63 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -6263,9 +6263,12 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -6416,6 +6419,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6432,17 +6436,22 @@ describe("@settable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -6895,11 +6904,15 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -7082,6 +7095,7 @@ describe("@settable", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -7104,6 +7118,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7157,9 +7172,12 @@ describe("@settable", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -7318,6 +7336,7 @@ describe("@settable", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7334,17 +7353,22 @@ describe("@settable", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -7809,11 +7833,15 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -7996,6 +8024,7 @@ describe("@settable", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -8018,6 +8047,7 @@ describe("@settable", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 91e1d43486..83c09ee305 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -650,9 +650,12 @@ describe("Interface Relationships", () => { screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } + \\"\\"\\"\\"\\"\\" type Actor { + \\"\\"\\"\\"\\"\\" actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + \\"\\"\\"\\"\\"\\" name: String! } @@ -829,6 +832,7 @@ describe("Interface Relationships", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -845,14 +849,18 @@ describe("Interface Relationships", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! relationshipsDeleted: Int! } + \\"\\"\\"\\"\\"\\" type Episode { + \\"\\"\\"\\"\\"\\" runtime: Int! + \\"\\"\\"\\"\\"\\" series(directed: Boolean = true, options: SeriesOptions, where: SeriesWhere): Series! seriesAggregate(directed: Boolean = true, where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection seriesConnection(after: String, directed: Boolean = true, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! @@ -1100,11 +1108,15 @@ describe("Interface Relationships", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" runtime: Int! + \\"\\"\\"\\"\\"\\" title: String! } @@ -1638,14 +1650,19 @@ describe("Interface Relationships", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" episodeCount: Int! + \\"\\"\\"\\"\\"\\" episodes(directed: Boolean = true, options: EpisodeOptions, where: EpisodeWhere): [Episode!]! episodesAggregate(directed: Boolean = true, where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection episodesConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -2020,6 +2037,7 @@ describe("Interface Relationships", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2042,6 +2060,7 @@ describe("Interface Relationships", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2106,6 +2125,7 @@ describe("Interface Relationships", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2137,6 +2157,7 @@ describe("Interface Relationships", () => { type2Interface2s: [Type2Interface2!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2411,6 +2432,7 @@ describe("Interface Relationships", () => { type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort], where: Type2Interface2Where): Type2Interface2sConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2423,8 +2445,11 @@ describe("Interface Relationships", () => { shortest: String! } + \\"\\"\\"\\"\\"\\" type Type1 { + \\"\\"\\"\\"\\"\\" field1: String! + \\"\\"\\"\\"\\"\\" interface1(directed: Boolean = true, options: Interface1Options, where: Interface1Where): [Interface1!]! interface1Connection(after: String, directed: Boolean = true, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } @@ -2456,8 +2481,11 @@ describe("Interface Relationships", () => { node: Type1! } + \\"\\"\\"\\"\\"\\" type Type1Interface1 implements Interface1 { + \\"\\"\\"\\"\\"\\" field1: String! + \\"\\"\\"\\"\\"\\" interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -2643,7 +2671,9 @@ describe("Interface Relationships", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Type1Interface2 implements Interface2 { + \\"\\"\\"\\"\\"\\" field2: String! } @@ -2768,8 +2798,11 @@ describe("Interface Relationships", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Type2Interface1 implements Interface1 { + \\"\\"\\"\\"\\"\\" field1: String! + \\"\\"\\"\\"\\"\\" interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -2895,7 +2928,9 @@ describe("Interface Relationships", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Type2Interface2 implements Interface2 { + \\"\\"\\"\\"\\"\\" field2: String! } @@ -2955,6 +2990,7 @@ describe("Interface Relationships", () => { totalCount: Int! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3033,12 +3069,17 @@ describe("Interface Relationships", () => { mutation: Mutation } + \\"\\"\\"\\"\\"\\" type Comment implements Content { + \\"\\"\\"\\"\\"\\" content: String + \\"\\"\\"\\"\\"\\" creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! creatorAggregate(directed: Boolean = true, where: UserWhere): CommentUserCreatorAggregationSelection creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" post(directed: Boolean = true, options: PostOptions, where: PostWhere): Post! postAggregate(directed: Boolean = true, where: PostWhere): CommentPostPostAggregationSelection postConnection(after: String, directed: Boolean = true, first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! @@ -3576,6 +3617,7 @@ describe("Interface Relationships", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3592,6 +3634,7 @@ describe("Interface Relationships", () => { users: [User!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3623,14 +3666,19 @@ describe("Interface Relationships", () => { startCursor: String } + \\"\\"\\"\\"\\"\\" type Post implements Content { + \\"\\"\\"\\"\\"\\" comments(directed: Boolean = true, options: CommentOptions, where: CommentWhere): [Comment!]! commentsAggregate(directed: Boolean = true, where: CommentWhere): PostCommentCommentsAggregationSelection commentsConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! + \\"\\"\\"\\"\\"\\" content: String + \\"\\"\\"\\"\\"\\" creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + \\"\\"\\"\\"\\"\\" id: ID } @@ -3970,6 +4018,7 @@ describe("Interface Relationships", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3987,6 +4036,7 @@ describe("Interface Relationships", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4005,10 +4055,14 @@ describe("Interface Relationships", () => { users: [User!]! } + \\"\\"\\"\\"\\"\\" type User { + \\"\\"\\"\\"\\"\\" content(directed: Boolean = true, options: ContentOptions, where: ContentWhere): [Content!]! contentConnection(after: String, directed: Boolean = true, first: Int, sort: [UserContentConnectionSort!], where: UserContentConnectionWhere): UserContentConnection! + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" name: String } diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index bf62cde187..5093ffd971 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -61,6 +61,7 @@ describe("Interfaces", () => { mutation: Mutation } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -72,6 +73,7 @@ describe("Interfaces", () => { movies: [Movie!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -83,12 +85,17 @@ describe("Interfaces", () => { shortest: ID } + \\"\\"\\"\\"\\"\\" type Movie implements MovieNode { + \\"\\"\\"\\"\\"\\" customQuery: [Movie] + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! + \\"\\"\\"\\"\\"\\" nodes: [MovieNode] } @@ -318,6 +325,7 @@ describe("Interfaces", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -325,6 +333,7 @@ describe("Interfaces", () => { DESC } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 439bdf27d3..5734d0c329 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -1342,6 +1342,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1358,6 +1359,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { series: [Series!]! } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1372,8 +1374,11 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { UPDATE } + \\"\\"\\"\\"\\"\\" type Genre { + \\"\\"\\"\\"\\"\\" name: String! + \\"\\"\\"\\"\\"\\" product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } @@ -1844,11 +1849,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_STARTS_WITH: String } + \\"\\"\\"\\"\\"\\" type Movie implements IProduct { + \\"\\"\\"\\"\\"\\" genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } @@ -2141,11 +2150,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements IProduct { + \\"\\"\\"\\"\\"\\" genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } @@ -2406,6 +2419,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2441,6 +2455,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 12abc4f99f..0a813f2762 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -5688,20 +5688,15 @@ describe("Subscriptions", () => { } interface Production { - #title: String! id: ID director: Creature! @relationship(type: "DIRECTED", direction: IN) } type Person implements Creature { - #name: String! - #id: ID @unique movies: Production! } interface Creature { - #name: String! - #id: ID movies: Production! @relationship(type: "DIRECTED", direction: OUT) } `; @@ -5722,6 +5717,7 @@ describe("Subscriptions", () => { subscription: Subscription } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5867,6 +5863,7 @@ describe("Subscriptions", () => { moviesConnection_NOT: CreatureMoviesConnectionWhere } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5893,10 +5890,14 @@ describe("Subscriptions", () => { sum: Int! } + \\"\\"\\"\\"\\"\\" type Movie implements Production { + \\"\\"\\"\\"\\"\\" director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" title: String! } @@ -6074,7 +6075,9 @@ describe("Subscriptions", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" type Person implements Creature { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } @@ -6398,11 +6401,16 @@ describe("Subscriptions", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } + \\"\\"\\"\\"\\"\\" type Series implements Production { + \\"\\"\\"\\"\\"\\" director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + \\"\\"\\"\\"\\"\\" episode: Int! + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" title: String! } @@ -6631,6 +6639,7 @@ describe("Subscriptions", () => { title_STARTS_WITH: String } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -6656,6 +6665,7 @@ describe("Subscriptions", () => { seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From 0742db7876d89d4fd506a2d14b3cc86e1b28a8d0 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 12:04:57 +0100 Subject: [PATCH 043/162] update subscriptions test to not expect type being generated because it would only contain logical operators --- .../schema/directives/subscription.test.ts | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/packages/graphql/tests/schema/directives/subscription.test.ts b/packages/graphql/tests/schema/directives/subscription.test.ts index f47f17ca37..1a422cbdda 100644 --- a/packages/graphql/tests/schema/directives/subscription.test.ts +++ b/packages/graphql/tests/schema/directives/subscription.test.ts @@ -716,37 +716,8 @@ describe("@subscription directive", () => { const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionPlugin } }); const schema = await neoSchema.getSchema(); - const subscriptionFields = schema.getSubscriptionType()?.getFields() as GraphQLFieldMap; - - const actorCreated = subscriptionFields["actorCreated"]; - const movieCreated = subscriptionFields["movieCreated"]; - - expect(actorCreated).toBeUndefined(); - expect(movieCreated).toBeUndefined(); - - const actorUpdated = subscriptionFields["actorUpdated"]; - const movieUpdated = subscriptionFields["movieUpdated"]; - - expect(actorUpdated).toBeUndefined(); - expect(movieUpdated).toBeUndefined(); - - const actorDeleted = subscriptionFields["actorDeleted"]; - const movieDeleted = subscriptionFields["movieDeleted"]; - - expect(actorDeleted).toBeUndefined(); - expect(movieDeleted).toBeUndefined(); - - const actorRelationshipCreated = subscriptionFields["actorRelationshipCreated"]; - const movieRelationshipCreated = subscriptionFields["movieRelationshipCreated"]; - - expect(actorRelationshipCreated).toBeUndefined(); - expect(movieRelationshipCreated).toBeUndefined(); - - const actorRelationshipDeleted = subscriptionFields["actorRelationshipDeleted"]; - const movieRelationshipDeleted = subscriptionFields["movieRelationshipDeleted"]; - - expect(actorRelationshipDeleted).toBeUndefined(); - expect(movieRelationshipDeleted).toBeUndefined(); + const subscriptionType = schema.getSubscriptionType(); + expect(subscriptionType).toBeUndefined(); }); test("should not throw an Error when is mixed with @query", async () => { From 5dd98c10de6f74aa56e49eaa7f34ec0281edb2c1 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 11 Sep 2023 16:23:05 +0200 Subject: [PATCH 044/162] feat: add createConnectionFields using schema model --- .../src/schema/create-connection-fields.ts | 267 +++++++++++++++++- .../src/schema/new-make-augmented-schema.ts | 23 +- packages/graphql/src/schema/pagination.ts | 28 ++ 3 files changed, 309 insertions(+), 9 deletions(-) diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index 549b68591a..db243663de 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -17,18 +17,21 @@ * limitations under the License. */ -import type { GraphQLResolveInfo } from "graphql"; +import type { DirectiveNode, GraphQLResolveInfo } from "graphql"; import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../classes"; import { Relationship } from "../classes"; import { DEPRECATED } from "../constants"; +import type { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { ConnectionField, ConnectionQueryArgs } from "../types"; import { addRelationshipArrayFilters } from "./augment/add-relationship-array-filters"; import { DEPRECATE_NOT } from "./constants"; -import { addDirectedArgument } from "./directed-argument"; +import { addDirectedArgument, addDirectedArgument2 } from "./directed-argument"; import type { ObjectFields } from "./get-obj-field-meta"; import getSortableFields from "./get-sortable-fields"; -import { connectionFieldResolver } from "./pagination"; +import { connectionFieldResolver, connectionFieldResolver2 } from "./pagination"; import { graphqlDirectivesToCompose } from "./to-compose"; function createConnectionFields({ @@ -290,3 +293,261 @@ function createConnectionFields({ } export default createConnectionFields; + +export function createConnectionFields2({ + concreteEntityAdapter, + schemaComposer, + composeNode, + userDefinedFieldDirectives, + relationshipFields, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; + schemaComposer: SchemaComposer; + composeNode: ObjectTypeComposer | InterfaceTypeComposer; + userDefinedFieldDirectives: Map; + relationshipFields: Map; +}): Relationship[] { + const relationships: Relationship[] = []; + + concreteEntityAdapter.relationships.forEach((relationship) => { + const relationshipObjectType = schemaComposer.getOrCreateOTC(relationship.relationshipFieldTypename, (tc) => { + tc.addFields({ + cursor: "String!", + node: `${relationship.target.name}!`, + }); + }); + + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(relationship.name); + const deprecatedDirectives = graphqlDirectivesToCompose( + (userDefinedDirectivesOnField || []).filter((directive) => directive.name.value === DEPRECATED) + ); + + const connectionWhereName = `${relationship.connectionFieldTypename}Where`; + const connectionWhere = schemaComposer.getOrCreateITC(connectionWhereName); + + // if (!connectionField.relationship.union) { + const relatedEntityIsUnionEntity = relationship.target instanceof UnionEntityAdapter; + if (!relatedEntityIsUnionEntity) { + connectionWhere.addFields({ + AND: `[${connectionWhereName}!]`, + OR: `[${connectionWhereName}!]`, + NOT: connectionWhereName, + }); + } + + const connection = schemaComposer.getOrCreateOTC(relationship.connectionFieldTypename, (tc) => { + tc.addFields({ + edges: relationshipObjectType.NonNull.List.NonNull, + totalCount: "Int!", + pageInfo: "PageInfo!", + }); + }); + + if (relationship.propertiesTypeName && !relatedEntityIsUnionEntity) { + const propertiesInterface = schemaComposer.getIFTC(relationship.propertiesTypeName); + relationshipObjectType.addInterface(propertiesInterface); + relationshipObjectType.addFields(propertiesInterface.getFields()); + + connectionWhere.addFields({ + edge: `${relationship.propertiesTypeName}Where`, + edge_NOT: { + type: `${relationship.propertiesTypeName}Where`, + directives: [DEPRECATE_NOT], + }, + }); + } + + const whereInput = schemaComposer.getITC(`${composeNode.getTypeName()}Where`); + if (relationship.isFilterableByValue()) { + whereInput.addFields({ + [relationship.connectionFieldName]: connectionWhere, + [`${relationship.connectionFieldName}_NOT`]: { + type: connectionWhere, + }, + }); + } + + // n..m Relationships + if (relationship.isList && relationship.isFilterableByValue()) { + addRelationshipArrayFilters({ + whereInput, + fieldName: relationship.connectionFieldName, + sourceName: concreteEntityAdapter.name, + relatedType: relationship.connectionFieldTypename, + whereType: connectionWhere, + directives: deprecatedDirectives, + }); + } + + const composeNodeBaseArgs: { + where: any; + sort?: any; + first?: any; + after?: any; + } = { + where: connectionWhere, + first: { + type: "Int", + }, + after: { + type: "String", + }, + }; + + const composeNodeArgs = addDirectedArgument2(composeNodeBaseArgs, relationship); + + if (relationship.propertiesTypeName) { + const connectionSort = schemaComposer.getOrCreateITC(`${relationship.connectionFieldTypename}Sort`); + connectionSort.addFields({ + edge: `${relationship.propertiesTypeName}Sort`, + }); + composeNodeArgs.sort = connectionSort.NonNull.List; + } + + const relatedEntityIsInterfaceEntity = relationship.target instanceof InterfaceEntityAdapter; + if (relatedEntityIsInterfaceEntity) { + connectionWhere.addFields({ + OR: connectionWhere.NonNull.List, + AND: connectionWhere.NonNull.List, + NOT: connectionWhereName, + node: `${relationship.target.name}Where`, + node_NOT: { + type: `${relationship.target.name}Where`, + directives: [DEPRECATE_NOT], + }, + }); + + if (schemaComposer.has(`${relationship.target.name}Sort`)) { + const connectionSort = schemaComposer.getOrCreateITC(`${relationship.connectionFieldTypename}Sort`); + connectionSort.addFields({ + node: `${relationship.target.name}Sort`, + }); + if (!composeNodeArgs.sort) { + composeNodeArgs.sort = connectionSort.NonNull.List; + } + } + + if (relationship.propertiesTypeName) { + const propertiesInterface = schemaComposer.getIFTC(relationship.propertiesTypeName); + relationshipObjectType.addInterface(propertiesInterface); + relationshipObjectType.addFields(propertiesInterface.getFields()); + + connectionWhere.addFields({ + edge: `${relationship.propertiesTypeName}Where`, + edge_NOT: { + type: `${relationship.propertiesTypeName}Where`, + directives: [DEPRECATE_NOT], + }, + }); + } + } else if (relatedEntityIsUnionEntity) { + // const relatedNodes = nodes.filter((n) => connectionField.relationship.union?.nodes?.includes(n.name)); + + relationship.target.concreteEntities.forEach((n) => { + const connectionName = relationship.connectionFieldTypename; + + // Append union member name before "ConnectionWhere" + const unionWhereName = `${connectionName.substring(0, connectionName.length - "Connection".length)}${ + n.name + }ConnectionWhere`; + + const unionWhere = schemaComposer.createInputTC({ + name: unionWhereName, + fields: { + OR: `[${unionWhereName}!]`, + AND: `[${unionWhereName}!]`, + NOT: unionWhereName, + }, + }); + + unionWhere.addFields({ + node: `${n.name}Where`, + node_NOT: { + type: `${n.name}Where`, + directives: [DEPRECATE_NOT], + }, + }); + + if (relationship.propertiesTypeName) { + const propertiesInterface = schemaComposer.getIFTC(relationship.propertiesTypeName); + relationshipObjectType.addInterface(propertiesInterface); + relationshipObjectType.addFields(propertiesInterface.getFields()); + + unionWhere.addFields({ + edge: `${relationship.propertiesTypeName}Where`, + edge_NOT: { + type: `${relationship.propertiesTypeName}Where`, + directives: [DEPRECATE_NOT], + }, + }); + } + + connectionWhere.addFields({ + [n.name]: unionWhere, + }); + }); + } else { + // const relatedNode = nodes.find((n) => n.name === connectionField.relationship.typeMeta.name) as Node; + + connectionWhere.addFields({ + node: `${relationship.target.name}Where`, + node_NOT: { + type: `${relationship.target.name}Where`, + directives: [DEPRECATE_NOT], + }, + }); + + if (relationship.target.sortableFields.length) { + const connectionSort = schemaComposer.getOrCreateITC(`${relationship.connectionFieldTypename}Sort`); + connectionSort.addFields({ + node: `${relationship.target.name}Sort`, + }); + if (!composeNodeArgs.sort) { + composeNodeArgs.sort = connectionSort.NonNull.List; + } + } + } + + // if (!connectionField.relationship.writeonly && connectionField.selectableOptions.onRead) { + if (relationship.isReadable()) { + composeNode.addFields({ + [relationship.connectionFieldName]: { + type: connection.NonNull, + args: composeNodeArgs, + directives: deprecatedDirectives, + resolve: (source, args: ConnectionQueryArgs, _ctx, info: GraphQLResolveInfo) => { + return connectionFieldResolver2({ + connectionFieldName: relationship.connectionFieldName, + args, + info, + source, + }); + }, + }, + }); + } + + const relFields = relationship.propertiesTypeName + ? relationshipFields.get(relationship.propertiesTypeName) + : ({} as ObjectFields | undefined); + + const r = new Relationship({ + name: relationship.relationshipFieldTypename, + type: relationship.type, + properties: relationship.propertiesTypeName, + ...(relFields + ? { + temporalFields: relFields.temporalFields, + scalarFields: relFields.scalarFields, + primitiveFields: relFields.primitiveFields, + enumFields: relFields.enumFields, + pointFields: relFields.pointFields, + customResolverFields: relFields.customResolverFields, + } + : {}), + }); + relationships.push(r); + }); + + return relationships; +} diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 1aa35b2786..44fc38545e 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -52,7 +52,6 @@ import type { Node } from "../classes"; import type Relationship from "../classes/Relationship"; import * as Scalars from "../graphql/scalars"; import { isRootType } from "../utils/is-root-type"; -import { createConnectionFields } from "./create-connection-fields"; import { ensureNonEmptyInput } from "./ensure-non-empty-input"; import getCustomResolvers from "./get-custom-resolvers"; import type { DefinitionNodes } from "./get-definition-nodes"; @@ -97,6 +96,7 @@ import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionE import type { BaseField, Neo4jFeaturesSettings } from "../types"; import { isInArray } from "../utils/is-in-array"; import { addArrayMethodsToITC, addArrayMethodsToITC2 } from "./array-methods"; +import createConnectionFields, { createConnectionFields2 } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; import createRelationshipFields, { createRelationshipFieldsFromConcreteEntityAdapter, @@ -1216,15 +1216,26 @@ function makeAugmentedSchema( userDefinedFieldDirectives, }); + // relationships = [ + // ...relationships, + // ...createConnectionFields({ + // connectionFields: node.connectionFields, + // schemaComposer: composer, + // composeNode, + // sourceName: concreteEntityAdapter.name, + // nodes, + // relationshipPropertyFields: relationshipFields, + // }), + // ]; + relationships = [ ...relationships, - ...createConnectionFields({ - connectionFields: node.connectionFields, + ...createConnectionFields2({ + concreteEntityAdapter, schemaComposer: composer, composeNode, - sourceName: concreteEntityAdapter.name, - nodes, - relationshipPropertyFields: relationshipFields, + userDefinedFieldDirectives, + relationshipFields, }), ]; diff --git a/packages/graphql/src/schema/pagination.ts b/packages/graphql/src/schema/pagination.ts index 0c13d5a79b..4e6a444d86 100644 --- a/packages/graphql/src/schema/pagination.ts +++ b/packages/graphql/src/schema/pagination.ts @@ -60,6 +60,34 @@ export function connectionFieldResolver({ }; } +export function connectionFieldResolver2({ + connectionFieldName, + source, + args, + info, +}: { + connectionFieldName: string; + source: any; + args: ConnectionQueryArgs; + info: GraphQLResolveInfo; +}) { + const firstField = info.fieldNodes[0] as FieldNode; + const { selectionSet } = firstField; + + let value = source[connectionFieldName]; + if (firstField.alias) { + value = source[firstField.alias.value]; + } + + const totalCountKey = getAliasKey({ selectionSet, key: "totalCount" }); + const { totalCount } = value; + + return { + [totalCountKey]: isNeoInt(totalCount) ? totalCount.toNumber() : totalCount, + ...createConnectionWithEdgeProperties({ source: value, selectionSet, args, totalCount }), + }; +} + /** * Adapted from graphql-relay-js ConnectionFromArraySlice */ From a0e456e08fe75d5cdcd3f46e0cb3c64cec4d2df3 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 11 Sep 2023 17:29:03 +0200 Subject: [PATCH 045/162] feat: add description to InterfaceEntity --- packages/graphql/src/schema-model/entity/InterfaceEntity.ts | 4 ++++ packages/graphql/src/schema-model/generate-model.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/graphql/src/schema-model/entity/InterfaceEntity.ts b/packages/graphql/src/schema-model/entity/InterfaceEntity.ts index f748d4f3d1..860f23ab28 100644 --- a/packages/graphql/src/schema-model/entity/InterfaceEntity.ts +++ b/packages/graphql/src/schema-model/entity/InterfaceEntity.ts @@ -27,6 +27,7 @@ import type { ConcreteEntity } from "./ConcreteEntity"; export class InterfaceEntity implements CompositeEntity { public readonly name: string; + public readonly description: string; public readonly concreteEntities: ConcreteEntity[]; public readonly attributes: Map = new Map(); public readonly relationships: Map = new Map(); @@ -34,18 +35,21 @@ export class InterfaceEntity implements CompositeEntity { constructor({ name, + description, concreteEntities, attributes = [], annotations = [], relationships = [], }: { name: string; + description: string; concreteEntities: ConcreteEntity[]; attributes?: Attribute[]; annotations?: Annotation[]; relationships?: Relationship[]; }) { this.name = name; + this.description = description; this.concreteEntities = concreteEntities; for (const attribute of attributes) { this.addAttribute(attribute); diff --git a/packages/graphql/src/schema-model/generate-model.ts b/packages/graphql/src/schema-model/generate-model.ts index bbe7142e56..fca347828b 100644 --- a/packages/graphql/src/schema-model/generate-model.ts +++ b/packages/graphql/src/schema-model/generate-model.ts @@ -185,6 +185,7 @@ function generateInterfaceEntity( return new InterfaceEntity({ ...interfaceEntity, + description: definition.description?.value || "", attributes: filterTruthy(fields) as Attribute[], annotations, }); From 49a664256583c210c277f6bf935f8c94f0068b28 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 11 Sep 2023 17:30:10 +0200 Subject: [PATCH 046/162] feat: add args to Relationship --- .../src/schema-model/generate-model.ts | 24 ++-- .../schema-model/parser/parse-attribute.ts | 22 ++-- .../schema-model/relationship/Relationship.ts | 30 +++-- .../RelationshipAdapter.test.ts | 1 + .../model-adapters/RelationshipAdapter.ts | 104 +++++++++--------- 5 files changed, 97 insertions(+), 84 deletions(-) diff --git a/packages/graphql/src/schema-model/generate-model.ts b/packages/graphql/src/schema-model/generate-model.ts index fca347828b..caa2076e65 100644 --- a/packages/graphql/src/schema-model/generate-model.ts +++ b/packages/graphql/src/schema-model/generate-model.ts @@ -24,26 +24,26 @@ import type { ObjectTypeDefinitionNode, } from "graphql"; import { Neo4jGraphQLSchemaValidationError } from "../classes"; +import { nodeDirective, privateDirective, relationshipDirective } from "../graphql/directives"; import getFieldTypeMeta from "../schema/get-field-type-meta"; import { filterTruthy } from "../utils/utils"; -import { Neo4jGraphQLSchemaModel } from "./Neo4jGraphQLSchemaModel"; import type { Operations } from "./Neo4jGraphQLSchemaModel"; +import { Neo4jGraphQLSchemaModel } from "./Neo4jGraphQLSchemaModel"; +import { Operation } from "./Operation"; import type { Annotation } from "./annotation/Annotation"; import type { Attribute } from "./attribute/Attribute"; import { ConcreteEntity } from "./entity/ConcreteEntity"; -import { findDirective } from "./parser/utils"; -import { parseArguments } from "./parser/parse-arguments"; -import type { NestedOperation, QueryDirection, RelationshipDirection } from "./relationship/Relationship"; -import { Relationship } from "./relationship/Relationship"; +import { InterfaceEntity } from "./entity/InterfaceEntity"; +import { UnionEntity } from "./entity/UnionEntity"; +import { parseKeyAnnotation } from "./parser/annotations-parser/key-annotation"; import type { DefinitionCollection } from "./parser/definition-collection"; import { getDefinitionCollection } from "./parser/definition-collection"; -import { Operation } from "./Operation"; -import { parseAttribute, parseField } from "./parser/parse-attribute"; -import { nodeDirective, privateDirective, relationshipDirective } from "../graphql/directives"; -import { parseKeyAnnotation } from "./parser/annotations-parser/key-annotation"; import { parseAnnotations } from "./parser/parse-annotation"; -import { InterfaceEntity } from "./entity/InterfaceEntity"; -import { UnionEntity } from "./entity/UnionEntity"; +import { parseArguments } from "./parser/parse-arguments"; +import { parseAttribute, parseAttributeArguments, parseField } from "./parser/parse-attribute"; +import { findDirective } from "./parser/utils"; +import type { NestedOperation, QueryDirection, RelationshipDirection } from "./relationship/Relationship"; +import { Relationship } from "./relationship/Relationship"; export function generateModel(document: DocumentNode): Neo4jGraphQLSchemaModel { const definitionCollection: DefinitionCollection = getDefinitionCollection(document); @@ -353,11 +353,13 @@ function generateRelationshipField( } const annotations = parseAnnotations(mergedDirectives); + const args = parseAttributeArguments(field.arguments || [], definitionCollection); // TODO: add property interface name return new Relationship({ name: fieldName, type: type as string, + args, attributes, source, target: relatedToEntity, diff --git a/packages/graphql/src/schema-model/parser/parse-attribute.ts b/packages/graphql/src/schema-model/parser/parse-attribute.ts index 772fba3d79..853e7c9d8f 100644 --- a/packages/graphql/src/schema-model/parser/parse-attribute.ts +++ b/packages/graphql/src/schema-model/parser/parse-attribute.ts @@ -19,32 +19,32 @@ import type { DirectiveNode, FieldDefinitionNode, InputValueDefinitionNode, TypeNode } from "graphql"; import { Kind } from "graphql"; +import { aliasDirective } from "../../graphql/directives"; +import { Argument } from "../argument/Argument"; +import { Attribute } from "../attribute/Attribute"; import type { AttributeType, Neo4jGraphQLScalarType } from "../attribute/AttributeType"; import { - ScalarType, EnumType, - UserScalarType, - ObjectType, - UnionType, + GraphQLBuiltInScalarType, InterfaceType, ListType, - GraphQLBuiltInScalarType, - Neo4jGraphQLSpatialType, + Neo4jCartesianPointType, Neo4jGraphQLNumberType, + Neo4jGraphQLSpatialType, Neo4jGraphQLTemporalType, Neo4jPointType, - Neo4jCartesianPointType, + ObjectType, + ScalarType, + UnionType, + UserScalarType, } from "../attribute/AttributeType"; -import { Attribute } from "../attribute/Attribute"; -import { Argument } from "../argument/Argument"; import { Field } from "../attribute/Field"; import type { DefinitionCollection } from "./definition-collection"; import { parseAnnotations } from "./parse-annotation"; -import { aliasDirective } from "../../graphql/directives"; import { parseArguments } from "./parse-arguments"; import { findDirective } from "./utils"; -function parseAttributeArguments( +export function parseAttributeArguments( fieldArgs: readonly InputValueDefinitionNode[], definitionCollection: DefinitionCollection ): Argument[] { diff --git a/packages/graphql/src/schema-model/relationship/Relationship.ts b/packages/graphql/src/schema-model/relationship/Relationship.ts index 1a10313428..f2d3e08fea 100644 --- a/packages/graphql/src/schema-model/relationship/Relationship.ts +++ b/packages/graphql/src/schema-model/relationship/Relationship.ts @@ -18,10 +18,11 @@ */ import { Neo4jGraphQLSchemaValidationError } from "../../classes"; -import type { RelationshipQueryDirectionOption, RelationshipNestedOperationsOption } from "../../constants"; +import type { RelationshipNestedOperationsOption, RelationshipQueryDirectionOption } from "../../constants"; import { upperFirst } from "../../utils/upper-first"; import type { Annotation, Annotations } from "../annotation/Annotation"; import { annotationToKey } from "../annotation/Annotation"; +import type { Argument } from "../argument/Argument"; import type { Attribute } from "../attribute/Attribute"; import type { Entity } from "../entity/Entity"; @@ -34,6 +35,7 @@ export type NestedOperation = keyof typeof RelationshipNestedOperationsOption; export class Relationship { public readonly name: string; // name of the relationship field, e.g. friends public readonly type: string; // name of the relationship type, e.g. "IS_FRIENDS_WITH" + public readonly args: Argument[]; public readonly attributes: Map = new Map(); public readonly source: Entity; public readonly target: Entity; @@ -48,20 +50,10 @@ export class Relationship { public readonly propertiesTypeName: string | undefined; public readonly inheritedFrom: string | undefined; - // TODO: Remove connectionFieldTypename and relationshipFieldTypename and delegate to the adapter - /**Note: Required for now to infer the types without ResolveTree */ - public get connectionFieldTypename(): string { - return `${this.source.name}${upperFirst(this.name)}Connection`; - } - - /**Note: Required for now to infer the types without ResolveTree */ - public get relationshipFieldTypename(): string { - return `${this.source.name}${upperFirst(this.name)}Relationship`; - } - constructor({ name, type, + args, attributes = [], source, target, @@ -78,6 +70,7 @@ export class Relationship { }: { name: string; type: string; + args: Argument[]; attributes?: Attribute[]; source: Entity; target: Entity; @@ -96,6 +89,7 @@ export class Relationship { this.source = source; this.target = target; this.name = name; + this.args = args; this.direction = direction; this.isList = isList; this.queryDirection = queryDirection; @@ -119,6 +113,7 @@ export class Relationship { return new Relationship({ name: this.name, type: this.type, + args: this.args, attributes: Array.from(this.attributes.values()).map((a) => a.clone()), source: this.source, target: this.target, @@ -156,4 +151,15 @@ export class Relationship { public findAttribute(name: string): Attribute | undefined { return this.attributes.get(name); } + + // TODO: Remove connectionFieldTypename and relationshipFieldTypename and delegate to the adapter + /**Note: Required for now to infer the types without ResolveTree */ + public get connectionFieldTypename(): string { + return `${this.source.name}${upperFirst(this.name)}Connection`; + } + + /**Note: Required for now to infer the types without ResolveTree */ + public get relationshipFieldTypename(): string { + return `${this.source.name}${upperFirst(this.name)}Relationship`; + } } 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 b6cd56a857..b64011ee8d 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 @@ -83,6 +83,7 @@ describe("RelationshipAdapter", () => { relationship = new Relationship({ name: "accounts", type: "HAS_ACCOUNT", + args: [], source: userEntity, target: accountEntity, direction: "OUT", 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 228b71da66..fc525f3dd7 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -19,6 +19,7 @@ import { upperFirst } from "graphql-compose"; import type { Annotations } from "../../annotation/Annotation"; +import type { Argument } from "../../argument/Argument"; import type { Attribute } from "../../attribute/Attribute"; import { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapter"; import { ConcreteEntity } from "../../entity/ConcreteEntity"; @@ -47,6 +48,59 @@ export class RelationshipAdapter { public readonly inheritedFrom: string | undefined; public readonly isList: boolean; public readonly annotations: Partial; + public readonly args: Argument[]; + + constructor( + relationship: Relationship, + sourceAdapter?: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter + ) { + const { + name, + type, + args, + attributes = new Map(), + source, + target, + direction, + isList, + queryDirection, + nestedOperations, + aggregate, + isNullable, + description, + annotations, + propertiesTypeName, + inheritedFrom, + } = relationship; + this.name = name; + this.type = type; + this.args = args; + if (sourceAdapter) { + this.source = sourceAdapter; + } else { + if (source instanceof ConcreteEntity) { + this.source = new ConcreteEntityAdapter(source); + } else if (source instanceof InterfaceEntity) { + this.source = new InterfaceEntityAdapter(source); + } else if (source instanceof UnionEntity) { + this.source = new UnionEntityAdapter(source); + } else { + throw new Error("relationship source must be an Entity"); + } + } + this.direction = direction; + this.isList = isList; + this.queryDirection = queryDirection; + this.nestedOperations = nestedOperations; + this.aggregate = aggregate; + this.isNullable = isNullable; + this.rawEntity = target; + this.initAttributes(attributes); + this.description = description; + this.annotations = annotations; + this.propertiesTypeName = propertiesTypeName; + this.inheritedFrom = inheritedFrom; + } public get prefixForTypename(): string { // TODO: if relationship field is inherited by source (part of a implemented Interface, not necessarily annotated as rel) @@ -163,56 +217,6 @@ export class RelationshipAdapter { )}${nestedFieldStr}${aggregationStr}Selection`; } - constructor( - relationship: Relationship, - sourceAdapter?: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter - ) { - const { - name, - type, - attributes = new Map(), - source, - target, - direction, - isList, - queryDirection, - nestedOperations, - aggregate, - isNullable, - description, - annotations, - propertiesTypeName, - inheritedFrom, - } = relationship; - this.name = name; - this.type = type; - if (sourceAdapter) { - this.source = sourceAdapter; - } else { - if (source instanceof ConcreteEntity) { - this.source = new ConcreteEntityAdapter(source); - } else if (source instanceof InterfaceEntity) { - this.source = new InterfaceEntityAdapter(source); - } else if (source instanceof UnionEntity) { - this.source = new UnionEntityAdapter(source); - } else { - throw new Error("relationship source must be an Entity"); - } - } - this.direction = direction; - this.isList = isList; - this.queryDirection = queryDirection; - this.nestedOperations = nestedOperations; - this.aggregate = aggregate; - this.isNullable = isNullable; - this.rawEntity = target; - this.initAttributes(attributes); - this.description = description; - this.annotations = annotations; - this.propertiesTypeName = propertiesTypeName; - this.inheritedFrom = inheritedFrom; - } - private initAttributes(attributes: Map) { for (const [attributeName, attribute] of attributes.entries()) { const attributeAdapter = new AttributeAdapter(attribute); From b4fef318caa5366e4ef04ff7e7cb38b065d020f9 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 11 Sep 2023 17:33:27 +0200 Subject: [PATCH 047/162] feat: use schema model for filteredInterfaceTypes --- .../src/schema/new-make-augmented-schema.ts | 67 ++-- packages/graphql/src/schema/to-compose.ts | 44 ++- .../schema/directives/customResolver.test.ts | 2 + .../tests/schema/directives/default.test.ts | 3 + .../tests/schema/directives/private.test.ts | 2 + .../graphql/tests/schema/interfaces.test.ts | 341 +++++++++++++++++- .../graphql/tests/schema/issues/2377.test.ts | 4 + .../graphql/tests/schema/issues/3439.test.ts | 2 + 8 files changed, 437 insertions(+), 28 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 44fc38545e..e9b46df219 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -61,18 +61,25 @@ import getObjFieldMeta from "./get-obj-field-meta"; import getSortableFields from "./get-sortable-fields"; import getWhereFields, { getWhereFieldsFromConcreteEntity } from "./get-where-fields"; import { - concreteEntityToComposeFields, + attributeAdapterToComposeFields, concreteEntityToCreateInputFields, concreteEntityToUpdateInputFields, graphqlDirectivesToCompose, objectFieldsToComposeFields, objectFieldsToCreateInputFields, objectFieldsToUpdateInputFields, + relationshipAdapterToComposeFields, } from "./to-compose"; // GraphQL type imports import type { Subgraph } from "../classes/Subgraph"; -import { DEPRECATED, FIELD_DIRECTIVES, OBJECT_DIRECTIVES, PROPAGATED_DIRECTIVES } from "../constants"; +import { + DEPRECATED, + FIELD_DIRECTIVES, + INTERFACE_DIRECTIVES, + OBJECT_DIRECTIVES, + PROPAGATED_DIRECTIVES, +} from "../constants"; import { SortDirection } from "../graphql/enums/SortDirection"; import { CartesianPointDistance } from "../graphql/input-objects/CartesianPointDistance"; import { CartesianPointInput } from "../graphql/input-objects/CartesianPointInput"; @@ -506,7 +513,7 @@ class ToComposer { */ function getUserDefinedFieldDirectivesForDefinition( - definitionNode: ObjectTypeDefinitionNode, + definitionNode: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, definitionNodes: DefinitionNodes ): Map { const userDefinedFieldDirectives = new Map(); @@ -1030,7 +1037,7 @@ function makeAugmentedSchema( const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - const nodeFields = concreteEntityToComposeFields( + const nodeFields = attributeAdapterToComposeFields( concreteEntityAdapter.objectFields, userDefinedFieldDirectives ); @@ -1398,29 +1405,39 @@ function makeAugmentedSchema( }); filteredInterfaceTypes.forEach((inter) => { - const objectFields = getObjFieldMeta({ - obj: inter, - scalars: scalarTypes, - enums: enumTypes, - interfaces: filteredInterfaceTypes, - unions: unionTypes, - objects: objectTypes, - callbacks, - }); + const interfaceEntity = schemaModel.getEntity(inter.name.value); + if (interfaceEntity?.isCompositeEntity() && interfaceEntity instanceof InterfaceEntity) { + const definitionNode = definitionNodes.interfaceTypes.find( + (type) => type.name.value === interfaceEntity.name + ); - const baseFields: BaseField[][] = Object.values(objectFields); - const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); + if (!definitionNode) { + console.error(`Definition node not found for ${interfaceEntity.name}`); + return; + } - composer.createInterfaceTC({ - name: inter.name.value, - description: inter.description?.value, - fields: objectComposeFields, - directives: graphqlDirectivesToCompose( - (inter.directives || []).filter( - (x) => !["auth", "authorization", "authentication", "exclude"].includes(x.name.value) - ) - ), - }); + const userDefinedInterfaceDirectives = + definitionNode.directives?.filter( + (directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value) + ) || []; + + const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); + composer.createInterfaceTC({ + name: interfaceEntityAdapter.name, + description: interfaceEntity.description, + fields: { + ...attributeAdapterToComposeFields( + Array.from(interfaceEntityAdapter.attributes.values()), + getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) + ), + ...relationshipAdapterToComposeFields( + Array.from(interfaceEntityAdapter.relationships.values()), + getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) + ), + }, + directives: graphqlDirectivesToCompose(userDefinedInterfaceDirectives), + }); + } }); if (!Object.values(composer.Mutation.getFields()).length) { diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index 6e90b9a51d..e373e927ac 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -24,6 +24,7 @@ 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 { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { BaseField, InputField, PrimitiveField, TemporalField } from "../types"; import { DEPRECATE_NOT } from "./constants"; import getFieldTypeMeta from "./get-field-type-meta"; @@ -104,10 +105,49 @@ export function objectFieldsToComposeFields(fields: BaseField[]): { }, {}); } -export function concreteEntityToComposeFields( +export function relationshipAdapterToComposeFields( + objectFields: RelationshipAdapter[], + userDefinedFieldDirectives: Map +): Record> { + const composeFields: Record> = {}; + for (const field of objectFields) { + if (field.isReadable() === false) { + continue; + } + + const relationshipFields = [ + { + typeName: field.getTargetTypePrettyName(), + fieldName: field.name, + }, + { + typeName: `${field.connectionFieldTypename}!`, // TODO: Move Adapter so we aren't manually adding the ! + fieldName: field.connectionFieldName, + }, + ]; + for (const { typeName, fieldName } of relationshipFields) { + const newField: ObjectTypeComposerFieldConfigAsObjectDefinition = { + type: typeName, + args: graphqlArgsToCompose2(field.args), + description: field.description, + }; + + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(field.name); + if (userDefinedDirectivesOnField) { + newField.directives = graphqlDirectivesToCompose(userDefinedDirectivesOnField); + } + + composeFields[fieldName] = newField; + } + } + + return composeFields; +} + +export function attributeAdapterToComposeFields( objectFields: AttributeAdapter[], userDefinedFieldDirectives: Map -) { +): Record> { const composeFields: Record> = {}; for (const field of objectFields) { if (field.isReadable() === false) { diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 72942153bc..99d057a4dc 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -157,7 +157,9 @@ describe("@customResolver directive", () => { node: User! } + \\"\\"\\"\\"\\"\\" interface UserInterface { + \\"\\"\\"\\"\\"\\" customResolver: String } diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index c709475e93..2d7324d2c2 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -206,8 +206,11 @@ describe("@default directive", () => { node: User! } + \\"\\"\\"\\"\\"\\" interface UserInterface { + \\"\\"\\"\\"\\"\\" fromInterface: String! + \\"\\"\\"\\"\\"\\" toBeOverridden: String! } diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index 97e92a42ae..330c5ed17a 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -131,7 +131,9 @@ describe("@private directive", () => { node: User! } + \\"\\"\\"\\"\\"\\" interface UserInterface { + \\"\\"\\"\\"\\"\\" id: ID } diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 5093ffd971..afcb6c0b77 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -18,8 +18,8 @@ */ import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import { lexicographicSortSchema } from "graphql/utilities"; import { gql } from "graphql-tag"; +import { lexicographicSortSchema } from "graphql/utilities"; import { Neo4jGraphQL } from "../../src"; describe("Interfaces", () => { @@ -158,10 +158,349 @@ describe("Interfaces", () => { id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") } + \\"\\"\\"\\"\\"\\" interface MovieNode { + \\"\\"\\"\\"\\"\\" + customQuery: [Movie] + \\"\\"\\"\\"\\"\\" + id: ID + \\"\\"\\"\\"\\"\\" + movies: [Movie!]! + \\"\\"\\"\\"\\"\\" + moviesConnection: MovieNodeMoviesConnection! + } + + input MovieNodeMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type MovieNodeMoviesConnection { + edges: [MovieNodeMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieNodeMoviesConnectionSort { + node: MovieSort + } + + input MovieNodeMoviesConnectionWhere { + AND: [MovieNodeMoviesConnectionWhere!] + NOT: MovieNodeMoviesConnectionWhere + OR: [MovieNodeMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieNodeMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input MovieNodeMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: MovieNodeMoviesConnectionWhere + } + + input MovieNodeMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieNodeMoviesConnectionWhere + } + + input MovieNodeMoviesFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] + } + + type MovieNodeMoviesRelationship { + cursor: String! + node: Movie! + } + + input MovieNodeMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input MovieNodeMoviesUpdateFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] + delete: [MovieNodeMoviesDeleteFieldInput!] + disconnect: [MovieNodeMoviesDisconnectFieldInput!] + update: MovieNodeMoviesUpdateConnectionInput + where: MovieNodeMoviesConnectionWhere + } + + 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!] + } + + input MovieRelationInput { + movies: [MovieNodeMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: ID + movies: [MovieNodeMoviesUpdateFieldInput!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: MovieNodeMoviesConnectionWhere + \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + test("Interface with directive", async () => { + const typeDefs = gql` + directive @something(something: String) on INTERFACE + + interface MovieNode @something(something: "test") { + id: ID + movies: [Movie!]! @relationship(type: "HAS_MOVIE", direction: OUT) + customQuery: [Movie] + @cypher( + statement: """ + MATCH (m:Movie) + RETURN m + """ + columnName: "m" + ) + } + + type Movie implements MovieNode { + id: ID + nodes: [MovieNode] + movies: [Movie!]! @relationship(type: "HAS_MOVIE", direction: OUT) + customQuery: [Movie] + @cypher( + statement: """ + MATCH (m:Movie) + RETURN m + """ + columnName: "m" + ) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + directive @something(something: String) on INTERFACE + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + \\"\\"\\"\\"\\"\\" + type Movie implements MovieNode { + \\"\\"\\"\\"\\"\\" + customQuery: [Movie] + \\"\\"\\"\\"\\"\\" + id: ID + \\"\\"\\"\\"\\"\\" + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! + \\"\\"\\"\\"\\"\\" + nodes: [MovieNode] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + movies: [MovieNodeMoviesConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + id: ID + movies: MovieNodeMoviesFieldInput + } + + input MovieDeleteInput { + movies: [MovieNodeMoviesDeleteFieldInput!] + } + + input MovieDisconnectInput { + movies: [MovieNodeMoviesDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieMovieMoviesAggregationSelection { + count: Int! + node: MovieMovieMoviesNodeAggregateSelection + } + + type MovieMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNullable! + } + + input MovieMoviesAggregateInput { + AND: [MovieMoviesAggregateInput!] + NOT: MovieMoviesAggregateInput + OR: [MovieMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieMoviesNodeAggregationWhereInput + } + + input MovieMoviesNodeAggregationWhereInput { + AND: [MovieMoviesNodeAggregationWhereInput!] + NOT: MovieMoviesNodeAggregationWhereInput + OR: [MovieMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + \\"\\"\\"\\"\\"\\" + interface MovieNode @something(something: \\"test\\") { + \\"\\"\\"\\"\\"\\" customQuery: [Movie] + \\"\\"\\"\\"\\"\\" id: ID + \\"\\"\\"\\"\\"\\" movies: [Movie!]! + \\"\\"\\"\\"\\"\\" moviesConnection: MovieNodeMoviesConnection! } diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 0acd9bed63..1a9d1767c4 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -374,9 +374,13 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { node: Resource! } + \\"\\"\\"\\"\\"\\" interface ResourceEntity { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" name: String + \\"\\"\\"\\"\\"\\" properties: [Property!] \\"\\"\\"Globally tracked tags for this resource (enum)\\"\\"\\" tags: [Tag!] diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 5734d0c329..07731d1ddf 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -375,7 +375,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { totalCount: Int! } + \\"\\"\\"\\"\\"\\" interface INode { + \\"\\"\\"\\"\\"\\" id: String! } From e45d738bd2709a9af7b1a589db6d9344efbf0d13 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 18:41:49 +0100 Subject: [PATCH 048/162] add typenames and filters to RelationshipAdapter --- .../model-adapters/RelationshipAdapter.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) 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 fc525f3dd7..13a9d9a49d 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -190,11 +190,21 @@ export class RelationshipAdapter { public get edgeCreateInputTypeName(): string { return `${this.propertiesTypeName}CreateInput${this.hasNonNullNonGeneratedProperties ? `!` : ""}`; } + public get edgeCreateInputTypeName2(): string { + return `${this.propertiesTypeName}CreateInput`; + } public get edgeUpdateInputTypeName(): string { return `${this.propertiesTypeName}UpdateInput`; } + public get edgeWhereInputTypeName(): string { + return `${this.propertiesTypeName}Where`; + } + public get edgeSortInputTypeName(): string { + return `${this.propertiesTypeName}Sort`; + } + public getConnectOrCreateInputFields(target: ConcreteEntityAdapter) { // TODO: use this._target in the end; currently passed-in as argument because unions need this per refNode // const target = this._target; @@ -332,4 +342,16 @@ export class RelationshipAdapter { public get aggregationWhereFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregationWhereField()); } + + public get createInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isCreateInputField()); + } + + public get updateInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); + } + + public get arrayMethodFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isArrayMethodField()); + } } From 654f71a0a723a06f32ff5126dc29ddf6f02adb01 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 18:42:37 +0100 Subject: [PATCH 049/162] create separate getWhereFields fn for relationship properties --- .../graphql/src/schema/get-where-fields.ts | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index 0280111342..148b00b49d 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -18,8 +18,12 @@ */ import type { DirectiveNode } from "graphql"; +import { StringMappingType } from "typescript"; import { DEPRECATED } from "../constants"; +import { Attribute } from "../schema-model/attribute/Attribute"; +import { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; import type { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { CustomEnumField, CustomScalarField, @@ -184,8 +188,53 @@ export function getWhereFieldsFromConcreteEntity({ NOT: `${concreteEntityAdapter.name}Where`, }; + const fields = getWhereFieldsForAttributes({ + attributes: Array.from(concreteEntityAdapter.attributes.values()), + userDefinedFieldDirectives, + features, + }); + + return { ...result, ...fields }; +} + +export function getWhereFieldsFromRelationshipProperties({ + relationshipAdapter, + userDefinedFieldDirectives, + features, +}: { + relationshipAdapter: RelationshipAdapter; + userDefinedFieldDirectives: Map; + features?: Neo4jFeaturesSettings; +}): Record { + // Add the default where fields + const result = { + OR: `[${relationshipAdapter.propertiesTypeName}Where!]`, + AND: `[${relationshipAdapter.propertiesTypeName}Where!]`, + NOT: `${relationshipAdapter.propertiesTypeName}Where`, + }; + + const fields = getWhereFieldsForAttributes({ + attributes: Array.from(relationshipAdapter.attributes.values()), + userDefinedFieldDirectives, + features, + }); + + return { ...result, ...fields }; +} + +function getWhereFieldsForAttributes({ + attributes, + userDefinedFieldDirectives, + features, +}: { + attributes: AttributeAdapter[]; + userDefinedFieldDirectives: Map; + features?: Neo4jFeaturesSettings; +}): Record[] { + const result: Record[] = []; + // Add the where fields for each attribute - for (const field of concreteEntityAdapter.attributes.values()) { + for (const field of attributes) { // If the field is not a where field, skip it if (field.isWhereField() === false) { continue; From 0f9c87522f619ea3768eabe01a2ffe0e33a5f791 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 18:43:10 +0100 Subject: [PATCH 050/162] refactor relationshipProperties to schema model --- .../src/schema/new-make-augmented-schema.ts | 116 ++++++++++++++---- 1 file changed, 91 insertions(+), 25 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index e9b46df219..a9f2051e28 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -59,7 +59,10 @@ import { getDefinitionNodes } from "./get-definition-nodes"; import type { ObjectFields } from "./get-obj-field-meta"; import getObjFieldMeta from "./get-obj-field-meta"; import getSortableFields from "./get-sortable-fields"; -import getWhereFields, { getWhereFieldsFromConcreteEntity } from "./get-where-fields"; +import getWhereFields, { + getWhereFieldsFromConcreteEntity, + getWhereFieldsFromRelationshipProperties, +} from "./get-where-fields"; import { attributeAdapterToComposeFields, concreteEntityToCreateInputFields, @@ -118,6 +121,7 @@ import { schemaConfigurationFromSchemaExtensions, } from "./schema-configuration"; import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; +import { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; @@ -702,30 +706,10 @@ function makeAugmentedSchema( const relationshipFields = new Map(); const interfaceCommonFields = new Map(); - relationshipProperties.forEach((relationship) => { - // const authDirective = (relationship.directives || []).find((x) => - // ["auth", "authorization", "authentication"].includes(x.name.value) - // ); - // if (authDirective) { - // throw new Error("Cannot have @auth directive on relationship properties interface"); - // } - - // relationship.fields?.forEach((field) => { - // constants.RESERVED_INTERFACE_FIELDS.forEach(([fieldName, message]) => { - // if (field.name.value === fieldName) { - // throw new Error(message); - // } - // }); - - // const forbiddenDirectives = ["auth", "authorization", "authentication", "relationship", "cypher"]; - // forbiddenDirectives.forEach((directive) => { - // const found = (field.directives || []).find((x) => x.name.value === directive); - // if (found) { - // throw new Error(`Cannot have @${directive} directive on relationship property`); - // } - // }); - // }); + // helper to only create relationshipProperties Interface types once, even if multiple relationships reference it + const seenRelationshipPropertiesInterfaces = new Set(); + relationshipProperties.forEach((relationship) => { const relFields = getObjFieldMeta({ enums: enumTypes, interfaces: filteredInterfaceTypes, @@ -737,7 +721,7 @@ function makeAugmentedSchema( }); relationshipFields.set(relationship.name.value, relFields); - + /* const baseFields: BaseField[][] = Object.values(relFields); const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); @@ -799,9 +783,18 @@ function makeAugmentedSchema( ...relFields.pointFields, ]), }); + */ }); interfaceRelationships.forEach((interfaceRelationship) => { + const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; + const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); + + // TODO + // 1. use interfaceEntityAdapter everywhere + // 2. move this to a separate function + // 3. call separate function from inside the nodes.forEach(), for each relationship where relationship.target is Interface, after doing the relationshipProperties interfaces + const implementations = objectTypes.filter((n) => n.interfaces?.some((i) => i.name.value === interfaceRelationship.name.value) ); @@ -1026,6 +1019,19 @@ function makeAugmentedSchema( const concreteEntity = schemaModel.getEntity(node.name) as ConcreteEntity; const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); + for (const relationship of concreteEntityAdapter.relationships.values()) { + { + if ( + !relationship.propertiesTypeName || + seenRelationshipPropertiesInterfaces.has(relationship.propertiesTypeName) + ) { + continue; + } + doForRelationshipPropertiesInterface(composer, relationship, definitionNodes, features); + seenRelationshipPropertiesInterfaces.add(relationship.propertiesTypeName); + } + } + // We wanted to get the userDefinedDirectives const definitionNode = definitionNodes.objectTypes.find( (type) => type.name.value === concreteEntityAdapter.name @@ -1557,3 +1563,63 @@ function makeAugmentedSchema( } export default makeAugmentedSchema; + +function doForRelationshipPropertiesInterface( + composer: SchemaComposer, + relationship: RelationshipAdapter, + definitionNodes: DefinitionNodes, + features?: Neo4jFeaturesSettings +) { + if (!relationship.propertiesTypeName) { + return; + } + + const obj = definitionNodes.interfaceTypes.find((i) => i.name.value === relationship.propertiesTypeName); + if (!obj) { + throw new Error(`Could not find interface named ${relationship.propertiesTypeName}`); + } + + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(obj, definitionNodes); + + const composeFields = attributeAdapterToComposeFields( + Array.from(relationship.attributes.values()), + userDefinedFieldDirectives + ); + + const propertiesInterface = composer.createInterfaceTC({ + name: relationship.propertiesTypeName, + fields: composeFields, + }); + + composer.createInputTC({ + name: relationship.edgeSortInputTypeName, + fields: propertiesInterface.getFieldNames().reduce((res, f) => { + return { ...res, [f]: "SortDirection" }; + }, {}), + }); + + const relationshipUpdateITC = composer.createInputTC({ + name: relationship.edgeUpdateInputTypeName, + // better name for this fn pls - we are using interface entity now. + fields: concreteEntityToUpdateInputFields(relationship.updateInputFields, userDefinedFieldDirectives), + }); + addMathOperatorsToITC(relationshipUpdateITC); + addArrayMethodsToITC2(relationshipUpdateITC, relationship.arrayMethodFields); + + const relationshipWhereFields = getWhereFieldsFromRelationshipProperties({ + relationshipAdapter: relationship, + userDefinedFieldDirectives, + features, + }); + + composer.createInputTC({ + name: relationship.edgeWhereInputTypeName, + fields: relationshipWhereFields, + }); + + composer.createInputTC({ + // name: `${relationship.propertiesTypeName}CreateInput`, + name: relationship.edgeCreateInputTypeName2, + fields: concreteEntityToCreateInputFields(relationship.createInputFields, userDefinedFieldDirectives), + }); +} From 4c72ae47d40456961514c83b07744acee1eb1391 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 11 Sep 2023 18:43:33 +0100 Subject: [PATCH 051/162] update tests with descriptions --- .../graphql/tests/schema/aggregations.test.ts | 20 ++++++++++++++++ .../tests/schema/array-methods.test.ts | 3 +++ .../graphql/tests/schema/comments.test.ts | 2 ++ .../schema/connect-or-create-unions.test.ts | 2 ++ .../tests/schema/connect-or-create.test.ts | 4 ++++ .../tests/schema/connections/enums.test.ts | 3 +++ .../tests/schema/connections/unions.test.ts | 4 ++++ .../tests/schema/directive-preserve.test.ts | 6 +++++ .../tests/schema/directives/alias.test.ts | 4 ++++ .../schema/directives/populatedBy.test.ts | 16 +++++++++++++ .../relationship-properties.test.ts | 24 +++++++++++++++++++ .../schema/interface-relationships.test.ts | 2 ++ .../graphql/tests/schema/issues/2993.test.ts | 2 ++ packages/graphql/tests/schema/math.test.ts | 6 +++++ .../tests/schema/string-comparators.test.ts | 3 +++ .../tests/schema/subscriptions.test.ts | 2 ++ 16 files changed, 103 insertions(+) diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index dd7a4286c7..41a45a07dd 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -522,15 +522,25 @@ describe("Aggregations", () => { } interface Likes { + \\"\\"\\"\\"\\"\\" someBigInt: BigInt + \\"\\"\\"\\"\\"\\" someDateTime: DateTime + \\"\\"\\"\\"\\"\\" someDuration: Duration + \\"\\"\\"\\"\\"\\" someFloat: Float + \\"\\"\\"\\"\\"\\" someId: ID + \\"\\"\\"\\"\\"\\" someInt: Int + \\"\\"\\"\\"\\"\\" someLocalDateTime: LocalDateTime + \\"\\"\\"\\"\\"\\" someLocalTime: LocalTime + \\"\\"\\"\\"\\"\\" someString: String + \\"\\"\\"\\"\\"\\" someTime: Time } @@ -1201,15 +1211,25 @@ describe("Aggregations", () => { type PostLikesRelationship implements Likes { cursor: String! node: User! + \\"\\"\\"\\"\\"\\" someBigInt: BigInt + \\"\\"\\"\\"\\"\\" someDateTime: DateTime + \\"\\"\\"\\"\\"\\" someDuration: Duration + \\"\\"\\"\\"\\"\\" someFloat: Float + \\"\\"\\"\\"\\"\\" someId: ID + \\"\\"\\"\\"\\"\\" someInt: Int + \\"\\"\\"\\"\\"\\" someLocalDateTime: LocalDateTime + \\"\\"\\"\\"\\"\\" someLocalTime: LocalTime + \\"\\"\\"\\"\\"\\" someString: String + \\"\\"\\"\\"\\"\\" someTime: Time } diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index fe9c9c383b..c2918b1f5c 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -51,6 +51,7 @@ describe("Arrays Methods", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" pay: [Float] } @@ -186,6 +187,7 @@ describe("Arrays Methods", () => { type ActorActedInRelationship implements ActedIn { cursor: String! node: Movie! + \\"\\"\\"\\"\\"\\" pay: [Float] } @@ -486,6 +488,7 @@ describe("Arrays Methods", () => { type MovieActorsRelationship implements ActedIn { cursor: String! node: Actor! + \\"\\"\\"\\"\\"\\" pay: [Float] } diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index bb5a41d76e..8e7d981f92 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -731,6 +731,7 @@ describe("Comments", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" screenTime: Int! } @@ -818,6 +819,7 @@ describe("Comments", () => { type ActorActedInRelationship implements ActedIn { cursor: String! node: Production! + \\"\\"\\"\\"\\"\\" screenTime: Int! } diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index b86c786522..08a9555523 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -56,6 +56,7 @@ describe("Connect Or Create", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" screenTime: Int! } @@ -203,6 +204,7 @@ describe("Connect Or Create", () => { type ActorActedInRelationship implements ActedIn { cursor: String! node: Production! + \\"\\"\\"\\"\\"\\" screenTime: Int! } diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index 9f06861f05..38907ce52e 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -537,7 +537,9 @@ describe("Connect Or Create", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" characterName: String + \\"\\"\\"\\"\\"\\" screentime: Int! } @@ -854,9 +856,11 @@ describe("Connect Or Create", () => { } type ActorMoviesRelationship implements ActedIn { + \\"\\"\\"\\"\\"\\" characterName: String cursor: String! node: Movie! + \\"\\"\\"\\"\\"\\" screentime: Int! } diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index 220490cc3c..959f017b0f 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -54,6 +54,7 @@ describe("Enums", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" roleType: RoleType! } @@ -236,6 +237,7 @@ describe("Enums", () => { type ActorMoviesRelationship implements ActedIn { cursor: String! node: Movie! + \\"\\"\\"\\"\\"\\" roleType: RoleType! } @@ -479,6 +481,7 @@ describe("Enums", () => { type MovieActorsRelationship implements ActedIn { cursor: String! node: Actor! + \\"\\"\\"\\"\\"\\" roleType: RoleType! } diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 690a373ebd..1dd64138f5 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -247,6 +247,7 @@ describe("Unions", () => { type AuthorPublicationsRelationship implements Wrote { cursor: String! node: Publication! + \\"\\"\\"\\"\\"\\" words: Int! } @@ -479,6 +480,7 @@ describe("Unions", () => { type BookAuthorRelationship implements Wrote { cursor: String! node: Author! + \\"\\"\\"\\"\\"\\" words: Int! } @@ -802,6 +804,7 @@ describe("Unions", () => { type JournalAuthorRelationship implements Wrote { cursor: String! node: Author! + \\"\\"\\"\\"\\"\\" words: Int! } @@ -1004,6 +1007,7 @@ describe("Unions", () => { } interface Wrote { + \\"\\"\\"\\"\\"\\" words: Int! } diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 8282b1664c..72e7b71f19 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -908,6 +908,7 @@ describe("Directive-preserve", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" role: String! } @@ -998,6 +999,7 @@ describe("Directive-preserve", () => { type ActorActedInRelationship implements ActedIn { cursor: String! node: Production! + \\"\\"\\"\\"\\"\\" role: String! } @@ -1464,6 +1466,7 @@ describe("Directive-preserve", () => { type ProductionActorsRelationship implements ActedIn { cursor: String! node: Actor! + \\"\\"\\"\\"\\"\\" role: String! } @@ -1889,6 +1892,7 @@ describe("Directive-preserve", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" role: String! } @@ -1979,6 +1983,7 @@ describe("Directive-preserve", () => { type ActorActedInRelationship implements ActedIn { cursor: String! node: Production! + \\"\\"\\"\\"\\"\\" role: String! } @@ -2445,6 +2450,7 @@ describe("Directive-preserve", () => { type ProductionActorsRelationship implements ActedIn { cursor: String! node: Actor! + \\"\\"\\"\\"\\"\\" role: String! } diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index be59adc882..3fde89e6fa 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -256,7 +256,9 @@ describe("Alias", () => { } interface ActorActedInProps { + \\"\\"\\"\\"\\"\\" character: String! + \\"\\"\\"\\"\\"\\" screenTime: Int } @@ -302,9 +304,11 @@ describe("Alias", () => { } type ActorActedInRelationship implements ActorActedInProps { + \\"\\"\\"\\"\\"\\" character: String! cursor: String! node: Movie! + \\"\\"\\"\\"\\"\\" screenTime: Int } diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 486b7e1408..3158603e4f 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -1061,10 +1061,14 @@ describe("@populatedBy tests", () => { } type MovieGenresRelationship implements RelProperties { + \\"\\"\\"\\"\\"\\" callback1: String! + \\"\\"\\"\\"\\"\\" callback2: String! + \\"\\"\\"\\"\\"\\" callback3: String! cursor: String! + \\"\\"\\"\\"\\"\\" id: ID! node: Genre! } @@ -1186,9 +1190,13 @@ describe("@populatedBy tests", () => { } interface RelProperties { + \\"\\"\\"\\"\\"\\" callback1: String! + \\"\\"\\"\\"\\"\\" callback2: String! + \\"\\"\\"\\"\\"\\" callback3: String! + \\"\\"\\"\\"\\"\\" id: ID! } @@ -1643,10 +1651,14 @@ describe("@populatedBy tests", () => { } type MovieGenresRelationship implements RelProperties { + \\"\\"\\"\\"\\"\\" callback1: Int! + \\"\\"\\"\\"\\"\\" callback2: Int! + \\"\\"\\"\\"\\"\\" callback3: Int! cursor: String! + \\"\\"\\"\\"\\"\\" id: ID! node: Genre! } @@ -1768,9 +1780,13 @@ describe("@populatedBy tests", () => { } interface RelProperties { + \\"\\"\\"\\"\\"\\" callback1: Int! + \\"\\"\\"\\"\\"\\" callback2: Int! + \\"\\"\\"\\"\\"\\" callback3: Int! + \\"\\"\\"\\"\\"\\" id: ID! } diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index 7a98eb01e0..a4baf38cd8 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -51,8 +51,11 @@ describe("Relationship-properties", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" leadRole: Boolean! + \\"\\"\\"\\"\\"\\" screenTime: Int! + \\"\\"\\"\\"\\"\\" startDate: Date! } @@ -293,9 +296,12 @@ describe("Relationship-properties", () => { type ActorMoviesRelationship implements ActedIn { cursor: String! + \\"\\"\\"\\"\\"\\" leadRole: Boolean! node: Movie! + \\"\\"\\"\\"\\"\\" screenTime: Int! + \\"\\"\\"\\"\\"\\" startDate: Date! } @@ -585,9 +591,12 @@ describe("Relationship-properties", () => { type MovieActorsRelationship implements ActedIn { cursor: String! + \\"\\"\\"\\"\\"\\" leadRole: Boolean! node: Actor! + \\"\\"\\"\\"\\"\\" screenTime: Int! + \\"\\"\\"\\"\\"\\" startDate: Date! } @@ -800,8 +809,11 @@ describe("Relationship-properties", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" screenTime: Int! + \\"\\"\\"\\"\\"\\" timestamp: DateTime! } @@ -1064,9 +1076,12 @@ describe("Relationship-properties", () => { type ActorMoviesRelationship implements ActedIn { cursor: String! + \\"\\"\\"\\"\\"\\" id: ID! node: Movie! + \\"\\"\\"\\"\\"\\" screenTime: Int! + \\"\\"\\"\\"\\"\\" timestamp: DateTime! } @@ -1384,9 +1399,12 @@ describe("Relationship-properties", () => { type MovieActorsRelationship implements ActedIn { cursor: String! + \\"\\"\\"\\"\\"\\" id: ID! node: Actor! + \\"\\"\\"\\"\\"\\" screenTime: Int! + \\"\\"\\"\\"\\"\\" timestamp: DateTime! } @@ -1598,7 +1616,9 @@ describe("Relationship-properties", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" timestamp: DateTime! } @@ -1814,8 +1834,10 @@ describe("Relationship-properties", () => { type ActorMoviesRelationship implements ActedIn { cursor: String! + \\"\\"\\"\\"\\"\\" id: ID! node: Movie! + \\"\\"\\"\\"\\"\\" timestamp: DateTime! } @@ -2097,8 +2119,10 @@ describe("Relationship-properties", () => { type MovieActorsRelationship implements ActedIn { cursor: String! + \\"\\"\\"\\"\\"\\" id: ID! node: Actor! + \\"\\"\\"\\"\\"\\" timestamp: DateTime! } diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 83c09ee305..77aad7f794 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -58,6 +58,7 @@ describe("Interface Relationships", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" screenTime: Int! } @@ -145,6 +146,7 @@ describe("Interface Relationships", () => { type ActorActedInRelationship implements ActedIn { cursor: String! node: Production! + \\"\\"\\"\\"\\"\\" screenTime: Int! } diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index a394765c8d..c8dd1ceb0d 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -73,6 +73,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } interface FOLLOWS { + \\"\\"\\"\\"\\"\\" since: DateTime! } @@ -324,6 +325,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { type UserFollowingRelationship implements FOLLOWS { cursor: String! node: Profile! + \\"\\"\\"\\"\\"\\" since: DateTime! } diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index f7863d7d47..2a51a2a71a 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -1769,7 +1769,9 @@ describe("Algebraic", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" pay: Float + \\"\\"\\"\\"\\"\\" roles: [String!] } @@ -1992,7 +1994,9 @@ describe("Algebraic", () => { type MovieActorsRelationship implements ActedIn { cursor: String! node: Person! + \\"\\"\\"\\"\\"\\" pay: Float + \\"\\"\\"\\"\\"\\" roles: [String!] } @@ -2303,7 +2307,9 @@ describe("Algebraic", () => { type PersonActedInMoviesRelationship implements ActedIn { cursor: String! node: Movie! + \\"\\"\\"\\"\\"\\" pay: Float + \\"\\"\\"\\"\\"\\" roles: [String!] } diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index 58045a5209..070cfa3c72 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -528,6 +528,7 @@ describe("String Comparators", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" screenTime: String } @@ -722,6 +723,7 @@ describe("String Comparators", () => { type ActorActedInRelationship implements ActedIn { cursor: String! node: Movie! + \\"\\"\\"\\"\\"\\" screenTime: String } @@ -1061,6 +1063,7 @@ describe("String Comparators", () => { type MovieActorsRelationship implements ActedIn { cursor: String! node: Actor! + \\"\\"\\"\\"\\"\\" screenTime: String } diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 0a813f2762..f02dc50767 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -2613,6 +2613,7 @@ describe("Subscriptions", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" screenTime: Int! } @@ -3133,6 +3134,7 @@ describe("Subscriptions", () => { type MovieActorsRelationship implements ActedIn { cursor: String! node: Actor! + \\"\\"\\"\\"\\"\\" screenTime: Int! } From 49646f092df290e6a01b34d5338c2f0e2dcce0fc Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 12 Sep 2023 16:14:22 +0200 Subject: [PATCH 052/162] refactor: replace usage of isTemporalField with isTemporal --- .../model-adapters/AttributeAdapter.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index ba984a530e..53aeae9d12 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -266,30 +266,17 @@ export class AttributeAdapter { ); } - isTemporalField(): boolean { - // TODO: why is .isTemporal() not enough?? - return ( - this.isTemporal() || - this.isDateTime() || - this.isDate() || - this.isLocalDateTime() || - this.isTime() || - this.isLocalTime() || - this.isDuration() - ); - } - isPrimitiveField(): boolean { return this.isGraphQLBuiltInScalar() || this.isUserScalar() || this.isEnum() || this.isBigInt(); } isAggregableField(): boolean { - return !this.isList() && (this.isPrimitiveField() || this.isTemporalField()) && this.isAggregable(); + return !this.isList() && (this.isPrimitiveField() || this.isTemporal()) && this.isAggregable(); } isAggregationWhereField(): boolean { const isGraphQLBuiltInScalarWithoutBoolean = this.isGraphQLBuiltInScalar() && !this.isBoolean(); - const isTemporalWithoutDate = this.isTemporalField() && !this.isDate(); + const isTemporalWithoutDate = this.isTemporal() && !this.isDate(); return ( !this.isList() && (isGraphQLBuiltInScalarWithoutBoolean || isTemporalWithoutDate || this.isBigInt()) && From f8f49a6b690d742e185c6fe81e980793c308187e Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 12 Sep 2023 16:20:04 +0200 Subject: [PATCH 053/162] fix: use isTemporal instead of isTemporalField --- .../schema-model/entity/model-adapters/ConcreteEntityAdapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts index 21a9aebad4..f80bba138a 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts @@ -157,7 +157,7 @@ export class ConcreteEntityAdapter { // } public get temporalFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isTemporalField()); + return Array.from(this.attributes.values()).filter((attribute) => attribute.isTemporal()); } // TODO: identify usage of old Node.[getLabels | getLabelsString] and migrate them if needed From f752cf051eade6501f924c87a8104381156a813f Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 12 Sep 2023 16:25:34 +0200 Subject: [PATCH 054/162] refactor: remove unneeded isPrimitiveField --- .../attribute/model-adapters/AttributeAdapter.ts | 8 ++------ .../entity/model-adapters/ConcreteEntityAdapter.ts | 4 ---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 53aeae9d12..4e3572f75b 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -266,12 +266,8 @@ export class AttributeAdapter { ); } - isPrimitiveField(): boolean { - return this.isGraphQLBuiltInScalar() || this.isUserScalar() || this.isEnum() || this.isBigInt(); - } - isAggregableField(): boolean { - return !this.isList() && (this.isPrimitiveField() || this.isTemporal()) && this.isAggregable(); + return !this.isList() && (this.isScalar() || this.isEnum()) && this.isAggregable(); } isAggregationWhereField(): boolean { @@ -292,7 +288,7 @@ export class AttributeAdapter { return ( this.isCypher() === false && this.isCustomResolvable() === false && - (this.isPrimitiveField() || this.isScalar() || this.isSpatial()) && + (this.isEnum() || this.isScalar() || this.isSpatial()) && !this.annotations.id && !this.annotations.populatedBy && !this.annotations.timestamp diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts index f80bba138a..97b1448934 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts @@ -121,10 +121,6 @@ export class ConcreteEntityAdapter { return Array.from(this.attributes.values()).filter((attribute) => attribute.isWhereField()); } - public get primitiveFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isPrimitiveField()); - } - public get aggregableFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregableField()); } From 3cef6cbcf9a43ee8097bec51a74213fefbb45648 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 12 Sep 2023 16:27:52 +0200 Subject: [PATCH 055/162] refactor: remove unused getPropagatedAnnotations --- .../model-adapters/AttributeAdapter.ts | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 4e3572f75b..2722e33638 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -593,37 +593,6 @@ export class AttributeAdapter { return this.annotations.fulltext?.indexes; } - getPropagatedAnnotations(): Partial { - // TODO: use constants - return Object.fromEntries( - Object.entries(this.annotations).filter( - ([name]) => - ![ - "relationship", - "cypher", - "id", - "authorization", - "authentication", - "readonly", - "writeonly", - "customResolver", - "default", - "coalesce", - "timestamp", - "alias", - "unique", - "callback", - "populatedBy", - "jwtClaim", - "selectable", - "settable", - "subscriptionsAuthorization", - "filterable", - ].includes(name) - ) - ); - } - isPartOfUpdateInputType(): boolean { if (this.isScalar() || this.isEnum() || this.isSpatial()) { return true; From 4d4e4d994105f7fb95b35583ed6ca8bc4fcab574 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 12 Sep 2023 16:43:00 +0200 Subject: [PATCH 056/162] refactor: use higher order categories where possible --- .../model-adapters/AttributeAdapter.ts | 65 ++----------------- 1 file changed, 7 insertions(+), 58 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 2722e33638..fd902d1469 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -82,13 +82,7 @@ export class AttributeAdapter { */ isMutable(): boolean { return ( - (this.isTemporal() || - this.isEnum() || - this.isInterface() || - this.isUnion() || - this.isSpatial() || - this.isScalar() || - this.isObject()) && + (this.isEnum() || this.isAbstract() || this.isSpatial() || this.isScalar() || this.isObject()) && !this.isCypher() ); } @@ -115,8 +109,7 @@ export class AttributeAdapter { this.isUserScalar() || this.isEnum() || this.isTemporal() || - this.isPoint() || - this.isCartesianPoint() + this.isSpatial() ); } @@ -137,17 +130,7 @@ export class AttributeAdapter { */ isObjectField(): boolean { return ( - this.isGraphQLBuiltInScalar() || - this.isCypher() || - this.isEnum() || - this.isUserScalar() || - this.isInterface() || - this.isObject() || - this.isUnion() || - this.isTemporal() || - this.isPoint() || - this.isCartesianPoint() || - this.isBigInt() + this.isScalar() || this.isEnum() || this.isAbstract() || this.isObject() || this.isSpatial() // this.isCustomResolver() ); } @@ -181,14 +164,7 @@ export class AttributeAdapter { return ( !this.isList() && !this.isCustomResolvable() && - (this.isGraphQLBuiltInScalar() || - this.isUserScalar() || - this.isEnum() || - this.isTemporal() || - this.isPoint() || - this.isCartesianPoint() || - this.isBigInt() || - this.isCypher()) + (this.isScalar() || this.isEnum() || this.isSpatial() || this.isCypher()) ); } @@ -203,15 +179,7 @@ export class AttributeAdapter { }, */ isWhereField(): boolean { - return ( - this.isGraphQLBuiltInScalar() || - this.isTemporal() || - this.isEnum() || - this.isPoint() || - this.isCartesianPoint() || - this.isUserScalar() || - this.isBigInt() - ); + return this.isEnum() || this.isSpatial() || this.isScalar(); } /** @@ -224,16 +192,7 @@ export class AttributeAdapter { ] */ isOnCreateField(): boolean { - return ( - this.isNonGeneratedField() && - (this.isGraphQLBuiltInScalar() || - this.isTemporal() || - this.isEnum() || - this.isPoint() || - this.isCartesianPoint() || - this.isUserScalar() || - this.isBigInt()) - ); + return this.isNonGeneratedField() && (this.isScalar() || this.isEnum() || this.isAbstract()); } /** @@ -253,17 +212,7 @@ export class AttributeAdapter { ), */ isNumericalOrTemporal(): boolean { - return ( - this.isFloat() || - this.isInt() || - this.isBigInt() || - this.isDateTime() || - this.isDate() || - this.isLocalDateTime() || - this.isTime() || - this.isLocalTime() || - this.isDuration() - ); + return this.isFloat() || this.isInt() || this.isBigInt() || this.isTemporal(); } isAggregableField(): boolean { From 37064d8fce9e3c4512b2f362e2dcf5a08357c5bb Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 12 Sep 2023 17:38:40 +0200 Subject: [PATCH 057/162] wip: move interface relationships to schema model --- .../model-adapters/InterfaceEntityAdapter.ts | 41 ++++ .../InterfaceEntityOperations.ts | 222 ++++++++++++++++++ .../src/schema/create-connection-fields.ts | 8 +- .../create-relationship-fields.ts | 32 +-- .../graphql/src/schema/get-where-fields.ts | 23 +- .../src/schema/new-make-augmented-schema.ts | 215 +++++++++-------- .../graphql/tests/schema/comments.test.ts | 1 + .../tests/schema/directive-preserve.test.ts | 4 + .../schema/directives/filterable.test.ts | 3 + .../directives/relationship-aggregate.test.ts | 4 + .../relationship-nested-operations.test.ts | 8 + .../schema/directives/selectable.test.ts | 4 + .../tests/schema/directives/settable.test.ts | 10 + .../schema/interface-relationships.test.ts | 7 + .../graphql/tests/schema/issues/2993.test.ts | 2 + .../graphql/tests/schema/issues/3439.test.ts | 9 + packages/graphql/tests/schema/math.test.ts | 1 + .../tests/schema/subscriptions.test.ts | 3 + 18 files changed, 466 insertions(+), 131 deletions(-) create mode 100644 packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts index 2d3bfaad90..cabe350edc 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts @@ -23,9 +23,11 @@ import { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapte import { RelationshipAdapter } from "../../relationship/model-adapters/RelationshipAdapter"; import type { Relationship } from "../../relationship/Relationship"; import { getFromMap } from "../../utils/get-from-map"; +import { plural, singular } from "../../utils/string-manipulation"; import type { ConcreteEntity } from "../ConcreteEntity"; import type { InterfaceEntity } from "../InterfaceEntity"; import { ConcreteEntityAdapter } from "./ConcreteEntityAdapter"; +import { InterfaceEntityOperations } from "./InterfaceEntityOperations"; export class InterfaceEntityAdapter { public readonly name: string; @@ -35,6 +37,12 @@ export class InterfaceEntityAdapter { public readonly annotations: Partial; private uniqueFieldsKeys: string[] = []; + private _singular: string | undefined; + private _plural: string | undefined; + + // specialize models + private _operations: InterfaceEntityOperations | undefined; + constructor(entity: InterfaceEntity) { this.name = entity.name; this.concreteEntities = []; @@ -67,7 +75,40 @@ export class InterfaceEntityAdapter { } } + public get singular(): string { + if (!this._singular) { + this._singular = singular(this.name); + } + return this._singular; + } + + public get plural(): string { + if (!this._plural) { + if (this.annotations.plural) { + this._plural = plural(this.annotations.plural.value); + } else { + this._plural = plural(this.name); + } + } + return this._plural; + } + + get operations(): InterfaceEntityOperations { + if (!this._operations) { + return new InterfaceEntityOperations(this); + } + return this._operations; + } + public get uniqueFields(): AttributeAdapter[] { return this.uniqueFieldsKeys.map((key) => getFromMap(this.attributes, key)); } + + public get sortableFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isSortableField()); + } + + public get updateInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); + } } diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts new file mode 100644 index 0000000000..736a555181 --- /dev/null +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts @@ -0,0 +1,222 @@ +/* + * 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 { upperFirst } from "../../../utils/upper-first"; +import type { InterfaceEntityAdapter } from "./InterfaceEntityAdapter"; + +type RootTypeFieldNames = { + create: string; + read: string; + update: string; + delete: string; + aggregate: string; + subscribe: { + created: string; + updated: string; + deleted: string; + relationship_created: string; + relationship_deleted: string; + }; +}; + +type FulltextTypeNames = { + result: string; + where: string; + sort: string; +}; + +type AggregateTypeNames = { + selection: string; + input: string; +}; + +type MutationResponseTypeNames = { + create: string; + update: string; +}; + +type SubscriptionEvents = { + create: string; + update: string; + delete: string; + create_relationship: string; + delete_relationship: string; +}; + +export type UpdateMutationArgumentNames = { + connect: string; + disconnect: string; + create: string; + update: string; + delete: string; + connectOrCreate: string; + where: string; +}; + +export type CreateMutationArgumentNames = { + input: string; +}; + +export class InterfaceEntityOperations { + private readonly InterfaceEntityAdapter: InterfaceEntityAdapter; + private readonly pascalCasePlural: string; + private readonly pascalCaseSingular: string; + + constructor(InterfaceEntityAdapter: InterfaceEntityAdapter) { + this.InterfaceEntityAdapter = InterfaceEntityAdapter; + this.pascalCasePlural = upperFirst(this.InterfaceEntityAdapter.plural); + this.pascalCaseSingular = upperFirst(this.InterfaceEntityAdapter.singular); + } + + public get whereInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}Where`; + } + + public get uniqueWhereInputTypeName(): string { + // ConnectOrCreateWhere.node + return `${this.InterfaceEntityAdapter.name}UniqueWhere`; + } + + public get connectOrCreateWhereInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ConnectOrCreateWhere`; + } + + public get createInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}CreateInput`; + } + + public get updateInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}UpdateInput`; + } + + public get deleteInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}DeleteInput`; + } + + public get optionsInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}Options`; + } + + public get fullTextInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}Fulltext`; + } + + public get sortInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}Sort`; + } + + public get relationInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}RelationInput`; + } + + public get connectInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ConnectInput`; + } + + public get disconnectInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}DisconnectInput`; + } + + public get onCreateInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}OnCreateInput`; + } + + public get rootTypeFieldNames(): RootTypeFieldNames { + return { + create: `create${this.pascalCasePlural}`, + read: this.InterfaceEntityAdapter.plural, + update: `update${this.pascalCasePlural}`, + delete: `delete${this.pascalCasePlural}`, + aggregate: `${this.InterfaceEntityAdapter.plural}Aggregate`, + subscribe: { + created: `${this.InterfaceEntityAdapter.singular}Created`, + updated: `${this.InterfaceEntityAdapter.singular}Updated`, + deleted: `${this.InterfaceEntityAdapter.singular}Deleted`, + relationship_deleted: `${this.InterfaceEntityAdapter.singular}RelationshipDeleted`, + relationship_created: `${this.InterfaceEntityAdapter.singular}RelationshipCreated`, + }, + }; + } + + public get fulltextTypeNames(): FulltextTypeNames { + return { + result: `${this.pascalCaseSingular}FulltextResult`, + where: `${this.pascalCaseSingular}FulltextWhere`, + sort: `${this.pascalCaseSingular}FulltextSort`, + }; + } + + public get aggregateTypeNames(): AggregateTypeNames { + return { + selection: `${this.InterfaceEntityAdapter.name}AggregateSelection`, + input: `${this.InterfaceEntityAdapter.name}AggregateSelectionInput`, + }; + } + + public get mutationResponseTypeNames(): MutationResponseTypeNames { + return { + create: `Create${this.pascalCasePlural}MutationResponse`, + update: `Update${this.pascalCasePlural}MutationResponse`, + }; + } + + public get subscriptionEventTypeNames(): SubscriptionEvents { + return { + create: `${this.pascalCaseSingular}CreatedEvent`, + update: `${this.pascalCaseSingular}UpdatedEvent`, + delete: `${this.pascalCaseSingular}DeletedEvent`, + create_relationship: `${this.pascalCaseSingular}RelationshipCreatedEvent`, + delete_relationship: `${this.pascalCaseSingular}RelationshipDeletedEvent`, + }; + } + + public get subscriptionEventPayloadFieldNames(): SubscriptionEvents { + return { + create: `created${this.pascalCaseSingular}`, + update: `updated${this.pascalCaseSingular}`, + delete: `deleted${this.pascalCaseSingular}`, + create_relationship: `${this.InterfaceEntityAdapter.singular}`, + delete_relationship: `${this.InterfaceEntityAdapter.singular}`, + }; + } + + public get updateMutationArgumentNames(): UpdateMutationArgumentNames { + return { + connect: `${this.InterfaceEntityAdapter.name}ConnectInput`, + disconnect: `${this.InterfaceEntityAdapter.name}DisconnectInput`, + create: this.relationInputTypeName, + update: this.updateInputTypeName, + delete: this.deleteInputTypeName, + connectOrCreate: `${this.InterfaceEntityAdapter.name}ConnectOrCreateInput`, + where: this.whereInputTypeName, + }; + } + + public get createMutationArgumentNames(): CreateMutationArgumentNames { + return { + input: `[${this.createInputTypeName}!]!`, + }; + } + + public get connectOrCreateWhereInputFieldNames() { + return { + node: `${this.uniqueWhereInputTypeName}!`, + }; + } +} diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index db243663de..5d35667ca0 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -295,13 +295,13 @@ function createConnectionFields({ export default createConnectionFields; export function createConnectionFields2({ - concreteEntityAdapter, + entityAdapter, schemaComposer, composeNode, userDefinedFieldDirectives, relationshipFields, }: { - concreteEntityAdapter: ConcreteEntityAdapter; + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; schemaComposer: SchemaComposer; composeNode: ObjectTypeComposer | InterfaceTypeComposer; userDefinedFieldDirectives: Map; @@ -309,7 +309,7 @@ export function createConnectionFields2({ }): Relationship[] { const relationships: Relationship[] = []; - concreteEntityAdapter.relationships.forEach((relationship) => { + entityAdapter.relationships.forEach((relationship) => { const relationshipObjectType = schemaComposer.getOrCreateOTC(relationship.relationshipFieldTypename, (tc) => { tc.addFields({ cursor: "String!", @@ -372,7 +372,7 @@ export function createConnectionFields2({ addRelationshipArrayFilters({ whereInput, fieldName: relationship.connectionFieldName, - sourceName: concreteEntityAdapter.name, + sourceName: entityAdapter.name, relatedType: relationship.connectionFieldTypename, whereType: connectionWhere, directives: deprecatedDirectives, 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 52cda74fb4..1c677969ab 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 @@ -509,7 +509,7 @@ function relationshipTargetHasRelationshipWithNestedOperation( export default createRelationshipFields; export function createRelationshipFieldsFromConcreteEntityAdapter({ - concreteEntityAdapter, + entityAdapter, schemaComposer, // TODO: Ideally we come up with a solution where we don't have to pass the following into these kind of functions composeNode, @@ -517,20 +517,20 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ subgraph, userDefinedFieldDirectives, }: { - concreteEntityAdapter: ConcreteEntityAdapter; + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; schemaComposer: SchemaComposer; composeNode: ObjectTypeComposer | InterfaceTypeComposer; // relationshipPropertyFields: Map; subgraph?: Subgraph; userDefinedFieldDirectives: Map; }): void { - if (!concreteEntityAdapter.relatedEntities.length) { + if (!entityAdapter.relationships.size) { return; } - concreteEntityAdapter.relationships.forEach((relationshipAdapter) => { + entityAdapter.relationships.forEach((relationshipAdapter) => { const relFields = relationshipAdapter.attributes; - const sourceName = concreteEntityAdapter.name; + const sourceName = entityAdapter.name; if (!relationshipAdapter) { return; @@ -583,8 +583,8 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } const nestedOperations = new Set(relationshipAdapter.nestedOperations); - const nodeCreateInput = schemaComposer.getITC(concreteEntityAdapter.operations.createInputTypeName); - const nodeUpdateInput = schemaComposer.getITC(concreteEntityAdapter.operations.updateInputTypeName); + const nodeCreateInput = schemaComposer.getITC(entityAdapter.operations.createInputTypeName); + const nodeUpdateInput = schemaComposer.getITC(entityAdapter.operations.updateInputTypeName); // Don't generate empty input type let nodeFieldInput: InputTypeComposer | undefined; @@ -646,7 +646,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } }); - const whereInput = schemaComposer.getITC(concreteEntityAdapter.operations.whereInputTypeName); + const whereInput = schemaComposer.getITC(entityAdapter.operations.whereInputTypeName); if (relationshipAdapter.isFilterableByValue()) { whereInput.addFields({ @@ -674,7 +674,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ addRelationshipArrayFilters({ whereInput, fieldName: relationshipAdapter.name, - sourceName: concreteEntityAdapter.name, + sourceName: entityAdapter.name, relatedType: relationshipAdapter.target.name, whereType: `${relationshipAdapter.target.name}Where`, directives: deprecatedDirectives, @@ -773,7 +773,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ createTopLevelConnectOrCreateInput2({ schemaComposer, - sourceName: concreteEntityAdapter.name, + sourceName: entityAdapter.name, relationshipAdapter, }); } @@ -806,9 +806,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ }); } - const nodeRelationInput = schemaComposer.getOrCreateITC( - concreteEntityAdapter.operations.relationInputTypeName - ); + const nodeRelationInput = schemaComposer.getOrCreateITC(entityAdapter.operations.relationInputTypeName); nodeRelationInput.addFields({ [relationshipAdapter.name]: { type: create, @@ -863,9 +861,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ nodeFieldInput.addFields({ connect }); } - const nodeConnectInput = schemaComposer.getOrCreateITC( - concreteEntityAdapter.operations.connectInputTypeName - ); + const nodeConnectInput = schemaComposer.getOrCreateITC(entityAdapter.operations.connectInputTypeName); nodeConnectInput.addFields({ [relationshipAdapter.name]: { type: connect, @@ -954,9 +950,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ : nodeFieldDisconnectInputName, }); - const nodeDisconnectInput = schemaComposer.getOrCreateITC( - concreteEntityAdapter.operations.disconnectInputTypeName - ); + const nodeDisconnectInput = schemaComposer.getOrCreateITC(entityAdapter.operations.disconnectInputTypeName); nodeDisconnectInput.addFields({ [relationshipAdapter.name]: { type: relationshipAdapter.isList diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index 148b00b49d..430ea8d966 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -18,10 +18,9 @@ */ import type { DirectiveNode } from "graphql"; -import { StringMappingType } from "typescript"; +import type { Directive } from "graphql-compose"; import { DEPRECATED } from "../constants"; -import { Attribute } from "../schema-model/attribute/Attribute"; -import { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; +import type { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; import type { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { @@ -222,7 +221,7 @@ export function getWhereFieldsFromRelationshipProperties({ return { ...result, ...fields }; } -function getWhereFieldsForAttributes({ +export function getWhereFieldsForAttributes({ attributes, userDefinedFieldDirectives, features, @@ -230,8 +229,20 @@ function getWhereFieldsForAttributes({ attributes: AttributeAdapter[]; userDefinedFieldDirectives: Map; features?: Neo4jFeaturesSettings; -}): Record[] { - const result: Record[] = []; +}): Record< + string, + { + type: string; + directives: Directive[]; + } +> { + const result: Record< + string, + { + type: string; + directives: Directive[]; + } + > = {}; // Add the where fields for each attribute for (const field of attributes) { diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index a9f2051e28..06974f73e5 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -58,8 +58,8 @@ import type { DefinitionNodes } from "./get-definition-nodes"; import { getDefinitionNodes } from "./get-definition-nodes"; import type { ObjectFields } from "./get-obj-field-meta"; import getObjFieldMeta from "./get-obj-field-meta"; -import getSortableFields from "./get-sortable-fields"; -import getWhereFields, { +import { + getWhereFieldsForAttributes, getWhereFieldsFromConcreteEntity, getWhereFieldsFromRelationshipProperties, } from "./get-where-fields"; @@ -69,8 +69,6 @@ import { concreteEntityToUpdateInputFields, graphqlDirectivesToCompose, objectFieldsToComposeFields, - objectFieldsToCreateInputFields, - objectFieldsToUpdateInputFields, relationshipAdapterToComposeFields, } from "./to-compose"; @@ -103,14 +101,13 @@ import type { UnionEntity } from "../schema-model/entity/UnionEntity"; import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; -import type { BaseField, Neo4jFeaturesSettings } from "../types"; +import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { Neo4jFeaturesSettings } from "../types"; import { isInArray } from "../utils/is-in-array"; -import { addArrayMethodsToITC, addArrayMethodsToITC2 } from "./array-methods"; -import createConnectionFields, { createConnectionFields2 } from "./create-connection-fields"; +import { addArrayMethodsToITC2 } from "./array-methods"; +import { createConnectionFields2 } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; -import createRelationshipFields, { - createRelationshipFieldsFromConcreteEntityAdapter, -} from "./create-relationship-fields/create-relationship-fields"; +import { createRelationshipFieldsFromConcreteEntityAdapter } from "./create-relationship-fields/create-relationship-fields"; import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; @@ -121,7 +118,6 @@ import { schemaConfigurationFromSchemaExtensions, } from "./schema-configuration"; import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; -import { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; @@ -790,15 +786,23 @@ function makeAugmentedSchema( const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); + // We wanted to get the userDefinedDirectives + const definitionNode = definitionNodes.interfaceTypes.find( + (type) => type.name.value === interfaceEntityAdapter.name + ); + if (!definitionNode) { + console.error(`Definition node not found for ${interfaceEntityAdapter.name}`); + return; + } + + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + // TODO // 1. use interfaceEntityAdapter everywhere // 2. move this to a separate function // 3. call separate function from inside the nodes.forEach(), for each relationship where relationship.target is Interface, after doing the relationshipProperties interfaces - const implementations = objectTypes.filter((n) => - n.interfaces?.some((i) => i.name.value === interfaceRelationship.name.value) - ); - + // TODO: Remove this const interfaceFields = getObjFieldMeta({ enums: enumTypes, interfaces: [...filteredInterfaceTypes, ...interfaceRelationships], @@ -809,66 +813,77 @@ function makeAugmentedSchema( callbacks, }); - const baseFields: BaseField[][] = Object.values(interfaceFields); - const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); + const objectComposeFields = attributeAdapterToComposeFields( + Array.from(interfaceEntityAdapter.attributes.values()), + userDefinedFieldDirectives + ); const composeInterface = composer.createInterfaceTC({ - name: interfaceRelationship.name.value, + name: interfaceEntityAdapter.name, fields: objectComposeFields, }); - interfaceCommonFields.set(interfaceRelationship.name.value, interfaceFields); + interfaceCommonFields.set(interfaceEntityAdapter.name, interfaceFields); - const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceRelationship.name.value}Options`, (tc) => { + const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Options`, (tc) => { tc.addFields({ limit: "Int", offset: "Int", }); }); - const interfaceSortableFields = getSortableFields(interfaceFields).reduce( - (res, f) => ({ - ...res, - [f.fieldName]: { - type: "SortDirection", - directives: graphqlDirectivesToCompose( - f.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) - ), - }, - }), + const interfaceSortableFields = interfaceEntityAdapter.sortableFields.reduce( + (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; + return { + ...res, + [attributeAdapter.name]: { + type: "SortDirection", + directives: graphqlDirectivesToCompose( + userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) + ), + }, + }; + }, {} ); if (Object.keys(interfaceSortableFields).length) { - const interfaceSortInput = composer.getOrCreateITC(`${interfaceRelationship.name.value}Sort`, (tc) => { + const interfaceSortInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Sort`, (tc) => { tc.addFields(interfaceSortableFields); tc.setDescription( `Fields to sort ${pluralize( - interfaceRelationship.name.value - )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceRelationship.name.value}Sort`} object.` + interfaceEntityAdapter.name + )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceEntityAdapter.name}Sort`} object.` ); }); interfaceOptionsInput.addFields({ sort: { - description: `Specify one or more ${`${interfaceRelationship.name.value}Sort`} objects to sort ${pluralize( - interfaceRelationship.name.value + description: `Specify one or more ${`${interfaceEntityAdapter.name}Sort`} objects to sort ${pluralize( + interfaceEntityAdapter.name )} by. The sorts will be applied in the order in which they are arranged in the array.`, type: interfaceSortInput.List, }, }); } - const interfaceWhereFields = getWhereFields({ - typeName: interfaceRelationship.name.value, - fields: { - scalarFields: interfaceFields.scalarFields, - enumFields: interfaceFields.enumFields, - temporalFields: interfaceFields.temporalFields, - pointFields: interfaceFields.pointFields, - primitiveFields: interfaceFields.primitiveFields, - }, - isInterface: true, + // const interfaceWhereFields = getWhereFields({ + // typeName: interfaceEntityAdapter.name, + // fields: { + // scalarFields: interfaceFields.scalarFields, + // enumFields: interfaceFields.enumFields, + // temporalFields: interfaceFields.temporalFields, + // pointFields: interfaceFields.pointFields, + // primitiveFields: interfaceFields.primitiveFields, + // }, + // isInterface: true, + // features, + // }); + + const interfaceWhereFields = getWhereFieldsForAttributes({ + attributes: Array.from(interfaceEntityAdapter.attributes.values()), + userDefinedFieldDirectives, features, }); @@ -880,103 +895,102 @@ function makeAugmentedSchema( implementationsWhereInput, ] = ["ConnectInput", "DeleteInput", "DisconnectInput", "UpdateInput", "Where"].map((suffix) => composer.createInputTC({ - name: `${interfaceRelationship.name.value}Implementations${suffix}`, + name: `${interfaceEntityAdapter.name}Implementations${suffix}`, fields: {}, }) ) as [InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer]; composer.createInputTC({ - name: `${interfaceRelationship.name.value}Where`, + name: `${interfaceEntityAdapter.name}Where`, fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, }); - const interfaceCreateInput = composer.createInputTC(`${interfaceRelationship.name.value}CreateInput`); - - const interfaceRelationshipITC = composer.getOrCreateITC( - `${interfaceRelationship.name.value}UpdateInput`, - (tc) => { - tc.addFields({ - ...objectFieldsToUpdateInputFields([ - ...interfaceFields.primitiveFields, - ...interfaceFields.scalarFields, - ...interfaceFields.enumFields, - ...interfaceFields.temporalFields.filter((field) => !field.timestamps), - ...interfaceFields.pointFields, - ]), - _on: implementationsUpdateInput, - }); - } - ); + const interfaceCreateInput = composer.createInputTC(`${interfaceEntityAdapter.name}CreateInput`); + + const interfaceRelationshipITC = composer.getOrCreateITC(`${interfaceEntityAdapter.name}UpdateInput`, (tc) => { + tc.addFields({ + ...concreteEntityToUpdateInputFields( + interfaceEntityAdapter.updateInputFields, + userDefinedFieldDirectives + ), + _on: implementationsUpdateInput, + }); + }); addMathOperatorsToITC(interfaceRelationshipITC); - createRelationshipFields({ - relationshipFields: interfaceFields.relationFields, + // createRelationshipFields({ + // relationshipFields: interfaceFields.relationFields, + // schemaComposer: composer, + // composeNode: composeInterface, + // sourceName: interfaceRelationship.name.value, + // nodes, + // relationshipPropertyFields: relationshipFields, + // subgraph, + // }); + + createRelationshipFieldsFromConcreteEntityAdapter({ + entityAdapter: interfaceEntityAdapter, schemaComposer: composer, composeNode: composeInterface, - sourceName: interfaceRelationship.name.value, - nodes, - relationshipPropertyFields: relationshipFields, subgraph, + userDefinedFieldDirectives, }); relationships = [ ...relationships, - ...createConnectionFields({ - connectionFields: interfaceFields.connectionFields, + ...createConnectionFields2({ + entityAdapter: interfaceEntityAdapter, schemaComposer: composer, composeNode: composeInterface, - sourceName: interfaceRelationship.name.value, - nodes, - relationshipPropertyFields: relationshipFields, + userDefinedFieldDirectives, + relationshipFields, }), ]; - implementations.forEach((implementation) => { - const node = nodes.find((n) => n.name === implementation.name.value) as Node; - + interfaceEntityAdapter.concreteEntities.forEach((implementation) => { implementationsWhereInput.addFields({ - [implementation.name.value]: { - type: `${implementation.name.value}Where`, + [implementation.name]: { + type: `${implementation.name}Where`, }, }); - if (node.relationFields.length) { + if (implementation.relationships.size) { implementationsConnectInput.addFields({ - [implementation.name.value]: { - type: `[${implementation.name.value}ConnectInput!]`, + [implementation.name]: { + type: `[${implementation.name}ConnectInput!]`, }, }); implementationsDeleteInput.addFields({ - [implementation.name.value]: { - type: `[${implementation.name.value}DeleteInput!]`, + [implementation.name]: { + type: `[${implementation.name}DeleteInput!]`, }, }); implementationsDisconnectInput.addFields({ - [implementation.name.value]: { - type: `[${implementation.name.value}DisconnectInput!]`, + [implementation.name]: { + type: `[${implementation.name}DisconnectInput!]`, }, }); } interfaceCreateInput.addFields({ - [implementation.name.value]: { - type: `${implementation.name.value}CreateInput`, + [implementation.name]: { + type: `${implementation.name}CreateInput`, }, }); implementationsUpdateInput.addFields({ - [implementation.name.value]: { - type: `${implementation.name.value}UpdateInput`, + [implementation.name]: { + type: `${implementation.name}UpdateInput`, }, }); }); if (implementationsConnectInput.getFieldNames().length) { const interfaceConnectInput = composer.getOrCreateITC( - `${interfaceRelationship.name.value}ConnectInput`, + `${interfaceEntityAdapter.name}ConnectInput`, (tc) => { tc.addFields({ _on: implementationsConnectInput }); } @@ -985,18 +999,15 @@ function makeAugmentedSchema( } if (implementationsDeleteInput.getFieldNames().length) { - const interfaceDeleteInput = composer.getOrCreateITC( - `${interfaceRelationship.name.value}DeleteInput`, - (tc) => { - tc.addFields({ _on: implementationsDeleteInput }); - } - ); + const interfaceDeleteInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}DeleteInput`, (tc) => { + tc.addFields({ _on: implementationsDeleteInput }); + }); interfaceDeleteInput.setField("_on", implementationsDeleteInput); } if (implementationsDisconnectInput.getFieldNames().length) { const interfaceDisconnectInput = composer.getOrCreateITC( - `${interfaceRelationship.name.value}DisconnectInput`, + `${interfaceEntityAdapter.name}DisconnectInput`, (tc) => { tc.addFields({ _on: implementationsDisconnectInput }); } @@ -1004,8 +1015,8 @@ function makeAugmentedSchema( interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); } - ensureNonEmptyInput(composer, `${interfaceRelationship.name.value}CreateInput`); - ensureNonEmptyInput(composer, `${interfaceRelationship.name.value}UpdateInput`); + ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); + ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); [ implementationsConnectInput, implementationsDeleteInput, @@ -1220,7 +1231,7 @@ function makeAugmentedSchema( // }); createRelationshipFieldsFromConcreteEntityAdapter({ - concreteEntityAdapter, + entityAdapter: concreteEntityAdapter, schemaComposer: composer, composeNode, // sourceName: concreteEntityAdapter.name, @@ -1244,7 +1255,7 @@ function makeAugmentedSchema( relationships = [ ...relationships, ...createConnectionFields2({ - concreteEntityAdapter, + entityAdapter: concreteEntityAdapter, schemaComposer: composer, composeNode, userDefinedFieldDirectives, diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 8e7d981f92..15e6337853 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -1064,6 +1064,7 @@ describe("Comments", () => { } interface Production { + \\"\\"\\"\\"\\"\\" title: String! } diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 72e7b71f19..8c95ae0bd3 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -1408,7 +1408,9 @@ describe("Directive-preserve", () => { } interface Production { + \\"\\"\\"\\"\\"\\" actors: [Actor!]! + \\"\\"\\"\\"\\"\\" title: String! } @@ -2392,7 +2394,9 @@ describe("Directive-preserve", () => { } interface Production { + \\"\\"\\"\\"\\"\\" actors: [Actor!]! @deprecated(reason: \\"Do not use\\") + \\"\\"\\"\\"\\"\\" title: String! } diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 5404d474e4..7cfa68df27 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -7329,6 +7329,7 @@ describe("@filterable directive", () => { } interface Person { + \\"\\"\\"\\"\\"\\" username: String! } @@ -8183,6 +8184,7 @@ describe("@filterable directive", () => { } interface Person { + \\"\\"\\"\\"\\"\\" username: String! } @@ -9037,6 +9039,7 @@ describe("@filterable directive", () => { } interface Person { + \\"\\"\\"\\"\\"\\" username: String! } diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index cdd6324a53..657635a632 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -1430,7 +1430,9 @@ describe("@relationship directive, aggregate argument", () => { } interface Person { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: String! } @@ -1849,7 +1851,9 @@ describe("@relationship directive, aggregate argument", () => { } interface Person { + \\"\\"\\"\\"\\"\\" password: String! + \\"\\"\\"\\"\\"\\" username: 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 faa9b671f4..4c8c47c436 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -8712,6 +8712,7 @@ describe("Relationship nested operations", () => { } interface Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -9144,6 +9145,7 @@ describe("Relationship nested operations", () => { } interface Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -9581,6 +9583,7 @@ describe("Relationship nested operations", () => { } interface Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -10008,6 +10011,7 @@ describe("Relationship nested operations", () => { } interface Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -10445,6 +10449,7 @@ describe("Relationship nested operations", () => { } interface Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -10872,6 +10877,7 @@ describe("Relationship nested operations", () => { } interface Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -11393,6 +11399,7 @@ describe("Relationship nested operations", () => { } interface Person { + \\"\\"\\"\\"\\"\\" name: String } @@ -11913,6 +11920,7 @@ describe("Relationship nested operations", () => { } interface Person { + \\"\\"\\"\\"\\"\\" name: String } diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 64a4bf5b0c..fffeb95296 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -3012,7 +3012,9 @@ describe("@selectable", () => { } interface Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -3516,7 +3518,9 @@ describe("@selectable", () => { } interface Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 5037bd6c63..cbaffde9d8 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -5529,7 +5529,9 @@ describe("@settable", () => { } interface Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -6037,7 +6039,9 @@ describe("@settable", () => { } interface Production { + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -6655,9 +6659,12 @@ describe("@settable", () => { } interface Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } @@ -7572,9 +7579,12 @@ describe("@settable", () => { } interface Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" description: String + \\"\\"\\"\\"\\"\\" title: String! } diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 77aad7f794..aa97cde0fc 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -391,6 +391,7 @@ describe("Interface Relationships", () => { } interface Production { + \\"\\"\\"\\"\\"\\" title: String! } @@ -2167,7 +2168,9 @@ describe("Interface Relationships", () => { } interface Interface1 { + \\"\\"\\"\\"\\"\\" field1: String! + \\"\\"\\"\\"\\"\\" interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! interface2Connection(after: String, directed: Boolean = true, first: Int, where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -2333,6 +2336,7 @@ describe("Interface Relationships", () => { } interface Interface2 { + \\"\\"\\"\\"\\"\\" field2: String } @@ -3388,9 +3392,12 @@ describe("Interface Relationships", () => { } interface Content { + \\"\\"\\"\\"\\"\\" content: String + \\"\\"\\"\\"\\"\\" creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + \\"\\"\\"\\"\\"\\" id: ID } diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index c8dd1ceb0d..7da90cb885 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -115,7 +115,9 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } interface Profile { + \\"\\"\\"\\"\\"\\" id: ID! + \\"\\"\\"\\"\\"\\" userName: String! } diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 07731d1ddf..dc891841e3 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -382,8 +382,11 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } interface IProduct { + \\"\\"\\"\\"\\"\\" genre: Genre! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } @@ -1641,8 +1644,11 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } interface IProduct { + \\"\\"\\"\\"\\"\\" genre: Genre! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } @@ -2806,8 +2812,11 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } interface IProduct { + \\"\\"\\"\\"\\"\\" genre: Genre! + \\"\\"\\"\\"\\"\\" id: String! + \\"\\"\\"\\"\\"\\" name: String! } diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 2a51a2a71a..6b626ddef0 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -1621,6 +1621,7 @@ describe("Algebraic", () => { } interface Production { + \\"\\"\\"\\"\\"\\" viewers: Int! } diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index f02dc50767..444ebfe75f 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -5742,6 +5742,7 @@ describe("Subscriptions", () => { } interface Creature { + \\"\\"\\"\\"\\"\\" movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } @@ -6220,8 +6221,10 @@ describe("Subscriptions", () => { } interface Production { + \\"\\"\\"\\"\\"\\" director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + \\"\\"\\"\\"\\"\\" id: ID } From 3bad281663d64cd8166a0af2ba2615dea7c20adc Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 12 Sep 2023 13:40:48 +0100 Subject: [PATCH 058/162] add attributes to Operation class --- packages/graphql/src/schema-model/Operation.ts | 17 +++++++++++++++++ .../graphql/src/schema-model/generate-model.ts | 11 +++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/graphql/src/schema-model/Operation.ts b/packages/graphql/src/schema-model/Operation.ts index 729535df49..48cc127077 100644 --- a/packages/graphql/src/schema-model/Operation.ts +++ b/packages/graphql/src/schema-model/Operation.ts @@ -21,21 +21,28 @@ import { Neo4jGraphQLSchemaValidationError } from "../classes"; import type { Annotation, Annotations } from "./annotation/Annotation"; import { annotationToKey } from "./annotation/Annotation"; +import type { Attribute } from "./attribute/Attribute"; import type { Field } from "./attribute/Field"; export class Operation { public readonly name: string; // Currently only includes custom Cypher fields public readonly fields: Map = new Map(); + // TODO: fields vs attributes + // TODO: custom resolvers to be modelled here or filter just for cypher fields? + // should this class only contain cypher attributes?? where to keep the rest then? + public readonly attributes: Map = new Map(); public readonly annotations: Partial = {}; constructor({ name, fields = [], + attributes = [], annotations = [], }: { name: string; fields?: Field[]; + attributes?: Attribute[]; annotations?: Annotation[]; }) { this.name = name; @@ -43,6 +50,9 @@ export class Operation { for (const field of fields) { this.addFields(field); } + for (const attribute of attributes) { + this.addAttribute(attribute); + } for (const annotation of annotations) { this.addAnnotation(annotation); @@ -60,6 +70,13 @@ export class Operation { this.fields.set(field.name, field); } + private addAttribute(attribute: Attribute): void { + if (this.attributes.has(attribute.name)) { + throw new Neo4jGraphQLSchemaValidationError(`Attribute ${attribute.name} already exists in ${this.name}`); + } + this.attributes.set(attribute.name, attribute); + } + private addAnnotation(annotation: Annotation): void { const annotationKey = annotationToKey(annotation); const existingAnnotation = this.annotations[annotationKey]; diff --git a/packages/graphql/src/schema-model/generate-model.ts b/packages/graphql/src/schema-model/generate-model.ts index caa2076e65..249b1b7985 100644 --- a/packages/graphql/src/schema-model/generate-model.ts +++ b/packages/graphql/src/schema-model/generate-model.ts @@ -49,7 +49,7 @@ export function generateModel(document: DocumentNode): Neo4jGraphQLSchemaModel { const definitionCollection: DefinitionCollection = getDefinitionCollection(document); const operations: Operations = definitionCollection.operations.reduce((acc, definition): Operations => { - acc[definition.name.value] = generateOperation(definition); + acc[definition.name.value] = generateOperation(definition, definitionCollection); return acc; }, {}); @@ -456,12 +456,19 @@ function createSchemaModelAnnotations(directives: readonly DirectiveNode[]): Ann return schemaModelAnnotations.concat(annotations); } -function generateOperation(definition: ObjectTypeDefinitionNode): Operation { +function generateOperation( + definition: ObjectTypeDefinitionNode, + definitionCollection: DefinitionCollection +): Operation { const fields = (definition.fields || []).map((fieldDefinition) => parseField(fieldDefinition)); + const attributes = (definition.fields || []).map((fieldDefinition) => + parseAttribute(fieldDefinition, undefined, definitionCollection) + ); return new Operation({ name: definition.name.value, fields: filterTruthy(fields), + attributes: filterTruthy(attributes) as Attribute[], annotations: createEntityAnnotations(definition.directives || []), }); } From 71bc38159144cf59b7377eedce4eabb48b9352bf Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 12 Sep 2023 13:41:34 +0100 Subject: [PATCH 059/162] add InputType in AttributeType type --- .../schema-model/attribute/AttributeType.ts | 20 ++++++++++++++++++- .../parser/definition-collection.ts | 14 +++++++++---- .../schema-model/parser/parse-attribute.ts | 6 ++++++ 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/AttributeType.ts b/packages/graphql/src/schema-model/attribute/AttributeType.ts index cd40f24ab5..35ed99b3f8 100644 --- a/packages/graphql/src/schema-model/attribute/AttributeType.ts +++ b/packages/graphql/src/schema-model/attribute/AttributeType.ts @@ -143,4 +143,22 @@ export class InterfaceType { } } -export type AttributeType = ScalarType | UserScalarType | ObjectType | ListType | EnumType | UnionType | InterfaceType; +export class InputType { + public name: string; + public isRequired: boolean; + + constructor(name: string, isRequired: boolean) { + this.name = name; + this.isRequired = isRequired; + } +} + +export type AttributeType = + | ScalarType + | UserScalarType + | ObjectType + | ListType + | EnumType + | UnionType + | InterfaceType + | InputType; diff --git a/packages/graphql/src/schema-model/parser/definition-collection.ts b/packages/graphql/src/schema-model/parser/definition-collection.ts index be1dc5ec3d..c73a08d701 100644 --- a/packages/graphql/src/schema-model/parser/definition-collection.ts +++ b/packages/graphql/src/schema-model/parser/definition-collection.ts @@ -22,6 +22,7 @@ import type { DirectiveNode, DocumentNode, EnumTypeDefinitionNode, + InputObjectTypeDefinitionNode, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode, ScalarTypeDefinitionNode, @@ -41,6 +42,7 @@ export type DefinitionCollection = { unionTypes: Map; directives: Map; relationshipProperties: Map; + inputTypes: Map; schemaExtension: SchemaExtensionNode | undefined; jwtPayload: ObjectTypeDefinitionNode | undefined; interfaceToImplementingTypeNamesMap: Map; // TODO: change this logic, this was the logic contained in initInterfacesToTypeNamesMap but potentially can be simplified now. @@ -68,9 +70,7 @@ export function getDefinitionCollection(document: DocumentNode): DefinitionColle definitionCollection.enumTypes.set(definition.name.value, definition); break; case Kind.INTERFACE_TYPE_DEFINITION: - if ( - findDirective(definition.directives, relationshipPropertiesDirective.name) - ) { + if (findDirective(definition.directives, relationshipPropertiesDirective.name)) { definitionCollection.relationshipProperties.set(definition.name.value, definition); } else { definitionCollection.interfaceTypes.set(definition.name.value, definition); @@ -83,10 +83,15 @@ export function getDefinitionCollection(document: DocumentNode): DefinitionColle case Kind.UNION_TYPE_DEFINITION: definitionCollection.unionTypes.set(definition.name.value, definition); break; + case Kind.INPUT_OBJECT_TYPE_DEFINITION: + definitionCollection.inputTypes.set(definition.name.value, definition); + break; case Kind.SCHEMA_EXTENSION: // This is based on the assumption that mergeTypeDefs is used and therefore there is only one schema extension (merged), this assumption is currently used as well for object extensions. definitionCollection.schemaExtension = definition; - definitionCollection.schemaDirectives = definition.directives ? Array.from(definition.directives) : []; + definitionCollection.schemaDirectives = definition.directives + ? Array.from(definition.directives) + : []; break; } @@ -100,6 +105,7 @@ export function getDefinitionCollection(document: DocumentNode): DefinitionColle directives: new Map(), unionTypes: new Map(), relationshipProperties: new Map(), + inputTypes: new Map(), schemaExtension: undefined, jwtPayload: undefined, interfaceToImplementingTypeNamesMap: new Map(), diff --git a/packages/graphql/src/schema-model/parser/parse-attribute.ts b/packages/graphql/src/schema-model/parser/parse-attribute.ts index 853e7c9d8f..91de0fe3a9 100644 --- a/packages/graphql/src/schema-model/parser/parse-attribute.ts +++ b/packages/graphql/src/schema-model/parser/parse-attribute.ts @@ -24,6 +24,7 @@ import { Argument } from "../argument/Argument"; import { Attribute } from "../attribute/Attribute"; import type { AttributeType, Neo4jGraphQLScalarType } from "../attribute/AttributeType"; import { + InputType, EnumType, GraphQLBuiltInScalarType, InterfaceType, @@ -135,6 +136,8 @@ function parseTypeNode( return new UnionType(typeNode.name.value, isRequired); } else if (isInterface(definitionCollection, typeNode.name.value)) { return new InterfaceType(typeNode.name.value, isRequired); + } else if (isInput(definitionCollection, typeNode.name.value)) { + return new InputType(typeNode.name.value, isRequired); } else { throw new Error(`Error while parsing Attribute with name: ${typeNode.name.value}`); } @@ -168,6 +171,9 @@ function isUserScalar(definitionCollection: DefinitionCollection, name: string) function isObject(definitionCollection, name: string) { return definitionCollection.nodes.has(name); } +function isInput(definitionCollection: DefinitionCollection, name: string) { + return definitionCollection.inputTypes.has(name); +} function isPoint(value: string): boolean { return isNeo4jGraphQLSpatialType(value) && value === Neo4jGraphQLSpatialType.Point; From 08d8462c455457a5726d3c82d3807fbcb63f867c Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 12 Sep 2023 13:42:15 +0100 Subject: [PATCH 060/162] create OperationAdapter class and Attribute category --- .../src/schema-model/OperationAdapter.ts | 46 +++++++++++++++++++ .../model-adapters/AttributeAdapter.ts | 24 ++++++++++ 2 files changed, 70 insertions(+) create mode 100644 packages/graphql/src/schema-model/OperationAdapter.ts diff --git a/packages/graphql/src/schema-model/OperationAdapter.ts b/packages/graphql/src/schema-model/OperationAdapter.ts new file mode 100644 index 0000000000..577901da70 --- /dev/null +++ b/packages/graphql/src/schema-model/OperationAdapter.ts @@ -0,0 +1,46 @@ +/* + * 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 { Annotations } from "./annotation/Annotation"; +import type { Attribute } from "./attribute/Attribute"; +import { AttributeAdapter } from "./attribute/model-adapters/AttributeAdapter"; +import type { Operation } from "./Operation"; + +export class OperationAdapter { + public readonly name: string; + public readonly attributes: Map = new Map(); + public readonly annotations: Partial = {}; + + constructor(entity: Operation) { + this.name = entity.name; + this.initAttributes(entity.attributes); + this.annotations = entity.annotations; + } + + private initAttributes(attributes: Map) { + for (const [attributeName, attribute] of attributes.entries()) { + const attributeAdapter = new AttributeAdapter(attribute); + this.attributes.set(attributeName, attributeAdapter); + } + } + + public get objectFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isObjectField()); + } +} diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index fd902d1469..4baeac6af8 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -135,6 +135,30 @@ export class AttributeAdapter { ); } + /** + * Previously defined as: + * ...objectFields.enumFields, + ...objectFields.interfaceFields, + ...objectFields.primitiveFields, + ...objectFields.relationFields, + ...objectFields.scalarFields, + ...objectFields.unionFields, + ...objectFields.objectFields, + ...objectFields.temporalFields, + */ + isRootTypeObjectField(): boolean { + return ( + this.isGraphQLBuiltInScalar() || + this.isEnum() || + this.isUserScalar() || + this.isInterface() || + this.isObject() || + this.isUnion() || + this.isTemporal() || + this.isBigInt() + ); + } + /* return [ ...obj.primitiveFields, From a2880ebd68f26f13b70cfa5a367cd86ae56828ed Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 12 Sep 2023 13:42:39 +0100 Subject: [PATCH 061/162] create cypherResolver2 function --- .../src/schema/resolvers/field/cypher.ts | 69 ++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/schema/resolvers/field/cypher.ts b/packages/graphql/src/schema/resolvers/field/cypher.ts index aa31048641..a450fb4d2d 100644 --- a/packages/graphql/src/schema/resolvers/field/cypher.ts +++ b/packages/graphql/src/schema/resolvers/field/cypher.ts @@ -20,12 +20,13 @@ import type { GraphQLResolveInfo } from "graphql"; import { execute } from "../../../utils"; import type { CypherField } from "../../../types"; -import { graphqlArgsToCompose } from "../../to-compose"; +import { graphqlArgsToCompose, graphqlArgsToCompose2 } from "../../to-compose"; import { isNeoInt } from "../../../utils/utils"; import { translateTopLevelCypher } from "../../../translate"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; +import type { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; export function cypherResolver({ field, @@ -92,3 +93,69 @@ export function cypherResolver({ args: graphqlArgsToCompose(field.arguments), }; } +export function cypherResolver2({ + field, + attributeAdapter, + type, +}: { + field: CypherField; // TODO: make this go away + attributeAdapter: AttributeAdapter; + type: "Query" | "Mutation"; +}) { + async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { + const resolveTree = getNeo4jResolveTree(info); + const statement = attributeAdapter.annotations.cypher?.statement as string; // this is known because of how we get here + + (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; + + const { cypher, params } = translateTopLevelCypher({ + context: context as Neo4jGraphQLTranslationContext, + field, + args, + type, + statement, + }); + + const executeResult = await execute({ + cypher, + params, + defaultAccessMode: type === "Query" ? "READ" : "WRITE", + context, + info, + }); + + const values = executeResult.result.records.map((record) => { + const value = record.get(0); + + if (["number", "string", "boolean"].includes(typeof value)) { + return value; + } + + if (!value) { + return undefined; + } + + if (isNeoInt(value)) { + return Number(value); + } + + if (value.identity && value.labels && value.properties) { + return value.properties; + } + + return value; + }); + + if (!attributeAdapter.isList()) { + return values[0]; + } + + return values; + } + + return { + type: attributeAdapter.getTypePrettyName(), + resolve, + args: graphqlArgsToCompose2(attributeAdapter.args), + }; +} From 6f97b13faeb03d36cd7b576156fc330d80f8dcbb Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 12 Sep 2023 13:43:28 +0100 Subject: [PATCH 062/162] refactor toplevel cypher fields types in make-augmented-schema --- .../src/schema/new-make-augmented-schema.ts | 84 +++++++++++-------- 1 file changed, 50 insertions(+), 34 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 06974f73e5..9c038b7d50 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -39,7 +39,7 @@ import { SchemaComposer } from "graphql-compose"; import pluralize from "pluralize"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; import { augmentFulltextSchema2 } from "./augment/fulltext"; -import { cypherResolver } from "./resolvers/field/cypher"; +import { cypherResolver2 } from "./resolvers/field/cypher"; import { numericalResolver } from "./resolvers/field/numerical"; import { createResolver2 } from "./resolvers/mutation/create"; import { deleteResolver2 } from "./resolvers/mutation/delete"; @@ -68,7 +68,6 @@ import { concreteEntityToCreateInputFields, concreteEntityToUpdateInputFields, graphqlDirectivesToCompose, - objectFieldsToComposeFields, relationshipAdapterToComposeFields, } from "./to-compose"; @@ -95,6 +94,8 @@ import { PageInfo } from "../graphql/objects/PageInfo"; import { Point } from "../graphql/objects/Point"; import { UpdateInfo } from "../graphql/objects/UpdateInfo"; import type { Neo4jGraphQLSchemaModel } from "../schema-model/Neo4jGraphQLSchemaModel"; +import type { Operation } from "../schema-model/Operation"; +import { OperationAdapter } from "../schema-model/OperationAdapter"; import { ConcreteEntity } from "../schema-model/entity/ConcreteEntity"; import { InterfaceEntity } from "../schema-model/entity/InterfaceEntity"; import type { UnionEntity } from "../schema-model/entity/UnionEntity"; @@ -102,7 +103,7 @@ import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/Con import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { Neo4jFeaturesSettings } from "../types"; +import type { CypherField, Neo4jFeaturesSettings } from "../types"; import { isInArray } from "../utils/is-in-array"; import { addArrayMethodsToITC2 } from "./array-methods"; import { createConnectionFields2 } from "./create-connection-fields"; @@ -1379,45 +1380,60 @@ function makeAugmentedSchema( }); } + // TODO: test this - toplevel cypher fields of type Point? ["Mutation", "Query"].forEach((type) => { const objectComposer: ObjectTypeComposer = composer[type]; - const cypherType: ObjectTypeDefinitionNode = customResolvers[`customCypher${type}`]; - - if (cypherType) { - const objectFields = getObjFieldMeta({ - obj: cypherType, - scalars: scalarTypes, - enums: enumTypes, - interfaces: filteredInterfaceTypes, - unions: unionTypes, - objects: objectTypes, - callbacks, - }); - const objectComposeFields = objectFieldsToComposeFields([ - ...objectFields.enumFields, - ...objectFields.interfaceFields, - ...objectFields.primitiveFields, - ...objectFields.relationFields, - ...objectFields.scalarFields, - ...objectFields.unionFields, - ...objectFields.objectFields, - ...objectFields.temporalFields, - ]); - - objectComposer.addFields(objectComposeFields); - - objectFields.cypherFields.forEach((field) => { - const customResolver = cypherResolver({ + const operation: Operation | undefined = schemaModel.operations[type]; + if (!operation) { + return; + } + const operationAdapter = new OperationAdapter(operation); + + const definitionNode = definitionNodes.operations.find( + (d) => d.name.value === type + ) as ObjectTypeDefinitionNode; + const userDefinedDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + + // TODO: this check is for getObjFieldMeta + // this should technically be implied. TBD in Operations class + const hasCypherAttributes = Array.from(operationAdapter.attributes.values()).find( + (attribute) => attribute.annotations.cypher !== undefined + ); + if (!hasCypherAttributes) { + return; + } + // needed for compatibility with translation layer + const objectFields = getObjFieldMeta({ + obj: customResolvers[`customCypher${type}`], + scalars: scalarTypes, + enums: enumTypes, + interfaces: filteredInterfaceTypes, + unions: unionTypes, + objects: objectTypes, + callbacks, + }); + + // TODO: extend this loop to do the non-cypher field logic as well + for (const attributeAdapter of operationAdapter.attributes.values()) { + const cypherAnnotation = attributeAdapter.annotations.cypher; + if (cypherAnnotation) { + // needed for compatibility with translation layer + const field = objectFields.cypherFields.find( + (f) => f.fieldName === attributeAdapter.name + ) as CypherField; + const customResolver = cypherResolver2({ field, - statement: field.statement, + attributeAdapter, type: type as "Query" | "Mutation", }); - const composedField = objectFieldsToComposeFields([field])[field.fieldName]; + const composedField = attributeAdapterToComposeFields([attributeAdapter], userDefinedDirectives)[ + attributeAdapter.name + ]; - objectComposer.addFields({ [field.fieldName]: { ...composedField, ...customResolver } }); - }); + objectComposer.addFields({ [attributeAdapter.name]: { ...composedField, ...customResolver } }); + } } }); From 23d0e40aba2584b2752d0e32a55a92a036e00ffc Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 12 Sep 2023 13:43:36 +0100 Subject: [PATCH 063/162] update tests with descriptions --- packages/graphql/tests/schema/custom-mutations.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index 66509b6c01..32571f8111 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -151,6 +151,7 @@ describe("Custom-mutations", () => { type Mutation { createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! deleteMovies(where: MovieWhere): DeleteInfo! + \\"\\"\\"\\"\\"\\" testCypherMutation(input: ExampleInput): String testMutation(input: ExampleInput): String updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! @@ -168,6 +169,7 @@ describe("Custom-mutations", () => { movies(options: MovieOptions, where: MovieWhere): [Movie!]! moviesAggregate(where: MovieWhere): MovieAggregateSelection! moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + \\"\\"\\"\\"\\"\\" testCypherQuery(input: ExampleInput): String testQuery(input: ExampleInput): String } From ecc8b9eb2e7f4c75d5239149a1a089f675b2a0c4 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 12 Sep 2023 17:59:42 +0200 Subject: [PATCH 064/162] feat: add InputType to AttributeAdapter --- .../attribute/model-adapters/AttributeAdapter.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 4baeac6af8..0b29bb7442 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -25,6 +25,7 @@ import type { AttributeType } from "../AttributeType"; import { EnumType, GraphQLBuiltInScalarType, + InputType, InterfaceType, ListType, Neo4jCartesianPointType, @@ -406,6 +407,11 @@ export class AttributeAdapter { return this.type instanceof ListType; } + isInput(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof InputType; + } + isUserScalar(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof UserScalarType; @@ -453,7 +459,8 @@ export class AttributeAdapter { this.isGraphQLBuiltInScalar(options) || this.isTemporal(options) || this.isBigInt(options) || - this.isUserScalar(options) + this.isUserScalar(options) || + this.isInput(options) ); } From 9d3de108f917aed5275f279126ccf66cf300a4fe Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 12 Sep 2023 18:00:03 +0200 Subject: [PATCH 065/162] feat: add isSpatial to isOnCreateField --- .../schema-model/attribute/model-adapters/AttributeAdapter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 0b29bb7442..2fd9844411 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -217,7 +217,9 @@ export class AttributeAdapter { ] */ isOnCreateField(): boolean { - return this.isNonGeneratedField() && (this.isScalar() || this.isEnum() || this.isAbstract()); + return ( + this.isNonGeneratedField() && (this.isScalar() || this.isSpatial() || this.isEnum() || this.isAbstract()) + ); } /** From 0ca341e0c5131817163208c77457f21c0a831e2a Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 12 Sep 2023 17:15:08 +0100 Subject: [PATCH 066/162] update comment --- packages/graphql/src/schema/new-make-augmented-schema.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 9c038b7d50..1d7d5b26d6 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -799,7 +799,6 @@ function makeAugmentedSchema( const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); // TODO - // 1. use interfaceEntityAdapter everywhere // 2. move this to a separate function // 3. call separate function from inside the nodes.forEach(), for each relationship where relationship.target is Interface, after doing the relationshipProperties interfaces From 3e133aeae7be9b12e983f4246ba1162040340e6c Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 12 Sep 2023 18:13:19 +0100 Subject: [PATCH 067/162] extract interfaceRelationships type generation to separate function --- .../src/schema/new-make-augmented-schema.ts | 443 +++++++++--------- 1 file changed, 222 insertions(+), 221 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 1d7d5b26d6..c8181c7068 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -786,18 +786,18 @@ function makeAugmentedSchema( interfaceRelationships.forEach((interfaceRelationship) => { const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); - - // We wanted to get the userDefinedDirectives - const definitionNode = definitionNodes.interfaceTypes.find( - (type) => type.name.value === interfaceEntityAdapter.name - ); - if (!definitionNode) { - console.error(`Definition node not found for ${interfaceEntityAdapter.name}`); - return; + const updatedRelationships = doForInterfacesThatAreTargetOfARelationship({ + composer, + interfaceEntityAdapter, + definitionNodes, + subgraph, + relationships, + relationshipFields, + }); + if (updatedRelationships) { + relationships = updatedRelationships; } - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - // TODO // 2. move this to a separate function // 3. call separate function from inside the nodes.forEach(), for each relationship where relationship.target is Interface, after doing the relationshipProperties interfaces @@ -812,218 +812,7 @@ function makeAugmentedSchema( obj: interfaceRelationship, callbacks, }); - - const objectComposeFields = attributeAdapterToComposeFields( - Array.from(interfaceEntityAdapter.attributes.values()), - userDefinedFieldDirectives - ); - - const composeInterface = composer.createInterfaceTC({ - name: interfaceEntityAdapter.name, - fields: objectComposeFields, - }); - interfaceCommonFields.set(interfaceEntityAdapter.name, interfaceFields); - - const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Options`, (tc) => { - tc.addFields({ - limit: "Int", - offset: "Int", - }); - }); - - const interfaceSortableFields = interfaceEntityAdapter.sortableFields.reduce( - (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { - const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; - return { - ...res, - [attributeAdapter.name]: { - type: "SortDirection", - directives: graphqlDirectivesToCompose( - userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) - ), - }, - }; - }, - {} - ); - - if (Object.keys(interfaceSortableFields).length) { - const interfaceSortInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Sort`, (tc) => { - tc.addFields(interfaceSortableFields); - tc.setDescription( - `Fields to sort ${pluralize( - interfaceEntityAdapter.name - )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceEntityAdapter.name}Sort`} object.` - ); - }); - - interfaceOptionsInput.addFields({ - sort: { - description: `Specify one or more ${`${interfaceEntityAdapter.name}Sort`} objects to sort ${pluralize( - interfaceEntityAdapter.name - )} by. The sorts will be applied in the order in which they are arranged in the array.`, - type: interfaceSortInput.List, - }, - }); - } - - // const interfaceWhereFields = getWhereFields({ - // typeName: interfaceEntityAdapter.name, - // fields: { - // scalarFields: interfaceFields.scalarFields, - // enumFields: interfaceFields.enumFields, - // temporalFields: interfaceFields.temporalFields, - // pointFields: interfaceFields.pointFields, - // primitiveFields: interfaceFields.primitiveFields, - // }, - // isInterface: true, - // features, - // }); - - const interfaceWhereFields = getWhereFieldsForAttributes({ - attributes: Array.from(interfaceEntityAdapter.attributes.values()), - userDefinedFieldDirectives, - features, - }); - - const [ - implementationsConnectInput, - implementationsDeleteInput, - implementationsDisconnectInput, - implementationsUpdateInput, - implementationsWhereInput, - ] = ["ConnectInput", "DeleteInput", "DisconnectInput", "UpdateInput", "Where"].map((suffix) => - composer.createInputTC({ - name: `${interfaceEntityAdapter.name}Implementations${suffix}`, - fields: {}, - }) - ) as [InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer]; - - composer.createInputTC({ - name: `${interfaceEntityAdapter.name}Where`, - fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, - }); - - const interfaceCreateInput = composer.createInputTC(`${interfaceEntityAdapter.name}CreateInput`); - - const interfaceRelationshipITC = composer.getOrCreateITC(`${interfaceEntityAdapter.name}UpdateInput`, (tc) => { - tc.addFields({ - ...concreteEntityToUpdateInputFields( - interfaceEntityAdapter.updateInputFields, - userDefinedFieldDirectives - ), - _on: implementationsUpdateInput, - }); - }); - - addMathOperatorsToITC(interfaceRelationshipITC); - - // createRelationshipFields({ - // relationshipFields: interfaceFields.relationFields, - // schemaComposer: composer, - // composeNode: composeInterface, - // sourceName: interfaceRelationship.name.value, - // nodes, - // relationshipPropertyFields: relationshipFields, - // subgraph, - // }); - - createRelationshipFieldsFromConcreteEntityAdapter({ - entityAdapter: interfaceEntityAdapter, - schemaComposer: composer, - composeNode: composeInterface, - subgraph, - userDefinedFieldDirectives, - }); - - relationships = [ - ...relationships, - ...createConnectionFields2({ - entityAdapter: interfaceEntityAdapter, - schemaComposer: composer, - composeNode: composeInterface, - userDefinedFieldDirectives, - relationshipFields, - }), - ]; - - interfaceEntityAdapter.concreteEntities.forEach((implementation) => { - implementationsWhereInput.addFields({ - [implementation.name]: { - type: `${implementation.name}Where`, - }, - }); - - if (implementation.relationships.size) { - implementationsConnectInput.addFields({ - [implementation.name]: { - type: `[${implementation.name}ConnectInput!]`, - }, - }); - - implementationsDeleteInput.addFields({ - [implementation.name]: { - type: `[${implementation.name}DeleteInput!]`, - }, - }); - - implementationsDisconnectInput.addFields({ - [implementation.name]: { - type: `[${implementation.name}DisconnectInput!]`, - }, - }); - } - - interfaceCreateInput.addFields({ - [implementation.name]: { - type: `${implementation.name}CreateInput`, - }, - }); - - implementationsUpdateInput.addFields({ - [implementation.name]: { - type: `${implementation.name}UpdateInput`, - }, - }); - }); - - if (implementationsConnectInput.getFieldNames().length) { - const interfaceConnectInput = composer.getOrCreateITC( - `${interfaceEntityAdapter.name}ConnectInput`, - (tc) => { - tc.addFields({ _on: implementationsConnectInput }); - } - ); - interfaceConnectInput.setField("_on", implementationsConnectInput); - } - - if (implementationsDeleteInput.getFieldNames().length) { - const interfaceDeleteInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}DeleteInput`, (tc) => { - tc.addFields({ _on: implementationsDeleteInput }); - }); - interfaceDeleteInput.setField("_on", implementationsDeleteInput); - } - - if (implementationsDisconnectInput.getFieldNames().length) { - const interfaceDisconnectInput = composer.getOrCreateITC( - `${interfaceEntityAdapter.name}DisconnectInput`, - (tc) => { - tc.addFields({ _on: implementationsDisconnectInput }); - } - ); - interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); - } - - ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); - ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); - [ - implementationsConnectInput, - implementationsDeleteInput, - implementationsDisconnectInput, - implementationsUpdateInput, - implementationsWhereInput, - ].forEach((c) => ensureNonEmptyInput(composer, c)); }); nodes.forEach((node) => { @@ -1649,3 +1438,215 @@ function doForRelationshipPropertiesInterface( fields: concreteEntityToCreateInputFields(relationship.createInputFields, userDefinedFieldDirectives), }); } + +function doForInterfacesThatAreTargetOfARelationship({ + composer, + interfaceEntityAdapter, + definitionNodes, + features, + subgraph, + relationships, + relationshipFields, +}: { + composer: SchemaComposer; + interfaceEntityAdapter: InterfaceEntityAdapter; + definitionNodes: DefinitionNodes; + features?: Neo4jFeaturesSettings; + subgraph?: Subgraph; + relationships: Relationship[]; + relationshipFields: Map; +}) { + // We wanted to get the userDefinedDirectives + const definitionNode = definitionNodes.interfaceTypes.find( + (type) => type.name.value === interfaceEntityAdapter.name + ); + if (!definitionNode) { + console.error(`Definition node not found for ${interfaceEntityAdapter.name}`); + return; + } + + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + + const objectComposeFields = attributeAdapterToComposeFields( + Array.from(interfaceEntityAdapter.attributes.values()), + userDefinedFieldDirectives + ); + + const composeInterface = composer.createInterfaceTC({ + name: interfaceEntityAdapter.name, + fields: objectComposeFields, + }); + + const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Options`, (tc) => { + tc.addFields({ + limit: "Int", + offset: "Int", + }); + }); + + const interfaceSortableFields = interfaceEntityAdapter.sortableFields.reduce( + (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; + return { + ...res, + [attributeAdapter.name]: { + type: "SortDirection", + directives: graphqlDirectivesToCompose( + userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) + ), + }, + }; + }, + {} + ); + + if (Object.keys(interfaceSortableFields).length) { + const interfaceSortInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Sort`, (tc) => { + tc.addFields(interfaceSortableFields); + tc.setDescription( + `Fields to sort ${pluralize( + interfaceEntityAdapter.name + )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceEntityAdapter.name}Sort`} object.` + ); + }); + + interfaceOptionsInput.addFields({ + sort: { + description: `Specify one or more ${`${interfaceEntityAdapter.name}Sort`} objects to sort ${pluralize( + interfaceEntityAdapter.name + )} by. The sorts will be applied in the order in which they are arranged in the array.`, + type: interfaceSortInput.List, + }, + }); + } + + const interfaceWhereFields = getWhereFieldsForAttributes({ + attributes: Array.from(interfaceEntityAdapter.attributes.values()), + userDefinedFieldDirectives, + features, + }); + + const [ + implementationsConnectInput, + implementationsDeleteInput, + implementationsDisconnectInput, + implementationsUpdateInput, + implementationsWhereInput, + ] = ["ConnectInput", "DeleteInput", "DisconnectInput", "UpdateInput", "Where"].map((suffix) => + composer.createInputTC({ + name: `${interfaceEntityAdapter.name}Implementations${suffix}`, + fields: {}, + }) + ) as [InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer]; + + composer.createInputTC({ + name: `${interfaceEntityAdapter.name}Where`, + fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, + }); + + const interfaceCreateInput = composer.createInputTC(`${interfaceEntityAdapter.name}CreateInput`); + + const interfaceRelationshipITC = composer.getOrCreateITC(`${interfaceEntityAdapter.name}UpdateInput`, (tc) => { + tc.addFields({ + ...concreteEntityToUpdateInputFields(interfaceEntityAdapter.updateInputFields, userDefinedFieldDirectives), + _on: implementationsUpdateInput, + }); + }); + + addMathOperatorsToITC(interfaceRelationshipITC); + + createRelationshipFieldsFromConcreteEntityAdapter({ + entityAdapter: interfaceEntityAdapter, + schemaComposer: composer, + composeNode: composeInterface, + subgraph, + userDefinedFieldDirectives, + }); + + relationships = [ + ...relationships, + ...createConnectionFields2({ + entityAdapter: interfaceEntityAdapter, + schemaComposer: composer, + composeNode: composeInterface, + userDefinedFieldDirectives, + relationshipFields, + }), + ]; + + interfaceEntityAdapter.concreteEntities.forEach((implementation) => { + implementationsWhereInput.addFields({ + [implementation.name]: { + type: `${implementation.name}Where`, + }, + }); + + if (implementation.relationships.size) { + implementationsConnectInput.addFields({ + [implementation.name]: { + type: `[${implementation.name}ConnectInput!]`, + }, + }); + + implementationsDeleteInput.addFields({ + [implementation.name]: { + type: `[${implementation.name}DeleteInput!]`, + }, + }); + + implementationsDisconnectInput.addFields({ + [implementation.name]: { + type: `[${implementation.name}DisconnectInput!]`, + }, + }); + } + + interfaceCreateInput.addFields({ + [implementation.name]: { + type: `${implementation.name}CreateInput`, + }, + }); + + implementationsUpdateInput.addFields({ + [implementation.name]: { + type: `${implementation.name}UpdateInput`, + }, + }); + }); + + if (implementationsConnectInput.getFieldNames().length) { + const interfaceConnectInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}ConnectInput`, (tc) => { + tc.addFields({ _on: implementationsConnectInput }); + }); + interfaceConnectInput.setField("_on", implementationsConnectInput); + } + + if (implementationsDeleteInput.getFieldNames().length) { + const interfaceDeleteInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}DeleteInput`, (tc) => { + tc.addFields({ _on: implementationsDeleteInput }); + }); + interfaceDeleteInput.setField("_on", implementationsDeleteInput); + } + + if (implementationsDisconnectInput.getFieldNames().length) { + const interfaceDisconnectInput = composer.getOrCreateITC( + `${interfaceEntityAdapter.name}DisconnectInput`, + (tc) => { + tc.addFields({ _on: implementationsDisconnectInput }); + } + ); + interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); + } + + ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); + ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); + [ + implementationsConnectInput, + implementationsDeleteInput, + implementationsDisconnectInput, + implementationsUpdateInput, + implementationsWhereInput, + ].forEach((c) => ensureNonEmptyInput(composer, c)); + + return relationships; +} From 8b6b67bdac73b8fe0ec50b545261b5cbb0ff1aff Mon Sep 17 00:00:00 2001 From: a-alle Date: Wed, 13 Sep 2023 11:13:12 +0100 Subject: [PATCH 068/162] refactor make-augmented-schema order and fix the last schema error --- .../src/schema/new-make-augmented-schema.ts | 37 ++++++++++--------- .../schema/interface-relationships.test.ts | 5 +++ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index c8181c7068..424c91f36c 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -706,6 +706,7 @@ function makeAugmentedSchema( // helper to only create relationshipProperties Interface types once, even if multiple relationships reference it const seenRelationshipPropertiesInterfaces = new Set(); + // TODO: keeping this for backwards compatibility on translation layer relationshipProperties.forEach((relationship) => { const relFields = getObjFieldMeta({ enums: enumTypes, @@ -783,6 +784,24 @@ function makeAugmentedSchema( */ }); + // this is the new way for the above forEach + schemaModel.concreteEntities.forEach((concreteEntity) => { + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); + + for (const relationship of concreteEntityAdapter.relationships.values()) { + { + if ( + !relationship.propertiesTypeName || + seenRelationshipPropertiesInterfaces.has(relationship.propertiesTypeName) + ) { + continue; + } + doForRelationshipPropertiesInterface(composer, relationship, definitionNodes, features); + seenRelationshipPropertiesInterfaces.add(relationship.propertiesTypeName); + } + } + }); + interfaceRelationships.forEach((interfaceRelationship) => { const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); @@ -797,11 +816,6 @@ function makeAugmentedSchema( if (updatedRelationships) { relationships = updatedRelationships; } - - // TODO - // 2. move this to a separate function - // 3. call separate function from inside the nodes.forEach(), for each relationship where relationship.target is Interface, after doing the relationshipProperties interfaces - // TODO: Remove this const interfaceFields = getObjFieldMeta({ enums: enumTypes, @@ -819,19 +833,6 @@ function makeAugmentedSchema( const concreteEntity = schemaModel.getEntity(node.name) as ConcreteEntity; const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - for (const relationship of concreteEntityAdapter.relationships.values()) { - { - if ( - !relationship.propertiesTypeName || - seenRelationshipPropertiesInterfaces.has(relationship.propertiesTypeName) - ) { - continue; - } - doForRelationshipPropertiesInterface(composer, relationship, definitionNodes, features); - seenRelationshipPropertiesInterfaces.add(relationship.propertiesTypeName); - } - } - // We wanted to get the userDefinedDirectives const definitionNode = definitionNodes.objectTypes.find( (type) => type.name.value === concreteEntityAdapter.name diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index aa97cde0fc..1fb619e44a 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -622,6 +622,7 @@ describe("Interface Relationships", () => { } interface ActedIn { + \\"\\"\\"\\"\\"\\" screenTime: Int! } @@ -712,6 +713,7 @@ describe("Interface Relationships", () => { type ActorActedInRelationship implements ActedIn { cursor: String! node: Production! + \\"\\"\\"\\"\\"\\" screenTime: Int! } @@ -1363,8 +1365,10 @@ describe("Interface Relationships", () => { } interface Production { + \\"\\"\\"\\"\\"\\" actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + \\"\\"\\"\\"\\"\\" title: String! } @@ -1507,6 +1511,7 @@ describe("Interface Relationships", () => { type ProductionActorsRelationship implements ActedIn { cursor: String! node: Actor! + \\"\\"\\"\\"\\"\\" screenTime: Int! } From 6c5d118555b5f0f245ca0ecee61f65ed1aae6dc0 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 13 Sep 2023 16:55:13 +0200 Subject: [PATCH 069/162] feat: do not default description to empty string --- packages/graphql/src/schema-model/attribute/Attribute.ts | 2 +- packages/graphql/src/schema-model/entity/ConcreteEntity.ts | 2 +- packages/graphql/src/schema-model/parser/parse-attribute.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/Attribute.ts b/packages/graphql/src/schema-model/attribute/Attribute.ts index 1afd7da7cf..efe78a8b07 100644 --- a/packages/graphql/src/schema-model/attribute/Attribute.ts +++ b/packages/graphql/src/schema-model/attribute/Attribute.ts @@ -49,7 +49,7 @@ export class Attribute { this.type = type; this.args = args; this.databaseName = databaseName ?? name; - this.description = description || ""; + this.description = description; for (const annotation of annotations) { this.addAnnotation(annotation); diff --git a/packages/graphql/src/schema-model/entity/ConcreteEntity.ts b/packages/graphql/src/schema-model/entity/ConcreteEntity.ts index ce796b9b23..01831afdab 100644 --- a/packages/graphql/src/schema-model/entity/ConcreteEntity.ts +++ b/packages/graphql/src/schema-model/entity/ConcreteEntity.ts @@ -53,7 +53,7 @@ export class ConcreteEntity implements Entity { compositeEntities?: CompositeEntity[]; }) { this.name = name; - this.description = description || ""; + this.description = description; this.labels = new Set(labels); for (const attribute of attributes) { this.addAttribute(attribute); diff --git a/packages/graphql/src/schema-model/parser/parse-attribute.ts b/packages/graphql/src/schema-model/parser/parse-attribute.ts index b86c26ec5c..a85be23ab3 100644 --- a/packages/graphql/src/schema-model/parser/parse-attribute.ts +++ b/packages/graphql/src/schema-model/parser/parse-attribute.ts @@ -54,7 +54,7 @@ export function parseAttributeArguments( name: fieldArg.name.value, type: parseTypeNode(definitionCollection, fieldArg.type), defaultValue: fieldArg.defaultValue, - description: fieldArg.description?.value || "", + description: fieldArg.description?.value, }); }); } @@ -76,7 +76,7 @@ export function parseAttribute( type, args, databaseName, - description: field.description?.value || "", + description: field.description?.value, }); } From d8d9afb353cec01c198782a6f495914b6f563dbc Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 13 Sep 2023 16:53:05 +0200 Subject: [PATCH 070/162] test: remove empty descriptions from tests --- .../graphql/tests/schema/aggregations.test.ts | 3002 +- .../tests/schema/array-methods.test.ts | 1289 +- packages/graphql/tests/schema/arrays.test.ts | 332 +- .../tests/schema/authorization.test.ts | 1164 +- .../graphql/tests/schema/comments.test.ts | 3064 +- .../tests/schema/connect-or-create-id.test.ts | 2223 +- .../schema/connect-or-create-unions.test.ts | 1227 +- .../tests/schema/connect-or-create.test.ts | 2148 +- .../tests/schema/connections/enums.test.ts | 1233 +- .../tests/schema/connections/sort.test.ts | 987 +- .../tests/schema/connections/unions.test.ts | 1965 +- .../tests/schema/custom-mutations.test.ts | 292 +- .../tests/schema/directive-preserve.test.ts | 6768 +++-- .../tests/schema/directives/alias.test.ts | 1187 +- .../schema/directives/autogenerate.test.ts | 301 +- .../schema/directives/customResolver.test.ts | 352 +- .../tests/schema/directives/cypher.test.ts | 867 +- .../tests/schema/directives/default.test.ts | 507 +- .../schema/directives/filterable.test.ts | 23688 ++++++++-------- .../tests/schema/directives/plural.test.ts | 1941 +- .../schema/directives/populatedBy.test.ts | 2896 +- .../tests/schema/directives/private.test.ts | 274 +- .../directives/relationship-aggregate.test.ts | 5404 ++-- .../relationship-nested-operations.test.ts | 23525 ++++++++------- .../relationship-properties.test.ts | 4382 ++- .../schema/directives/relationship.test.ts | 1865 +- .../schema/directives/selectable.test.ts | 7082 +++-- .../tests/schema/directives/settable.test.ts | 15661 +++++----- .../schema/directives/timestamps.test.ts | 326 +- packages/graphql/tests/schema/enum.test.ts | 252 +- packages/graphql/tests/schema/extend.test.ts | 305 +- .../graphql/tests/schema/federation.test.ts | 1991 +- .../graphql/tests/schema/fulltext.test.ts | 377 +- .../graphql/tests/schema/global-node.test.ts | 331 +- packages/graphql/tests/schema/inputs.test.ts | 274 +- .../schema/interface-relationships.test.ts | 8197 +++--- .../graphql/tests/schema/interfaces.test.ts | 1168 +- .../graphql/tests/schema/issues/1038.test.ts | 480 +- .../graphql/tests/schema/issues/1182.test.ts | 1033 +- .../graphql/tests/schema/issues/162.test.ts | 1118 +- .../graphql/tests/schema/issues/200.test.ts | 351 +- .../graphql/tests/schema/issues/2187.test.ts | 1338 +- .../graphql/tests/schema/issues/2377.test.ts | 992 +- .../graphql/tests/schema/issues/2969.test.ts | 1137 +- .../graphql/tests/schema/issues/2981.test.ts | 1724 +- .../graphql/tests/schema/issues/2993.test.ts | 742 +- .../graphql/tests/schema/issues/3428.test.ts | 1417 +- .../graphql/tests/schema/issues/3439.test.ts | 6240 ++-- .../graphql/tests/schema/issues/3537.test.ts | 1599 +- .../graphql/tests/schema/issues/3541.test.ts | 1425 +- .../graphql/tests/schema/issues/3816.test.ts | 2000 +- .../graphql/tests/schema/issues/609.test.ts | 264 +- .../graphql/tests/schema/issues/872.test.ts | 1403 +- packages/graphql/tests/schema/math.test.ts | 4750 ++-- packages/graphql/tests/schema/null.test.ts | 590 +- .../schema/pluralize-consistency.test.ts | 789 +- .../tests/schema/query-direction.test.ts | 1875 +- packages/graphql/tests/schema/scalar.test.ts | 315 +- packages/graphql/tests/schema/simple.test.ts | 371 +- .../tests/schema/string-comparators.test.ts | 2251 +- .../tests/schema/subscriptions.test.ts | 13059 +++++---- .../graphql/tests/schema/types/bigint.test.ts | 319 +- .../graphql/tests/schema/types/date.test.ts | 295 +- .../tests/schema/types/datetime.test.ts | 307 +- .../tests/schema/types/duration.test.ts | 307 +- .../tests/schema/types/localdatetime.test.ts | 307 +- .../tests/schema/types/localtime.test.ts | 311 +- .../graphql/tests/schema/types/point.test.ts | 1066 +- .../graphql/tests/schema/types/time.test.ts | 307 +- packages/graphql/tests/schema/unions.test.ts | 806 +- 70 files changed, 89370 insertions(+), 90765 deletions(-) diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index 41a45a07dd..88a2346c77 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -43,369 +43,357 @@ describe("Aggregations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. - \\"\\"\\" - scalar BigInt - - type BigIntAggregateSelectionNullable { - average: BigInt - max: BigInt - min: BigInt - sum: BigInt - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNullable { - max: DateTime - min: DateTime - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" - scalar Duration - - type DurationAggregateSelectionNullable { - max: Duration - min: Duration - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" - scalar LocalDateTime - - type LocalDateTimeAggregateSelectionNullable { - max: LocalDateTime - min: LocalDateTime - } - - \\"\\"\\" - A local time, represented as a time string without timezone information - \\"\\"\\" - scalar LocalTime - - type LocalTimeAggregateSelectionNullable { - max: LocalTime - min: LocalTime - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - createdAt: DateTime - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - imdbRating: Float - \\"\\"\\"\\"\\"\\" - isbn: String! - \\"\\"\\"\\"\\"\\" - screenTime: Duration - \\"\\"\\"\\"\\"\\" - someBigInt: BigInt - \\"\\"\\"\\"\\"\\" - someInt: Int - \\"\\"\\"\\"\\"\\" - someLocalDateTime: LocalDateTime - \\"\\"\\"\\"\\"\\" - someLocalTime: LocalTime - \\"\\"\\"\\"\\"\\" - someTime: Time - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - imdbRating: FloatAggregateSelectionNullable! - isbn: StringAggregateSelectionNonNullable! - screenTime: DurationAggregateSelectionNullable! - someBigInt: BigIntAggregateSelectionNullable! - someInt: IntAggregateSelectionNullable! - someLocalDateTime: LocalDateTimeAggregateSelectionNullable! - someLocalTime: LocalTimeAggregateSelectionNullable! - someTime: TimeAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - } - - input MovieCreateInput { - createdAt: DateTime - id: ID - imdbRating: Float - isbn: String! - screenTime: Duration - someBigInt: BigInt - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - title: String - } - - 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 { - createdAt: SortDirection - id: SortDirection - imdbRating: SortDirection - isbn: SortDirection - screenTime: SortDirection - someBigInt: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someTime: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - createdAt: DateTime - id: ID - imdbRating: Float - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SUBTRACT: Float - isbn: String - screenTime: Duration - someBigInt: BigInt - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someInt: Int - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn: String - isbn_CONTAINS: String - isbn_ENDS_WITH: String - isbn_IN: [String!] - isbn_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_STARTS_WITH: String - screenTime: Duration - screenTime_GT: Duration - screenTime_GTE: Duration - screenTime_IN: [Duration] - screenTime_LT: Duration - screenTime_LTE: Duration - screenTime_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" - scalar Time - - type TimeAggregateSelectionNullable { - max: Time - min: Time - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\" +A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. +\\"\\"\\" +scalar BigInt + +type BigIntAggregateSelectionNullable { + average: BigInt + max: BigInt + min: BigInt + sum: BigInt +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNullable { + max: DateTime + min: DateTime +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +\\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" +scalar Duration + +type DurationAggregateSelectionNullable { + max: Duration + min: Duration +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +\\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" +scalar LocalDateTime + +type LocalDateTimeAggregateSelectionNullable { + max: LocalDateTime + min: LocalDateTime +} + +\\"\\"\\" +A local time, represented as a time string without timezone information +\\"\\"\\" +scalar LocalTime + +type LocalTimeAggregateSelectionNullable { + max: LocalTime + min: LocalTime +} + +type Movie { + createdAt: DateTime + id: ID + imdbRating: Float + isbn: String! + screenTime: Duration + someBigInt: BigInt + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + title: String +} + +type MovieAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + imdbRating: FloatAggregateSelectionNullable! + isbn: StringAggregateSelectionNonNullable! + screenTime: DurationAggregateSelectionNullable! + someBigInt: BigIntAggregateSelectionNullable! + someInt: IntAggregateSelectionNullable! + someLocalDateTime: LocalDateTimeAggregateSelectionNullable! + someLocalTime: LocalTimeAggregateSelectionNullable! + someTime: TimeAggregateSelectionNullable! + title: StringAggregateSelectionNullable! +} + +input MovieCreateInput { + createdAt: DateTime + id: ID + imdbRating: Float + isbn: String! + screenTime: Duration + someBigInt: BigInt + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + title: String +} + +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 { + createdAt: SortDirection + id: SortDirection + imdbRating: SortDirection + isbn: SortDirection + screenTime: SortDirection + someBigInt: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someTime: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + createdAt: DateTime + id: ID + imdbRating: Float + imdbRating_ADD: Float + imdbRating_DIVIDE: Float + imdbRating_MULTIPLY: Float + imdbRating_SUBTRACT: Float + isbn: String + screenTime: Duration + someBigInt: BigInt + someBigInt_DECREMENT: BigInt + someBigInt_INCREMENT: BigInt + someInt: Int + someInt_DECREMENT: Int + someInt_INCREMENT: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + imdbRating: Float + imdbRating_GT: Float + imdbRating_GTE: Float + imdbRating_IN: [Float] + imdbRating_LT: Float + imdbRating_LTE: Float + imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn: String + isbn_CONTAINS: String + isbn_ENDS_WITH: String + isbn_IN: [String!] + isbn_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_STARTS_WITH: String + screenTime: Duration + screenTime_GT: Duration + screenTime_GTE: Duration + screenTime_IN: [Duration] + screenTime_LT: Duration + screenTime_LTE: Duration + screenTime_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someBigInt: BigInt + someBigInt_GT: BigInt + someBigInt_GTE: BigInt + someBigInt_IN: [BigInt] + someBigInt_LT: BigInt + someBigInt_LTE: BigInt + someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someInt: Int + someInt_GT: Int + someInt_GTE: Int + someInt_IN: [Int] + someInt_LT: Int + someInt_LTE: Int + someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime: LocalDateTime + someLocalDateTime_GT: LocalDateTime + someLocalDateTime_GTE: LocalDateTime + someLocalDateTime_IN: [LocalDateTime] + someLocalDateTime_LT: LocalDateTime + someLocalDateTime_LTE: LocalDateTime + someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime: LocalTime + someLocalTime_GT: LocalTime + someLocalTime_GTE: LocalTime + someLocalTime_IN: [LocalTime] + someLocalTime_LT: LocalTime + someLocalTime_LTE: LocalTime + someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someTime: Time + someTime_GT: Time + someTime_GTE: Time + someTime_IN: [Time] + someTime_LT: Time + someTime_LTE: Time + someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" +scalar Time + +type TimeAggregateSelectionNullable { + max: Time + min: Time +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Where Level Aggregations", async () => { @@ -445,1166 +433,1132 @@ describe("Aggregations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. - \\"\\"\\" - scalar BigInt - - type BigIntAggregateSelectionNullable { - average: BigInt - max: BigInt - min: BigInt - sum: BigInt - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNullable { - max: DateTime - min: DateTime - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" - scalar Duration - - type DurationAggregateSelectionNullable { - max: Duration - min: Duration - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - interface Likes { - \\"\\"\\"\\"\\"\\" - someBigInt: BigInt - \\"\\"\\"\\"\\"\\" - someDateTime: DateTime - \\"\\"\\"\\"\\"\\" - someDuration: Duration - \\"\\"\\"\\"\\"\\" - someFloat: Float - \\"\\"\\"\\"\\"\\" - someId: ID - \\"\\"\\"\\"\\"\\" - someInt: Int - \\"\\"\\"\\"\\"\\" - someLocalDateTime: LocalDateTime - \\"\\"\\"\\"\\"\\" - someLocalTime: LocalTime - \\"\\"\\"\\"\\"\\" - someString: String - \\"\\"\\"\\"\\"\\" - someTime: Time - } - - input LikesCreateInput { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time - } - - input LikesSort { - someBigInt: SortDirection - someDateTime: SortDirection - someDuration: SortDirection - someFloat: SortDirection - someId: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someString: SortDirection - someTime: SortDirection - } - - input LikesUpdateInput { - someBigInt: BigInt - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someFloat_ADD: Float - someFloat_DIVIDE: Float - someFloat_MULTIPLY: Float - someFloat_SUBTRACT: Float - someId: ID - someInt: Int - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time - } - - input LikesWhere { - AND: [LikesWhere!] - NOT: LikesWhere - OR: [LikesWhere!] - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDateTime: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDateTime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDateTime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDuration: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someDuration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDuration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someFloat: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someFloat_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someFloat_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId: ID - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_IN: [ID] - someId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_STARTS_WITH: ID - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString: String - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_IN: [String] - someString_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_STARTS_WITH: String - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" - scalar LocalDateTime - - type LocalDateTimeAggregateSelectionNullable { - max: LocalDateTime - min: LocalDateTime - } - - \\"\\"\\" - A local time, represented as a time string without timezone information - \\"\\"\\" - scalar LocalTime - - type LocalTimeAggregateSelectionNullable { - max: LocalTime - min: LocalTime - } - - type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"\\"\\"\\" - type Post { - \\"\\"\\"\\"\\"\\" - likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! - likesAggregate(directed: Boolean = true, where: UserWhere): PostUserLikesAggregationSelection - likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type PostAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input PostConnectInput { - likes: [PostLikesConnectFieldInput!] - } - - input PostCreateInput { - likes: PostLikesFieldInput - title: String - } - - input PostDeleteInput { - likes: [PostLikesDeleteFieldInput!] - } - - input PostDisconnectInput { - likes: [PostLikesDisconnectFieldInput!] - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostLikesAggregateInput { - AND: [PostLikesAggregateInput!] - NOT: PostLikesAggregateInput - OR: [PostLikesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: PostLikesEdgeAggregationWhereInput - node: PostLikesNodeAggregationWhereInput - } - - input PostLikesConnectFieldInput { - edge: LikesCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type PostLikesConnection { - edges: [PostLikesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PostLikesConnectionSort { - edge: LikesSort - node: UserSort - } - - input PostLikesConnectionWhere { - AND: [PostLikesConnectionWhere!] - NOT: PostLikesConnectionWhere - OR: [PostLikesConnectionWhere!] - edge: LikesWhere - edge_NOT: LikesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PostLikesCreateFieldInput { - edge: LikesCreateInput - node: UserCreateInput! - } - - input PostLikesDeleteFieldInput { - where: PostLikesConnectionWhere - } - - input PostLikesDisconnectFieldInput { - where: PostLikesConnectionWhere - } - - input PostLikesEdgeAggregationWhereInput { - AND: [PostLikesEdgeAggregationWhereInput!] - NOT: PostLikesEdgeAggregationWhereInput - OR: [PostLikesEdgeAggregationWhereInput!] - someBigInt_AVERAGE_EQUAL: BigInt - someBigInt_AVERAGE_GT: BigInt - someBigInt_AVERAGE_GTE: BigInt - someBigInt_AVERAGE_LT: BigInt - someBigInt_AVERAGE_LTE: BigInt - someBigInt_EQUAL: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_GT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_GTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_LT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_LTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_MAX_EQUAL: BigInt - someBigInt_MAX_GT: BigInt - someBigInt_MAX_GTE: BigInt - someBigInt_MAX_LT: BigInt - someBigInt_MAX_LTE: BigInt - someBigInt_MIN_EQUAL: BigInt - someBigInt_MIN_GT: BigInt - someBigInt_MIN_GTE: BigInt - someBigInt_MIN_LT: BigInt - someBigInt_MIN_LTE: BigInt - someBigInt_SUM_EQUAL: BigInt - someBigInt_SUM_GT: BigInt - someBigInt_SUM_GTE: BigInt - someBigInt_SUM_LT: BigInt - someBigInt_SUM_LTE: BigInt - someDateTime_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_MAX_EQUAL: DateTime - someDateTime_MAX_GT: DateTime - someDateTime_MAX_GTE: DateTime - someDateTime_MAX_LT: DateTime - someDateTime_MAX_LTE: DateTime - someDateTime_MIN_EQUAL: DateTime - someDateTime_MIN_GT: DateTime - someDateTime_MIN_GTE: DateTime - someDateTime_MIN_LT: DateTime - someDateTime_MIN_LTE: DateTime - someDuration_AVERAGE_EQUAL: Duration - someDuration_AVERAGE_GT: Duration - someDuration_AVERAGE_GTE: Duration - someDuration_AVERAGE_LT: Duration - someDuration_AVERAGE_LTE: Duration - someDuration_EQUAL: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_GT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_GTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_LT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_LTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_MAX_EQUAL: Duration - someDuration_MAX_GT: Duration - someDuration_MAX_GTE: Duration - someDuration_MAX_LT: Duration - someDuration_MAX_LTE: Duration - someDuration_MIN_EQUAL: Duration - someDuration_MIN_GT: Duration - someDuration_MIN_GTE: Duration - someDuration_MIN_LT: Duration - someDuration_MIN_LTE: Duration - someFloat_AVERAGE_EQUAL: Float - someFloat_AVERAGE_GT: Float - someFloat_AVERAGE_GTE: Float - someFloat_AVERAGE_LT: Float - someFloat_AVERAGE_LTE: Float - someFloat_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_MAX_EQUAL: Float - someFloat_MAX_GT: Float - someFloat_MAX_GTE: Float - someFloat_MAX_LT: Float - someFloat_MAX_LTE: Float - someFloat_MIN_EQUAL: Float - someFloat_MIN_GT: Float - someFloat_MIN_GTE: Float - someFloat_MIN_LT: Float - someFloat_MIN_LTE: Float - someFloat_SUM_EQUAL: Float - someFloat_SUM_GT: Float - someFloat_SUM_GTE: Float - someFloat_SUM_LT: Float - someFloat_SUM_LTE: Float - someId_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_AVERAGE_EQUAL: Float - someInt_AVERAGE_GT: Float - someInt_AVERAGE_GTE: Float - someInt_AVERAGE_LT: Float - someInt_AVERAGE_LTE: Float - someInt_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_MAX_EQUAL: Int - someInt_MAX_GT: Int - someInt_MAX_GTE: Int - someInt_MAX_LT: Int - someInt_MAX_LTE: Int - someInt_MIN_EQUAL: Int - someInt_MIN_GT: Int - someInt_MIN_GTE: Int - someInt_MIN_LT: Int - someInt_MIN_LTE: Int - someInt_SUM_EQUAL: Int - someInt_SUM_GT: Int - someInt_SUM_GTE: Int - someInt_SUM_LT: Int - someInt_SUM_LTE: Int - someLocalDateTime_EQUAL: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_MAX_EQUAL: LocalDateTime - someLocalDateTime_MAX_GT: LocalDateTime - someLocalDateTime_MAX_GTE: LocalDateTime - someLocalDateTime_MAX_LT: LocalDateTime - someLocalDateTime_MAX_LTE: LocalDateTime - someLocalDateTime_MIN_EQUAL: LocalDateTime - someLocalDateTime_MIN_GT: LocalDateTime - someLocalDateTime_MIN_GTE: LocalDateTime - someLocalDateTime_MIN_LT: LocalDateTime - someLocalDateTime_MIN_LTE: LocalDateTime - someLocalTime_EQUAL: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_GT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_GTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_LT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_LTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_MAX_EQUAL: LocalTime - someLocalTime_MAX_GT: LocalTime - someLocalTime_MAX_GTE: LocalTime - someLocalTime_MAX_LT: LocalTime - someLocalTime_MAX_LTE: LocalTime - someLocalTime_MIN_EQUAL: LocalTime - someLocalTime_MIN_GT: LocalTime - someLocalTime_MIN_GTE: LocalTime - someLocalTime_MIN_LT: LocalTime - someLocalTime_MIN_LTE: LocalTime - someString_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_LENGTH_EQUAL: Float - someString_AVERAGE_LENGTH_GT: Float - someString_AVERAGE_LENGTH_GTE: Float - someString_AVERAGE_LENGTH_LT: Float - someString_AVERAGE_LENGTH_LTE: Float - someString_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_LENGTH_EQUAL: Int - someString_LONGEST_LENGTH_GT: Int - someString_LONGEST_LENGTH_GTE: Int - someString_LONGEST_LENGTH_LT: Int - someString_LONGEST_LENGTH_LTE: Int - someString_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_LENGTH_EQUAL: Int - someString_SHORTEST_LENGTH_GT: Int - someString_SHORTEST_LENGTH_GTE: Int - someString_SHORTEST_LENGTH_LT: Int - someString_SHORTEST_LENGTH_LTE: Int - someString_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someTime_EQUAL: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_GT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_GTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_LT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_LTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_MAX_EQUAL: Time - someTime_MAX_GT: Time - someTime_MAX_GTE: Time - someTime_MAX_LT: Time - someTime_MAX_LTE: Time - someTime_MIN_EQUAL: Time - someTime_MIN_GT: Time - someTime_MIN_GTE: Time - someTime_MIN_LT: Time - someTime_MIN_LTE: Time - } - - input PostLikesFieldInput { - connect: [PostLikesConnectFieldInput!] - create: [PostLikesCreateFieldInput!] - } - - input PostLikesNodeAggregationWhereInput { - AND: [PostLikesNodeAggregationWhereInput!] - NOT: PostLikesNodeAggregationWhereInput - OR: [PostLikesNodeAggregationWhereInput!] - someBigInt_AVERAGE_EQUAL: BigInt - someBigInt_AVERAGE_GT: BigInt - someBigInt_AVERAGE_GTE: BigInt - someBigInt_AVERAGE_LT: BigInt - someBigInt_AVERAGE_LTE: BigInt - someBigInt_EQUAL: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_GT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_GTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_LT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_LTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_MAX_EQUAL: BigInt - someBigInt_MAX_GT: BigInt - someBigInt_MAX_GTE: BigInt - someBigInt_MAX_LT: BigInt - someBigInt_MAX_LTE: BigInt - someBigInt_MIN_EQUAL: BigInt - someBigInt_MIN_GT: BigInt - someBigInt_MIN_GTE: BigInt - someBigInt_MIN_LT: BigInt - someBigInt_MIN_LTE: BigInt - someBigInt_SUM_EQUAL: BigInt - someBigInt_SUM_GT: BigInt - someBigInt_SUM_GTE: BigInt - someBigInt_SUM_LT: BigInt - someBigInt_SUM_LTE: BigInt - someDateTime_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_MAX_EQUAL: DateTime - someDateTime_MAX_GT: DateTime - someDateTime_MAX_GTE: DateTime - someDateTime_MAX_LT: DateTime - someDateTime_MAX_LTE: DateTime - someDateTime_MIN_EQUAL: DateTime - someDateTime_MIN_GT: DateTime - someDateTime_MIN_GTE: DateTime - someDateTime_MIN_LT: DateTime - someDateTime_MIN_LTE: DateTime - someDuration_AVERAGE_EQUAL: Duration - someDuration_AVERAGE_GT: Duration - someDuration_AVERAGE_GTE: Duration - someDuration_AVERAGE_LT: Duration - someDuration_AVERAGE_LTE: Duration - someDuration_EQUAL: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_GT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_GTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_LT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_LTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_MAX_EQUAL: Duration - someDuration_MAX_GT: Duration - someDuration_MAX_GTE: Duration - someDuration_MAX_LT: Duration - someDuration_MAX_LTE: Duration - someDuration_MIN_EQUAL: Duration - someDuration_MIN_GT: Duration - someDuration_MIN_GTE: Duration - someDuration_MIN_LT: Duration - someDuration_MIN_LTE: Duration - someFloat_AVERAGE_EQUAL: Float - someFloat_AVERAGE_GT: Float - someFloat_AVERAGE_GTE: Float - someFloat_AVERAGE_LT: Float - someFloat_AVERAGE_LTE: Float - someFloat_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_MAX_EQUAL: Float - someFloat_MAX_GT: Float - someFloat_MAX_GTE: Float - someFloat_MAX_LT: Float - someFloat_MAX_LTE: Float - someFloat_MIN_EQUAL: Float - someFloat_MIN_GT: Float - someFloat_MIN_GTE: Float - someFloat_MIN_LT: Float - someFloat_MIN_LTE: Float - someFloat_SUM_EQUAL: Float - someFloat_SUM_GT: Float - someFloat_SUM_GTE: Float - someFloat_SUM_LT: Float - someFloat_SUM_LTE: Float - someId_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_AVERAGE_EQUAL: Float - someInt_AVERAGE_GT: Float - someInt_AVERAGE_GTE: Float - someInt_AVERAGE_LT: Float - someInt_AVERAGE_LTE: Float - someInt_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_MAX_EQUAL: Int - someInt_MAX_GT: Int - someInt_MAX_GTE: Int - someInt_MAX_LT: Int - someInt_MAX_LTE: Int - someInt_MIN_EQUAL: Int - someInt_MIN_GT: Int - someInt_MIN_GTE: Int - someInt_MIN_LT: Int - someInt_MIN_LTE: Int - someInt_SUM_EQUAL: Int - someInt_SUM_GT: Int - someInt_SUM_GTE: Int - someInt_SUM_LT: Int - someInt_SUM_LTE: Int - someLocalDateTime_EQUAL: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_MAX_EQUAL: LocalDateTime - someLocalDateTime_MAX_GT: LocalDateTime - someLocalDateTime_MAX_GTE: LocalDateTime - someLocalDateTime_MAX_LT: LocalDateTime - someLocalDateTime_MAX_LTE: LocalDateTime - someLocalDateTime_MIN_EQUAL: LocalDateTime - someLocalDateTime_MIN_GT: LocalDateTime - someLocalDateTime_MIN_GTE: LocalDateTime - someLocalDateTime_MIN_LT: LocalDateTime - someLocalDateTime_MIN_LTE: LocalDateTime - someLocalTime_EQUAL: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_GT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_GTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_LT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_LTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_MAX_EQUAL: LocalTime - someLocalTime_MAX_GT: LocalTime - someLocalTime_MAX_GTE: LocalTime - someLocalTime_MAX_LT: LocalTime - someLocalTime_MAX_LTE: LocalTime - someLocalTime_MIN_EQUAL: LocalTime - someLocalTime_MIN_GT: LocalTime - someLocalTime_MIN_GTE: LocalTime - someLocalTime_MIN_LT: LocalTime - someLocalTime_MIN_LTE: LocalTime - someString_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_LENGTH_EQUAL: Float - someString_AVERAGE_LENGTH_GT: Float - someString_AVERAGE_LENGTH_GTE: Float - someString_AVERAGE_LENGTH_LT: Float - someString_AVERAGE_LENGTH_LTE: Float - someString_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_LENGTH_EQUAL: Int - someString_LONGEST_LENGTH_GT: Int - someString_LONGEST_LENGTH_GTE: Int - someString_LONGEST_LENGTH_LT: Int - someString_LONGEST_LENGTH_LTE: Int - someString_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_LENGTH_EQUAL: Int - someString_SHORTEST_LENGTH_GT: Int - someString_SHORTEST_LENGTH_GTE: Int - someString_SHORTEST_LENGTH_LT: Int - someString_SHORTEST_LENGTH_LTE: Int - someString_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someTime_EQUAL: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_GT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_GTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_LT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_LTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_MAX_EQUAL: Time - someTime_MAX_GT: Time - someTime_MAX_GTE: Time - someTime_MAX_LT: Time - someTime_MAX_LTE: Time - someTime_MIN_EQUAL: Time - someTime_MIN_GT: Time - someTime_MIN_GTE: Time - someTime_MIN_LT: Time - someTime_MIN_LTE: Time - } - - type PostLikesRelationship implements Likes { - cursor: String! - node: User! - \\"\\"\\"\\"\\"\\" - someBigInt: BigInt - \\"\\"\\"\\"\\"\\" - someDateTime: DateTime - \\"\\"\\"\\"\\"\\" - someDuration: Duration - \\"\\"\\"\\"\\"\\" - someFloat: Float - \\"\\"\\"\\"\\"\\" - someId: ID - \\"\\"\\"\\"\\"\\" - someInt: Int - \\"\\"\\"\\"\\"\\" - someLocalDateTime: LocalDateTime - \\"\\"\\"\\"\\"\\" - someLocalTime: LocalTime - \\"\\"\\"\\"\\"\\" - someString: String - \\"\\"\\"\\"\\"\\" - someTime: Time - } - - input PostLikesUpdateConnectionInput { - edge: LikesUpdateInput - node: UserUpdateInput - } - - input PostLikesUpdateFieldInput { - connect: [PostLikesConnectFieldInput!] - create: [PostLikesCreateFieldInput!] - delete: [PostLikesDeleteFieldInput!] - disconnect: [PostLikesDisconnectFieldInput!] - update: PostLikesUpdateConnectionInput - where: PostLikesConnectionWhere - } - - input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] - } - - input PostRelationInput { - likes: [PostLikesCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - title: SortDirection - } - - input PostUpdateInput { - likes: [PostLikesUpdateFieldInput!] - title: String - } - - type PostUserLikesAggregationSelection { - count: Int! - edge: PostUserLikesEdgeAggregateSelection - node: PostUserLikesNodeAggregateSelection - } - - type PostUserLikesEdgeAggregateSelection { - someBigInt: BigIntAggregateSelectionNullable! - someDateTime: DateTimeAggregateSelectionNullable! - someDuration: DurationAggregateSelectionNullable! - someFloat: FloatAggregateSelectionNullable! - someId: IDAggregateSelectionNullable! - someInt: IntAggregateSelectionNullable! - someLocalDateTime: LocalDateTimeAggregateSelectionNullable! - someLocalTime: LocalTimeAggregateSelectionNullable! - someString: StringAggregateSelectionNullable! - someTime: TimeAggregateSelectionNullable! - } - - type PostUserLikesNodeAggregateSelection { - someBigInt: BigIntAggregateSelectionNullable! - someDateTime: DateTimeAggregateSelectionNullable! - someDuration: DurationAggregateSelectionNullable! - someFloat: FloatAggregateSelectionNullable! - someId: IDAggregateSelectionNullable! - someInt: IntAggregateSelectionNullable! - someLocalDateTime: LocalDateTimeAggregateSelectionNullable! - someLocalTime: LocalTimeAggregateSelectionNullable! - someString: StringAggregateSelectionNullable! - someTime: TimeAggregateSelectionNullable! - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - likes: UserWhere @deprecated(reason: \\"Use \`likes_SOME\` instead.\\") - likesAggregate: PostLikesAggregateInput - likesConnection: PostLikesConnectionWhere @deprecated(reason: \\"Use \`likesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Posts where all of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_ALL: PostLikesConnectionWhere - \\"\\"\\" - Return Posts where none of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_NONE: PostLikesConnectionWhere - likesConnection_NOT: PostLikesConnectionWhere @deprecated(reason: \\"Use \`likesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Posts where one of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_SINGLE: PostLikesConnectionWhere - \\"\\"\\" - Return Posts where some of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_SOME: PostLikesConnectionWhere - \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" - likes_ALL: UserWhere - \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" - likes_NONE: UserWhere - likes_NOT: UserWhere @deprecated(reason: \\"Use \`likes_NONE\` instead.\\") - \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" - likes_SINGLE: UserWhere - \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" - likes_SOME: UserWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" - scalar Time - - type TimeAggregateSelectionNullable { - max: Time - min: Time - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - someBigInt: BigInt - \\"\\"\\"\\"\\"\\" - someDateTime: DateTime - \\"\\"\\"\\"\\"\\" - someDuration: Duration - \\"\\"\\"\\"\\"\\" - someFloat: Float - \\"\\"\\"\\"\\"\\" - someId: ID - \\"\\"\\"\\"\\"\\" - someInt: Int - \\"\\"\\"\\"\\"\\" - someLocalDateTime: LocalDateTime - \\"\\"\\"\\"\\"\\" - someLocalTime: LocalTime - \\"\\"\\"\\"\\"\\" - someString: String - \\"\\"\\"\\"\\"\\" - someTime: Time - } - - type UserAggregateSelection { - count: Int! - someBigInt: BigIntAggregateSelectionNullable! - someDateTime: DateTimeAggregateSelectionNullable! - someDuration: DurationAggregateSelectionNullable! - someFloat: FloatAggregateSelectionNullable! - someId: IDAggregateSelectionNullable! - someInt: IntAggregateSelectionNullable! - someLocalDateTime: LocalDateTimeAggregateSelectionNullable! - someLocalTime: LocalTimeAggregateSelectionNullable! - someString: StringAggregateSelectionNullable! - someTime: TimeAggregateSelectionNullable! - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time - } - - type UserEdge { - cursor: String! - node: User! - } - - 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 { - someBigInt: SortDirection - someDateTime: SortDirection - someDuration: SortDirection - someFloat: SortDirection - someId: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someString: SortDirection - someTime: SortDirection - } - - input UserUpdateInput { - someBigInt: BigInt - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someFloat_ADD: Float - someFloat_DIVIDE: Float - someFloat_MULTIPLY: Float - someFloat_SUBTRACT: Float - someId: ID - someInt: Int - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDateTime: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDateTime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDateTime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDuration: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someDuration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDuration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someFloat: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someFloat_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someFloat_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId: ID - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_IN: [ID] - someId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_STARTS_WITH: ID - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString: String - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_IN: [String] - someString_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_STARTS_WITH: String - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\" +A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. +\\"\\"\\" +scalar BigInt + +type BigIntAggregateSelectionNullable { + average: BigInt + max: BigInt + min: BigInt + sum: BigInt +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNullable { + max: DateTime + min: DateTime +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +\\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" +scalar Duration + +type DurationAggregateSelectionNullable { + max: Duration + min: Duration +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +interface Likes { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time +} + +input LikesCreateInput { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time +} + +input LikesSort { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection +} + +input LikesUpdateInput { + someBigInt: BigInt + someBigInt_DECREMENT: BigInt + someBigInt_INCREMENT: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someFloat_ADD: Float + someFloat_DIVIDE: Float + someFloat_MULTIPLY: Float + someFloat_SUBTRACT: Float + someId: ID + someInt: Int + someInt_DECREMENT: Int + someInt_INCREMENT: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time +} + +input LikesWhere { + AND: [LikesWhere!] + NOT: LikesWhere + OR: [LikesWhere!] + someBigInt: BigInt + someBigInt_GT: BigInt + someBigInt_GTE: BigInt + someBigInt_IN: [BigInt] + someBigInt_LT: BigInt + someBigInt_LTE: BigInt + someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDateTime: DateTime + someDateTime_GT: DateTime + someDateTime_GTE: DateTime + someDateTime_IN: [DateTime] + someDateTime_LT: DateTime + someDateTime_LTE: DateTime + someDateTime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDateTime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDuration: Duration + someDuration_GT: Duration + someDuration_GTE: Duration + someDuration_IN: [Duration] + someDuration_LT: Duration + someDuration_LTE: Duration + someDuration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDuration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someFloat: Float + someFloat_GT: Float + someFloat_GTE: Float + someFloat_IN: [Float] + someFloat_LT: Float + someFloat_LTE: Float + someFloat_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someFloat_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId: ID + someId_CONTAINS: ID + someId_ENDS_WITH: ID + someId_IN: [ID] + someId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_STARTS_WITH: ID + someInt: Int + someInt_GT: Int + someInt_GTE: Int + someInt_IN: [Int] + someInt_LT: Int + someInt_LTE: Int + someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime: LocalDateTime + someLocalDateTime_GT: LocalDateTime + someLocalDateTime_GTE: LocalDateTime + someLocalDateTime_IN: [LocalDateTime] + someLocalDateTime_LT: LocalDateTime + someLocalDateTime_LTE: LocalDateTime + someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime: LocalTime + someLocalTime_GT: LocalTime + someLocalTime_GTE: LocalTime + someLocalTime_IN: [LocalTime] + someLocalTime_LT: LocalTime + someLocalTime_LTE: LocalTime + someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString: String + someString_CONTAINS: String + someString_ENDS_WITH: String + someString_IN: [String] + someString_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_STARTS_WITH: String + someTime: Time + someTime_GT: Time + someTime_GTE: Time + someTime_IN: [Time] + someTime_LT: Time + someTime_LTE: Time + someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +\\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" +scalar LocalDateTime + +type LocalDateTimeAggregateSelectionNullable { + max: LocalDateTime + min: LocalDateTime +} + +\\"\\"\\" +A local time, represented as a time string without timezone information +\\"\\"\\" +scalar LocalTime + +type LocalTimeAggregateSelectionNullable { + max: LocalTime + min: LocalTime +} + +type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Post { + likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! + likesAggregate(directed: Boolean = true, where: UserWhere): PostUserLikesAggregationSelection + likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + title: String +} + +type PostAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input PostConnectInput { + likes: [PostLikesConnectFieldInput!] +} + +input PostCreateInput { + likes: PostLikesFieldInput + title: String +} + +input PostDeleteInput { + likes: [PostLikesDeleteFieldInput!] +} + +input PostDisconnectInput { + likes: [PostLikesDisconnectFieldInput!] +} + +type PostEdge { + cursor: String! + node: Post! +} + +input PostLikesAggregateInput { + AND: [PostLikesAggregateInput!] + NOT: PostLikesAggregateInput + OR: [PostLikesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: PostLikesEdgeAggregationWhereInput + node: PostLikesNodeAggregationWhereInput +} + +input PostLikesConnectFieldInput { + edge: LikesCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type PostLikesConnection { + edges: [PostLikesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PostLikesConnectionSort { + edge: LikesSort + node: UserSort +} + +input PostLikesConnectionWhere { + AND: [PostLikesConnectionWhere!] + NOT: PostLikesConnectionWhere + OR: [PostLikesConnectionWhere!] + edge: LikesWhere + edge_NOT: LikesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PostLikesCreateFieldInput { + edge: LikesCreateInput + node: UserCreateInput! +} + +input PostLikesDeleteFieldInput { + where: PostLikesConnectionWhere +} + +input PostLikesDisconnectFieldInput { + where: PostLikesConnectionWhere +} + +input PostLikesEdgeAggregationWhereInput { + AND: [PostLikesEdgeAggregationWhereInput!] + NOT: PostLikesEdgeAggregationWhereInput + OR: [PostLikesEdgeAggregationWhereInput!] + someBigInt_AVERAGE_EQUAL: BigInt + someBigInt_AVERAGE_GT: BigInt + someBigInt_AVERAGE_GTE: BigInt + someBigInt_AVERAGE_LT: BigInt + someBigInt_AVERAGE_LTE: BigInt + someBigInt_EQUAL: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_MAX_EQUAL: BigInt + someBigInt_MAX_GT: BigInt + someBigInt_MAX_GTE: BigInt + someBigInt_MAX_LT: BigInt + someBigInt_MAX_LTE: BigInt + someBigInt_MIN_EQUAL: BigInt + someBigInt_MIN_GT: BigInt + someBigInt_MIN_GTE: BigInt + someBigInt_MIN_LT: BigInt + someBigInt_MIN_LTE: BigInt + someBigInt_SUM_EQUAL: BigInt + someBigInt_SUM_GT: BigInt + someBigInt_SUM_GTE: BigInt + someBigInt_SUM_LT: BigInt + someBigInt_SUM_LTE: BigInt + someDateTime_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_MAX_EQUAL: DateTime + someDateTime_MAX_GT: DateTime + someDateTime_MAX_GTE: DateTime + someDateTime_MAX_LT: DateTime + someDateTime_MAX_LTE: DateTime + someDateTime_MIN_EQUAL: DateTime + someDateTime_MIN_GT: DateTime + someDateTime_MIN_GTE: DateTime + someDateTime_MIN_LT: DateTime + someDateTime_MIN_LTE: DateTime + someDuration_AVERAGE_EQUAL: Duration + someDuration_AVERAGE_GT: Duration + someDuration_AVERAGE_GTE: Duration + someDuration_AVERAGE_LT: Duration + someDuration_AVERAGE_LTE: Duration + someDuration_EQUAL: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_GT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_GTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_LT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_LTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_MAX_EQUAL: Duration + someDuration_MAX_GT: Duration + someDuration_MAX_GTE: Duration + someDuration_MAX_LT: Duration + someDuration_MAX_LTE: Duration + someDuration_MIN_EQUAL: Duration + someDuration_MIN_GT: Duration + someDuration_MIN_GTE: Duration + someDuration_MIN_LT: Duration + someDuration_MIN_LTE: Duration + someFloat_AVERAGE_EQUAL: Float + someFloat_AVERAGE_GT: Float + someFloat_AVERAGE_GTE: Float + someFloat_AVERAGE_LT: Float + someFloat_AVERAGE_LTE: Float + someFloat_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_MAX_EQUAL: Float + someFloat_MAX_GT: Float + someFloat_MAX_GTE: Float + someFloat_MAX_LT: Float + someFloat_MAX_LTE: Float + someFloat_MIN_EQUAL: Float + someFloat_MIN_GT: Float + someFloat_MIN_GTE: Float + someFloat_MIN_LT: Float + someFloat_MIN_LTE: Float + someFloat_SUM_EQUAL: Float + someFloat_SUM_GT: Float + someFloat_SUM_GTE: Float + someFloat_SUM_LT: Float + someFloat_SUM_LTE: Float + someId_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_AVERAGE_EQUAL: Float + someInt_AVERAGE_GT: Float + someInt_AVERAGE_GTE: Float + someInt_AVERAGE_LT: Float + someInt_AVERAGE_LTE: Float + someInt_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_MAX_EQUAL: Int + someInt_MAX_GT: Int + someInt_MAX_GTE: Int + someInt_MAX_LT: Int + someInt_MAX_LTE: Int + someInt_MIN_EQUAL: Int + someInt_MIN_GT: Int + someInt_MIN_GTE: Int + someInt_MIN_LT: Int + someInt_MIN_LTE: Int + someInt_SUM_EQUAL: Int + someInt_SUM_GT: Int + someInt_SUM_GTE: Int + someInt_SUM_LT: Int + someInt_SUM_LTE: Int + someLocalDateTime_EQUAL: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_MAX_EQUAL: LocalDateTime + someLocalDateTime_MAX_GT: LocalDateTime + someLocalDateTime_MAX_GTE: LocalDateTime + someLocalDateTime_MAX_LT: LocalDateTime + someLocalDateTime_MAX_LTE: LocalDateTime + someLocalDateTime_MIN_EQUAL: LocalDateTime + someLocalDateTime_MIN_GT: LocalDateTime + someLocalDateTime_MIN_GTE: LocalDateTime + someLocalDateTime_MIN_LT: LocalDateTime + someLocalDateTime_MIN_LTE: LocalDateTime + someLocalTime_EQUAL: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_MAX_EQUAL: LocalTime + someLocalTime_MAX_GT: LocalTime + someLocalTime_MAX_GTE: LocalTime + someLocalTime_MAX_LT: LocalTime + someLocalTime_MAX_LTE: LocalTime + someLocalTime_MIN_EQUAL: LocalTime + someLocalTime_MIN_GT: LocalTime + someLocalTime_MIN_GTE: LocalTime + someLocalTime_MIN_LT: LocalTime + someLocalTime_MIN_LTE: LocalTime + someString_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_LENGTH_EQUAL: Float + someString_AVERAGE_LENGTH_GT: Float + someString_AVERAGE_LENGTH_GTE: Float + someString_AVERAGE_LENGTH_LT: Float + someString_AVERAGE_LENGTH_LTE: Float + someString_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_LENGTH_EQUAL: Int + someString_LONGEST_LENGTH_GT: Int + someString_LONGEST_LENGTH_GTE: Int + someString_LONGEST_LENGTH_LT: Int + someString_LONGEST_LENGTH_LTE: Int + someString_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_LENGTH_EQUAL: Int + someString_SHORTEST_LENGTH_GT: Int + someString_SHORTEST_LENGTH_GTE: Int + someString_SHORTEST_LENGTH_LT: Int + someString_SHORTEST_LENGTH_LTE: Int + someString_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someTime_EQUAL: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_GT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_GTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_LT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_LTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_MAX_EQUAL: Time + someTime_MAX_GT: Time + someTime_MAX_GTE: Time + someTime_MAX_LT: Time + someTime_MAX_LTE: Time + someTime_MIN_EQUAL: Time + someTime_MIN_GT: Time + someTime_MIN_GTE: Time + someTime_MIN_LT: Time + someTime_MIN_LTE: Time +} + +input PostLikesFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] +} + +input PostLikesNodeAggregationWhereInput { + AND: [PostLikesNodeAggregationWhereInput!] + NOT: PostLikesNodeAggregationWhereInput + OR: [PostLikesNodeAggregationWhereInput!] + someBigInt_AVERAGE_EQUAL: BigInt + someBigInt_AVERAGE_GT: BigInt + someBigInt_AVERAGE_GTE: BigInt + someBigInt_AVERAGE_LT: BigInt + someBigInt_AVERAGE_LTE: BigInt + someBigInt_EQUAL: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_MAX_EQUAL: BigInt + someBigInt_MAX_GT: BigInt + someBigInt_MAX_GTE: BigInt + someBigInt_MAX_LT: BigInt + someBigInt_MAX_LTE: BigInt + someBigInt_MIN_EQUAL: BigInt + someBigInt_MIN_GT: BigInt + someBigInt_MIN_GTE: BigInt + someBigInt_MIN_LT: BigInt + someBigInt_MIN_LTE: BigInt + someBigInt_SUM_EQUAL: BigInt + someBigInt_SUM_GT: BigInt + someBigInt_SUM_GTE: BigInt + someBigInt_SUM_LT: BigInt + someBigInt_SUM_LTE: BigInt + someDateTime_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_MAX_EQUAL: DateTime + someDateTime_MAX_GT: DateTime + someDateTime_MAX_GTE: DateTime + someDateTime_MAX_LT: DateTime + someDateTime_MAX_LTE: DateTime + someDateTime_MIN_EQUAL: DateTime + someDateTime_MIN_GT: DateTime + someDateTime_MIN_GTE: DateTime + someDateTime_MIN_LT: DateTime + someDateTime_MIN_LTE: DateTime + someDuration_AVERAGE_EQUAL: Duration + someDuration_AVERAGE_GT: Duration + someDuration_AVERAGE_GTE: Duration + someDuration_AVERAGE_LT: Duration + someDuration_AVERAGE_LTE: Duration + someDuration_EQUAL: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_GT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_GTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_LT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_LTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_MAX_EQUAL: Duration + someDuration_MAX_GT: Duration + someDuration_MAX_GTE: Duration + someDuration_MAX_LT: Duration + someDuration_MAX_LTE: Duration + someDuration_MIN_EQUAL: Duration + someDuration_MIN_GT: Duration + someDuration_MIN_GTE: Duration + someDuration_MIN_LT: Duration + someDuration_MIN_LTE: Duration + someFloat_AVERAGE_EQUAL: Float + someFloat_AVERAGE_GT: Float + someFloat_AVERAGE_GTE: Float + someFloat_AVERAGE_LT: Float + someFloat_AVERAGE_LTE: Float + someFloat_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_MAX_EQUAL: Float + someFloat_MAX_GT: Float + someFloat_MAX_GTE: Float + someFloat_MAX_LT: Float + someFloat_MAX_LTE: Float + someFloat_MIN_EQUAL: Float + someFloat_MIN_GT: Float + someFloat_MIN_GTE: Float + someFloat_MIN_LT: Float + someFloat_MIN_LTE: Float + someFloat_SUM_EQUAL: Float + someFloat_SUM_GT: Float + someFloat_SUM_GTE: Float + someFloat_SUM_LT: Float + someFloat_SUM_LTE: Float + someId_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_AVERAGE_EQUAL: Float + someInt_AVERAGE_GT: Float + someInt_AVERAGE_GTE: Float + someInt_AVERAGE_LT: Float + someInt_AVERAGE_LTE: Float + someInt_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_MAX_EQUAL: Int + someInt_MAX_GT: Int + someInt_MAX_GTE: Int + someInt_MAX_LT: Int + someInt_MAX_LTE: Int + someInt_MIN_EQUAL: Int + someInt_MIN_GT: Int + someInt_MIN_GTE: Int + someInt_MIN_LT: Int + someInt_MIN_LTE: Int + someInt_SUM_EQUAL: Int + someInt_SUM_GT: Int + someInt_SUM_GTE: Int + someInt_SUM_LT: Int + someInt_SUM_LTE: Int + someLocalDateTime_EQUAL: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_MAX_EQUAL: LocalDateTime + someLocalDateTime_MAX_GT: LocalDateTime + someLocalDateTime_MAX_GTE: LocalDateTime + someLocalDateTime_MAX_LT: LocalDateTime + someLocalDateTime_MAX_LTE: LocalDateTime + someLocalDateTime_MIN_EQUAL: LocalDateTime + someLocalDateTime_MIN_GT: LocalDateTime + someLocalDateTime_MIN_GTE: LocalDateTime + someLocalDateTime_MIN_LT: LocalDateTime + someLocalDateTime_MIN_LTE: LocalDateTime + someLocalTime_EQUAL: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_MAX_EQUAL: LocalTime + someLocalTime_MAX_GT: LocalTime + someLocalTime_MAX_GTE: LocalTime + someLocalTime_MAX_LT: LocalTime + someLocalTime_MAX_LTE: LocalTime + someLocalTime_MIN_EQUAL: LocalTime + someLocalTime_MIN_GT: LocalTime + someLocalTime_MIN_GTE: LocalTime + someLocalTime_MIN_LT: LocalTime + someLocalTime_MIN_LTE: LocalTime + someString_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_LENGTH_EQUAL: Float + someString_AVERAGE_LENGTH_GT: Float + someString_AVERAGE_LENGTH_GTE: Float + someString_AVERAGE_LENGTH_LT: Float + someString_AVERAGE_LENGTH_LTE: Float + someString_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_LENGTH_EQUAL: Int + someString_LONGEST_LENGTH_GT: Int + someString_LONGEST_LENGTH_GTE: Int + someString_LONGEST_LENGTH_LT: Int + someString_LONGEST_LENGTH_LTE: Int + someString_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_LENGTH_EQUAL: Int + someString_SHORTEST_LENGTH_GT: Int + someString_SHORTEST_LENGTH_GTE: Int + someString_SHORTEST_LENGTH_LT: Int + someString_SHORTEST_LENGTH_LTE: Int + someString_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someTime_EQUAL: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_GT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_GTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_LT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_LTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_MAX_EQUAL: Time + someTime_MAX_GT: Time + someTime_MAX_GTE: Time + someTime_MAX_LT: Time + someTime_MAX_LTE: Time + someTime_MIN_EQUAL: Time + someTime_MIN_GT: Time + someTime_MIN_GTE: Time + someTime_MIN_LT: Time + someTime_MIN_LTE: Time +} + +type PostLikesRelationship implements Likes { + cursor: String! + node: User! + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time +} + +input PostLikesUpdateConnectionInput { + edge: LikesUpdateInput + node: UserUpdateInput +} + +input PostLikesUpdateFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + delete: [PostLikesDeleteFieldInput!] + disconnect: [PostLikesDisconnectFieldInput!] + update: PostLikesUpdateConnectionInput + where: PostLikesConnectionWhere +} + +input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] +} + +input PostRelationInput { + likes: [PostLikesCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. +\\"\\"\\" +input PostSort { + title: SortDirection +} + +input PostUpdateInput { + likes: [PostLikesUpdateFieldInput!] + title: String +} + +type PostUserLikesAggregationSelection { + count: Int! + edge: PostUserLikesEdgeAggregateSelection + node: PostUserLikesNodeAggregateSelection +} + +type PostUserLikesEdgeAggregateSelection { + someBigInt: BigIntAggregateSelectionNullable! + someDateTime: DateTimeAggregateSelectionNullable! + someDuration: DurationAggregateSelectionNullable! + someFloat: FloatAggregateSelectionNullable! + someId: IDAggregateSelectionNullable! + someInt: IntAggregateSelectionNullable! + someLocalDateTime: LocalDateTimeAggregateSelectionNullable! + someLocalTime: LocalTimeAggregateSelectionNullable! + someString: StringAggregateSelectionNullable! + someTime: TimeAggregateSelectionNullable! +} + +type PostUserLikesNodeAggregateSelection { + someBigInt: BigIntAggregateSelectionNullable! + someDateTime: DateTimeAggregateSelectionNullable! + someDuration: DurationAggregateSelectionNullable! + someFloat: FloatAggregateSelectionNullable! + someId: IDAggregateSelectionNullable! + someInt: IntAggregateSelectionNullable! + someLocalDateTime: LocalDateTimeAggregateSelectionNullable! + someLocalTime: LocalTimeAggregateSelectionNullable! + someString: StringAggregateSelectionNullable! + someTime: TimeAggregateSelectionNullable! +} + +input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + likes: UserWhere @deprecated(reason: \\"Use \`likes_SOME\` instead.\\") + likesAggregate: PostLikesAggregateInput + likesConnection: PostLikesConnectionWhere @deprecated(reason: \\"Use \`likesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Posts where all of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_ALL: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_NONE: PostLikesConnectionWhere + likesConnection_NOT: PostLikesConnectionWhere @deprecated(reason: \\"Use \`likesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Posts where one of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SINGLE: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SOME: PostLikesConnectionWhere + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + likes_ALL: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + likes_NONE: UserWhere + likes_NOT: UserWhere @deprecated(reason: \\"Use \`likes_NONE\` instead.\\") + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + likes_SINGLE: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + likes_SOME: UserWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" +scalar Time + +type TimeAggregateSelectionNullable { + max: Time + min: Time +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time +} + +type UserAggregateSelection { + count: Int! + someBigInt: BigIntAggregateSelectionNullable! + someDateTime: DateTimeAggregateSelectionNullable! + someDuration: DurationAggregateSelectionNullable! + someFloat: FloatAggregateSelectionNullable! + someId: IDAggregateSelectionNullable! + someInt: IntAggregateSelectionNullable! + someLocalDateTime: LocalDateTimeAggregateSelectionNullable! + someLocalTime: LocalTimeAggregateSelectionNullable! + someString: StringAggregateSelectionNullable! + someTime: TimeAggregateSelectionNullable! +} + +input UserConnectWhere { + node: UserWhere! +} + +input UserCreateInput { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time +} + +type UserEdge { + cursor: String! + node: User! +} + +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 { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection +} + +input UserUpdateInput { + someBigInt: BigInt + someBigInt_DECREMENT: BigInt + someBigInt_INCREMENT: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someFloat_ADD: Float + someFloat_DIVIDE: Float + someFloat_MULTIPLY: Float + someFloat_SUBTRACT: Float + someId: ID + someInt: Int + someInt_DECREMENT: Int + someInt_INCREMENT: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + someBigInt: BigInt + someBigInt_GT: BigInt + someBigInt_GTE: BigInt + someBigInt_IN: [BigInt] + someBigInt_LT: BigInt + someBigInt_LTE: BigInt + someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDateTime: DateTime + someDateTime_GT: DateTime + someDateTime_GTE: DateTime + someDateTime_IN: [DateTime] + someDateTime_LT: DateTime + someDateTime_LTE: DateTime + someDateTime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDateTime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDuration: Duration + someDuration_GT: Duration + someDuration_GTE: Duration + someDuration_IN: [Duration] + someDuration_LT: Duration + someDuration_LTE: Duration + someDuration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDuration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someFloat: Float + someFloat_GT: Float + someFloat_GTE: Float + someFloat_IN: [Float] + someFloat_LT: Float + someFloat_LTE: Float + someFloat_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someFloat_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId: ID + someId_CONTAINS: ID + someId_ENDS_WITH: ID + someId_IN: [ID] + someId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_STARTS_WITH: ID + someInt: Int + someInt_GT: Int + someInt_GTE: Int + someInt_IN: [Int] + someInt_LT: Int + someInt_LTE: Int + someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime: LocalDateTime + someLocalDateTime_GT: LocalDateTime + someLocalDateTime_GTE: LocalDateTime + someLocalDateTime_IN: [LocalDateTime] + someLocalDateTime_LT: LocalDateTime + someLocalDateTime_LTE: LocalDateTime + someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime: LocalTime + someLocalTime_GT: LocalTime + someLocalTime_GTE: LocalTime + someLocalTime_IN: [LocalTime] + someLocalTime_LT: LocalTime + someLocalTime_LTE: LocalTime + someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString: String + someString_CONTAINS: String + someString_ENDS_WITH: String + someString_IN: [String] + someString_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_STARTS_WITH: String + someTime: Time + someTime_GT: Time + someTime_GTE: Time + someTime_IN: [Time] + someTime_LT: Time + someTime_LTE: Time + someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index c2918b1f5c..7c280a74ab 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -45,655 +45,644 @@ describe("Arrays Methods", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - pay: [Float] - } - - input ActedInCreateInput { - pay: [Float] - } - - input ActedInSort { - pay: SortDirection - } - - input ActedInUpdateInput { - pay: [Float] - pay_POP: Int - pay_PUSH: [Float] - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - pay: [Float] - pay_INCLUDES: Float - pay_NOT: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - pay_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: MovieSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput - node: MovieCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Movie! - \\"\\"\\"\\"\\"\\" - pay: [Float] - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInNodeAggregateSelection { - averageRating: FloatAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - averageRating: Float! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - ratings: [Float!]! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - \\"\\"\\"\\"\\"\\" - pay: [Float] - } - - input MovieActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - averageRating: FloatAggregateSelectionNonNullable! - count: Int! - id: IDAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - averageRating: Float! - id: ID! - ratings: [Float!]! - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - averageRating: SortDirection - id: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - ratings: [Float!] - ratings_POP: Int - ratings_PUSH: [Float!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - ratings: [Float!] - ratings_INCLUDES: Float - ratings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - ratings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + pay: [Float] +} + +input ActedInCreateInput { + pay: [Float] +} + +input ActedInSort { + pay: SortDirection +} + +input ActedInUpdateInput { + pay: [Float] + pay_POP: Int + pay_PUSH: [Float] +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + pay: [Float] + pay_INCLUDES: Float + pay_NOT: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + pay_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActedInSort + node: MovieSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + edge: ActedInCreateInput + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Movie! + pay: [Float] +} + +input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInNodeAggregateSelection { + averageRating: FloatAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float! + id: ID! + ratings: [Float!]! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + pay: [Float] +} + +input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + averageRating: FloatAggregateSelectionNonNullable! + count: Int! + id: IDAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + averageRating: Float! + id: ID! + ratings: [Float!]! +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + averageRating: SortDirection + id: SortDirection +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + ratings: [Float!] + ratings_POP: Int + ratings_PUSH: [Float!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float!] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + ratings: [Float!] + ratings_INCLUDES: Float + ratings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + ratings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index cd70d24cf4..1aa23fe658 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -35,173 +35,169 @@ describe("Arrays", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - averageRating: Float! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - ratings: [Float!]! - } - - type MovieAggregateSelection { - averageRating: FloatAggregateSelectionNonNullable! - count: Int! - id: IDAggregateSelectionNonNullable! - } - - input MovieCreateInput { - averageRating: Float! - id: ID! - ratings: [Float!]! - } - - 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 { - averageRating: SortDirection - id: SortDirection - } - - input MovieUpdateInput { - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - ratings: [Float!] - ratings_POP: Int - ratings_PUSH: [Float!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - ratings: [Float!] - ratings_INCLUDES: Float - ratings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - ratings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Movie { + averageRating: Float! + id: ID! + ratings: [Float!]! +} + +type MovieAggregateSelection { + averageRating: FloatAggregateSelectionNonNullable! + count: Int! + id: IDAggregateSelectionNonNullable! +} + +input MovieCreateInput { + averageRating: Float! + id: ID! + ratings: [Float!]! +} + +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 { + averageRating: SortDirection + id: SortDirection +} + +input MovieUpdateInput { + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + ratings: [Float!] + ratings_POP: Int + ratings_PUSH: [Float!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float!] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + ratings: [Float!] + ratings_INCLUDES: Float + ratings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + ratings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index 08b54f0e2d..c6b99a3ba1 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -42,591 +42,583 @@ describe("Authorization", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"\\"\\"\\" - type Post { - \\"\\"\\"\\"\\"\\" - author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type PostAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput - } - - input PostAuthorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type PostAuthorConnection { - edges: [PostAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PostAuthorConnectionSort { - node: UserSort - } - - input PostAuthorConnectionWhere { - AND: [PostAuthorConnectionWhere!] - NOT: PostAuthorConnectionWhere - OR: [PostAuthorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PostAuthorCreateFieldInput { - node: UserCreateInput! - } - - input PostAuthorDeleteFieldInput { - delete: UserDeleteInput - where: PostAuthorConnectionWhere - } - - input PostAuthorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: PostAuthorConnectionWhere - } - - input PostAuthorFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - } - - input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type PostAuthorRelationship { - cursor: String! - node: User! - } - - input PostAuthorUpdateConnectionInput { - node: UserUpdateInput - } - - input PostAuthorUpdateFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - delete: PostAuthorDeleteFieldInput - disconnect: PostAuthorDisconnectFieldInput - update: PostAuthorUpdateConnectionInput - where: PostAuthorConnectionWhere - } - - input PostConnectInput { - author: PostAuthorConnectFieldInput - } - - input PostCreateInput { - author: PostAuthorFieldInput - id: ID! - name: String! - } - - input PostDeleteInput { - author: PostAuthorDeleteFieldInput - } - - input PostDisconnectInput { - author: PostAuthorDisconnectFieldInput - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] - } - - input PostRelationInput { - author: PostAuthorCreateFieldInput - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - id: SortDirection - name: SortDirection - } - - input PostUpdateInput { - author: PostAuthorUpdateFieldInput - id: ID - name: String - } - - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - - type PostUserAuthorNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - author: UserWhere - authorAggregate: PostAuthorAggregateInput - authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - posts(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! - postsAggregate(directed: Boolean = true, where: UserWhere): UserUserPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! - } - - type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input UserConnectInput { - posts: [UserPostsConnectFieldInput!] - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - id: ID! - name: String! - posts: UserPostsFieldInput - } - - input UserDeleteInput { - posts: [UserPostsDeleteFieldInput!] - } - - input UserDisconnectInput { - posts: [UserPostsDisconnectFieldInput!] - } - - type UserEdge { - cursor: String! - node: User! - } - - 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!] - } - - input UserPostsAggregateInput { - AND: [UserPostsAggregateInput!] - NOT: UserPostsAggregateInput - OR: [UserPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserPostsNodeAggregationWhereInput - } - - input UserPostsConnectFieldInput { - connect: [UserConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type UserPostsConnection { - edges: [UserPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserPostsConnectionSort { - node: UserSort - } - - input UserPostsConnectionWhere { - AND: [UserPostsConnectionWhere!] - NOT: UserPostsConnectionWhere - OR: [UserPostsConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input UserPostsCreateFieldInput { - node: UserCreateInput! - } - - input UserPostsDeleteFieldInput { - delete: UserDeleteInput - where: UserPostsConnectionWhere - } - - input UserPostsDisconnectFieldInput { - disconnect: UserDisconnectInput - where: UserPostsConnectionWhere - } - - input UserPostsFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - } - - input UserPostsNodeAggregationWhereInput { - AND: [UserPostsNodeAggregationWhereInput!] - NOT: UserPostsNodeAggregationWhereInput - OR: [UserPostsNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type UserPostsRelationship { - cursor: String! - node: User! - } - - input UserPostsUpdateConnectionInput { - node: UserUpdateInput - } - - input UserPostsUpdateFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - delete: [UserPostsDeleteFieldInput!] - disconnect: [UserPostsDisconnectFieldInput!] - update: UserPostsUpdateConnectionInput - where: UserPostsConnectionWhere - } - - input UserRelationInput { - posts: [UserPostsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - id: SortDirection - name: SortDirection - } - - input UserUpdateInput { - id: ID - name: String - posts: [UserPostsUpdateFieldInput!] - } - - type UserUserPostsAggregationSelection { - count: Int! - node: UserUserPostsNodeAggregateSelection - } - - type UserUserPostsNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - posts: UserWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: UserPostsAggregateInput - postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere - postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere - \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" - posts_ALL: UserWhere - \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" - posts_NONE: UserWhere - posts_NOT: UserWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" - posts_SINGLE: UserWhere - \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" - posts_SOME: UserWhere - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Post { + author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + id: ID! + name: String! +} + +type PostAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input PostAuthorAggregateInput { + AND: [PostAuthorAggregateInput!] + NOT: PostAuthorAggregateInput + OR: [PostAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostAuthorNodeAggregationWhereInput +} + +input PostAuthorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PostAuthorConnectionSort { + node: UserSort +} + +input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PostAuthorCreateFieldInput { + node: UserCreateInput! +} + +input PostAuthorDeleteFieldInput { + delete: UserDeleteInput + where: PostAuthorConnectionWhere +} + +input PostAuthorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostAuthorConnectionWhere +} + +input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput +} + +input PostAuthorNodeAggregationWhereInput { + AND: [PostAuthorNodeAggregationWhereInput!] + NOT: PostAuthorNodeAggregationWhereInput + OR: [PostAuthorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type PostAuthorRelationship { + cursor: String! + node: User! +} + +input PostAuthorUpdateConnectionInput { + node: UserUpdateInput +} + +input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere +} + +input PostConnectInput { + author: PostAuthorConnectFieldInput +} + +input PostCreateInput { + author: PostAuthorFieldInput + id: ID! + name: String! +} + +input PostDeleteInput { + author: PostAuthorDeleteFieldInput +} + +input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput +} + +type PostEdge { + cursor: String! + node: Post! +} + +input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] +} + +input PostRelationInput { + author: PostAuthorCreateFieldInput +} + +\\"\\"\\" +Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. +\\"\\"\\" +input PostSort { + id: SortDirection + name: SortDirection +} + +input PostUpdateInput { + author: PostAuthorUpdateFieldInput + id: ID + name: String +} + +type PostUserAuthorAggregationSelection { + count: Int! + node: PostUserAuthorNodeAggregateSelection +} + +type PostUserAuthorNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + id: ID! + name: String! + posts(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! + postsAggregate(directed: Boolean = true, where: UserWhere): UserUserPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! +} + +type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input UserConnectInput { + posts: [UserPostsConnectFieldInput!] +} + +input UserConnectWhere { + node: UserWhere! +} + +input UserCreateInput { + id: ID! + name: String! + posts: UserPostsFieldInput +} + +input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] +} + +input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] +} + +type UserEdge { + cursor: String! + node: User! +} + +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!] +} + +input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput +} + +input UserPostsConnectFieldInput { + connect: [UserConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserPostsConnectionSort { + node: UserSort +} + +input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input UserPostsCreateFieldInput { + node: UserCreateInput! +} + +input UserPostsDeleteFieldInput { + delete: UserDeleteInput + where: UserPostsConnectionWhere +} + +input UserPostsDisconnectFieldInput { + disconnect: UserDisconnectInput + where: UserPostsConnectionWhere +} + +input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] +} + +input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type UserPostsRelationship { + cursor: String! + node: User! +} + +input UserPostsUpdateConnectionInput { + node: UserUpdateInput +} + +input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere +} + +input UserRelationInput { + posts: [UserPostsCreateFieldInput!] +} + +\\"\\"\\" +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 { + id: SortDirection + name: SortDirection +} + +input UserUpdateInput { + id: ID + name: String + posts: [UserPostsUpdateFieldInput!] +} + +type UserUserPostsAggregationSelection { + count: Int! + node: UserUserPostsNodeAggregateSelection +} + +type UserUserPostsNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: UserWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" + posts_ALL: UserWhere + \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" + posts_NONE: UserWhere + posts_NOT: UserWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" + posts_SINGLE: UserWhere + \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" + posts_SOME: UserWhere +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 15e6337853..2b3ee5a901 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -60,226 +60,223 @@ describe("Comments", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A custom scalar.\\"\\"\\" - scalar CustomScalar - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - \\"\\"\\"An enumeration of movie genres.\\"\\"\\" - enum Genre { - ACTION - DRAMA - ROMANCE - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"A type describing a movie.\\"\\"\\" - type Movie { - \\"\\"\\"The number of actors who acted in the movie.\\"\\"\\" - actorCount: Int - \\"\\"\\"The average rating for the movie.\\"\\"\\" - averageRating: Float - \\"\\"\\"\\"\\"\\" - customScalar: CustomScalar - \\"\\"\\"\\"\\"\\" - genre: Genre - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\" - Is the movie active? - - This is measured based on annual profit. - \\"\\"\\" - isActive: Boolean - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - actorCount: Int - averageRating: Float - customScalar: CustomScalar - genre: Genre - id: ID - isActive: Boolean - } - - 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 { - actorCount: SortDirection - averageRating: SortDirection - customScalar: SortDirection - genre: SortDirection - id: SortDirection - isActive: SortDirection - } - - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - customScalar: CustomScalar - genre: Genre - id: ID - isActive: Boolean - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - customScalar: CustomScalar - customScalar_IN: [CustomScalar] - customScalar_NOT: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - customScalar_NOT_IN: [CustomScalar] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - genre: Genre - genre_IN: [Genre] - genre_NOT: Genre @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - genre_NOT_IN: [Genre] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A custom scalar.\\"\\"\\" +scalar CustomScalar + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +\\"\\"\\"An enumeration of movie genres.\\"\\"\\" +enum Genre { + ACTION + DRAMA + ROMANCE +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +\\"\\"\\"A type describing a movie.\\"\\"\\" +type Movie { + \\"\\"\\"The number of actors who acted in the movie.\\"\\"\\" + actorCount: Int + \\"\\"\\"The average rating for the movie.\\"\\"\\" + averageRating: Float + customScalar: CustomScalar + genre: Genre + id: ID + \\"\\"\\" + Is the movie active? + + This is measured based on annual profit. + \\"\\"\\" + isActive: Boolean +} + +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + actorCount: Int + averageRating: Float + customScalar: CustomScalar + genre: Genre + id: ID + isActive: Boolean +} + +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 { + actorCount: SortDirection + averageRating: SortDirection + customScalar: SortDirection + genre: SortDirection + id: SortDirection + isActive: SortDirection +} + +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + customScalar: CustomScalar + genre: Genre + id: ID + isActive: Boolean +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + customScalar: CustomScalar + customScalar_IN: [CustomScalar] + customScalar_NOT: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + customScalar_NOT_IN: [CustomScalar] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + genre: Genre + genre_IN: [Genre] + genre_NOT: Genre @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + genre_NOT_IN: [Genre] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); describe("Relationship", () => { @@ -299,400 +296,396 @@ describe("Comments", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"Actors in Movie\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + name: String +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + name: String +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + \\"\\"\\"Actors in Movie\\"\\"\\" + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Interface", async () => { @@ -725,530 +718,519 @@ describe("Comments", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActedInCreateInput { - screenTime: Int! - } - - input ActedInSort { - screenTime: SortDirection - } - - input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"Acted in Production\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - edge: ActedInCreateInput! - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - runtime: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - runtime: Int! - title: String! - } - - 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 { - runtime: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - episodes: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - episodes: Int! - title: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - episodes: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - episodes: Int - episodes_DECREMENT: Int - episodes_INCREMENT: Int - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + screenTime: Int! +} + +input ActedInCreateInput { + screenTime: Int! +} + +input ActedInSort { + screenTime: SortDirection +} + +input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + \\"\\"\\"Acted in Production\\"\\"\\" + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + edge: ActedInCreateInput! + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + screenTime: Int! +} + +input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie implements Production { + runtime: Int! + title: String! +} + +type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + runtime: Int! + title: String! +} + +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 { + runtime: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + title: String! +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + episodes: Int! + title: String! +} + +type SeriesAggregateSelection { + count: Int! + episodes: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + episodes: Int! + title: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + episodes: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + episodes: Int + episodes_DECREMENT: Int + episodes_INCREMENT: Int + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + episodes: Int + episodes_GT: Int + episodes_GTE: Int + episodes_IN: [Int!] + episodes_LT: Int + episodes_LTE: Int + episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); test("Unions", async () => { @@ -1269,412 +1251,406 @@ describe("Comments", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - id: ID - } - - type GenreAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input GenreConnectWhere { - node: GenreWhere! - } - - 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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! - \\"\\"\\"\\"\\"\\" - searchNoDirective: Search - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - search: MovieSearchConnectInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - id: ID - search: MovieSearchCreateInput - } - - input MovieDeleteInput { - search: MovieSearchDeleteInput - } - - input MovieDisconnectInput { - search: MovieSearchDisconnectInput - } - - 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!] - } - - input MovieRelationInput { - search: MovieSearchCreateFieldInput - } - - input MovieSearchConnectInput { - Genre: [MovieSearchGenreConnectFieldInput!] - Movie: [MovieSearchMovieConnectFieldInput!] - } - - type MovieSearchConnection { - edges: [MovieSearchRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieSearchConnectionWhere { - Genre: MovieSearchGenreConnectionWhere - Movie: MovieSearchMovieConnectionWhere - } - - input MovieSearchCreateFieldInput { - Genre: [MovieSearchGenreCreateFieldInput!] - Movie: [MovieSearchMovieCreateFieldInput!] - } - - input MovieSearchCreateInput { - Genre: MovieSearchGenreFieldInput - Movie: MovieSearchMovieFieldInput - } - - input MovieSearchDeleteInput { - Genre: [MovieSearchGenreDeleteFieldInput!] - Movie: [MovieSearchMovieDeleteFieldInput!] - } - - input MovieSearchDisconnectInput { - Genre: [MovieSearchGenreDisconnectFieldInput!] - Movie: [MovieSearchMovieDisconnectFieldInput!] - } - - input MovieSearchGenreConnectFieldInput { - where: GenreConnectWhere - } - - input MovieSearchGenreConnectionWhere { - AND: [MovieSearchGenreConnectionWhere!] - NOT: MovieSearchGenreConnectionWhere - OR: [MovieSearchGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieSearchGenreCreateFieldInput { - node: GenreCreateInput! - } - - input MovieSearchGenreDeleteFieldInput { - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchGenreDisconnectFieldInput { - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchGenreFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] - } - - input MovieSearchGenreUpdateConnectionInput { - node: GenreUpdateInput - } - - input MovieSearchGenreUpdateFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] - delete: [MovieSearchGenreDeleteFieldInput!] - disconnect: [MovieSearchGenreDisconnectFieldInput!] - update: MovieSearchGenreUpdateConnectionInput - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere - } - - input MovieSearchMovieConnectionWhere { - AND: [MovieSearchMovieConnectionWhere!] - NOT: MovieSearchMovieConnectionWhere - OR: [MovieSearchMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieSearchMovieCreateFieldInput { - node: MovieCreateInput! - } - - input MovieSearchMovieDeleteFieldInput { - delete: MovieDeleteInput - where: MovieSearchMovieConnectionWhere - } - - input MovieSearchMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieSearchMovieConnectionWhere - } - - input MovieSearchMovieFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] - } - - input MovieSearchMovieUpdateConnectionInput { - node: MovieUpdateInput - } - - input MovieSearchMovieUpdateFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] - delete: [MovieSearchMovieDeleteFieldInput!] - disconnect: [MovieSearchMovieDisconnectFieldInput!] - update: MovieSearchMovieUpdateConnectionInput - where: MovieSearchMovieConnectionWhere - } - - type MovieSearchRelationship { - cursor: String! - node: Search! - } - - input MovieSearchUpdateInput { - Genre: [MovieSearchGenreUpdateFieldInput!] - Movie: [MovieSearchMovieUpdateFieldInput!] - } - - \\"\\"\\" - 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 { - id: ID - search: MovieSearchUpdateInput - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - searchConnection: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_ALL: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_NONE: MovieSearchConnectionWhere - searchConnection_NOT: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SINGLE: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SOME: MovieSearchConnectionWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - union Search = Genre | Movie - - input SearchWhere { - Genre: GenreWhere - Movie: MovieWhere - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Genre { + id: ID +} + +type GenreAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input GenreConnectWhere { + node: GenreWhere! +} + +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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID + search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! + searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + searchNoDirective: Search +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + search: MovieSearchConnectInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + id: ID + search: MovieSearchCreateInput +} + +input MovieDeleteInput { + search: MovieSearchDeleteInput +} + +input MovieDisconnectInput { + search: MovieSearchDisconnectInput +} + +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!] +} + +input MovieRelationInput { + search: MovieSearchCreateFieldInput +} + +input MovieSearchConnectInput { + Genre: [MovieSearchGenreConnectFieldInput!] + Movie: [MovieSearchMovieConnectFieldInput!] +} + +type MovieSearchConnection { + edges: [MovieSearchRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieSearchConnectionWhere { + Genre: MovieSearchGenreConnectionWhere + Movie: MovieSearchMovieConnectionWhere +} + +input MovieSearchCreateFieldInput { + Genre: [MovieSearchGenreCreateFieldInput!] + Movie: [MovieSearchMovieCreateFieldInput!] +} + +input MovieSearchCreateInput { + Genre: MovieSearchGenreFieldInput + Movie: MovieSearchMovieFieldInput +} + +input MovieSearchDeleteInput { + Genre: [MovieSearchGenreDeleteFieldInput!] + Movie: [MovieSearchMovieDeleteFieldInput!] +} + +input MovieSearchDisconnectInput { + Genre: [MovieSearchGenreDisconnectFieldInput!] + Movie: [MovieSearchMovieDisconnectFieldInput!] +} + +input MovieSearchGenreConnectFieldInput { + where: GenreConnectWhere +} + +input MovieSearchGenreConnectionWhere { + AND: [MovieSearchGenreConnectionWhere!] + NOT: MovieSearchGenreConnectionWhere + OR: [MovieSearchGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieSearchGenreCreateFieldInput { + node: GenreCreateInput! +} + +input MovieSearchGenreDeleteFieldInput { + where: MovieSearchGenreConnectionWhere +} + +input MovieSearchGenreDisconnectFieldInput { + where: MovieSearchGenreConnectionWhere +} + +input MovieSearchGenreFieldInput { + connect: [MovieSearchGenreConnectFieldInput!] + create: [MovieSearchGenreCreateFieldInput!] +} + +input MovieSearchGenreUpdateConnectionInput { + node: GenreUpdateInput +} + +input MovieSearchGenreUpdateFieldInput { + connect: [MovieSearchGenreConnectFieldInput!] + create: [MovieSearchGenreCreateFieldInput!] + delete: [MovieSearchGenreDeleteFieldInput!] + disconnect: [MovieSearchGenreDisconnectFieldInput!] + update: MovieSearchGenreUpdateConnectionInput + where: MovieSearchGenreConnectionWhere +} + +input MovieSearchMovieConnectFieldInput { + connect: [MovieConnectInput!] + where: MovieConnectWhere +} + +input MovieSearchMovieConnectionWhere { + AND: [MovieSearchMovieConnectionWhere!] + NOT: MovieSearchMovieConnectionWhere + OR: [MovieSearchMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieSearchMovieCreateFieldInput { + node: MovieCreateInput! +} + +input MovieSearchMovieDeleteFieldInput { + delete: MovieDeleteInput + where: MovieSearchMovieConnectionWhere +} + +input MovieSearchMovieDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieSearchMovieConnectionWhere +} + +input MovieSearchMovieFieldInput { + connect: [MovieSearchMovieConnectFieldInput!] + create: [MovieSearchMovieCreateFieldInput!] +} + +input MovieSearchMovieUpdateConnectionInput { + node: MovieUpdateInput +} + +input MovieSearchMovieUpdateFieldInput { + connect: [MovieSearchMovieConnectFieldInput!] + create: [MovieSearchMovieCreateFieldInput!] + delete: [MovieSearchMovieDeleteFieldInput!] + disconnect: [MovieSearchMovieDisconnectFieldInput!] + update: MovieSearchMovieUpdateConnectionInput + where: MovieSearchMovieConnectionWhere +} + +type MovieSearchRelationship { + cursor: String! + node: Search! +} + +input MovieSearchUpdateInput { + Genre: [MovieSearchGenreUpdateFieldInput!] + Movie: [MovieSearchMovieUpdateFieldInput!] +} + +\\"\\"\\" +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 { + id: ID + search: MovieSearchUpdateInput +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + searchConnection: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_ALL: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_NONE: MovieSearchConnectionWhere + searchConnection_NOT: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_SINGLE: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_SOME: MovieSearchConnectionWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +union Search = Genre | Movie + +input SearchWhere { + Genre: GenreWhere + Movie: MovieWhere +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); }); diff --git a/packages/graphql/tests/schema/connect-or-create-id.test.ts b/packages/graphql/tests/schema/connect-or-create-id.test.ts index 229deaf2ac..351844b798 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -39,443 +39,437 @@ describe("connect or create with id", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectOrCreateInput { - movies: [ActorMoviesConnectOrCreateFieldInput!] - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - name: String! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - input ActorMoviesConnectOrCreateFieldInput { - onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! - } - - input ActorMoviesConnectOrCreateFieldInputOnCreate { - node: MovieOnCreateInput! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - where: ActorMoviesConnectionWhere - } - - input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - title: String! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieOnCreateInput { - title: String! - } - - 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 - title: SortDirection - } - - input MovieUniqueWhere { - id: ID - } - - input MovieUpdateInput { - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + name: String! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! +} + +input ActorMoviesConnectOrCreateFieldInputOnCreate { + node: MovieOnCreateInput! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input ActorMoviesDeleteFieldInput { + where: ActorMoviesConnectionWhere +} + +input ActorMoviesDisconnectFieldInput { + where: ActorMoviesConnectionWhere +} + +input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] +} + +input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Movie { + id: ID! + title: String! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + title: String! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +input MovieOnCreateInput { + title: String! +} + +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 + title: SortDirection +} + +input MovieUniqueWhere { + id: ID +} + +input MovieUpdateInput { + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("connect or create with non-autogenerated id", async () => { @@ -497,687 +491,678 @@ describe("connect or create with id", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, connectOrCreate: PostConnectOrCreateInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, connectOrCreate: UserConnectOrCreateInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"\\"\\"\\" - type Post { - \\"\\"\\"\\"\\"\\" - content: String! - \\"\\"\\"\\"\\"\\" - createdAt: DateTime! - \\"\\"\\"\\"\\"\\" - creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection - creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCreatorConnectionSort!], where: PostCreatorConnectionWhere): PostCreatorConnection! - \\"\\"\\"\\"\\"\\" - id: ID! - } - - type PostAggregateSelection { - content: StringAggregateSelectionNonNullable! - count: Int! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - } - - input PostConnectInput { - creator: PostCreatorConnectFieldInput - } - - input PostConnectOrCreateInput { - creator: PostCreatorConnectOrCreateFieldInput - } - - input PostConnectOrCreateWhere { - node: PostUniqueWhere! - } - - input PostConnectWhere { - node: PostWhere! - } - - input PostCreateInput { - content: String! - createdAt: DateTime! - creator: PostCreatorFieldInput - id: ID! - } - - input PostCreatorAggregateInput { - AND: [PostCreatorAggregateInput!] - NOT: PostCreatorAggregateInput - OR: [PostCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostCreatorNodeAggregationWhereInput - } - - input PostCreatorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - input PostCreatorConnectOrCreateFieldInput { - onCreate: PostCreatorConnectOrCreateFieldInputOnCreate! - where: UserConnectOrCreateWhere! - } - - input PostCreatorConnectOrCreateFieldInputOnCreate { - node: UserOnCreateInput! - } - - type PostCreatorConnection { - edges: [PostCreatorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PostCreatorConnectionSort { - node: UserSort - } - - input PostCreatorConnectionWhere { - AND: [PostCreatorConnectionWhere!] - NOT: PostCreatorConnectionWhere - OR: [PostCreatorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PostCreatorCreateFieldInput { - node: UserCreateInput! - } - - input PostCreatorDeleteFieldInput { - delete: UserDeleteInput - where: PostCreatorConnectionWhere - } - - input PostCreatorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: PostCreatorConnectionWhere - } - - input PostCreatorFieldInput { - connect: PostCreatorConnectFieldInput - connectOrCreate: PostCreatorConnectOrCreateFieldInput - create: PostCreatorCreateFieldInput - } - - input PostCreatorNodeAggregationWhereInput { - AND: [PostCreatorNodeAggregationWhereInput!] - NOT: PostCreatorNodeAggregationWhereInput - OR: [PostCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type PostCreatorRelationship { - cursor: String! - node: User! - } - - input PostCreatorUpdateConnectionInput { - node: UserUpdateInput - } - - input PostCreatorUpdateFieldInput { - connect: PostCreatorConnectFieldInput - connectOrCreate: PostCreatorConnectOrCreateFieldInput - create: PostCreatorCreateFieldInput - delete: PostCreatorDeleteFieldInput - disconnect: PostCreatorDisconnectFieldInput - update: PostCreatorUpdateConnectionInput - where: PostCreatorConnectionWhere - } - - input PostDeleteInput { - creator: PostCreatorDeleteFieldInput - } - - input PostDisconnectInput { - creator: PostCreatorDisconnectFieldInput - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostOnCreateInput { - content: String! - createdAt: DateTime! - id: ID! - } - - input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] - } - - input PostRelationInput { - creator: PostCreatorCreateFieldInput - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - content: SortDirection - createdAt: SortDirection - id: SortDirection - } - - input PostUniqueWhere { - id: ID - } - - input PostUpdateInput { - content: String - createdAt: DateTime - creator: PostCreatorUpdateFieldInput - id: ID - } - - type PostUserCreatorAggregationSelection { - count: Int! - node: PostUserCreatorNodeAggregateSelection - } - - type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String!] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - creator: UserWhere - creatorAggregate: PostCreatorAggregateInput - creatorConnection: PostCreatorConnectionWhere - creatorConnection_NOT: PostCreatorConnectionWhere - creator_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! - } - - type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input UserConnectInput { - posts: [UserPostsConnectFieldInput!] - } - - input UserConnectOrCreateInput { - posts: [UserPostsConnectOrCreateFieldInput!] - } - - input UserConnectOrCreateWhere { - node: UserUniqueWhere! - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - name: String! - posts: UserPostsFieldInput - } - - input UserDeleteInput { - posts: [UserPostsDeleteFieldInput!] - } - - input UserDisconnectInput { - posts: [UserPostsDisconnectFieldInput!] - } - - type UserEdge { - cursor: String! - node: User! - } - - input UserOnCreateInput { - name: String! - } - - 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!] - } - - type UserPostPostsAggregationSelection { - count: Int! - node: UserPostPostsNodeAggregateSelection - } - - type UserPostPostsNodeAggregateSelection { - content: StringAggregateSelectionNonNullable! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - } - - input UserPostsAggregateInput { - AND: [UserPostsAggregateInput!] - NOT: UserPostsAggregateInput - OR: [UserPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserPostsNodeAggregationWhereInput - } - - input UserPostsConnectFieldInput { - connect: [PostConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere - } - - input UserPostsConnectOrCreateFieldInput { - onCreate: UserPostsConnectOrCreateFieldInputOnCreate! - where: PostConnectOrCreateWhere! - } - - input UserPostsConnectOrCreateFieldInputOnCreate { - node: PostOnCreateInput! - } - - type UserPostsConnection { - edges: [UserPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserPostsConnectionSort { - node: PostSort - } - - input UserPostsConnectionWhere { - AND: [UserPostsConnectionWhere!] - NOT: UserPostsConnectionWhere - OR: [UserPostsConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input UserPostsCreateFieldInput { - node: PostCreateInput! - } - - input UserPostsDeleteFieldInput { - delete: PostDeleteInput - where: UserPostsConnectionWhere - } - - input UserPostsDisconnectFieldInput { - disconnect: PostDisconnectInput - where: UserPostsConnectionWhere - } - - input UserPostsFieldInput { - connect: [UserPostsConnectFieldInput!] - connectOrCreate: [UserPostsConnectOrCreateFieldInput!] - create: [UserPostsCreateFieldInput!] - } - - input UserPostsNodeAggregationWhereInput { - AND: [UserPostsNodeAggregationWhereInput!] - NOT: UserPostsNodeAggregationWhereInput - OR: [UserPostsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_MAX_EQUAL: DateTime - createdAt_MAX_GT: DateTime - createdAt_MAX_GTE: DateTime - createdAt_MAX_LT: DateTime - createdAt_MAX_LTE: DateTime - createdAt_MIN_EQUAL: DateTime - createdAt_MIN_GT: DateTime - createdAt_MIN_GTE: DateTime - createdAt_MIN_LT: DateTime - createdAt_MIN_LTE: DateTime - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type UserPostsRelationship { - cursor: String! - node: Post! - } - - input UserPostsUpdateConnectionInput { - node: PostUpdateInput - } - - input UserPostsUpdateFieldInput { - connect: [UserPostsConnectFieldInput!] - connectOrCreate: [UserPostsConnectOrCreateFieldInput!] - create: [UserPostsCreateFieldInput!] - delete: [UserPostsDeleteFieldInput!] - disconnect: [UserPostsDisconnectFieldInput!] - update: UserPostsUpdateConnectionInput - where: UserPostsConnectionWhere - } - - input UserRelationInput { - posts: [UserPostsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - id: SortDirection - name: SortDirection - } - - input UserUniqueWhere { - id: ID - } - - input UserUpdateInput { - name: String - posts: [UserPostsUpdateFieldInput!] - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: UserPostsAggregateInput - postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere - postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere - \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere - \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere - posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere - \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, connectOrCreate: PostConnectOrCreateInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, connectOrCreate: UserConnectOrCreateInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Post { + content: String! + createdAt: DateTime! + creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection + creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCreatorConnectionSort!], where: PostCreatorConnectionWhere): PostCreatorConnection! + id: ID! +} + +type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! +} + +input PostConnectInput { + creator: PostCreatorConnectFieldInput +} + +input PostConnectOrCreateInput { + creator: PostCreatorConnectOrCreateFieldInput +} + +input PostConnectOrCreateWhere { + node: PostUniqueWhere! +} + +input PostConnectWhere { + node: PostWhere! +} + +input PostCreateInput { + content: String! + createdAt: DateTime! + creator: PostCreatorFieldInput + id: ID! +} + +input PostCreatorAggregateInput { + AND: [PostCreatorAggregateInput!] + NOT: PostCreatorAggregateInput + OR: [PostCreatorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostCreatorNodeAggregationWhereInput +} + +input PostCreatorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +input PostCreatorConnectOrCreateFieldInput { + onCreate: PostCreatorConnectOrCreateFieldInputOnCreate! + where: UserConnectOrCreateWhere! +} + +input PostCreatorConnectOrCreateFieldInputOnCreate { + node: UserOnCreateInput! +} + +type PostCreatorConnection { + edges: [PostCreatorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PostCreatorConnectionSort { + node: UserSort +} + +input PostCreatorConnectionWhere { + AND: [PostCreatorConnectionWhere!] + NOT: PostCreatorConnectionWhere + OR: [PostCreatorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PostCreatorCreateFieldInput { + node: UserCreateInput! +} + +input PostCreatorDeleteFieldInput { + delete: UserDeleteInput + where: PostCreatorConnectionWhere +} + +input PostCreatorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostCreatorConnectionWhere +} + +input PostCreatorFieldInput { + connect: PostCreatorConnectFieldInput + connectOrCreate: PostCreatorConnectOrCreateFieldInput + create: PostCreatorCreateFieldInput +} + +input PostCreatorNodeAggregationWhereInput { + AND: [PostCreatorNodeAggregationWhereInput!] + NOT: PostCreatorNodeAggregationWhereInput + OR: [PostCreatorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type PostCreatorRelationship { + cursor: String! + node: User! +} + +input PostCreatorUpdateConnectionInput { + node: UserUpdateInput +} + +input PostCreatorUpdateFieldInput { + connect: PostCreatorConnectFieldInput + connectOrCreate: PostCreatorConnectOrCreateFieldInput + create: PostCreatorCreateFieldInput + delete: PostCreatorDeleteFieldInput + disconnect: PostCreatorDisconnectFieldInput + update: PostCreatorUpdateConnectionInput + where: PostCreatorConnectionWhere +} + +input PostDeleteInput { + creator: PostCreatorDeleteFieldInput +} + +input PostDisconnectInput { + creator: PostCreatorDisconnectFieldInput +} + +type PostEdge { + cursor: String! + node: Post! +} + +input PostOnCreateInput { + content: String! + createdAt: DateTime! + id: ID! +} + +input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] +} + +input PostRelationInput { + creator: PostCreatorCreateFieldInput +} + +\\"\\"\\" +Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. +\\"\\"\\" +input PostSort { + content: SortDirection + createdAt: SortDirection + id: SortDirection +} + +input PostUniqueWhere { + id: ID +} + +input PostUpdateInput { + content: String + createdAt: DateTime + creator: PostCreatorUpdateFieldInput + id: ID +} + +type PostUserCreatorAggregationSelection { + count: Int! + node: PostUserCreatorNodeAggregateSelection +} + +type PostUserCreatorNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime!] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + creator: UserWhere + creatorAggregate: PostCreatorAggregateInput + creatorConnection: PostCreatorConnectionWhere + creatorConnection_NOT: PostCreatorConnectionWhere + creator_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + id: ID! + name: String! + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! +} + +type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input UserConnectInput { + posts: [UserPostsConnectFieldInput!] +} + +input UserConnectOrCreateInput { + posts: [UserPostsConnectOrCreateFieldInput!] +} + +input UserConnectOrCreateWhere { + node: UserUniqueWhere! +} + +input UserConnectWhere { + node: UserWhere! +} + +input UserCreateInput { + name: String! + posts: UserPostsFieldInput +} + +input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] +} + +input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] +} + +type UserEdge { + cursor: String! + node: User! +} + +input UserOnCreateInput { + name: String! +} + +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!] +} + +type UserPostPostsAggregationSelection { + count: Int! + node: UserPostPostsNodeAggregateSelection +} + +type UserPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNonNullable! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! +} + +input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput +} + +input UserPostsConnectFieldInput { + connect: [PostConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere +} + +input UserPostsConnectOrCreateFieldInput { + onCreate: UserPostsConnectOrCreateFieldInputOnCreate! + where: PostConnectOrCreateWhere! +} + +input UserPostsConnectOrCreateFieldInputOnCreate { + node: PostOnCreateInput! +} + +type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserPostsConnectionSort { + node: PostSort +} + +input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input UserPostsCreateFieldInput { + node: PostCreateInput! +} + +input UserPostsDeleteFieldInput { + delete: PostDeleteInput + where: UserPostsConnectionWhere +} + +input UserPostsDisconnectFieldInput { + disconnect: PostDisconnectInput + where: UserPostsConnectionWhere +} + +input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + connectOrCreate: [UserPostsConnectOrCreateFieldInput!] + create: [UserPostsCreateFieldInput!] +} + +input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_MAX_EQUAL: DateTime + createdAt_MAX_GT: DateTime + createdAt_MAX_GTE: DateTime + createdAt_MAX_LT: DateTime + createdAt_MAX_LTE: DateTime + createdAt_MIN_EQUAL: DateTime + createdAt_MIN_GT: DateTime + createdAt_MIN_GTE: DateTime + createdAt_MIN_LT: DateTime + createdAt_MIN_LTE: DateTime + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type UserPostsRelationship { + cursor: String! + node: Post! +} + +input UserPostsUpdateConnectionInput { + node: PostUpdateInput +} + +input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + connectOrCreate: [UserPostsConnectOrCreateFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere +} + +input UserRelationInput { + posts: [UserPostsCreateFieldInput!] +} + +\\"\\"\\" +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 { + id: SortDirection + name: SortDirection +} + +input UserUniqueWhere { + id: ID +} + +input UserUpdateInput { + name: String + posts: [UserPostsUpdateFieldInput!] +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index 08a9555523..5066fbd9ed 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -50,624 +50,613 @@ describe("Connect Or Create", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActedInCreateInput { - screenTime: Int! - } - - input ActedInSort { - screenTime: SortDirection - } - - input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] - } - - input ActorActedInConnectOrCreateInput { - Movie: [ActorActedInMovieConnectOrCreateFieldInput!] - Series: [ActorActedInSeriesConnectOrCreateFieldInput!] - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - } - - input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere - } - - input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput - } - - input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] - } - - input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] - } - - input ActorActedInMovieConnectFieldInput { - edge: ActedInCreateInput! - where: MovieConnectWhere - } - - input ActorActedInMovieConnectOrCreateFieldInput { - onCreate: ActorActedInMovieConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! - } - - input ActorActedInMovieConnectOrCreateFieldInputOnCreate { - edge: ActedInCreateInput! - node: MovieOnCreateInput! - } - - input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInMovieCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! - } - - input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - connectOrCreate: [ActorActedInMovieConnectOrCreateFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - } - - input ActorActedInMovieUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput - } - - input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - connectOrCreate: [ActorActedInMovieConnectOrCreateFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere - } - - type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActorActedInSeriesConnectFieldInput { - edge: ActedInCreateInput! - where: SeriesConnectWhere - } - - input ActorActedInSeriesConnectOrCreateFieldInput { - onCreate: ActorActedInSeriesConnectOrCreateFieldInputOnCreate! - where: SeriesConnectOrCreateWhere! - } - - input ActorActedInSeriesConnectOrCreateFieldInputOnCreate { - edge: ActedInCreateInput! - node: SeriesOnCreateInput! - } - - input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInSeriesCreateFieldInput { - edge: ActedInCreateInput! - node: SeriesCreateInput! - } - - input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - connectOrCreate: [ActorActedInSeriesConnectOrCreateFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInSeriesUpdateConnectionInput { - edge: ActedInUpdateInput - node: SeriesUpdateInput - } - - input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - connectOrCreate: [ActorActedInSeriesConnectOrCreateFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: ActorActedInConnectInput - } - - input ActorConnectOrCreateInput { - actedIn: ActorActedInConnectOrCreateInput - } - - input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! - } - - input ActorDeleteInput { - actedIn: ActorActedInDeleteInput - } - - input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput - } - - \\"\\"\\" - 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 { - actedIn: ActorActedInUpdateInput - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - isan: String! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - isan: String! - title: String! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieOnCreateInput { - isan: String! - title: String! - } - - 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 { - isan: SortDirection - title: SortDirection - } - - input MovieUniqueWhere { - isan: String - } - - input MovieUpdateInput { - isan: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - isan: String - isan_CONTAINS: String - isan_ENDS_WITH: String - isan_IN: [String!] - isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Production = Movie | Series - - input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"\\"\\"\\" - type Series { - \\"\\"\\"\\"\\"\\" - isan: String! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesAggregateSelection { - count: Int! - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input SeriesConnectOrCreateWhere { - node: SeriesUniqueWhere! - } - - input SeriesConnectWhere { - node: SeriesWhere! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - isan: String! - title: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOnCreateInput { - isan: String! - title: String! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - isan: SortDirection - title: SortDirection - } - - input SeriesUniqueWhere { - isan: String - } - - input SeriesUpdateInput { - isan: String - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - isan: String - isan_CONTAINS: String - isan_ENDS_WITH: String - isan_IN: [String!] - isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + screenTime: Int! +} + +input ActedInCreateInput { + screenTime: Int! +} + +input ActedInSort { + screenTime: SortDirection +} + +input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] +} + +input ActorActedInConnectOrCreateInput { + Movie: [ActorActedInMovieConnectOrCreateFieldInput!] + Series: [ActorActedInSeriesConnectOrCreateFieldInput!] +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActedInSort +} + +input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere +} + +input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput +} + +input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] +} + +input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] +} + +input ActorActedInMovieConnectFieldInput { + edge: ActedInCreateInput! + where: MovieConnectWhere +} + +input ActorActedInMovieConnectOrCreateFieldInput { + onCreate: ActorActedInMovieConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! +} + +input ActorActedInMovieConnectOrCreateFieldInputOnCreate { + edge: ActedInCreateInput! + node: MovieOnCreateInput! +} + +input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInMovieCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! +} + +input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + connectOrCreate: [ActorActedInMovieConnectOrCreateFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] +} + +input ActorActedInMovieUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput +} + +input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + connectOrCreate: [ActorActedInMovieConnectOrCreateFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere +} + +type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + screenTime: Int! +} + +input ActorActedInSeriesConnectFieldInput { + edge: ActedInCreateInput! + where: SeriesConnectWhere +} + +input ActorActedInSeriesConnectOrCreateFieldInput { + onCreate: ActorActedInSeriesConnectOrCreateFieldInputOnCreate! + where: SeriesConnectOrCreateWhere! +} + +input ActorActedInSeriesConnectOrCreateFieldInputOnCreate { + edge: ActedInCreateInput! + node: SeriesOnCreateInput! +} + +input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInSeriesCreateFieldInput { + edge: ActedInCreateInput! + node: SeriesCreateInput! +} + +input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + connectOrCreate: [ActorActedInSeriesConnectOrCreateFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInSeriesUpdateConnectionInput { + edge: ActedInUpdateInput + node: SeriesUpdateInput +} + +input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + connectOrCreate: [ActorActedInSeriesConnectOrCreateFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: ActorActedInConnectInput +} + +input ActorConnectOrCreateInput { + actedIn: ActorActedInConnectOrCreateInput +} + +input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! +} + +input ActorDeleteInput { + actedIn: ActorActedInDeleteInput +} + +input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput +} + +\\"\\"\\" +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 { + actedIn: ActorActedInUpdateInput + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + isan: String! + title: String! +} + +type MovieAggregateSelection { + count: Int! + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + isan: String! + title: String! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +input MovieOnCreateInput { + isan: String! + title: String! +} + +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 { + isan: SortDirection + title: SortDirection +} + +input MovieUniqueWhere { + isan: String +} + +input MovieUpdateInput { + isan: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + isan: String + isan_CONTAINS: String + isan_ENDS_WITH: String + isan_IN: [String!] + isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Production = Movie | Series + +input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +type Series { + isan: String! + title: String! +} + +type SeriesAggregateSelection { + count: Int! + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input SeriesConnectOrCreateWhere { + node: SeriesUniqueWhere! +} + +input SeriesConnectWhere { + node: SeriesWhere! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + isan: String! + title: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOnCreateInput { + isan: String! + title: String! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + isan: SortDirection + title: SortDirection +} + +input SeriesUniqueWhere { + isan: String +} + +input SeriesUpdateInput { + isan: String + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + isan: String + isan_CONTAINS: String + isan_ENDS_WITH: String + isan_IN: [String!] + isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index 38907ce52e..2039cb0528 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -39,475 +39,469 @@ describe("Connect Or Create", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectOrCreateInput { - movies: [ActorMoviesConnectOrCreateFieldInput!] - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - name: String! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - input ActorMoviesConnectOrCreateFieldInput { - onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! - } - - input ActorMoviesConnectOrCreateFieldInputOnCreate { - node: MovieOnCreateInput! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - where: ActorMoviesConnectionWhere - } - - input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - isan_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_LENGTH_EQUAL: Float - isan_AVERAGE_LENGTH_GT: Float - isan_AVERAGE_LENGTH_GTE: Float - isan_AVERAGE_LENGTH_LT: Float - isan_AVERAGE_LENGTH_LTE: Float - isan_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_LENGTH_EQUAL: Int - isan_LONGEST_LENGTH_GT: Int - isan_LONGEST_LENGTH_GTE: Int - isan_LONGEST_LENGTH_LT: Int - isan_LONGEST_LENGTH_LTE: Int - isan_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_LENGTH_EQUAL: Int - isan_SHORTEST_LENGTH_GT: Int - isan_SHORTEST_LENGTH_GTE: Int - isan_SHORTEST_LENGTH_LT: Int - isan_SHORTEST_LENGTH_LTE: Int - isan_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - isan: String! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - isan: String! - title: String! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieOnCreateInput { - isan: String! - title: String! - } - - 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 { - isan: SortDirection - title: SortDirection - } - - input MovieUniqueWhere { - isan: String - } - - input MovieUpdateInput { - isan: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - isan: String - isan_CONTAINS: String - isan_ENDS_WITH: String - isan_IN: [String!] - isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + name: String! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! +} + +input ActorMoviesConnectOrCreateFieldInputOnCreate { + node: MovieOnCreateInput! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input ActorMoviesDeleteFieldInput { + where: ActorMoviesConnectionWhere +} + +input ActorMoviesDisconnectFieldInput { + where: ActorMoviesConnectionWhere +} + +input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] +} + +input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + isan_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_LENGTH_EQUAL: Float + isan_AVERAGE_LENGTH_GT: Float + isan_AVERAGE_LENGTH_GTE: Float + isan_AVERAGE_LENGTH_LT: Float + isan_AVERAGE_LENGTH_LTE: Float + isan_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_LENGTH_EQUAL: Int + isan_LONGEST_LENGTH_GT: Int + isan_LONGEST_LENGTH_GTE: Int + isan_LONGEST_LENGTH_LT: Int + isan_LONGEST_LENGTH_LTE: Int + isan_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_LENGTH_EQUAL: Int + isan_SHORTEST_LENGTH_GT: Int + isan_SHORTEST_LENGTH_GTE: Int + isan_SHORTEST_LENGTH_LT: Int + isan_SHORTEST_LENGTH_LTE: Int + isan_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + isan: String! + title: String! +} + +type MovieAggregateSelection { + count: Int! + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + isan: String! + title: String! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +input MovieOnCreateInput { + isan: String! + title: String! +} + +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 { + isan: SortDirection + title: SortDirection +} + +input MovieUniqueWhere { + isan: String +} + +input MovieUpdateInput { + isan: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + isan: String + isan_CONTAINS: String + isan_ENDS_WITH: String + isan_IN: [String!] + isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Connect Or Create with relation properties", async () => { @@ -531,618 +525,608 @@ describe("Connect Or Create", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - characterName: String - \\"\\"\\"\\"\\"\\" - screentime: Int! - } - - input ActedInCreateInput { - characterName: String - screentime: Int! - } - - input ActedInSort { - characterName: SortDirection - screentime: SortDirection - } - - input ActedInUpdateInput { - characterName: String - screentime: Int - screentime_DECREMENT: Int - screentime_INCREMENT: Int - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - characterName: String - characterName_CONTAINS: String - characterName_ENDS_WITH: String - characterName_IN: [String] - characterName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_STARTS_WITH: String - screentime: Int - screentime_GT: Int - screentime_GTE: Int - screentime_IN: [Int!] - screentime_LT: Int - screentime_LTE: Int - screentime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screentime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectOrCreateInput { - movies: [ActorMoviesConnectOrCreateFieldInput!] - } - - 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 { - characterName: StringAggregateSelectionNullable! - screentime: IntAggregateSelectionNonNullable! - } - - type ActorMovieMoviesNodeAggregateSelection { - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorMoviesEdgeAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - input ActorMoviesConnectOrCreateFieldInput { - onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! - } - - input ActorMoviesConnectOrCreateFieldInputOnCreate { - edge: ActedInCreateInput! - node: MovieOnCreateInput! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - edge: ActedInSort - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - where: ActorMoviesConnectionWhere - } - - input ActorMoviesEdgeAggregationWhereInput { - AND: [ActorMoviesEdgeAggregationWhereInput!] - NOT: ActorMoviesEdgeAggregationWhereInput - OR: [ActorMoviesEdgeAggregationWhereInput!] - characterName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_AVERAGE_LENGTH_EQUAL: Float - characterName_AVERAGE_LENGTH_GT: Float - characterName_AVERAGE_LENGTH_GTE: Float - characterName_AVERAGE_LENGTH_LT: Float - characterName_AVERAGE_LENGTH_LTE: Float - characterName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LONGEST_LENGTH_EQUAL: Int - characterName_LONGEST_LENGTH_GT: Int - characterName_LONGEST_LENGTH_GTE: Int - characterName_LONGEST_LENGTH_LT: Int - characterName_LONGEST_LENGTH_LTE: Int - characterName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_SHORTEST_LENGTH_EQUAL: Int - characterName_SHORTEST_LENGTH_GT: Int - characterName_SHORTEST_LENGTH_GTE: Int - characterName_SHORTEST_LENGTH_LT: Int - characterName_SHORTEST_LENGTH_LTE: Int - characterName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screentime_AVERAGE_EQUAL: Float - screentime_AVERAGE_GT: Float - screentime_AVERAGE_GTE: Float - screentime_AVERAGE_LT: Float - screentime_AVERAGE_LTE: Float - screentime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screentime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screentime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screentime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screentime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - isan_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_LENGTH_EQUAL: Float - isan_AVERAGE_LENGTH_GT: Float - isan_AVERAGE_LENGTH_GTE: Float - isan_AVERAGE_LENGTH_LT: Float - isan_AVERAGE_LENGTH_LTE: Float - isan_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_LENGTH_EQUAL: Int - isan_LONGEST_LENGTH_GT: Int - isan_LONGEST_LENGTH_GTE: Int - isan_LONGEST_LENGTH_LT: Int - isan_LONGEST_LENGTH_LTE: Int - isan_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_LENGTH_EQUAL: Int - isan_SHORTEST_LENGTH_GT: Int - isan_SHORTEST_LENGTH_GTE: Int - isan_SHORTEST_LENGTH_LT: Int - isan_SHORTEST_LENGTH_LTE: Int - isan_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship implements ActedIn { - \\"\\"\\"\\"\\"\\" - characterName: String - cursor: String! - node: Movie! - \\"\\"\\"\\"\\"\\" - screentime: Int! - } - - input ActorMoviesUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput - } - - input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - isan: String! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - isan: String! - title: String! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieOnCreateInput { - isan: String! - title: String! - } - - 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 { - isan: SortDirection - title: SortDirection - } - - input MovieUniqueWhere { - isan: String - } - - input MovieUpdateInput { - isan: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - isan: String - isan_CONTAINS: String - isan_ENDS_WITH: String - isan_IN: [String!] - isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + characterName: String + screentime: Int! +} + +input ActedInCreateInput { + characterName: String + screentime: Int! +} + +input ActedInSort { + characterName: SortDirection + screentime: SortDirection +} + +input ActedInUpdateInput { + characterName: String + screentime: Int + screentime_DECREMENT: Int + screentime_INCREMENT: Int +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + characterName: String + characterName_CONTAINS: String + characterName_ENDS_WITH: String + characterName_IN: [String] + characterName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_STARTS_WITH: String + screentime: Int + screentime_GT: Int + screentime_GTE: Int + screentime_IN: [Int!] + screentime_LT: Int + screentime_LTE: Int + screentime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screentime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] +} + +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 { + characterName: StringAggregateSelectionNullable! + screentime: IntAggregateSelectionNonNullable! +} + +type ActorMovieMoviesNodeAggregateSelection { + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! +} + +input ActorMoviesConnectOrCreateFieldInputOnCreate { + edge: ActedInCreateInput! + node: MovieOnCreateInput! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + edge: ActedInSort + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! +} + +input ActorMoviesDeleteFieldInput { + where: ActorMoviesConnectionWhere +} + +input ActorMoviesDisconnectFieldInput { + where: ActorMoviesConnectionWhere +} + +input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + characterName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_AVERAGE_LENGTH_EQUAL: Float + characterName_AVERAGE_LENGTH_GT: Float + characterName_AVERAGE_LENGTH_GTE: Float + characterName_AVERAGE_LENGTH_LT: Float + characterName_AVERAGE_LENGTH_LTE: Float + characterName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LONGEST_LENGTH_EQUAL: Int + characterName_LONGEST_LENGTH_GT: Int + characterName_LONGEST_LENGTH_GTE: Int + characterName_LONGEST_LENGTH_LT: Int + characterName_LONGEST_LENGTH_LTE: Int + characterName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_SHORTEST_LENGTH_EQUAL: Int + characterName_SHORTEST_LENGTH_GT: Int + characterName_SHORTEST_LENGTH_GTE: Int + characterName_SHORTEST_LENGTH_LT: Int + characterName_SHORTEST_LENGTH_LTE: Int + characterName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screentime_AVERAGE_EQUAL: Float + screentime_AVERAGE_GT: Float + screentime_AVERAGE_GTE: Float + screentime_AVERAGE_LT: Float + screentime_AVERAGE_LTE: Float + screentime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screentime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screentime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screentime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screentime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] +} + +input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + isan_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_LENGTH_EQUAL: Float + isan_AVERAGE_LENGTH_GT: Float + isan_AVERAGE_LENGTH_GTE: Float + isan_AVERAGE_LENGTH_LT: Float + isan_AVERAGE_LENGTH_LTE: Float + isan_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_LENGTH_EQUAL: Int + isan_LONGEST_LENGTH_GT: Int + isan_LONGEST_LENGTH_GTE: Int + isan_LONGEST_LENGTH_LT: Int + isan_LONGEST_LENGTH_LTE: Int + isan_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_LENGTH_EQUAL: Int + isan_SHORTEST_LENGTH_GT: Int + isan_SHORTEST_LENGTH_GTE: Int + isan_SHORTEST_LENGTH_LT: Int + isan_SHORTEST_LENGTH_LTE: Int + isan_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship implements ActedIn { + characterName: String + cursor: String! + node: Movie! + screentime: Int! +} + +input ActorMoviesUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput +} + +input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie { + isan: String! + title: String! +} + +type MovieAggregateSelection { + count: Int! + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + isan: String! + title: String! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +input MovieOnCreateInput { + isan: String! + title: String! +} + +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 { + isan: SortDirection + title: SortDirection +} + +input MovieUniqueWhere { + isan: String +} + +input MovieUpdateInput { + isan: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + isan: String + isan_CONTAINS: String + isan_ENDS_WITH: String + isan_IN: [String!] + isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index 959f017b0f..b7384e2525 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -48,626 +48,617 @@ describe("Enums", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - roleType: RoleType! - } - - input ActedInCreateInput { - roleType: RoleType! - } - - input ActedInSort { - roleType: SortDirection - } - - input ActedInUpdateInput { - roleType: RoleType - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - roleType: RoleType - roleType_IN: [RoleType!] - roleType_NOT: RoleType @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - roleType_NOT_IN: [RoleType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - 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! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship implements ActedIn { - cursor: String! - node: Movie! - \\"\\"\\"\\"\\"\\" - roleType: RoleType! - } - - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - \\"\\"\\"\\"\\"\\" - roleType: RoleType! - } - - 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: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - enum RoleType { - LEADING - SUPPORTING - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + roleType: RoleType! +} + +input ActedInCreateInput { + roleType: RoleType! +} + +input ActedInSort { + roleType: SortDirection +} + +input ActedInUpdateInput { + roleType: RoleType +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + roleType: RoleType + roleType_IN: [RoleType!] + roleType_NOT: RoleType @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + roleType_NOT_IN: [RoleType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +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! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship implements ActedIn { + cursor: String! + node: Movie! + roleType: RoleType! +} + +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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + roleType: RoleType! +} + +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: StringAggregateSelectionNonNullable! +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +enum RoleType { + LEADING + SUPPORTING +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 5a5fada30c..932225e449 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -38,501 +38,496 @@ describe("Sort", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateNode1sMutationResponse { - info: CreateInfo! - node1s: [Node1!]! - } - - type CreateNode2sMutationResponse { - info: CreateInfo! - node2s: [Node2!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createNode1s(input: [Node1CreateInput!]!): CreateNode1sMutationResponse! - createNode2s(input: [Node2CreateInput!]!): CreateNode2sMutationResponse! - deleteNode1s(delete: Node1DeleteInput, where: Node1Where): DeleteInfo! - deleteNode2s(delete: Node2DeleteInput, where: Node2Where): DeleteInfo! - updateNode1s(connect: Node1ConnectInput, create: Node1RelationInput, delete: Node1DeleteInput, disconnect: Node1DisconnectInput, update: Node1UpdateInput, where: Node1Where): UpdateNode1sMutationResponse! - updateNode2s(connect: Node2ConnectInput, create: Node2RelationInput, delete: Node2DeleteInput, disconnect: Node2DisconnectInput, update: Node2UpdateInput, where: Node2Where): UpdateNode2sMutationResponse! - } - - \\"\\"\\"\\"\\"\\" - type Node1 { - \\"\\"\\"\\"\\"\\" - property: String! - \\"\\"\\"\\"\\"\\" - relatedTo(directed: Boolean = true, options: Node2Options, where: Node2Where): [Node2!]! - relatedToAggregate(directed: Boolean = true, where: Node2Where): Node1Node2RelatedToAggregationSelection - relatedToConnection(after: String, directed: Boolean = true, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! - } - - type Node1AggregateSelection { - count: Int! - property: StringAggregateSelectionNonNullable! - } - - input Node1ConnectInput { - relatedTo: [Node1RelatedToConnectFieldInput!] - } - - input Node1ConnectWhere { - node: Node1Where! - } - - input Node1CreateInput { - property: String! - relatedTo: Node1RelatedToFieldInput - } - - input Node1DeleteInput { - relatedTo: [Node1RelatedToDeleteFieldInput!] - } - - input Node1DisconnectInput { - relatedTo: [Node1RelatedToDisconnectFieldInput!] - } - - type Node1Edge { - cursor: String! - node: Node1! - } - - type Node1Node2RelatedToAggregationSelection { - count: Int! - } - - input Node1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Node1Sort objects to sort Node1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Node1Sort!] - } - - input Node1RelatedToAggregateInput { - AND: [Node1RelatedToAggregateInput!] - NOT: Node1RelatedToAggregateInput - OR: [Node1RelatedToAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - } - - input Node1RelatedToConnectFieldInput { - connect: [Node2ConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: Node2ConnectWhere - } - - type Node1RelatedToConnection { - edges: [Node1RelatedToRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input Node1RelatedToConnectionWhere { - AND: [Node1RelatedToConnectionWhere!] - NOT: Node1RelatedToConnectionWhere - OR: [Node1RelatedToConnectionWhere!] - node: Node2Where - node_NOT: Node2Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input Node1RelatedToCreateFieldInput { - node: Node2CreateInput! - } - - input Node1RelatedToDeleteFieldInput { - delete: Node2DeleteInput - where: Node1RelatedToConnectionWhere - } - - input Node1RelatedToDisconnectFieldInput { - disconnect: Node2DisconnectInput - where: Node1RelatedToConnectionWhere - } - - input Node1RelatedToFieldInput { - connect: [Node1RelatedToConnectFieldInput!] - create: [Node1RelatedToCreateFieldInput!] - } - - type Node1RelatedToRelationship { - cursor: String! - node: Node2! - } - - input Node1RelatedToUpdateConnectionInput { - node: Node2UpdateInput - } - - input Node1RelatedToUpdateFieldInput { - connect: [Node1RelatedToConnectFieldInput!] - create: [Node1RelatedToCreateFieldInput!] - delete: [Node1RelatedToDeleteFieldInput!] - disconnect: [Node1RelatedToDisconnectFieldInput!] - update: Node1RelatedToUpdateConnectionInput - where: Node1RelatedToConnectionWhere - } - - input Node1RelationInput { - relatedTo: [Node1RelatedToCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Node1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Node1Sort object. - \\"\\"\\" - input Node1Sort { - property: SortDirection - } - - input Node1UpdateInput { - property: String - relatedTo: [Node1RelatedToUpdateFieldInput!] - } - - input Node1Where { - AND: [Node1Where!] - NOT: Node1Where - OR: [Node1Where!] - property: String - property_CONTAINS: String - property_ENDS_WITH: String - property_IN: [String!] - property_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_STARTS_WITH: String - relatedTo: Node2Where @deprecated(reason: \\"Use \`relatedTo_SOME\` instead.\\") - relatedToAggregate: Node1RelatedToAggregateInput - relatedToConnection: Node1RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_SOME\` instead.\\") - \\"\\"\\" - Return Node1s where all of the related Node1RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_ALL: Node1RelatedToConnectionWhere - \\"\\"\\" - Return Node1s where none of the related Node1RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_NONE: Node1RelatedToConnectionWhere - relatedToConnection_NOT: Node1RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_NONE\` instead.\\") - \\"\\"\\" - Return Node1s where one of the related Node1RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_SINGLE: Node1RelatedToConnectionWhere - \\"\\"\\" - Return Node1s where some of the related Node1RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_SOME: Node1RelatedToConnectionWhere - \\"\\"\\"Return Node1s where all of the related Node2s match this filter\\"\\"\\" - relatedTo_ALL: Node2Where - \\"\\"\\"Return Node1s where none of the related Node2s match this filter\\"\\"\\" - relatedTo_NONE: Node2Where - relatedTo_NOT: Node2Where @deprecated(reason: \\"Use \`relatedTo_NONE\` instead.\\") - \\"\\"\\"Return Node1s where one of the related Node2s match this filter\\"\\"\\" - relatedTo_SINGLE: Node2Where - \\"\\"\\"Return Node1s where some of the related Node2s match this filter\\"\\"\\" - relatedTo_SOME: Node2Where - } - - type Node1sConnection { - edges: [Node1Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Node2 { - \\"\\"\\"\\"\\"\\" - relatedTo(directed: Boolean = true, options: Node1Options, where: Node1Where): [Node1!]! - relatedToAggregate(directed: Boolean = true, where: Node1Where): Node2Node1RelatedToAggregationSelection - relatedToConnection(after: String, directed: Boolean = true, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! - } - - type Node2AggregateSelection { - count: Int! - } - - input Node2ConnectInput { - relatedTo: [Node2RelatedToConnectFieldInput!] - } - - input Node2ConnectWhere { - node: Node2Where! - } - - input Node2CreateInput { - relatedTo: Node2RelatedToFieldInput - } - - input Node2DeleteInput { - relatedTo: [Node2RelatedToDeleteFieldInput!] - } - - input Node2DisconnectInput { - relatedTo: [Node2RelatedToDisconnectFieldInput!] - } - - type Node2Edge { - cursor: String! - node: Node2! - } - - type Node2Node1RelatedToAggregationSelection { - count: Int! - node: Node2Node1RelatedToNodeAggregateSelection - } - - type Node2Node1RelatedToNodeAggregateSelection { - property: StringAggregateSelectionNonNullable! - } - - input Node2Options { - limit: Int - offset: Int - } - - input Node2RelatedToAggregateInput { - AND: [Node2RelatedToAggregateInput!] - NOT: Node2RelatedToAggregateInput - OR: [Node2RelatedToAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: Node2RelatedToNodeAggregationWhereInput - } - - input Node2RelatedToConnectFieldInput { - connect: [Node1ConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: Node1ConnectWhere - } - - type Node2RelatedToConnection { - edges: [Node2RelatedToRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input Node2RelatedToConnectionSort { - node: Node1Sort - } - - input Node2RelatedToConnectionWhere { - AND: [Node2RelatedToConnectionWhere!] - NOT: Node2RelatedToConnectionWhere - OR: [Node2RelatedToConnectionWhere!] - node: Node1Where - node_NOT: Node1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input Node2RelatedToCreateFieldInput { - node: Node1CreateInput! - } - - input Node2RelatedToDeleteFieldInput { - delete: Node1DeleteInput - where: Node2RelatedToConnectionWhere - } - - input Node2RelatedToDisconnectFieldInput { - disconnect: Node1DisconnectInput - where: Node2RelatedToConnectionWhere - } - - input Node2RelatedToFieldInput { - connect: [Node2RelatedToConnectFieldInput!] - create: [Node2RelatedToCreateFieldInput!] - } - - input Node2RelatedToNodeAggregationWhereInput { - AND: [Node2RelatedToNodeAggregationWhereInput!] - NOT: Node2RelatedToNodeAggregationWhereInput - OR: [Node2RelatedToNodeAggregationWhereInput!] - property_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_AVERAGE_LENGTH_EQUAL: Float - property_AVERAGE_LENGTH_GT: Float - property_AVERAGE_LENGTH_GTE: Float - property_AVERAGE_LENGTH_LT: Float - property_AVERAGE_LENGTH_LTE: Float - property_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LONGEST_LENGTH_EQUAL: Int - property_LONGEST_LENGTH_GT: Int - property_LONGEST_LENGTH_GTE: Int - property_LONGEST_LENGTH_LT: Int - property_LONGEST_LENGTH_LTE: Int - property_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_SHORTEST_LENGTH_EQUAL: Int - property_SHORTEST_LENGTH_GT: Int - property_SHORTEST_LENGTH_GTE: Int - property_SHORTEST_LENGTH_LT: Int - property_SHORTEST_LENGTH_LTE: Int - property_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type Node2RelatedToRelationship { - cursor: String! - node: Node1! - } - - input Node2RelatedToUpdateConnectionInput { - node: Node1UpdateInput - } - - input Node2RelatedToUpdateFieldInput { - connect: [Node2RelatedToConnectFieldInput!] - create: [Node2RelatedToCreateFieldInput!] - delete: [Node2RelatedToDeleteFieldInput!] - disconnect: [Node2RelatedToDisconnectFieldInput!] - update: Node2RelatedToUpdateConnectionInput - where: Node2RelatedToConnectionWhere - } - - input Node2RelationInput { - relatedTo: [Node2RelatedToCreateFieldInput!] - } - - input Node2UpdateInput { - relatedTo: [Node2RelatedToUpdateFieldInput!] - } - - input Node2Where { - AND: [Node2Where!] - NOT: Node2Where - OR: [Node2Where!] - relatedTo: Node1Where @deprecated(reason: \\"Use \`relatedTo_SOME\` instead.\\") - relatedToAggregate: Node2RelatedToAggregateInput - relatedToConnection: Node2RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_SOME\` instead.\\") - \\"\\"\\" - Return Node2s where all of the related Node2RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_ALL: Node2RelatedToConnectionWhere - \\"\\"\\" - Return Node2s where none of the related Node2RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_NONE: Node2RelatedToConnectionWhere - relatedToConnection_NOT: Node2RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_NONE\` instead.\\") - \\"\\"\\" - Return Node2s where one of the related Node2RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_SINGLE: Node2RelatedToConnectionWhere - \\"\\"\\" - Return Node2s where some of the related Node2RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_SOME: Node2RelatedToConnectionWhere - \\"\\"\\"Return Node2s where all of the related Node1s match this filter\\"\\"\\" - relatedTo_ALL: Node1Where - \\"\\"\\"Return Node2s where none of the related Node1s match this filter\\"\\"\\" - relatedTo_NONE: Node1Where - relatedTo_NOT: Node1Where @deprecated(reason: \\"Use \`relatedTo_NONE\` instead.\\") - \\"\\"\\"Return Node2s where one of the related Node1s match this filter\\"\\"\\" - relatedTo_SINGLE: Node1Where - \\"\\"\\"Return Node2s where some of the related Node1s match this filter\\"\\"\\" - relatedTo_SOME: Node1Where - } - - type Node2sConnection { - edges: [Node2Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - node1s(options: Node1Options, where: Node1Where): [Node1!]! - node1sAggregate(where: Node1Where): Node1AggregateSelection! - node1sConnection(after: String, first: Int, sort: [Node1Sort], where: Node1Where): Node1sConnection! - node2s(options: Node2Options, where: Node2Where): [Node2!]! - node2sAggregate(where: Node2Where): Node2AggregateSelection! - node2sConnection(after: String, first: Int, where: Node2Where): Node2sConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateNode1sMutationResponse { - info: UpdateInfo! - node1s: [Node1!]! - } - - type UpdateNode2sMutationResponse { - info: UpdateInfo! - node2s: [Node2!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateNode1sMutationResponse { + info: CreateInfo! + node1s: [Node1!]! +} + +type CreateNode2sMutationResponse { + info: CreateInfo! + node2s: [Node2!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createNode1s(input: [Node1CreateInput!]!): CreateNode1sMutationResponse! + createNode2s(input: [Node2CreateInput!]!): CreateNode2sMutationResponse! + deleteNode1s(delete: Node1DeleteInput, where: Node1Where): DeleteInfo! + deleteNode2s(delete: Node2DeleteInput, where: Node2Where): DeleteInfo! + updateNode1s(connect: Node1ConnectInput, create: Node1RelationInput, delete: Node1DeleteInput, disconnect: Node1DisconnectInput, update: Node1UpdateInput, where: Node1Where): UpdateNode1sMutationResponse! + updateNode2s(connect: Node2ConnectInput, create: Node2RelationInput, delete: Node2DeleteInput, disconnect: Node2DisconnectInput, update: Node2UpdateInput, where: Node2Where): UpdateNode2sMutationResponse! +} + +type Node1 { + property: String! + relatedTo(directed: Boolean = true, options: Node2Options, where: Node2Where): [Node2!]! + relatedToAggregate(directed: Boolean = true, where: Node2Where): Node1Node2RelatedToAggregationSelection + relatedToConnection(after: String, directed: Boolean = true, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! +} + +type Node1AggregateSelection { + count: Int! + property: StringAggregateSelectionNonNullable! +} + +input Node1ConnectInput { + relatedTo: [Node1RelatedToConnectFieldInput!] +} + +input Node1ConnectWhere { + node: Node1Where! +} + +input Node1CreateInput { + property: String! + relatedTo: Node1RelatedToFieldInput +} + +input Node1DeleteInput { + relatedTo: [Node1RelatedToDeleteFieldInput!] +} + +input Node1DisconnectInput { + relatedTo: [Node1RelatedToDisconnectFieldInput!] +} + +type Node1Edge { + cursor: String! + node: Node1! +} + +type Node1Node2RelatedToAggregationSelection { + count: Int! +} + +input Node1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Node1Sort objects to sort Node1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Node1Sort!] +} + +input Node1RelatedToAggregateInput { + AND: [Node1RelatedToAggregateInput!] + NOT: Node1RelatedToAggregateInput + OR: [Node1RelatedToAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int +} + +input Node1RelatedToConnectFieldInput { + connect: [Node2ConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: Node2ConnectWhere +} + +type Node1RelatedToConnection { + edges: [Node1RelatedToRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input Node1RelatedToConnectionWhere { + AND: [Node1RelatedToConnectionWhere!] + NOT: Node1RelatedToConnectionWhere + OR: [Node1RelatedToConnectionWhere!] + node: Node2Where + node_NOT: Node2Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input Node1RelatedToCreateFieldInput { + node: Node2CreateInput! +} + +input Node1RelatedToDeleteFieldInput { + delete: Node2DeleteInput + where: Node1RelatedToConnectionWhere +} + +input Node1RelatedToDisconnectFieldInput { + disconnect: Node2DisconnectInput + where: Node1RelatedToConnectionWhere +} + +input Node1RelatedToFieldInput { + connect: [Node1RelatedToConnectFieldInput!] + create: [Node1RelatedToCreateFieldInput!] +} + +type Node1RelatedToRelationship { + cursor: String! + node: Node2! +} + +input Node1RelatedToUpdateConnectionInput { + node: Node2UpdateInput +} + +input Node1RelatedToUpdateFieldInput { + connect: [Node1RelatedToConnectFieldInput!] + create: [Node1RelatedToCreateFieldInput!] + delete: [Node1RelatedToDeleteFieldInput!] + disconnect: [Node1RelatedToDisconnectFieldInput!] + update: Node1RelatedToUpdateConnectionInput + where: Node1RelatedToConnectionWhere +} + +input Node1RelationInput { + relatedTo: [Node1RelatedToCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Node1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Node1Sort object. +\\"\\"\\" +input Node1Sort { + property: SortDirection +} + +input Node1UpdateInput { + property: String + relatedTo: [Node1RelatedToUpdateFieldInput!] +} + +input Node1Where { + AND: [Node1Where!] + NOT: Node1Where + OR: [Node1Where!] + property: String + property_CONTAINS: String + property_ENDS_WITH: String + property_IN: [String!] + property_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_STARTS_WITH: String + relatedTo: Node2Where @deprecated(reason: \\"Use \`relatedTo_SOME\` instead.\\") + relatedToAggregate: Node1RelatedToAggregateInput + relatedToConnection: Node1RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_SOME\` instead.\\") + \\"\\"\\" + Return Node1s where all of the related Node1RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_ALL: Node1RelatedToConnectionWhere + \\"\\"\\" + Return Node1s where none of the related Node1RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_NONE: Node1RelatedToConnectionWhere + relatedToConnection_NOT: Node1RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_NONE\` instead.\\") + \\"\\"\\" + Return Node1s where one of the related Node1RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_SINGLE: Node1RelatedToConnectionWhere + \\"\\"\\" + Return Node1s where some of the related Node1RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_SOME: Node1RelatedToConnectionWhere + \\"\\"\\"Return Node1s where all of the related Node2s match this filter\\"\\"\\" + relatedTo_ALL: Node2Where + \\"\\"\\"Return Node1s where none of the related Node2s match this filter\\"\\"\\" + relatedTo_NONE: Node2Where + relatedTo_NOT: Node2Where @deprecated(reason: \\"Use \`relatedTo_NONE\` instead.\\") + \\"\\"\\"Return Node1s where one of the related Node2s match this filter\\"\\"\\" + relatedTo_SINGLE: Node2Where + \\"\\"\\"Return Node1s where some of the related Node2s match this filter\\"\\"\\" + relatedTo_SOME: Node2Where +} + +type Node1sConnection { + edges: [Node1Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Node2 { + relatedTo(directed: Boolean = true, options: Node1Options, where: Node1Where): [Node1!]! + relatedToAggregate(directed: Boolean = true, where: Node1Where): Node2Node1RelatedToAggregationSelection + relatedToConnection(after: String, directed: Boolean = true, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! +} + +type Node2AggregateSelection { + count: Int! +} + +input Node2ConnectInput { + relatedTo: [Node2RelatedToConnectFieldInput!] +} + +input Node2ConnectWhere { + node: Node2Where! +} + +input Node2CreateInput { + relatedTo: Node2RelatedToFieldInput +} + +input Node2DeleteInput { + relatedTo: [Node2RelatedToDeleteFieldInput!] +} + +input Node2DisconnectInput { + relatedTo: [Node2RelatedToDisconnectFieldInput!] +} + +type Node2Edge { + cursor: String! + node: Node2! +} + +type Node2Node1RelatedToAggregationSelection { + count: Int! + node: Node2Node1RelatedToNodeAggregateSelection +} + +type Node2Node1RelatedToNodeAggregateSelection { + property: StringAggregateSelectionNonNullable! +} + +input Node2Options { + limit: Int + offset: Int +} + +input Node2RelatedToAggregateInput { + AND: [Node2RelatedToAggregateInput!] + NOT: Node2RelatedToAggregateInput + OR: [Node2RelatedToAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: Node2RelatedToNodeAggregationWhereInput +} + +input Node2RelatedToConnectFieldInput { + connect: [Node1ConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: Node1ConnectWhere +} + +type Node2RelatedToConnection { + edges: [Node2RelatedToRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input Node2RelatedToConnectionSort { + node: Node1Sort +} + +input Node2RelatedToConnectionWhere { + AND: [Node2RelatedToConnectionWhere!] + NOT: Node2RelatedToConnectionWhere + OR: [Node2RelatedToConnectionWhere!] + node: Node1Where + node_NOT: Node1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input Node2RelatedToCreateFieldInput { + node: Node1CreateInput! +} + +input Node2RelatedToDeleteFieldInput { + delete: Node1DeleteInput + where: Node2RelatedToConnectionWhere +} + +input Node2RelatedToDisconnectFieldInput { + disconnect: Node1DisconnectInput + where: Node2RelatedToConnectionWhere +} + +input Node2RelatedToFieldInput { + connect: [Node2RelatedToConnectFieldInput!] + create: [Node2RelatedToCreateFieldInput!] +} + +input Node2RelatedToNodeAggregationWhereInput { + AND: [Node2RelatedToNodeAggregationWhereInput!] + NOT: Node2RelatedToNodeAggregationWhereInput + OR: [Node2RelatedToNodeAggregationWhereInput!] + property_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_AVERAGE_LENGTH_EQUAL: Float + property_AVERAGE_LENGTH_GT: Float + property_AVERAGE_LENGTH_GTE: Float + property_AVERAGE_LENGTH_LT: Float + property_AVERAGE_LENGTH_LTE: Float + property_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LONGEST_LENGTH_EQUAL: Int + property_LONGEST_LENGTH_GT: Int + property_LONGEST_LENGTH_GTE: Int + property_LONGEST_LENGTH_LT: Int + property_LONGEST_LENGTH_LTE: Int + property_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_SHORTEST_LENGTH_EQUAL: Int + property_SHORTEST_LENGTH_GT: Int + property_SHORTEST_LENGTH_GTE: Int + property_SHORTEST_LENGTH_LT: Int + property_SHORTEST_LENGTH_LTE: Int + property_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type Node2RelatedToRelationship { + cursor: String! + node: Node1! +} + +input Node2RelatedToUpdateConnectionInput { + node: Node1UpdateInput +} + +input Node2RelatedToUpdateFieldInput { + connect: [Node2RelatedToConnectFieldInput!] + create: [Node2RelatedToCreateFieldInput!] + delete: [Node2RelatedToDeleteFieldInput!] + disconnect: [Node2RelatedToDisconnectFieldInput!] + update: Node2RelatedToUpdateConnectionInput + where: Node2RelatedToConnectionWhere +} + +input Node2RelationInput { + relatedTo: [Node2RelatedToCreateFieldInput!] +} + +input Node2UpdateInput { + relatedTo: [Node2RelatedToUpdateFieldInput!] +} + +input Node2Where { + AND: [Node2Where!] + NOT: Node2Where + OR: [Node2Where!] + relatedTo: Node1Where @deprecated(reason: \\"Use \`relatedTo_SOME\` instead.\\") + relatedToAggregate: Node2RelatedToAggregateInput + relatedToConnection: Node2RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_SOME\` instead.\\") + \\"\\"\\" + Return Node2s where all of the related Node2RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_ALL: Node2RelatedToConnectionWhere + \\"\\"\\" + Return Node2s where none of the related Node2RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_NONE: Node2RelatedToConnectionWhere + relatedToConnection_NOT: Node2RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_NONE\` instead.\\") + \\"\\"\\" + Return Node2s where one of the related Node2RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_SINGLE: Node2RelatedToConnectionWhere + \\"\\"\\" + Return Node2s where some of the related Node2RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_SOME: Node2RelatedToConnectionWhere + \\"\\"\\"Return Node2s where all of the related Node1s match this filter\\"\\"\\" + relatedTo_ALL: Node1Where + \\"\\"\\"Return Node2s where none of the related Node1s match this filter\\"\\"\\" + relatedTo_NONE: Node1Where + relatedTo_NOT: Node1Where @deprecated(reason: \\"Use \`relatedTo_NONE\` instead.\\") + \\"\\"\\"Return Node2s where one of the related Node1s match this filter\\"\\"\\" + relatedTo_SINGLE: Node1Where + \\"\\"\\"Return Node2s where some of the related Node1s match this filter\\"\\"\\" + relatedTo_SOME: Node1Where +} + +type Node2sConnection { + edges: [Node2Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + node1s(options: Node1Options, where: Node1Where): [Node1!]! + node1sAggregate(where: Node1Where): Node1AggregateSelection! + node1sConnection(after: String, first: Int, sort: [Node1Sort], where: Node1Where): Node1sConnection! + node2s(options: Node2Options, where: Node2Where): [Node2!]! + node2sAggregate(where: Node2Where): Node2AggregateSelection! + node2sConnection(after: String, first: Int, where: Node2Where): Node2sConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateNode1sMutationResponse { + info: UpdateInfo! + node1s: [Node1!]! +} + +type UpdateNode2sMutationResponse { + info: UpdateInfo! + node2s: [Node2!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 1dd64138f5..70a8d058c6 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -50,994 +50,981 @@ describe("Unions", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Author { - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - publications(directed: Boolean = true, options: QueryOptions, where: PublicationWhere): [Publication!]! - publicationsConnection(after: String, directed: Boolean = true, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! - } - - type AuthorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input AuthorConnectInput { - publications: AuthorPublicationsConnectInput - } - - input AuthorConnectWhere { - node: AuthorWhere! - } - - input AuthorCreateInput { - name: String! - publications: AuthorPublicationsCreateInput - } - - input AuthorDeleteInput { - publications: AuthorPublicationsDeleteInput - } - - input AuthorDisconnectInput { - publications: AuthorPublicationsDisconnectInput - } - - type AuthorEdge { - cursor: String! - node: Author! - } - - input AuthorOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AuthorSort objects to sort Authors by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AuthorSort!] - } - - input AuthorPublicationsBookConnectFieldInput { - connect: [BookConnectInput!] - edge: WroteCreateInput! - where: BookConnectWhere - } - - input AuthorPublicationsBookConnectionWhere { - AND: [AuthorPublicationsBookConnectionWhere!] - NOT: AuthorPublicationsBookConnectionWhere - OR: [AuthorPublicationsBookConnectionWhere!] - edge: WroteWhere - edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: BookWhere - node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input AuthorPublicationsBookCreateFieldInput { - edge: WroteCreateInput! - node: BookCreateInput! - } - - input AuthorPublicationsBookDeleteFieldInput { - delete: BookDeleteInput - where: AuthorPublicationsBookConnectionWhere - } - - input AuthorPublicationsBookDisconnectFieldInput { - disconnect: BookDisconnectInput - where: AuthorPublicationsBookConnectionWhere - } - - input AuthorPublicationsBookFieldInput { - connect: [AuthorPublicationsBookConnectFieldInput!] - create: [AuthorPublicationsBookCreateFieldInput!] - } - - input AuthorPublicationsBookUpdateConnectionInput { - edge: WroteUpdateInput - node: BookUpdateInput - } - - input AuthorPublicationsBookUpdateFieldInput { - connect: [AuthorPublicationsBookConnectFieldInput!] - create: [AuthorPublicationsBookCreateFieldInput!] - delete: [AuthorPublicationsBookDeleteFieldInput!] - disconnect: [AuthorPublicationsBookDisconnectFieldInput!] - update: AuthorPublicationsBookUpdateConnectionInput - where: AuthorPublicationsBookConnectionWhere - } - - input AuthorPublicationsConnectInput { - Book: [AuthorPublicationsBookConnectFieldInput!] - Journal: [AuthorPublicationsJournalConnectFieldInput!] - } - - type AuthorPublicationsConnection { - edges: [AuthorPublicationsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input AuthorPublicationsConnectionSort { - edge: WroteSort - } - - input AuthorPublicationsConnectionWhere { - Book: AuthorPublicationsBookConnectionWhere - Journal: AuthorPublicationsJournalConnectionWhere - } - - input AuthorPublicationsCreateFieldInput { - Book: [AuthorPublicationsBookCreateFieldInput!] - Journal: [AuthorPublicationsJournalCreateFieldInput!] - } - - input AuthorPublicationsCreateInput { - Book: AuthorPublicationsBookFieldInput - Journal: AuthorPublicationsJournalFieldInput - } - - input AuthorPublicationsDeleteInput { - Book: [AuthorPublicationsBookDeleteFieldInput!] - Journal: [AuthorPublicationsJournalDeleteFieldInput!] - } - - input AuthorPublicationsDisconnectInput { - Book: [AuthorPublicationsBookDisconnectFieldInput!] - Journal: [AuthorPublicationsJournalDisconnectFieldInput!] - } - - input AuthorPublicationsJournalConnectFieldInput { - connect: [JournalConnectInput!] - edge: WroteCreateInput! - where: JournalConnectWhere - } - - input AuthorPublicationsJournalConnectionWhere { - AND: [AuthorPublicationsJournalConnectionWhere!] - NOT: AuthorPublicationsJournalConnectionWhere - OR: [AuthorPublicationsJournalConnectionWhere!] - edge: WroteWhere - edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: JournalWhere - node_NOT: JournalWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input AuthorPublicationsJournalCreateFieldInput { - edge: WroteCreateInput! - node: JournalCreateInput! - } - - input AuthorPublicationsJournalDeleteFieldInput { - delete: JournalDeleteInput - where: AuthorPublicationsJournalConnectionWhere - } - - input AuthorPublicationsJournalDisconnectFieldInput { - disconnect: JournalDisconnectInput - where: AuthorPublicationsJournalConnectionWhere - } - - input AuthorPublicationsJournalFieldInput { - connect: [AuthorPublicationsJournalConnectFieldInput!] - create: [AuthorPublicationsJournalCreateFieldInput!] - } - - input AuthorPublicationsJournalUpdateConnectionInput { - edge: WroteUpdateInput - node: JournalUpdateInput - } - - input AuthorPublicationsJournalUpdateFieldInput { - connect: [AuthorPublicationsJournalConnectFieldInput!] - create: [AuthorPublicationsJournalCreateFieldInput!] - delete: [AuthorPublicationsJournalDeleteFieldInput!] - disconnect: [AuthorPublicationsJournalDisconnectFieldInput!] - update: AuthorPublicationsJournalUpdateConnectionInput - where: AuthorPublicationsJournalConnectionWhere - } - - type AuthorPublicationsRelationship implements Wrote { - cursor: String! - node: Publication! - \\"\\"\\"\\"\\"\\" - words: Int! - } - - input AuthorPublicationsUpdateInput { - Book: [AuthorPublicationsBookUpdateFieldInput!] - Journal: [AuthorPublicationsJournalUpdateFieldInput!] - } - - input AuthorRelationInput { - publications: AuthorPublicationsCreateFieldInput - } - - \\"\\"\\" - Fields to sort Authors by. The order in which sorts are applied is not guaranteed when specifying many fields in one AuthorSort object. - \\"\\"\\" - input AuthorSort { - name: SortDirection - } - - input AuthorUpdateInput { - name: String - publications: AuthorPublicationsUpdateInput - } - - input AuthorWhere { - AND: [AuthorWhere!] - NOT: AuthorWhere - OR: [AuthorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - publicationsConnection: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Use \`publicationsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Authors where all of the related AuthorPublicationsConnections match this filter - \\"\\"\\" - publicationsConnection_ALL: AuthorPublicationsConnectionWhere - \\"\\"\\" - Return Authors where none of the related AuthorPublicationsConnections match this filter - \\"\\"\\" - publicationsConnection_NONE: AuthorPublicationsConnectionWhere - publicationsConnection_NOT: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Use \`publicationsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Authors where one of the related AuthorPublicationsConnections match this filter - \\"\\"\\" - publicationsConnection_SINGLE: AuthorPublicationsConnectionWhere - \\"\\"\\" - Return Authors where some of the related AuthorPublicationsConnections match this filter - \\"\\"\\" - publicationsConnection_SOME: AuthorPublicationsConnectionWhere - } - - type AuthorsConnection { - edges: [AuthorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Book { - \\"\\"\\"\\"\\"\\" - author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! - authorAggregate(directed: Boolean = true, where: AuthorWhere): BookAuthorAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type BookAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! - } - - input BookAuthorAggregateInput { - AND: [BookAuthorAggregateInput!] - NOT: BookAuthorAggregateInput - OR: [BookAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: BookAuthorEdgeAggregationWhereInput - node: BookAuthorNodeAggregationWhereInput - } - - type BookAuthorAuthorAggregationSelection { - count: Int! - edge: BookAuthorAuthorEdgeAggregateSelection - node: BookAuthorAuthorNodeAggregateSelection - } - - type BookAuthorAuthorEdgeAggregateSelection { - words: IntAggregateSelectionNonNullable! - } - - type BookAuthorAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input BookAuthorConnectFieldInput { - connect: [AuthorConnectInput!] - edge: WroteCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: AuthorConnectWhere - } - - type BookAuthorConnection { - edges: [BookAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input BookAuthorConnectionSort { - edge: WroteSort - node: AuthorSort - } - - input BookAuthorConnectionWhere { - AND: [BookAuthorConnectionWhere!] - NOT: BookAuthorConnectionWhere - OR: [BookAuthorConnectionWhere!] - edge: WroteWhere - edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: AuthorWhere - node_NOT: AuthorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input BookAuthorCreateFieldInput { - edge: WroteCreateInput! - node: AuthorCreateInput! - } - - input BookAuthorDeleteFieldInput { - delete: AuthorDeleteInput - where: BookAuthorConnectionWhere - } - - input BookAuthorDisconnectFieldInput { - disconnect: AuthorDisconnectInput - where: BookAuthorConnectionWhere - } - - input BookAuthorEdgeAggregationWhereInput { - AND: [BookAuthorEdgeAggregationWhereInput!] - NOT: BookAuthorEdgeAggregationWhereInput - OR: [BookAuthorEdgeAggregationWhereInput!] - words_AVERAGE_EQUAL: Float - words_AVERAGE_GT: Float - words_AVERAGE_GTE: Float - words_AVERAGE_LT: Float - words_AVERAGE_LTE: Float - words_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_MAX_EQUAL: Int - words_MAX_GT: Int - words_MAX_GTE: Int - words_MAX_LT: Int - words_MAX_LTE: Int - words_MIN_EQUAL: Int - words_MIN_GT: Int - words_MIN_GTE: Int - words_MIN_LT: Int - words_MIN_LTE: Int - words_SUM_EQUAL: Int - words_SUM_GT: Int - words_SUM_GTE: Int - words_SUM_LT: Int - words_SUM_LTE: Int - } - - input BookAuthorFieldInput { - connect: [BookAuthorConnectFieldInput!] - create: [BookAuthorCreateFieldInput!] - } - - input BookAuthorNodeAggregationWhereInput { - AND: [BookAuthorNodeAggregationWhereInput!] - NOT: BookAuthorNodeAggregationWhereInput - OR: [BookAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type BookAuthorRelationship implements Wrote { - cursor: String! - node: Author! - \\"\\"\\"\\"\\"\\" - words: Int! - } - - input BookAuthorUpdateConnectionInput { - edge: WroteUpdateInput - node: AuthorUpdateInput - } - - input BookAuthorUpdateFieldInput { - connect: [BookAuthorConnectFieldInput!] - create: [BookAuthorCreateFieldInput!] - delete: [BookAuthorDeleteFieldInput!] - disconnect: [BookAuthorDisconnectFieldInput!] - update: BookAuthorUpdateConnectionInput - where: BookAuthorConnectionWhere - } - - input BookConnectInput { - author: [BookAuthorConnectFieldInput!] - } - - input BookConnectWhere { - node: BookWhere! - } - - input BookCreateInput { - author: BookAuthorFieldInput - title: String! - } - - input BookDeleteInput { - author: [BookAuthorDeleteFieldInput!] - } - - input BookDisconnectInput { - author: [BookAuthorDisconnectFieldInput!] - } - - type BookEdge { - cursor: String! - node: Book! - } - - input BookOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BookSort!] - } - - input BookRelationInput { - author: [BookAuthorCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. - \\"\\"\\" - input BookSort { - title: SortDirection - } - - input BookUpdateInput { - author: [BookAuthorUpdateFieldInput!] - title: String - } - - input BookWhere { - AND: [BookWhere!] - NOT: BookWhere - OR: [BookWhere!] - author: AuthorWhere @deprecated(reason: \\"Use \`author_SOME\` instead.\\") - authorAggregate: BookAuthorAggregateInput - authorConnection: BookAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_SOME\` instead.\\") - \\"\\"\\" - Return Books where all of the related BookAuthorConnections match this filter - \\"\\"\\" - authorConnection_ALL: BookAuthorConnectionWhere - \\"\\"\\" - Return Books where none of the related BookAuthorConnections match this filter - \\"\\"\\" - authorConnection_NONE: BookAuthorConnectionWhere - authorConnection_NOT: BookAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_NONE\` instead.\\") - \\"\\"\\" - Return Books where one of the related BookAuthorConnections match this filter - \\"\\"\\" - authorConnection_SINGLE: BookAuthorConnectionWhere - \\"\\"\\" - Return Books where some of the related BookAuthorConnections match this filter - \\"\\"\\" - authorConnection_SOME: BookAuthorConnectionWhere - \\"\\"\\"Return Books where all of the related Authors match this filter\\"\\"\\" - author_ALL: AuthorWhere - \\"\\"\\"Return Books where none of the related Authors match this filter\\"\\"\\" - author_NONE: AuthorWhere - author_NOT: AuthorWhere @deprecated(reason: \\"Use \`author_NONE\` instead.\\") - \\"\\"\\"Return Books where one of the related Authors match this filter\\"\\"\\" - author_SINGLE: AuthorWhere - \\"\\"\\"Return Books where some of the related Authors match this filter\\"\\"\\" - author_SOME: AuthorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type BooksConnection { - edges: [BookEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateAuthorsMutationResponse { - authors: [Author!]! - info: CreateInfo! - } - - type CreateBooksMutationResponse { - books: [Book!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateJournalsMutationResponse { - info: CreateInfo! - journals: [Journal!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Journal { - \\"\\"\\"\\"\\"\\" - author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! - authorAggregate(directed: Boolean = true, where: AuthorWhere): JournalAuthorAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! - \\"\\"\\"\\"\\"\\" - subject: String! - } - - type JournalAggregateSelection { - count: Int! - subject: StringAggregateSelectionNonNullable! - } - - input JournalAuthorAggregateInput { - AND: [JournalAuthorAggregateInput!] - NOT: JournalAuthorAggregateInput - OR: [JournalAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: JournalAuthorEdgeAggregationWhereInput - node: JournalAuthorNodeAggregationWhereInput - } - - type JournalAuthorAuthorAggregationSelection { - count: Int! - edge: JournalAuthorAuthorEdgeAggregateSelection - node: JournalAuthorAuthorNodeAggregateSelection - } - - type JournalAuthorAuthorEdgeAggregateSelection { - words: IntAggregateSelectionNonNullable! - } - - type JournalAuthorAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input JournalAuthorConnectFieldInput { - connect: [AuthorConnectInput!] - edge: WroteCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: AuthorConnectWhere - } - - type JournalAuthorConnection { - edges: [JournalAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input JournalAuthorConnectionSort { - edge: WroteSort - node: AuthorSort - } - - input JournalAuthorConnectionWhere { - AND: [JournalAuthorConnectionWhere!] - NOT: JournalAuthorConnectionWhere - OR: [JournalAuthorConnectionWhere!] - edge: WroteWhere - edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: AuthorWhere - node_NOT: AuthorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input JournalAuthorCreateFieldInput { - edge: WroteCreateInput! - node: AuthorCreateInput! - } - - input JournalAuthorDeleteFieldInput { - delete: AuthorDeleteInput - where: JournalAuthorConnectionWhere - } - - input JournalAuthorDisconnectFieldInput { - disconnect: AuthorDisconnectInput - where: JournalAuthorConnectionWhere - } - - input JournalAuthorEdgeAggregationWhereInput { - AND: [JournalAuthorEdgeAggregationWhereInput!] - NOT: JournalAuthorEdgeAggregationWhereInput - OR: [JournalAuthorEdgeAggregationWhereInput!] - words_AVERAGE_EQUAL: Float - words_AVERAGE_GT: Float - words_AVERAGE_GTE: Float - words_AVERAGE_LT: Float - words_AVERAGE_LTE: Float - words_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_MAX_EQUAL: Int - words_MAX_GT: Int - words_MAX_GTE: Int - words_MAX_LT: Int - words_MAX_LTE: Int - words_MIN_EQUAL: Int - words_MIN_GT: Int - words_MIN_GTE: Int - words_MIN_LT: Int - words_MIN_LTE: Int - words_SUM_EQUAL: Int - words_SUM_GT: Int - words_SUM_GTE: Int - words_SUM_LT: Int - words_SUM_LTE: Int - } - - input JournalAuthorFieldInput { - connect: [JournalAuthorConnectFieldInput!] - create: [JournalAuthorCreateFieldInput!] - } - - input JournalAuthorNodeAggregationWhereInput { - AND: [JournalAuthorNodeAggregationWhereInput!] - NOT: JournalAuthorNodeAggregationWhereInput - OR: [JournalAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type JournalAuthorRelationship implements Wrote { - cursor: String! - node: Author! - \\"\\"\\"\\"\\"\\" - words: Int! - } - - input JournalAuthorUpdateConnectionInput { - edge: WroteUpdateInput - node: AuthorUpdateInput - } - - input JournalAuthorUpdateFieldInput { - connect: [JournalAuthorConnectFieldInput!] - create: [JournalAuthorCreateFieldInput!] - delete: [JournalAuthorDeleteFieldInput!] - disconnect: [JournalAuthorDisconnectFieldInput!] - update: JournalAuthorUpdateConnectionInput - where: JournalAuthorConnectionWhere - } - - input JournalConnectInput { - author: [JournalAuthorConnectFieldInput!] - } - - input JournalConnectWhere { - node: JournalWhere! - } - - input JournalCreateInput { - author: JournalAuthorFieldInput - subject: String! - } - - input JournalDeleteInput { - author: [JournalAuthorDeleteFieldInput!] - } - - input JournalDisconnectInput { - author: [JournalAuthorDisconnectFieldInput!] - } - - type JournalEdge { - cursor: String! - node: Journal! - } - - input JournalOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more JournalSort objects to sort Journals by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [JournalSort!] - } - - input JournalRelationInput { - author: [JournalAuthorCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Journals by. The order in which sorts are applied is not guaranteed when specifying many fields in one JournalSort object. - \\"\\"\\" - input JournalSort { - subject: SortDirection - } - - input JournalUpdateInput { - author: [JournalAuthorUpdateFieldInput!] - subject: String - } - - input JournalWhere { - AND: [JournalWhere!] - NOT: JournalWhere - OR: [JournalWhere!] - author: AuthorWhere @deprecated(reason: \\"Use \`author_SOME\` instead.\\") - authorAggregate: JournalAuthorAggregateInput - authorConnection: JournalAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_SOME\` instead.\\") - \\"\\"\\" - Return Journals where all of the related JournalAuthorConnections match this filter - \\"\\"\\" - authorConnection_ALL: JournalAuthorConnectionWhere - \\"\\"\\" - Return Journals where none of the related JournalAuthorConnections match this filter - \\"\\"\\" - authorConnection_NONE: JournalAuthorConnectionWhere - authorConnection_NOT: JournalAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_NONE\` instead.\\") - \\"\\"\\" - Return Journals where one of the related JournalAuthorConnections match this filter - \\"\\"\\" - authorConnection_SINGLE: JournalAuthorConnectionWhere - \\"\\"\\" - Return Journals where some of the related JournalAuthorConnections match this filter - \\"\\"\\" - authorConnection_SOME: JournalAuthorConnectionWhere - \\"\\"\\"Return Journals where all of the related Authors match this filter\\"\\"\\" - author_ALL: AuthorWhere - \\"\\"\\"Return Journals where none of the related Authors match this filter\\"\\"\\" - author_NONE: AuthorWhere - author_NOT: AuthorWhere @deprecated(reason: \\"Use \`author_NONE\` instead.\\") - \\"\\"\\"Return Journals where one of the related Authors match this filter\\"\\"\\" - author_SINGLE: AuthorWhere - \\"\\"\\"Return Journals where some of the related Authors match this filter\\"\\"\\" - author_SOME: AuthorWhere - subject: String - subject_CONTAINS: String - subject_ENDS_WITH: String - subject_IN: [String!] - subject_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_STARTS_WITH: String - } - - type JournalsConnection { - edges: [JournalEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createAuthors(input: [AuthorCreateInput!]!): CreateAuthorsMutationResponse! - createBooks(input: [BookCreateInput!]!): CreateBooksMutationResponse! - createJournals(input: [JournalCreateInput!]!): CreateJournalsMutationResponse! - deleteAuthors(delete: AuthorDeleteInput, where: AuthorWhere): DeleteInfo! - deleteBooks(delete: BookDeleteInput, where: BookWhere): DeleteInfo! - deleteJournals(delete: JournalDeleteInput, where: JournalWhere): DeleteInfo! - updateAuthors(connect: AuthorConnectInput, create: AuthorRelationInput, delete: AuthorDeleteInput, disconnect: AuthorDisconnectInput, update: AuthorUpdateInput, where: AuthorWhere): UpdateAuthorsMutationResponse! - updateBooks(connect: BookConnectInput, create: BookRelationInput, delete: BookDeleteInput, disconnect: BookDisconnectInput, update: BookUpdateInput, where: BookWhere): UpdateBooksMutationResponse! - updateJournals(connect: JournalConnectInput, create: JournalRelationInput, delete: JournalDeleteInput, disconnect: JournalDisconnectInput, update: JournalUpdateInput, where: JournalWhere): UpdateJournalsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Publication = Book | Journal - - input PublicationWhere { - Book: BookWhere - Journal: JournalWhere - } - - type Query { - authors(options: AuthorOptions, where: AuthorWhere): [Author!]! - authorsAggregate(where: AuthorWhere): AuthorAggregateSelection! - authorsConnection(after: String, first: Int, sort: [AuthorSort], where: AuthorWhere): AuthorsConnection! - books(options: BookOptions, where: BookWhere): [Book!]! - booksAggregate(where: BookWhere): BookAggregateSelection! - booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! - journals(options: JournalOptions, where: JournalWhere): [Journal!]! - journalsAggregate(where: JournalWhere): JournalAggregateSelection! - journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateAuthorsMutationResponse { - authors: [Author!]! - info: UpdateInfo! - } - - type UpdateBooksMutationResponse { - books: [Book!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateJournalsMutationResponse { - info: UpdateInfo! - journals: [Journal!]! - } - - interface Wrote { - \\"\\"\\"\\"\\"\\" - words: Int! - } - - input WroteCreateInput { - words: Int! - } - - input WroteSort { - words: SortDirection - } - - input WroteUpdateInput { - words: Int - words_DECREMENT: Int - words_INCREMENT: Int - } - - input WroteWhere { - AND: [WroteWhere!] - NOT: WroteWhere - OR: [WroteWhere!] - words: Int - words_GT: Int - words_GTE: Int - words_IN: [Int!] - words_LT: Int - words_LTE: Int - words_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - words_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Author { + name: String! + publications(directed: Boolean = true, options: QueryOptions, where: PublicationWhere): [Publication!]! + publicationsConnection(after: String, directed: Boolean = true, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! +} + +type AuthorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input AuthorConnectInput { + publications: AuthorPublicationsConnectInput +} + +input AuthorConnectWhere { + node: AuthorWhere! +} + +input AuthorCreateInput { + name: String! + publications: AuthorPublicationsCreateInput +} + +input AuthorDeleteInput { + publications: AuthorPublicationsDeleteInput +} + +input AuthorDisconnectInput { + publications: AuthorPublicationsDisconnectInput +} + +type AuthorEdge { + cursor: String! + node: Author! +} + +input AuthorOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AuthorSort objects to sort Authors by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AuthorSort!] +} + +input AuthorPublicationsBookConnectFieldInput { + connect: [BookConnectInput!] + edge: WroteCreateInput! + where: BookConnectWhere +} + +input AuthorPublicationsBookConnectionWhere { + AND: [AuthorPublicationsBookConnectionWhere!] + NOT: AuthorPublicationsBookConnectionWhere + OR: [AuthorPublicationsBookConnectionWhere!] + edge: WroteWhere + edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: BookWhere + node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input AuthorPublicationsBookCreateFieldInput { + edge: WroteCreateInput! + node: BookCreateInput! +} + +input AuthorPublicationsBookDeleteFieldInput { + delete: BookDeleteInput + where: AuthorPublicationsBookConnectionWhere +} + +input AuthorPublicationsBookDisconnectFieldInput { + disconnect: BookDisconnectInput + where: AuthorPublicationsBookConnectionWhere +} + +input AuthorPublicationsBookFieldInput { + connect: [AuthorPublicationsBookConnectFieldInput!] + create: [AuthorPublicationsBookCreateFieldInput!] +} + +input AuthorPublicationsBookUpdateConnectionInput { + edge: WroteUpdateInput + node: BookUpdateInput +} + +input AuthorPublicationsBookUpdateFieldInput { + connect: [AuthorPublicationsBookConnectFieldInput!] + create: [AuthorPublicationsBookCreateFieldInput!] + delete: [AuthorPublicationsBookDeleteFieldInput!] + disconnect: [AuthorPublicationsBookDisconnectFieldInput!] + update: AuthorPublicationsBookUpdateConnectionInput + where: AuthorPublicationsBookConnectionWhere +} + +input AuthorPublicationsConnectInput { + Book: [AuthorPublicationsBookConnectFieldInput!] + Journal: [AuthorPublicationsJournalConnectFieldInput!] +} + +type AuthorPublicationsConnection { + edges: [AuthorPublicationsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input AuthorPublicationsConnectionSort { + edge: WroteSort +} + +input AuthorPublicationsConnectionWhere { + Book: AuthorPublicationsBookConnectionWhere + Journal: AuthorPublicationsJournalConnectionWhere +} + +input AuthorPublicationsCreateFieldInput { + Book: [AuthorPublicationsBookCreateFieldInput!] + Journal: [AuthorPublicationsJournalCreateFieldInput!] +} + +input AuthorPublicationsCreateInput { + Book: AuthorPublicationsBookFieldInput + Journal: AuthorPublicationsJournalFieldInput +} + +input AuthorPublicationsDeleteInput { + Book: [AuthorPublicationsBookDeleteFieldInput!] + Journal: [AuthorPublicationsJournalDeleteFieldInput!] +} + +input AuthorPublicationsDisconnectInput { + Book: [AuthorPublicationsBookDisconnectFieldInput!] + Journal: [AuthorPublicationsJournalDisconnectFieldInput!] +} + +input AuthorPublicationsJournalConnectFieldInput { + connect: [JournalConnectInput!] + edge: WroteCreateInput! + where: JournalConnectWhere +} + +input AuthorPublicationsJournalConnectionWhere { + AND: [AuthorPublicationsJournalConnectionWhere!] + NOT: AuthorPublicationsJournalConnectionWhere + OR: [AuthorPublicationsJournalConnectionWhere!] + edge: WroteWhere + edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: JournalWhere + node_NOT: JournalWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input AuthorPublicationsJournalCreateFieldInput { + edge: WroteCreateInput! + node: JournalCreateInput! +} + +input AuthorPublicationsJournalDeleteFieldInput { + delete: JournalDeleteInput + where: AuthorPublicationsJournalConnectionWhere +} + +input AuthorPublicationsJournalDisconnectFieldInput { + disconnect: JournalDisconnectInput + where: AuthorPublicationsJournalConnectionWhere +} + +input AuthorPublicationsJournalFieldInput { + connect: [AuthorPublicationsJournalConnectFieldInput!] + create: [AuthorPublicationsJournalCreateFieldInput!] +} + +input AuthorPublicationsJournalUpdateConnectionInput { + edge: WroteUpdateInput + node: JournalUpdateInput +} + +input AuthorPublicationsJournalUpdateFieldInput { + connect: [AuthorPublicationsJournalConnectFieldInput!] + create: [AuthorPublicationsJournalCreateFieldInput!] + delete: [AuthorPublicationsJournalDeleteFieldInput!] + disconnect: [AuthorPublicationsJournalDisconnectFieldInput!] + update: AuthorPublicationsJournalUpdateConnectionInput + where: AuthorPublicationsJournalConnectionWhere +} + +type AuthorPublicationsRelationship implements Wrote { + cursor: String! + node: Publication! + words: Int! +} + +input AuthorPublicationsUpdateInput { + Book: [AuthorPublicationsBookUpdateFieldInput!] + Journal: [AuthorPublicationsJournalUpdateFieldInput!] +} + +input AuthorRelationInput { + publications: AuthorPublicationsCreateFieldInput +} + +\\"\\"\\" +Fields to sort Authors by. The order in which sorts are applied is not guaranteed when specifying many fields in one AuthorSort object. +\\"\\"\\" +input AuthorSort { + name: SortDirection +} + +input AuthorUpdateInput { + name: String + publications: AuthorPublicationsUpdateInput +} + +input AuthorWhere { + AND: [AuthorWhere!] + NOT: AuthorWhere + OR: [AuthorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + publicationsConnection: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Use \`publicationsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Authors where all of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + publicationsConnection_ALL: AuthorPublicationsConnectionWhere + \\"\\"\\" + Return Authors where none of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + publicationsConnection_NONE: AuthorPublicationsConnectionWhere + publicationsConnection_NOT: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Use \`publicationsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Authors where one of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + publicationsConnection_SINGLE: AuthorPublicationsConnectionWhere + \\"\\"\\" + Return Authors where some of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + publicationsConnection_SOME: AuthorPublicationsConnectionWhere +} + +type AuthorsConnection { + edges: [AuthorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Book { + author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! + authorAggregate(directed: Boolean = true, where: AuthorWhere): BookAuthorAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! + title: String! +} + +type BookAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! +} + +input BookAuthorAggregateInput { + AND: [BookAuthorAggregateInput!] + NOT: BookAuthorAggregateInput + OR: [BookAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: BookAuthorEdgeAggregationWhereInput + node: BookAuthorNodeAggregationWhereInput +} + +type BookAuthorAuthorAggregationSelection { + count: Int! + edge: BookAuthorAuthorEdgeAggregateSelection + node: BookAuthorAuthorNodeAggregateSelection +} + +type BookAuthorAuthorEdgeAggregateSelection { + words: IntAggregateSelectionNonNullable! +} + +type BookAuthorAuthorNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input BookAuthorConnectFieldInput { + connect: [AuthorConnectInput!] + edge: WroteCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: AuthorConnectWhere +} + +type BookAuthorConnection { + edges: [BookAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input BookAuthorConnectionSort { + edge: WroteSort + node: AuthorSort +} + +input BookAuthorConnectionWhere { + AND: [BookAuthorConnectionWhere!] + NOT: BookAuthorConnectionWhere + OR: [BookAuthorConnectionWhere!] + edge: WroteWhere + edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: AuthorWhere + node_NOT: AuthorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input BookAuthorCreateFieldInput { + edge: WroteCreateInput! + node: AuthorCreateInput! +} + +input BookAuthorDeleteFieldInput { + delete: AuthorDeleteInput + where: BookAuthorConnectionWhere +} + +input BookAuthorDisconnectFieldInput { + disconnect: AuthorDisconnectInput + where: BookAuthorConnectionWhere +} + +input BookAuthorEdgeAggregationWhereInput { + AND: [BookAuthorEdgeAggregationWhereInput!] + NOT: BookAuthorEdgeAggregationWhereInput + OR: [BookAuthorEdgeAggregationWhereInput!] + words_AVERAGE_EQUAL: Float + words_AVERAGE_GT: Float + words_AVERAGE_GTE: Float + words_AVERAGE_LT: Float + words_AVERAGE_LTE: Float + words_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_MAX_EQUAL: Int + words_MAX_GT: Int + words_MAX_GTE: Int + words_MAX_LT: Int + words_MAX_LTE: Int + words_MIN_EQUAL: Int + words_MIN_GT: Int + words_MIN_GTE: Int + words_MIN_LT: Int + words_MIN_LTE: Int + words_SUM_EQUAL: Int + words_SUM_GT: Int + words_SUM_GTE: Int + words_SUM_LT: Int + words_SUM_LTE: Int +} + +input BookAuthorFieldInput { + connect: [BookAuthorConnectFieldInput!] + create: [BookAuthorCreateFieldInput!] +} + +input BookAuthorNodeAggregationWhereInput { + AND: [BookAuthorNodeAggregationWhereInput!] + NOT: BookAuthorNodeAggregationWhereInput + OR: [BookAuthorNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type BookAuthorRelationship implements Wrote { + cursor: String! + node: Author! + words: Int! +} + +input BookAuthorUpdateConnectionInput { + edge: WroteUpdateInput + node: AuthorUpdateInput +} + +input BookAuthorUpdateFieldInput { + connect: [BookAuthorConnectFieldInput!] + create: [BookAuthorCreateFieldInput!] + delete: [BookAuthorDeleteFieldInput!] + disconnect: [BookAuthorDisconnectFieldInput!] + update: BookAuthorUpdateConnectionInput + where: BookAuthorConnectionWhere +} + +input BookConnectInput { + author: [BookAuthorConnectFieldInput!] +} + +input BookConnectWhere { + node: BookWhere! +} + +input BookCreateInput { + author: BookAuthorFieldInput + title: String! +} + +input BookDeleteInput { + author: [BookAuthorDeleteFieldInput!] +} + +input BookDisconnectInput { + author: [BookAuthorDisconnectFieldInput!] +} + +type BookEdge { + cursor: String! + node: Book! +} + +input BookOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BookSort!] +} + +input BookRelationInput { + author: [BookAuthorCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. +\\"\\"\\" +input BookSort { + title: SortDirection +} + +input BookUpdateInput { + author: [BookAuthorUpdateFieldInput!] + title: String +} + +input BookWhere { + AND: [BookWhere!] + NOT: BookWhere + OR: [BookWhere!] + author: AuthorWhere @deprecated(reason: \\"Use \`author_SOME\` instead.\\") + authorAggregate: BookAuthorAggregateInput + authorConnection: BookAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_SOME\` instead.\\") + \\"\\"\\" + Return Books where all of the related BookAuthorConnections match this filter + \\"\\"\\" + authorConnection_ALL: BookAuthorConnectionWhere + \\"\\"\\" + Return Books where none of the related BookAuthorConnections match this filter + \\"\\"\\" + authorConnection_NONE: BookAuthorConnectionWhere + authorConnection_NOT: BookAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_NONE\` instead.\\") + \\"\\"\\" + Return Books where one of the related BookAuthorConnections match this filter + \\"\\"\\" + authorConnection_SINGLE: BookAuthorConnectionWhere + \\"\\"\\" + Return Books where some of the related BookAuthorConnections match this filter + \\"\\"\\" + authorConnection_SOME: BookAuthorConnectionWhere + \\"\\"\\"Return Books where all of the related Authors match this filter\\"\\"\\" + author_ALL: AuthorWhere + \\"\\"\\"Return Books where none of the related Authors match this filter\\"\\"\\" + author_NONE: AuthorWhere + author_NOT: AuthorWhere @deprecated(reason: \\"Use \`author_NONE\` instead.\\") + \\"\\"\\"Return Books where one of the related Authors match this filter\\"\\"\\" + author_SINGLE: AuthorWhere + \\"\\"\\"Return Books where some of the related Authors match this filter\\"\\"\\" + author_SOME: AuthorWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type BooksConnection { + edges: [BookEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateAuthorsMutationResponse { + authors: [Author!]! + info: CreateInfo! +} + +type CreateBooksMutationResponse { + books: [Book!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateJournalsMutationResponse { + info: CreateInfo! + journals: [Journal!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Journal { + author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! + authorAggregate(directed: Boolean = true, where: AuthorWhere): JournalAuthorAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! + subject: String! +} + +type JournalAggregateSelection { + count: Int! + subject: StringAggregateSelectionNonNullable! +} + +input JournalAuthorAggregateInput { + AND: [JournalAuthorAggregateInput!] + NOT: JournalAuthorAggregateInput + OR: [JournalAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: JournalAuthorEdgeAggregationWhereInput + node: JournalAuthorNodeAggregationWhereInput +} + +type JournalAuthorAuthorAggregationSelection { + count: Int! + edge: JournalAuthorAuthorEdgeAggregateSelection + node: JournalAuthorAuthorNodeAggregateSelection +} + +type JournalAuthorAuthorEdgeAggregateSelection { + words: IntAggregateSelectionNonNullable! +} + +type JournalAuthorAuthorNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input JournalAuthorConnectFieldInput { + connect: [AuthorConnectInput!] + edge: WroteCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: AuthorConnectWhere +} + +type JournalAuthorConnection { + edges: [JournalAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input JournalAuthorConnectionSort { + edge: WroteSort + node: AuthorSort +} + +input JournalAuthorConnectionWhere { + AND: [JournalAuthorConnectionWhere!] + NOT: JournalAuthorConnectionWhere + OR: [JournalAuthorConnectionWhere!] + edge: WroteWhere + edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: AuthorWhere + node_NOT: AuthorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input JournalAuthorCreateFieldInput { + edge: WroteCreateInput! + node: AuthorCreateInput! +} + +input JournalAuthorDeleteFieldInput { + delete: AuthorDeleteInput + where: JournalAuthorConnectionWhere +} + +input JournalAuthorDisconnectFieldInput { + disconnect: AuthorDisconnectInput + where: JournalAuthorConnectionWhere +} + +input JournalAuthorEdgeAggregationWhereInput { + AND: [JournalAuthorEdgeAggregationWhereInput!] + NOT: JournalAuthorEdgeAggregationWhereInput + OR: [JournalAuthorEdgeAggregationWhereInput!] + words_AVERAGE_EQUAL: Float + words_AVERAGE_GT: Float + words_AVERAGE_GTE: Float + words_AVERAGE_LT: Float + words_AVERAGE_LTE: Float + words_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_MAX_EQUAL: Int + words_MAX_GT: Int + words_MAX_GTE: Int + words_MAX_LT: Int + words_MAX_LTE: Int + words_MIN_EQUAL: Int + words_MIN_GT: Int + words_MIN_GTE: Int + words_MIN_LT: Int + words_MIN_LTE: Int + words_SUM_EQUAL: Int + words_SUM_GT: Int + words_SUM_GTE: Int + words_SUM_LT: Int + words_SUM_LTE: Int +} + +input JournalAuthorFieldInput { + connect: [JournalAuthorConnectFieldInput!] + create: [JournalAuthorCreateFieldInput!] +} + +input JournalAuthorNodeAggregationWhereInput { + AND: [JournalAuthorNodeAggregationWhereInput!] + NOT: JournalAuthorNodeAggregationWhereInput + OR: [JournalAuthorNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type JournalAuthorRelationship implements Wrote { + cursor: String! + node: Author! + words: Int! +} + +input JournalAuthorUpdateConnectionInput { + edge: WroteUpdateInput + node: AuthorUpdateInput +} + +input JournalAuthorUpdateFieldInput { + connect: [JournalAuthorConnectFieldInput!] + create: [JournalAuthorCreateFieldInput!] + delete: [JournalAuthorDeleteFieldInput!] + disconnect: [JournalAuthorDisconnectFieldInput!] + update: JournalAuthorUpdateConnectionInput + where: JournalAuthorConnectionWhere +} + +input JournalConnectInput { + author: [JournalAuthorConnectFieldInput!] +} + +input JournalConnectWhere { + node: JournalWhere! +} + +input JournalCreateInput { + author: JournalAuthorFieldInput + subject: String! +} + +input JournalDeleteInput { + author: [JournalAuthorDeleteFieldInput!] +} + +input JournalDisconnectInput { + author: [JournalAuthorDisconnectFieldInput!] +} + +type JournalEdge { + cursor: String! + node: Journal! +} + +input JournalOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more JournalSort objects to sort Journals by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [JournalSort!] +} + +input JournalRelationInput { + author: [JournalAuthorCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Journals by. The order in which sorts are applied is not guaranteed when specifying many fields in one JournalSort object. +\\"\\"\\" +input JournalSort { + subject: SortDirection +} + +input JournalUpdateInput { + author: [JournalAuthorUpdateFieldInput!] + subject: String +} + +input JournalWhere { + AND: [JournalWhere!] + NOT: JournalWhere + OR: [JournalWhere!] + author: AuthorWhere @deprecated(reason: \\"Use \`author_SOME\` instead.\\") + authorAggregate: JournalAuthorAggregateInput + authorConnection: JournalAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_SOME\` instead.\\") + \\"\\"\\" + Return Journals where all of the related JournalAuthorConnections match this filter + \\"\\"\\" + authorConnection_ALL: JournalAuthorConnectionWhere + \\"\\"\\" + Return Journals where none of the related JournalAuthorConnections match this filter + \\"\\"\\" + authorConnection_NONE: JournalAuthorConnectionWhere + authorConnection_NOT: JournalAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_NONE\` instead.\\") + \\"\\"\\" + Return Journals where one of the related JournalAuthorConnections match this filter + \\"\\"\\" + authorConnection_SINGLE: JournalAuthorConnectionWhere + \\"\\"\\" + Return Journals where some of the related JournalAuthorConnections match this filter + \\"\\"\\" + authorConnection_SOME: JournalAuthorConnectionWhere + \\"\\"\\"Return Journals where all of the related Authors match this filter\\"\\"\\" + author_ALL: AuthorWhere + \\"\\"\\"Return Journals where none of the related Authors match this filter\\"\\"\\" + author_NONE: AuthorWhere + author_NOT: AuthorWhere @deprecated(reason: \\"Use \`author_NONE\` instead.\\") + \\"\\"\\"Return Journals where one of the related Authors match this filter\\"\\"\\" + author_SINGLE: AuthorWhere + \\"\\"\\"Return Journals where some of the related Authors match this filter\\"\\"\\" + author_SOME: AuthorWhere + subject: String + subject_CONTAINS: String + subject_ENDS_WITH: String + subject_IN: [String!] + subject_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_STARTS_WITH: String +} + +type JournalsConnection { + edges: [JournalEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createAuthors(input: [AuthorCreateInput!]!): CreateAuthorsMutationResponse! + createBooks(input: [BookCreateInput!]!): CreateBooksMutationResponse! + createJournals(input: [JournalCreateInput!]!): CreateJournalsMutationResponse! + deleteAuthors(delete: AuthorDeleteInput, where: AuthorWhere): DeleteInfo! + deleteBooks(delete: BookDeleteInput, where: BookWhere): DeleteInfo! + deleteJournals(delete: JournalDeleteInput, where: JournalWhere): DeleteInfo! + updateAuthors(connect: AuthorConnectInput, create: AuthorRelationInput, delete: AuthorDeleteInput, disconnect: AuthorDisconnectInput, update: AuthorUpdateInput, where: AuthorWhere): UpdateAuthorsMutationResponse! + updateBooks(connect: BookConnectInput, create: BookRelationInput, delete: BookDeleteInput, disconnect: BookDisconnectInput, update: BookUpdateInput, where: BookWhere): UpdateBooksMutationResponse! + updateJournals(connect: JournalConnectInput, create: JournalRelationInput, delete: JournalDeleteInput, disconnect: JournalDisconnectInput, update: JournalUpdateInput, where: JournalWhere): UpdateJournalsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Publication = Book | Journal + +input PublicationWhere { + Book: BookWhere + Journal: JournalWhere +} + +type Query { + authors(options: AuthorOptions, where: AuthorWhere): [Author!]! + authorsAggregate(where: AuthorWhere): AuthorAggregateSelection! + authorsConnection(after: String, first: Int, sort: [AuthorSort], where: AuthorWhere): AuthorsConnection! + books(options: BookOptions, where: BookWhere): [Book!]! + booksAggregate(where: BookWhere): BookAggregateSelection! + booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! + journals(options: JournalOptions, where: JournalWhere): [Journal!]! + journalsAggregate(where: JournalWhere): JournalAggregateSelection! + journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateAuthorsMutationResponse { + authors: [Author!]! + info: UpdateInfo! +} + +type UpdateBooksMutationResponse { + books: [Book!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateJournalsMutationResponse { + info: UpdateInfo! + journals: [Journal!]! +} + +interface Wrote { + words: Int! +} + +input WroteCreateInput { + words: Int! +} + +input WroteSort { + words: SortDirection +} + +input WroteUpdateInput { + words: Int + words_DECREMENT: Int + words_INCREMENT: Int +} + +input WroteWhere { + AND: [WroteWhere!] + NOT: WroteWhere + OR: [WroteWhere!] + words: Int + words_GT: Int + words_GTE: Int + words_IN: [Int!] + words_LT: Int + words_LTE: Int + words_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + words_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +}" +`); }); }); diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index 32571f8111..f73b1a7dac 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -52,153 +52,149 @@ describe("Custom-mutations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - input ExampleInput { - id: ID - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - \\"\\"\\"\\"\\"\\" - testCypherMutation(input: ExampleInput): String - testMutation(input: ExampleInput): String - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - \\"\\"\\"\\"\\"\\" - testCypherQuery(input: ExampleInput): String - testQuery(input: ExampleInput): String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type Subscription { - testSubscription(input: ExampleInput): String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +input ExampleInput { + id: ID +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + testCypherMutation(input: ExampleInput): String + testMutation(input: ExampleInput): String + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + testCypherQuery(input: ExampleInput): String + testQuery(input: ExampleInput): String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type Subscription { + testSubscription(input: ExampleInput): String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 8c95ae0bd3..a1c8d23e02 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -36,143 +36,141 @@ describe("Directive-preserve", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - directive @preservedFieldLevel(boolean: Boolean, float: Float, int: Int, string: String) on FIELD_DEFINITION - - directive @preservedTopLevel(boolean: Boolean, float: Float, int: Int, string: String) on OBJECT - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie @preservedTopLevel { - \\"\\"\\"\\"\\"\\" - id: ID @preservedFieldLevel(string: \\"str\\", int: 12, float: 1.2, boolean: true) - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +directive @preservedFieldLevel(boolean: Boolean, float: Float, int: Int, string: String) on FIELD_DEFINITION + +directive @preservedTopLevel(boolean: Boolean, float: Float, int: Int, string: String) on OBJECT + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie @preservedTopLevel { + id: ID @preservedFieldLevel(string: \\"str\\", int: 12, float: 1.2, boolean: true) +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Directives on relations preserved", async () => { @@ -193,679 +191,671 @@ describe("Directive-preserve", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String - } - - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input GenreConnectInput { - movies: [GenreMoviesConnectFieldInput!] - } - - input GenreConnectWhere { - node: GenreWhere! - } - - input GenreCreateInput { - movies: GenreMoviesFieldInput - name: String - } - - input GenreDeleteInput { - movies: [GenreMoviesDeleteFieldInput!] - } - - input GenreDisconnectInput { - movies: [GenreMoviesDisconnectFieldInput!] - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection - } - - type GenreMovieMoviesNodeAggregateSelection { - imdbRating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - year: IntAggregateSelectionNullable! - } - - input GenreMoviesAggregateInput { - AND: [GenreMoviesAggregateInput!] - NOT: GenreMoviesAggregateInput - OR: [GenreMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: GenreMoviesNodeAggregationWhereInput - } - - input GenreMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input GenreMoviesConnectionSort { - node: MovieSort - } - - input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input GenreMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input GenreMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: GenreMoviesConnectionWhere - } - - input GenreMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: GenreMoviesConnectionWhere - } - - input GenreMoviesFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - } - - input GenreMoviesNodeAggregationWhereInput { - AND: [GenreMoviesNodeAggregationWhereInput!] - NOT: GenreMoviesNodeAggregationWhereInput - OR: [GenreMoviesNodeAggregationWhereInput!] - imdbRating_AVERAGE_EQUAL: Float - imdbRating_AVERAGE_GT: Float - imdbRating_AVERAGE_GTE: Float - imdbRating_AVERAGE_LT: Float - imdbRating_AVERAGE_LTE: Float - imdbRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_MAX_EQUAL: Float - imdbRating_MAX_GT: Float - imdbRating_MAX_GTE: Float - imdbRating_MAX_LT: Float - imdbRating_MAX_LTE: Float - imdbRating_MIN_EQUAL: Float - imdbRating_MIN_GT: Float - imdbRating_MIN_GTE: Float - imdbRating_MIN_LT: Float - imdbRating_MIN_LTE: Float - imdbRating_SUM_EQUAL: Float - imdbRating_SUM_GT: Float - imdbRating_SUM_GTE: Float - imdbRating_SUM_LT: Float - imdbRating_SUM_LTE: Float - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - year_AVERAGE_EQUAL: Float - year_AVERAGE_GT: Float - year_AVERAGE_GTE: Float - year_AVERAGE_LT: Float - year_AVERAGE_LTE: Float - year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_MAX_EQUAL: Int - year_MAX_GT: Int - year_MAX_GTE: Int - year_MAX_LT: Int - year_MAX_LTE: Int - year_MIN_EQUAL: Int - year_MIN_GT: Int - year_MIN_GTE: Int - year_MIN_LT: Int - year_MIN_LTE: Int - year_SUM_EQUAL: Int - year_SUM_GT: Int - year_SUM_GTE: Int - year_SUM_LT: Int - year_SUM_LTE: Int - } - - type GenreMoviesRelationship { - cursor: String! - node: Movie! - } - - input GenreMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input GenreMoviesUpdateFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - delete: [GenreMoviesDeleteFieldInput!] - disconnect: [GenreMoviesDisconnectFieldInput!] - update: GenreMoviesUpdateConnectionInput - where: GenreMoviesConnectionWhere - } - - 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!] - } - - input GenreRelationInput { - movies: [GenreMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: SortDirection - } - - input GenreUpdateInput { - movies: [GenreMoviesUpdateFieldInput!] - name: String - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: GenreMoviesAggregateInput - moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere - moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere - \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") - genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use\\") - \\"\\"\\"\\"\\"\\" - imdbRating: Float - \\"\\"\\"\\"\\"\\" - title: String - \\"\\"\\"\\"\\"\\" - year: Int - } - - type MovieAggregateSelection { - count: Int! - imdbRating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - year: IntAggregateSelectionNullable! - } - - input MovieConnectInput { - genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - genres: MovieGenresFieldInput @deprecated(reason: \\"Do not use\\") - imdbRating: Float - title: String - year: Int - } - - input MovieDeleteInput { - genres: [MovieGenresDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - input MovieDisconnectInput { - genres: [MovieGenresDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieGenreGenresAggregationSelection { - count: Int! - node: MovieGenreGenresNodeAggregateSelection - } - - type MovieGenreGenresNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieGenresAggregateInput { - AND: [MovieGenresAggregateInput!] - NOT: MovieGenresAggregateInput - OR: [MovieGenresAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenresNodeAggregationWhereInput - } - - input MovieGenresConnectFieldInput { - connect: [GenreConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere - } - - type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieGenresConnectionSort { - node: GenreSort - } - - input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieGenresCreateFieldInput { - node: GenreCreateInput! - } - - input MovieGenresDeleteFieldInput { - delete: GenreDeleteInput - where: MovieGenresConnectionWhere - } - - input MovieGenresDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: MovieGenresConnectionWhere - } - - input MovieGenresFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - } - - input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieGenresRelationship { - cursor: String! - node: Genre! - } - - input MovieGenresUpdateConnectionInput { - node: GenreUpdateInput - } - - input MovieGenresUpdateFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - delete: [MovieGenresDeleteFieldInput!] - disconnect: [MovieGenresDisconnectFieldInput!] - update: MovieGenresUpdateConnectionInput - where: MovieGenresConnectionWhere - } - - 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!] - } - - input MovieRelationInput { - genres: [MovieGenresCreateFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - \\"\\"\\" - 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 { - imdbRating: SortDirection - title: SortDirection - year: SortDirection - } - - input MovieUpdateInput { - genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - imdbRating: Float - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SUBTRACT: Float - title: String - year: Int - year_DECREMENT: Int - year_INCREMENT: Int - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") - genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use\\") - genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where none of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") - genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where some of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere @deprecated(reason: \\"Do not use\\") - genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere @deprecated(reason: \\"Do not use\\") - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - year: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int - year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type Genre { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + name: String +} + +type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input GenreConnectInput { + movies: [GenreMoviesConnectFieldInput!] +} + +input GenreConnectWhere { + node: GenreWhere! +} + +input GenreCreateInput { + movies: GenreMoviesFieldInput + name: String +} + +input GenreDeleteInput { + movies: [GenreMoviesDeleteFieldInput!] +} + +input GenreDisconnectInput { + movies: [GenreMoviesDisconnectFieldInput!] +} + +type GenreEdge { + cursor: String! + node: Genre! +} + +type GenreMovieMoviesAggregationSelection { + count: Int! + node: GenreMovieMoviesNodeAggregateSelection +} + +type GenreMovieMoviesNodeAggregateSelection { + imdbRating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! +} + +input GenreMoviesAggregateInput { + AND: [GenreMoviesAggregateInput!] + NOT: GenreMoviesAggregateInput + OR: [GenreMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: GenreMoviesNodeAggregationWhereInput +} + +input GenreMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type GenreMoviesConnection { + edges: [GenreMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input GenreMoviesConnectionSort { + node: MovieSort +} + +input GenreMoviesConnectionWhere { + AND: [GenreMoviesConnectionWhere!] + NOT: GenreMoviesConnectionWhere + OR: [GenreMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input GenreMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input GenreMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: GenreMoviesConnectionWhere +} + +input GenreMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: GenreMoviesConnectionWhere +} + +input GenreMoviesFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] +} + +input GenreMoviesNodeAggregationWhereInput { + AND: [GenreMoviesNodeAggregationWhereInput!] + NOT: GenreMoviesNodeAggregationWhereInput + OR: [GenreMoviesNodeAggregationWhereInput!] + imdbRating_AVERAGE_EQUAL: Float + imdbRating_AVERAGE_GT: Float + imdbRating_AVERAGE_GTE: Float + imdbRating_AVERAGE_LT: Float + imdbRating_AVERAGE_LTE: Float + imdbRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_MAX_EQUAL: Float + imdbRating_MAX_GT: Float + imdbRating_MAX_GTE: Float + imdbRating_MAX_LT: Float + imdbRating_MAX_LTE: Float + imdbRating_MIN_EQUAL: Float + imdbRating_MIN_GT: Float + imdbRating_MIN_GTE: Float + imdbRating_MIN_LT: Float + imdbRating_MIN_LTE: Float + imdbRating_SUM_EQUAL: Float + imdbRating_SUM_GT: Float + imdbRating_SUM_GTE: Float + imdbRating_SUM_LT: Float + imdbRating_SUM_LTE: Float + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + year_AVERAGE_EQUAL: Float + year_AVERAGE_GT: Float + year_AVERAGE_GTE: Float + year_AVERAGE_LT: Float + year_AVERAGE_LTE: Float + year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_MAX_EQUAL: Int + year_MAX_GT: Int + year_MAX_GTE: Int + year_MAX_LT: Int + year_MAX_LTE: Int + year_MIN_EQUAL: Int + year_MIN_GT: Int + year_MIN_GTE: Int + year_MIN_LT: Int + year_MIN_LTE: Int + year_SUM_EQUAL: Int + year_SUM_GT: Int + year_SUM_GTE: Int + year_SUM_LT: Int + year_SUM_LTE: Int +} + +type GenreMoviesRelationship { + cursor: String! + node: Movie! +} + +input GenreMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input GenreMoviesUpdateFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + delete: [GenreMoviesDeleteFieldInput!] + disconnect: [GenreMoviesDisconnectFieldInput!] + update: GenreMoviesUpdateConnectionInput + where: GenreMoviesConnectionWhere +} + +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!] +} + +input GenreRelationInput { + movies: [GenreMoviesCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: SortDirection +} + +input GenreUpdateInput { + movies: [GenreMoviesUpdateFieldInput!] + name: String +} + +input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: GenreMoviesConnectionWhere + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") + genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") + genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use\\") + imdbRating: Float + title: String + year: Int +} + +type MovieAggregateSelection { + count: Int! + imdbRating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! +} + +input MovieConnectInput { + genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + genres: MovieGenresFieldInput @deprecated(reason: \\"Do not use\\") + imdbRating: Float + title: String + year: Int +} + +input MovieDeleteInput { + genres: [MovieGenresDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +input MovieDisconnectInput { + genres: [MovieGenresDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieGenreGenresAggregationSelection { + count: Int! + node: MovieGenreGenresNodeAggregateSelection +} + +type MovieGenreGenresNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieGenresAggregateInput { + AND: [MovieGenresAggregateInput!] + NOT: MovieGenresAggregateInput + OR: [MovieGenresAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenresNodeAggregationWhereInput +} + +input MovieGenresConnectFieldInput { + connect: [GenreConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere +} + +type MovieGenresConnection { + edges: [MovieGenresRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieGenresConnectionSort { + node: GenreSort +} + +input MovieGenresConnectionWhere { + AND: [MovieGenresConnectionWhere!] + NOT: MovieGenresConnectionWhere + OR: [MovieGenresConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieGenresCreateFieldInput { + node: GenreCreateInput! +} + +input MovieGenresDeleteFieldInput { + delete: GenreDeleteInput + where: MovieGenresConnectionWhere +} + +input MovieGenresDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: MovieGenresConnectionWhere +} + +input MovieGenresFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] +} + +input MovieGenresNodeAggregationWhereInput { + AND: [MovieGenresNodeAggregationWhereInput!] + NOT: MovieGenresNodeAggregationWhereInput + OR: [MovieGenresNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieGenresRelationship { + cursor: String! + node: Genre! +} + +input MovieGenresUpdateConnectionInput { + node: GenreUpdateInput +} + +input MovieGenresUpdateFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + delete: [MovieGenresDeleteFieldInput!] + disconnect: [MovieGenresDisconnectFieldInput!] + update: MovieGenresUpdateConnectionInput + where: MovieGenresConnectionWhere +} + +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!] +} + +input MovieRelationInput { + genres: [MovieGenresCreateFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +\\"\\"\\" +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 { + imdbRating: SortDirection + title: SortDirection + year: SortDirection +} + +input MovieUpdateInput { + genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") + imdbRating: Float + imdbRating_ADD: Float + imdbRating_DIVIDE: Float + imdbRating_MULTIPLY: Float + imdbRating_SUBTRACT: Float + title: String + year: Int + year_DECREMENT: Int + year_INCREMENT: Int +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") + genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use\\") + genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + genres_ALL: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + genres_NONE: GenreWhere @deprecated(reason: \\"Do not use\\") + genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + genres_SOME: GenreWhere @deprecated(reason: \\"Do not use\\") + imdbRating: Float + imdbRating_GT: Float + imdbRating_GTE: Float + imdbRating_IN: [Float] + imdbRating_LT: Float + imdbRating_LTE: Float + imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + year: Int + year_GT: Int + year_GTE: Int + year_IN: [Int] + year_LT: Int + year_LTE: Int + year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Directives on implemented interface relations preserved", async () => { @@ -902,2625 +892,2585 @@ describe("Directive-preserve", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - role: String! - } +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + role: String! +} + +input ActedInCreateInput { + role: String! +} + +input ActedInSort { + role: SortDirection +} + +input ActedInUpdateInput { + role: String +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + role: String + role_CONTAINS: String + role_ENDS_WITH: String + role_IN: [String!] + role_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_STARTS_WITH: String +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + edge: ActedInCreateInput! + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + role: String! +} + +input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + runtime: Int! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsEdgeAggregateSelection { + role: StringAggregateSelectionNonNullable! +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +input MovieCreateInput { + actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") + runtime: Int! + title: String! +} + +input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +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!] +} + +input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +\\"\\"\\" +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 { + runtime: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + actors: [Actor!]! + title: String! +} + +input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ProductionActorsConnectionSort { + edge: ActedInSort + node: ActorSort +} + +input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ProductionActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! +} + +input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] +} + +type ProductionActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + role: String! +} + +input ProductionActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput +} + +input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere +} + +input ProductionConnectInput { + _on: ProductionImplementationsConnectInput +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput +} + +input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput +} + +input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] +} + +input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] +} + +input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + episodes: Int! + title: String! +} + +type SeriesActorActorsAggregationSelection { + count: Int! + edge: SeriesActorActorsEdgeAggregateSelection + node: SeriesActorActorsNodeAggregateSelection +} + +type SeriesActorActorsEdgeAggregateSelection { + role: StringAggregateSelectionNonNullable! +} + +type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: SeriesActorsEdgeAggregationWhereInput + node: SeriesActorsNodeAggregationWhereInput +} + +input SeriesActorsEdgeAggregationWhereInput { + AND: [SeriesActorsEdgeAggregationWhereInput!] + NOT: SeriesActorsEdgeAggregationWhereInput + OR: [SeriesActorsEdgeAggregationWhereInput!] + role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type SeriesAggregateSelection { + count: Int! + episodes: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + actors: ProductionActorsFieldInput + episodes: Int! + title: String! +} + +input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] +} + +input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + episodes: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + episodes: Int + episodes_DECREMENT: Int + episodes_INCREMENT: Int + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + episodes: Int + episodes_GT: Int + episodes_GTE: Int + episodes_IN: [Int!] + episodes_LT: Int + episodes_LTE: Int + episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); - input ActedInCreateInput { - role: String! + test("Directives on base interface preserved", async () => { + const typeDefs = gql` + interface Production { + title: String! + actors: [Actor!]! @deprecated(reason: "Do not use") } - input ActedInSort { - role: SortDirection + type Movie implements Production { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + runtime: Int! } - input ActedInUpdateInput { - role: String + type Series implements Production { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + episodes: Int! } - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - role: String - role_CONTAINS: String - role_ENDS_WITH: String - role_IN: [String!] - role_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_STARTS_WITH: String + interface ActedIn @relationshipProperties { + role: String! } - \\"\\"\\"\\"\\"\\" type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - edge: ActedInCreateInput! - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - \\"\\"\\"\\"\\"\\" - role: String! - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + role: String! +} + +input ActedInCreateInput { + role: String! +} + +input ActedInSort { + role: SortDirection +} + +input ActedInUpdateInput { + role: String +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + role: String + role_CONTAINS: String + role_ENDS_WITH: String + role_IN: [String!] + role_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_STARTS_WITH: String +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + edge: ActedInCreateInput! + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + role: String! +} + +input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + runtime: Int! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsEdgeAggregateSelection { + role: StringAggregateSelectionNonNullable! +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +input MovieCreateInput { + actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") + runtime: Int! + title: String! +} + +input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +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!] +} + +input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +\\"\\"\\" +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 { + runtime: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + actors: [Actor!]! @deprecated(reason: \\"Do not use\\") + title: String! +} + +input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ProductionActorsConnectionSort { + edge: ActedInSort + node: ActorSort +} + +input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ProductionActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! +} + +input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] +} + +type ProductionActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + role: String! +} + +input ProductionActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput +} + +input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere +} + +input ProductionConnectInput { + _on: ProductionImplementationsConnectInput +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput +} + +input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput +} + +input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] +} + +input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] +} + +input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + episodes: Int! + title: String! +} + +type SeriesActorActorsAggregationSelection { + count: Int! + edge: SeriesActorActorsEdgeAggregateSelection + node: SeriesActorActorsNodeAggregateSelection +} + +type SeriesActorActorsEdgeAggregateSelection { + role: StringAggregateSelectionNonNullable! +} + +type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: SeriesActorsEdgeAggregationWhereInput + node: SeriesActorsNodeAggregationWhereInput +} + +input SeriesActorsEdgeAggregationWhereInput { + AND: [SeriesActorsEdgeAggregationWhereInput!] + NOT: SeriesActorsEdgeAggregationWhereInput + OR: [SeriesActorsEdgeAggregationWhereInput!] + role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type SeriesAggregateSelection { + count: Int! + episodes: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") + episodes: Int! + title: String! +} + +input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + episodes: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") + episodes: Int + episodes_DECREMENT: Int + episodes_INCREMENT: Int + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") + episodes: Int + episodes_GT: Int + episodes_GTE: Int + episodes_IN: [Int!] + episodes_LT: Int + episodes_LTE: Int + episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); - input ActorConnectWhere { - node: ActorWhere! - } + test("Directives on unions preserved", async () => { + const typeDefs = gql` + union Content = Blog | Post - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! + type Blog { + title: String + posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) } - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] + type Post { + content: String @deprecated(reason: "Do not use post.content") } - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] + type User { + name: String + content: [Content!]! + @relationship(type: "HAS_CONTENT", direction: OUT) + @deprecated(reason: "Do not use user.content") } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") - \\"\\"\\"\\"\\"\\" - runtime: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - role: StringAggregateSelectionNonNullable! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - input MovieCreateInput { - actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") - runtime: Int! - title: String! - } - - input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - 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!] - } - - input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - \\"\\"\\" - 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 { - runtime: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - actors: [Actor!]! - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ProductionActorsConnectionSort { - edge: ActedInSort - node: ActorSort - } - - input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ProductionActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! - } - - input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - } - - type ProductionActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - \\"\\"\\"\\"\\"\\" - role: String! - } - - input ProductionActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput - } - - input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere - } - - input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - } - - input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - } - - input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] - } - - input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] - } - - input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - episodes: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsEdgeAggregateSelection { - role: StringAggregateSelectionNonNullable! - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: SeriesActorsEdgeAggregationWhereInput - node: SeriesActorsNodeAggregationWhereInput - } - - input SeriesActorsEdgeAggregationWhereInput { - AND: [SeriesActorsEdgeAggregationWhereInput!] - NOT: SeriesActorsEdgeAggregationWhereInput - OR: [SeriesActorsEdgeAggregationWhereInput!] - role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - actors: ProductionActorsFieldInput - episodes: Int! - title: String! - } - - input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] - } - - input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - episodes: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - episodes: Int - episodes_DECREMENT: Int - episodes_INCREMENT: Int - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Directives on base interface preserved", async () => { - const typeDefs = gql` - interface Production { - title: String! - actors: [Actor!]! @deprecated(reason: "Do not use") - } - - type Movie implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - runtime: Int! - } - - type Series implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! - } - - interface ActedIn @relationshipProperties { - role: String! - } - - type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - role: String! - } - - input ActedInCreateInput { - role: String! - } - - input ActedInSort { - role: SortDirection - } - - input ActedInUpdateInput { - role: String - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - role: String - role_CONTAINS: String - role_ENDS_WITH: String - role_IN: [String!] - role_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_STARTS_WITH: String - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - edge: ActedInCreateInput! - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - \\"\\"\\"\\"\\"\\" - role: String! - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") - \\"\\"\\"\\"\\"\\" - runtime: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - role: StringAggregateSelectionNonNullable! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - input MovieCreateInput { - actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") - runtime: Int! - title: String! - } - - input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - 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!] - } - - input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - \\"\\"\\" - 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 { - runtime: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - actors: [Actor!]! @deprecated(reason: \\"Do not use\\") - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ProductionActorsConnectionSort { - edge: ActedInSort - node: ActorSort - } - - input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ProductionActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! - } - - input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - } - - type ProductionActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - \\"\\"\\"\\"\\"\\" - role: String! - } - - input ProductionActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput - } - - input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere - } - - input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - } - - input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - } - - input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] - } - - input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] - } - - input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") - \\"\\"\\"\\"\\"\\" - episodes: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsEdgeAggregateSelection { - role: StringAggregateSelectionNonNullable! - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: SeriesActorsEdgeAggregationWhereInput - node: SeriesActorsNodeAggregationWhereInput - } - - input SeriesActorsEdgeAggregationWhereInput { - AND: [SeriesActorsEdgeAggregationWhereInput!] - NOT: SeriesActorsEdgeAggregationWhereInput - OR: [SeriesActorsEdgeAggregationWhereInput!] - role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") - episodes: Int! - title: String! - } - - input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - episodes: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - episodes: Int - episodes_DECREMENT: Int - episodes_INCREMENT: Int - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput @deprecated(reason: \\"Do not use\\") - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Directives on unions preserved", async () => { - const typeDefs = gql` - union Content = Blog | Post - - type Blog { - title: String - posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) - } - - type Post { - content: String @deprecated(reason: "Do not use post.content") - } - - type User { - name: String - content: [Content!]! - @relationship(type: "HAS_CONTENT", direction: OUT) - @deprecated(reason: "Do not use user.content") - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Blog { - \\"\\"\\"\\"\\"\\" - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true, where: PostWhere): BlogPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type BlogAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input BlogConnectInput { - posts: [BlogPostsConnectFieldInput!] - } - - input BlogConnectWhere { - node: BlogWhere! - } - - input BlogCreateInput { - posts: BlogPostsFieldInput - title: String - } - - input BlogDeleteInput { - posts: [BlogPostsDeleteFieldInput!] - } - - input BlogDisconnectInput { - posts: [BlogPostsDisconnectFieldInput!] - } - - type BlogEdge { - cursor: String! - node: Blog! - } - - input BlogOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BlogSort objects to sort Blogs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BlogSort!] - } - - type BlogPostPostsAggregationSelection { - count: Int! - node: BlogPostPostsNodeAggregateSelection - } - - type BlogPostPostsNodeAggregateSelection { - content: StringAggregateSelectionNullable! - } - - input BlogPostsAggregateInput { - AND: [BlogPostsAggregateInput!] - NOT: BlogPostsAggregateInput - OR: [BlogPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: BlogPostsNodeAggregationWhereInput - } - - input BlogPostsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere - } - - type BlogPostsConnection { - edges: [BlogPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input BlogPostsConnectionSort { - node: PostSort - } - - input BlogPostsConnectionWhere { - AND: [BlogPostsConnectionWhere!] - NOT: BlogPostsConnectionWhere - OR: [BlogPostsConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input BlogPostsCreateFieldInput { - node: PostCreateInput! - } - - input BlogPostsDeleteFieldInput { - where: BlogPostsConnectionWhere - } - - input BlogPostsDisconnectFieldInput { - where: BlogPostsConnectionWhere - } - - input BlogPostsFieldInput { - connect: [BlogPostsConnectFieldInput!] - create: [BlogPostsCreateFieldInput!] - } - - input BlogPostsNodeAggregationWhereInput { - AND: [BlogPostsNodeAggregationWhereInput!] - NOT: BlogPostsNodeAggregationWhereInput - OR: [BlogPostsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type BlogPostsRelationship { - cursor: String! - node: Post! - } - - input BlogPostsUpdateConnectionInput { - node: PostUpdateInput - } - - input BlogPostsUpdateFieldInput { - connect: [BlogPostsConnectFieldInput!] - create: [BlogPostsCreateFieldInput!] - delete: [BlogPostsDeleteFieldInput!] - disconnect: [BlogPostsDisconnectFieldInput!] - update: BlogPostsUpdateConnectionInput - where: BlogPostsConnectionWhere - } - - input BlogRelationInput { - posts: [BlogPostsCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Blogs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BlogSort object. - \\"\\"\\" - input BlogSort { - title: SortDirection - } - - input BlogUpdateInput { - posts: [BlogPostsUpdateFieldInput!] - title: String - } - - input BlogWhere { - AND: [BlogWhere!] - NOT: BlogWhere - OR: [BlogWhere!] - posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: BlogPostsAggregateInput - postsConnection: BlogPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Blogs where all of the related BlogPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: BlogPostsConnectionWhere - \\"\\"\\" - Return Blogs where none of the related BlogPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: BlogPostsConnectionWhere - postsConnection_NOT: BlogPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Blogs where one of the related BlogPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: BlogPostsConnectionWhere - \\"\\"\\" - Return Blogs where some of the related BlogPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: BlogPostsConnectionWhere - \\"\\"\\"Return Blogs where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere - \\"\\"\\"Return Blogs where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere - posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Blogs where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere - \\"\\"\\"Return Blogs where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type BlogsConnection { - edges: [BlogEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - union Content = Blog | Post - - input ContentWhere { - Blog: BlogWhere - Post: PostWhere - } - - type CreateBlogsMutationResponse { - blogs: [Blog!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createBlogs(input: [BlogCreateInput!]!): CreateBlogsMutationResponse! - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteBlogs(delete: BlogDeleteInput, where: BlogWhere): DeleteInfo! - deletePosts(where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateBlogs(connect: BlogConnectInput, create: BlogRelationInput, delete: BlogDeleteInput, disconnect: BlogDisconnectInput, update: BlogUpdateInput, where: BlogWhere): UpdateBlogsMutationResponse! - updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"\\"\\"\\" - type Post { - \\"\\"\\"\\"\\"\\" - content: String @deprecated(reason: \\"Do not use post.content\\") - } - - type PostAggregateSelection { - content: StringAggregateSelectionNullable! - count: Int! - } - - input PostConnectWhere { - node: PostWhere! - } - - input PostCreateInput { - content: String @deprecated(reason: \\"Do not use post.content\\") - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - content: SortDirection @deprecated(reason: \\"Do not use post.content\\") - } - - input PostUpdateInput { - content: String @deprecated(reason: \\"Do not use post.content\\") - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - content: String @deprecated(reason: \\"Do not use post.content\\") - content_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") - content_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") - content_IN: [String] @deprecated(reason: \\"Do not use post.content\\") - content_NOT: String @deprecated(reason: \\"Do not use post.content\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") - content_NOT_IN: [String] @deprecated(reason: \\"Do not use post.content\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Do not use post.content\\") - content_STARTS_WITH: String @deprecated(reason: \\"Do not use post.content\\") - } - - type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - blogs(options: BlogOptions, where: BlogWhere): [Blog!]! - blogsAggregate(where: BlogWhere): BlogAggregateSelection! - blogsConnection(after: String, first: Int, sort: [BlogSort], where: BlogWhere): BlogsConnection! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateBlogsMutationResponse { - blogs: [Blog!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason: \\"Do not use user.content\\") - contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: \\"Do not use user.content\\") - \\"\\"\\"\\"\\"\\" - name: String - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input UserConnectInput { - content: UserContentConnectInput - } - - input UserContentBlogConnectFieldInput { - connect: [BlogConnectInput!] - where: BlogConnectWhere - } - - input UserContentBlogConnectionWhere { - AND: [UserContentBlogConnectionWhere!] - NOT: UserContentBlogConnectionWhere - OR: [UserContentBlogConnectionWhere!] - node: BlogWhere - node_NOT: BlogWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input UserContentBlogCreateFieldInput { - node: BlogCreateInput! - } - - input UserContentBlogDeleteFieldInput { - delete: BlogDeleteInput - where: UserContentBlogConnectionWhere - } - - input UserContentBlogDisconnectFieldInput { - disconnect: BlogDisconnectInput - where: UserContentBlogConnectionWhere - } - - input UserContentBlogFieldInput { - connect: [UserContentBlogConnectFieldInput!] - create: [UserContentBlogCreateFieldInput!] - } - - input UserContentBlogUpdateConnectionInput { - node: BlogUpdateInput - } - - input UserContentBlogUpdateFieldInput { - connect: [UserContentBlogConnectFieldInput!] - create: [UserContentBlogCreateFieldInput!] - delete: [UserContentBlogDeleteFieldInput!] - disconnect: [UserContentBlogDisconnectFieldInput!] - update: UserContentBlogUpdateConnectionInput - where: UserContentBlogConnectionWhere - } - - input UserContentConnectInput { - Blog: [UserContentBlogConnectFieldInput!] - Post: [UserContentPostConnectFieldInput!] - } - - type UserContentConnection { - edges: [UserContentRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserContentConnectionWhere { - Blog: UserContentBlogConnectionWhere - Post: UserContentPostConnectionWhere - } - - input UserContentCreateFieldInput { - Blog: [UserContentBlogCreateFieldInput!] - Post: [UserContentPostCreateFieldInput!] - } - - input UserContentCreateInput { - Blog: UserContentBlogFieldInput - Post: UserContentPostFieldInput - } - - input UserContentDeleteInput { - Blog: [UserContentBlogDeleteFieldInput!] - Post: [UserContentPostDeleteFieldInput!] - } - - input UserContentDisconnectInput { - Blog: [UserContentBlogDisconnectFieldInput!] - Post: [UserContentPostDisconnectFieldInput!] - } - - input UserContentPostConnectFieldInput { - where: PostConnectWhere - } - - input UserContentPostConnectionWhere { - AND: [UserContentPostConnectionWhere!] - NOT: UserContentPostConnectionWhere - OR: [UserContentPostConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input UserContentPostCreateFieldInput { - node: PostCreateInput! - } - - input UserContentPostDeleteFieldInput { - where: UserContentPostConnectionWhere - } - - input UserContentPostDisconnectFieldInput { - where: UserContentPostConnectionWhere - } - - input UserContentPostFieldInput { - connect: [UserContentPostConnectFieldInput!] - create: [UserContentPostCreateFieldInput!] - } - - input UserContentPostUpdateConnectionInput { - node: PostUpdateInput - } - - input UserContentPostUpdateFieldInput { - connect: [UserContentPostConnectFieldInput!] - create: [UserContentPostCreateFieldInput!] - delete: [UserContentPostDeleteFieldInput!] - disconnect: [UserContentPostDisconnectFieldInput!] - update: UserContentPostUpdateConnectionInput - where: UserContentPostConnectionWhere - } - - type UserContentRelationship { - cursor: String! - node: Content! - } - - input UserContentUpdateInput { - Blog: [UserContentBlogUpdateFieldInput!] - Post: [UserContentPostUpdateFieldInput!] - } - - input UserCreateInput { - content: UserContentCreateInput - name: String - } - - input UserDeleteInput { - content: UserContentDeleteInput - } - - input UserDisconnectInput { - content: UserContentDisconnectInput - } - - type UserEdge { - cursor: String! - node: User! - } - - 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!] - } - - input UserRelationInput { - content: UserContentCreateFieldInput - } - - \\"\\"\\" - 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 { - content: UserContentUpdateInput - name: String - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - contentConnection: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_ALL: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") - \\"\\"\\" - Return Users where none of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_NONE: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") - contentConnection_NOT: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_SINGLE: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") - \\"\\"\\" - Return Users where some of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_SOME: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Blog { + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): BlogPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! + title: String +} + +type BlogAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input BlogConnectInput { + posts: [BlogPostsConnectFieldInput!] +} + +input BlogConnectWhere { + node: BlogWhere! +} + +input BlogCreateInput { + posts: BlogPostsFieldInput + title: String +} + +input BlogDeleteInput { + posts: [BlogPostsDeleteFieldInput!] +} + +input BlogDisconnectInput { + posts: [BlogPostsDisconnectFieldInput!] +} + +type BlogEdge { + cursor: String! + node: Blog! +} + +input BlogOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BlogSort objects to sort Blogs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BlogSort!] +} + +type BlogPostPostsAggregationSelection { + count: Int! + node: BlogPostPostsNodeAggregateSelection +} + +type BlogPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNullable! +} + +input BlogPostsAggregateInput { + AND: [BlogPostsAggregateInput!] + NOT: BlogPostsAggregateInput + OR: [BlogPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: BlogPostsNodeAggregationWhereInput +} + +input BlogPostsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere +} + +type BlogPostsConnection { + edges: [BlogPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input BlogPostsConnectionSort { + node: PostSort +} + +input BlogPostsConnectionWhere { + AND: [BlogPostsConnectionWhere!] + NOT: BlogPostsConnectionWhere + OR: [BlogPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input BlogPostsCreateFieldInput { + node: PostCreateInput! +} + +input BlogPostsDeleteFieldInput { + where: BlogPostsConnectionWhere +} + +input BlogPostsDisconnectFieldInput { + where: BlogPostsConnectionWhere +} + +input BlogPostsFieldInput { + connect: [BlogPostsConnectFieldInput!] + create: [BlogPostsCreateFieldInput!] +} + +input BlogPostsNodeAggregationWhereInput { + AND: [BlogPostsNodeAggregationWhereInput!] + NOT: BlogPostsNodeAggregationWhereInput + OR: [BlogPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type BlogPostsRelationship { + cursor: String! + node: Post! +} + +input BlogPostsUpdateConnectionInput { + node: PostUpdateInput +} + +input BlogPostsUpdateFieldInput { + connect: [BlogPostsConnectFieldInput!] + create: [BlogPostsCreateFieldInput!] + delete: [BlogPostsDeleteFieldInput!] + disconnect: [BlogPostsDisconnectFieldInput!] + update: BlogPostsUpdateConnectionInput + where: BlogPostsConnectionWhere +} + +input BlogRelationInput { + posts: [BlogPostsCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Blogs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BlogSort object. +\\"\\"\\" +input BlogSort { + title: SortDirection +} + +input BlogUpdateInput { + posts: [BlogPostsUpdateFieldInput!] + title: String +} + +input BlogWhere { + AND: [BlogWhere!] + NOT: BlogWhere + OR: [BlogWhere!] + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: BlogPostsAggregateInput + postsConnection: BlogPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Blogs where all of the related BlogPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: BlogPostsConnectionWhere + \\"\\"\\" + Return Blogs where none of the related BlogPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: BlogPostsConnectionWhere + postsConnection_NOT: BlogPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Blogs where one of the related BlogPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: BlogPostsConnectionWhere + \\"\\"\\" + Return Blogs where some of the related BlogPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: BlogPostsConnectionWhere + \\"\\"\\"Return Blogs where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Blogs where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Blogs where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Blogs where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type BlogsConnection { + edges: [BlogEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +union Content = Blog | Post + +input ContentWhere { + Blog: BlogWhere + Post: PostWhere +} + +type CreateBlogsMutationResponse { + blogs: [Blog!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createBlogs(input: [BlogCreateInput!]!): CreateBlogsMutationResponse! + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteBlogs(delete: BlogDeleteInput, where: BlogWhere): DeleteInfo! + deletePosts(where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateBlogs(connect: BlogConnectInput, create: BlogRelationInput, delete: BlogDeleteInput, disconnect: BlogDisconnectInput, update: BlogUpdateInput, where: BlogWhere): UpdateBlogsMutationResponse! + updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Post { + content: String @deprecated(reason: \\"Do not use post.content\\") +} + +type PostAggregateSelection { + content: StringAggregateSelectionNullable! + count: Int! +} + +input PostConnectWhere { + node: PostWhere! +} + +input PostCreateInput { + content: String @deprecated(reason: \\"Do not use post.content\\") +} + +type PostEdge { + cursor: String! + node: Post! +} + +input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] +} + +\\"\\"\\" +Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. +\\"\\"\\" +input PostSort { + content: SortDirection @deprecated(reason: \\"Do not use post.content\\") +} + +input PostUpdateInput { + content: String @deprecated(reason: \\"Do not use post.content\\") +} + +input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + content: String @deprecated(reason: \\"Do not use post.content\\") + content_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") + content_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") + content_IN: [String] @deprecated(reason: \\"Do not use post.content\\") + content_NOT: String @deprecated(reason: \\"Do not use post.content\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") + content_NOT_IN: [String] @deprecated(reason: \\"Do not use post.content\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Do not use post.content\\") + content_STARTS_WITH: String @deprecated(reason: \\"Do not use post.content\\") +} + +type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Query { + blogs(options: BlogOptions, where: BlogWhere): [Blog!]! + blogsAggregate(where: BlogWhere): BlogAggregateSelection! + blogsConnection(after: String, first: Int, sort: [BlogSort], where: BlogWhere): BlogsConnection! + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateBlogsMutationResponse { + blogs: [Blog!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason: \\"Do not use user.content\\") + contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: \\"Do not use user.content\\") + name: String +} + +type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input UserConnectInput { + content: UserContentConnectInput +} + +input UserContentBlogConnectFieldInput { + connect: [BlogConnectInput!] + where: BlogConnectWhere +} + +input UserContentBlogConnectionWhere { + AND: [UserContentBlogConnectionWhere!] + NOT: UserContentBlogConnectionWhere + OR: [UserContentBlogConnectionWhere!] + node: BlogWhere + node_NOT: BlogWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input UserContentBlogCreateFieldInput { + node: BlogCreateInput! +} + +input UserContentBlogDeleteFieldInput { + delete: BlogDeleteInput + where: UserContentBlogConnectionWhere +} + +input UserContentBlogDisconnectFieldInput { + disconnect: BlogDisconnectInput + where: UserContentBlogConnectionWhere +} + +input UserContentBlogFieldInput { + connect: [UserContentBlogConnectFieldInput!] + create: [UserContentBlogCreateFieldInput!] +} + +input UserContentBlogUpdateConnectionInput { + node: BlogUpdateInput +} + +input UserContentBlogUpdateFieldInput { + connect: [UserContentBlogConnectFieldInput!] + create: [UserContentBlogCreateFieldInput!] + delete: [UserContentBlogDeleteFieldInput!] + disconnect: [UserContentBlogDisconnectFieldInput!] + update: UserContentBlogUpdateConnectionInput + where: UserContentBlogConnectionWhere +} + +input UserContentConnectInput { + Blog: [UserContentBlogConnectFieldInput!] + Post: [UserContentPostConnectFieldInput!] +} + +type UserContentConnection { + edges: [UserContentRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserContentConnectionWhere { + Blog: UserContentBlogConnectionWhere + Post: UserContentPostConnectionWhere +} + +input UserContentCreateFieldInput { + Blog: [UserContentBlogCreateFieldInput!] + Post: [UserContentPostCreateFieldInput!] +} + +input UserContentCreateInput { + Blog: UserContentBlogFieldInput + Post: UserContentPostFieldInput +} + +input UserContentDeleteInput { + Blog: [UserContentBlogDeleteFieldInput!] + Post: [UserContentPostDeleteFieldInput!] +} + +input UserContentDisconnectInput { + Blog: [UserContentBlogDisconnectFieldInput!] + Post: [UserContentPostDisconnectFieldInput!] +} + +input UserContentPostConnectFieldInput { + where: PostConnectWhere +} + +input UserContentPostConnectionWhere { + AND: [UserContentPostConnectionWhere!] + NOT: UserContentPostConnectionWhere + OR: [UserContentPostConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input UserContentPostCreateFieldInput { + node: PostCreateInput! +} + +input UserContentPostDeleteFieldInput { + where: UserContentPostConnectionWhere +} + +input UserContentPostDisconnectFieldInput { + where: UserContentPostConnectionWhere +} + +input UserContentPostFieldInput { + connect: [UserContentPostConnectFieldInput!] + create: [UserContentPostCreateFieldInput!] +} + +input UserContentPostUpdateConnectionInput { + node: PostUpdateInput +} + +input UserContentPostUpdateFieldInput { + connect: [UserContentPostConnectFieldInput!] + create: [UserContentPostCreateFieldInput!] + delete: [UserContentPostDeleteFieldInput!] + disconnect: [UserContentPostDisconnectFieldInput!] + update: UserContentPostUpdateConnectionInput + where: UserContentPostConnectionWhere +} + +type UserContentRelationship { + cursor: String! + node: Content! +} + +input UserContentUpdateInput { + Blog: [UserContentBlogUpdateFieldInput!] + Post: [UserContentPostUpdateFieldInput!] +} + +input UserCreateInput { + content: UserContentCreateInput + name: String +} + +input UserDeleteInput { + content: UserContentDeleteInput +} + +input UserDisconnectInput { + content: UserContentDisconnectInput +} + +type UserEdge { + cursor: String! + node: User! +} + +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!] +} + +input UserRelationInput { + content: UserContentCreateFieldInput +} + +\\"\\"\\" +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 { + content: UserContentUpdateInput + name: String +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + contentConnection: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_ALL: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\" + Return Users where none of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_NONE: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + contentConnection_NOT: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_SINGLE: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\" + Return Users where some of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_SOME: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 3fde89e6fa..7870d55a8f 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -45,604 +45,593 @@ describe("Alias", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - city: String - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorActedInEdgeAggregationWhereInput - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - edge: ActorActedInPropsCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActorActedInPropsSort - node: MovieSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActorActedInPropsWhere - edge_NOT: ActorActedInPropsWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - edge: ActorActedInPropsCreateInput! - node: MovieCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInEdgeAggregationWhereInput { - AND: [ActorActedInEdgeAggregationWhereInput!] - NOT: ActorActedInEdgeAggregationWhereInput - OR: [ActorActedInEdgeAggregationWhereInput!] - character_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_AVERAGE_LENGTH_EQUAL: Float - character_AVERAGE_LENGTH_GT: Float - character_AVERAGE_LENGTH_GTE: Float - character_AVERAGE_LENGTH_LT: Float - character_AVERAGE_LENGTH_LTE: Float - character_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LONGEST_LENGTH_EQUAL: Int - character_LONGEST_LENGTH_GT: Int - character_LONGEST_LENGTH_GTE: Int - character_LONGEST_LENGTH_LT: Int - character_LONGEST_LENGTH_LTE: Int - character_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_SHORTEST_LENGTH_EQUAL: Int - character_SHORTEST_LENGTH_GT: Int - character_SHORTEST_LENGTH_GTE: Int - character_SHORTEST_LENGTH_LT: Int - character_SHORTEST_LENGTH_LTE: Int - character_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - rating_AVERAGE_EQUAL: Float - rating_AVERAGE_GT: Float - rating_AVERAGE_GTE: Float - rating_AVERAGE_LT: Float - rating_AVERAGE_LTE: Float - rating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_MAX_EQUAL: Float - rating_MAX_GT: Float - rating_MAX_GTE: Float - rating_MAX_LT: Float - rating_MAX_LTE: Float - rating_MIN_EQUAL: Float - rating_MIN_GT: Float - rating_MIN_GTE: Float - rating_MIN_LT: Float - rating_MIN_LTE: Float - rating_SUM_EQUAL: Float - rating_SUM_GT: Float - rating_SUM_GTE: Float - rating_SUM_LT: Float - rating_SUM_LTE: Float - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - interface ActorActedInProps { - \\"\\"\\"\\"\\"\\" - character: String! - \\"\\"\\"\\"\\"\\" - screenTime: Int - } - - input ActorActedInPropsCreateInput { - character: String! - screenTime: Int - } - - input ActorActedInPropsSort { - character: SortDirection - screenTime: SortDirection - } - - input ActorActedInPropsUpdateInput { - character: String - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - } - - input ActorActedInPropsWhere { - AND: [ActorActedInPropsWhere!] - NOT: ActorActedInPropsWhere - OR: [ActorActedInPropsWhere!] - character: String - character_CONTAINS: String - character_ENDS_WITH: String - character_IN: [String!] - character_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_STARTS_WITH: String - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type ActorActedInRelationship implements ActorActedInProps { - \\"\\"\\"\\"\\"\\" - character: String! - cursor: String! - node: Movie! - \\"\\"\\"\\"\\"\\" - screenTime: Int - } - - input ActorActedInUpdateConnectionInput { - edge: ActorActedInPropsUpdateInput - node: MovieUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - city: StringAggregateSelectionNullable! - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - city: String - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - edge: ActorMovieActedInEdgeAggregateSelection - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInEdgeAggregateSelection { - character: StringAggregateSelectionNonNullable! - screenTime: IntAggregateSelectionNullable! - } - - type ActorMovieActedInNodeAggregateSelection { - rating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - city: SortDirection - name: SortDirection - } - - input ActorUpdateInput { - actedIn: [ActorActedInUpdateFieldInput!] - city: String - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - city: String - city_CONTAINS: String - city_ENDS_WITH: String - city_IN: [String] - city_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - rating: Float - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - rating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - rating: Float - title: String! - } - - 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 { - rating: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - rating: Float - rating_ADD: Float - rating_DIVIDE: Float - rating_MULTIPLY: Float - rating_SUBTRACT: Float - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - rating: Float - rating_GT: Float - rating_GTE: Float - rating_IN: [Float] - rating_LT: Float - rating_LTE: Float - rating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - rating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + city: String + name: String! +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorActedInEdgeAggregationWhereInput + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + edge: ActorActedInPropsCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActorActedInPropsSort + node: MovieSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActorActedInPropsWhere + edge_NOT: ActorActedInPropsWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + edge: ActorActedInPropsCreateInput! + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInEdgeAggregationWhereInput { + AND: [ActorActedInEdgeAggregationWhereInput!] + NOT: ActorActedInEdgeAggregationWhereInput + OR: [ActorActedInEdgeAggregationWhereInput!] + character_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_AVERAGE_LENGTH_EQUAL: Float + character_AVERAGE_LENGTH_GT: Float + character_AVERAGE_LENGTH_GTE: Float + character_AVERAGE_LENGTH_LT: Float + character_AVERAGE_LENGTH_LTE: Float + character_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LONGEST_LENGTH_EQUAL: Int + character_LONGEST_LENGTH_GT: Int + character_LONGEST_LENGTH_GTE: Int + character_LONGEST_LENGTH_LT: Int + character_LONGEST_LENGTH_LTE: Int + character_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_SHORTEST_LENGTH_EQUAL: Int + character_SHORTEST_LENGTH_GT: Int + character_SHORTEST_LENGTH_GTE: Int + character_SHORTEST_LENGTH_LT: Int + character_SHORTEST_LENGTH_LTE: Int + character_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + rating_AVERAGE_EQUAL: Float + rating_AVERAGE_GT: Float + rating_AVERAGE_GTE: Float + rating_AVERAGE_LT: Float + rating_AVERAGE_LTE: Float + rating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_MAX_EQUAL: Float + rating_MAX_GT: Float + rating_MAX_GTE: Float + rating_MAX_LT: Float + rating_MAX_LTE: Float + rating_MIN_EQUAL: Float + rating_MIN_GT: Float + rating_MIN_GTE: Float + rating_MIN_LT: Float + rating_MIN_LTE: Float + rating_SUM_EQUAL: Float + rating_SUM_GT: Float + rating_SUM_GTE: Float + rating_SUM_LT: Float + rating_SUM_LTE: Float + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +interface ActorActedInProps { + character: String! + screenTime: Int +} + +input ActorActedInPropsCreateInput { + character: String! + screenTime: Int +} + +input ActorActedInPropsSort { + character: SortDirection + screenTime: SortDirection +} + +input ActorActedInPropsUpdateInput { + character: String + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int +} + +input ActorActedInPropsWhere { + AND: [ActorActedInPropsWhere!] + NOT: ActorActedInPropsWhere + OR: [ActorActedInPropsWhere!] + character: String + character_CONTAINS: String + character_ENDS_WITH: String + character_IN: [String!] + character_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_STARTS_WITH: String + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type ActorActedInRelationship implements ActorActedInProps { + character: String! + cursor: String! + node: Movie! + screenTime: Int +} + +input ActorActedInUpdateConnectionInput { + edge: ActorActedInPropsUpdateInput + node: MovieUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + city: StringAggregateSelectionNullable! + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + city: String + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + edge: ActorMovieActedInEdgeAggregateSelection + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInEdgeAggregateSelection { + character: StringAggregateSelectionNonNullable! + screenTime: IntAggregateSelectionNullable! +} + +type ActorMovieActedInNodeAggregateSelection { + rating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + city: SortDirection + name: SortDirection +} + +input ActorUpdateInput { + actedIn: [ActorActedInUpdateFieldInput!] + city: String + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + city: String + city_CONTAINS: String + city_ENDS_WITH: String + city_IN: [String] + city_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + rating: Float + title: String! +} + +type MovieAggregateSelection { + count: Int! + rating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + rating: Float + title: String! +} + +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 { + rating: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + rating: Float + rating_ADD: Float + rating_DIVIDE: Float + rating_MULTIPLY: Float + rating_SUBTRACT: Float + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + rating: Float + rating_GT: Float + rating_GTE: Float + rating_IN: [Float] + rating_LT: Float + rating_LTE: Float + rating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + rating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index fd194d5105..b50165c201 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -34,157 +34,154 @@ describe("Autogenerate", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - name: String! - } - - 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 - name: SortDirection - } - - input MovieUpdateInput { - name: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Movie { + id: ID! + name: String! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + name: String! +} + +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 + name: SortDirection +} + +input MovieUpdateInput { + name: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 99d057a4dc..c9f16d00db 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -49,185 +49,177 @@ describe("@customResolver directive", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User implements UserInterface { - \\"\\"\\"\\"\\"\\" - customResolver: String - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - nickname: String! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input UserCreateInput { - id: ID! - password: String! - username: String! - } - - type UserEdge { - cursor: String! - node: User! - } - - \\"\\"\\"\\"\\"\\" - interface UserInterface { - \\"\\"\\"\\"\\"\\" - customResolver: String - } - - 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 { - id: SortDirection - password: SortDirection - username: SortDirection - } - - input UserUpdateInput { - id: ID - password: String - username: String - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User implements UserInterface { + customResolver: String + id: ID! + nickname: String! + password: String! + username: String! +} + +type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input UserCreateInput { + id: ID! + password: String! + username: String! +} + +type UserEdge { + cursor: String! + node: User! +} + +interface UserInterface { + customResolver: String +} + +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 { + id: SortDirection + password: SortDirection + username: SortDirection +} + +input UserUpdateInput { + id: ID + password: String + username: String +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index d3bfe80e32..538891077b 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -46,224 +46,219 @@ describe("Cypher", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input ActorCreateInput { - name: String - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(title: String): [Actor] - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + name: String +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input ActorCreateInput { + name: String +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(title: String): [Actor] + id: ID +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Sort On Primitive Field", async () => { @@ -297,226 +292,220 @@ describe("Cypher", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - totalScreenTime: Int! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input ActorCreateInput { - name: String - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 - totalScreenTime: SortDirection - } - - input ActorUpdateInput { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(title: String): [Actor] - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + name: String + totalScreenTime: Int! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input ActorCreateInput { + name: String +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 + totalScreenTime: SortDirection +} + +input ActorUpdateInput { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(title: String): [Actor] + id: ID +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index 2d7324d2c2..d739d8e04b 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -52,291 +52,278 @@ describe("@default directive", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } +"schema { + query: Query + mutation: Mutation +} - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime - type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! - } +type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! +} - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} - type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! - } +type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! +} - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} - enum Location { - EVERYWHERE - HERE - THERE - } +enum Location { + EVERYWHERE + HERE + THERE +} - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(where: UserWhere): DeleteInfo! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } +type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(where: UserWhere): DeleteInfo! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} - type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } +type Query { + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} - \\"\\"\\"\\"\\"\\" - type User implements UserInterface { - \\"\\"\\"\\"\\"\\" - fromInterface: String! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - location: Location! - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - numberOfFriends: Int! - \\"\\"\\"\\"\\"\\" - rating: Float! - \\"\\"\\"\\"\\"\\" - toBeOverridden: String! - \\"\\"\\"\\"\\"\\" - verified: Boolean! - \\"\\"\\"\\"\\"\\" - verifiedDate: DateTime! - } +type User implements UserInterface { + fromInterface: String! + id: ID! + location: Location! + name: String! + numberOfFriends: Int! + rating: Float! + toBeOverridden: String! + verified: Boolean! + verifiedDate: DateTime! +} - type UserAggregateSelection { - count: Int! - fromInterface: StringAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - numberOfFriends: IntAggregateSelectionNonNullable! - rating: FloatAggregateSelectionNonNullable! - toBeOverridden: StringAggregateSelectionNonNullable! - verifiedDate: DateTimeAggregateSelectionNonNullable! - } +type UserAggregateSelection { + count: Int! + fromInterface: StringAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + numberOfFriends: IntAggregateSelectionNonNullable! + rating: FloatAggregateSelectionNonNullable! + toBeOverridden: StringAggregateSelectionNonNullable! + verifiedDate: DateTimeAggregateSelectionNonNullable! +} - input UserCreateInput { - fromInterface: String! = \\"Interface default value\\" - id: ID! = \\"00000000-00000000-00000000-00000000\\" - location: Location! = HERE - name: String! = \\"Jane Smith\\" - numberOfFriends: Int! = 0 - rating: Float! = 0 - toBeOverridden: String! = \\"Overridden value\\" - verified: Boolean! = false - verifiedDate: DateTime! = \\"1970-01-01T00:00:00.000Z\\" - } +input UserCreateInput { + fromInterface: String! = \\"Interface default value\\" + id: ID! = \\"00000000-00000000-00000000-00000000\\" + location: Location! = HERE + name: String! = \\"Jane Smith\\" + numberOfFriends: Int! = 0 + rating: Float! = 0 + toBeOverridden: String! = \\"Overridden value\\" + verified: Boolean! = false + verifiedDate: DateTime! = \\"1970-01-01T00:00:00.000Z\\" +} - type UserEdge { - cursor: String! - node: User! - } +type UserEdge { + cursor: String! + node: User! +} - \\"\\"\\"\\"\\"\\" - interface UserInterface { - \\"\\"\\"\\"\\"\\" - fromInterface: String! - \\"\\"\\"\\"\\"\\" - toBeOverridden: String! - } +interface UserInterface { + fromInterface: String! + toBeOverridden: String! +} - 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!] - } +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 { - fromInterface: SortDirection - id: SortDirection - location: SortDirection - name: SortDirection - numberOfFriends: SortDirection - rating: SortDirection - toBeOverridden: SortDirection - verified: SortDirection - verifiedDate: SortDirection - } +\\"\\"\\" +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 { + fromInterface: SortDirection + id: SortDirection + location: SortDirection + name: SortDirection + numberOfFriends: SortDirection + rating: SortDirection + toBeOverridden: SortDirection + verified: SortDirection + verifiedDate: SortDirection +} - input UserUpdateInput { - fromInterface: String - id: ID - location: Location - name: String - numberOfFriends: Int - numberOfFriends_DECREMENT: Int - numberOfFriends_INCREMENT: Int - rating: Float - rating_ADD: Float - rating_DIVIDE: Float - rating_MULTIPLY: Float - rating_SUBTRACT: Float - toBeOverridden: String - verified: Boolean - verifiedDate: DateTime - } +input UserUpdateInput { + fromInterface: String + id: ID + location: Location + name: String + numberOfFriends: Int + numberOfFriends_DECREMENT: Int + numberOfFriends_INCREMENT: Int + rating: Float + rating_ADD: Float + rating_DIVIDE: Float + rating_MULTIPLY: Float + rating_SUBTRACT: Float + toBeOverridden: String + verified: Boolean + verifiedDate: DateTime +} - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - fromInterface: String - fromInterface_CONTAINS: String - fromInterface_ENDS_WITH: String - fromInterface_IN: [String!] - fromInterface_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_STARTS_WITH: String - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - location: Location - location_IN: [Location!] - location_NOT: Location @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - location_NOT_IN: [Location!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - numberOfFriends: Int - numberOfFriends_GT: Int - numberOfFriends_GTE: Int - numberOfFriends_IN: [Int!] - numberOfFriends_LT: Int - numberOfFriends_LTE: Int - numberOfFriends_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - numberOfFriends_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - rating: Float - rating_GT: Float - rating_GTE: Float - rating_IN: [Float!] - rating_LT: Float - rating_LTE: Float - rating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - rating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden: String - toBeOverridden_CONTAINS: String - toBeOverridden_ENDS_WITH: String - toBeOverridden_IN: [String!] - toBeOverridden_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_STARTS_WITH: String - verified: Boolean - verifiedDate: DateTime - verifiedDate_GT: DateTime - verifiedDate_GTE: DateTime - verifiedDate_IN: [DateTime!] - verifiedDate_LT: DateTime - verifiedDate_LTE: DateTime - verifiedDate_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - verifiedDate_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - verified_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + fromInterface: String + fromInterface_CONTAINS: String + fromInterface_ENDS_WITH: String + fromInterface_IN: [String!] + fromInterface_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_STARTS_WITH: String + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + location: Location + location_IN: [Location!] + location_NOT: Location @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + location_NOT_IN: [Location!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + numberOfFriends: Int + numberOfFriends_GT: Int + numberOfFriends_GTE: Int + numberOfFriends_IN: [Int!] + numberOfFriends_LT: Int + numberOfFriends_LTE: Int + numberOfFriends_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + numberOfFriends_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + rating: Float + rating_GT: Float + rating_GTE: Float + rating_IN: [Float!] + rating_LT: Float + rating_LTE: Float + rating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + rating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden: String + toBeOverridden_CONTAINS: String + toBeOverridden_ENDS_WITH: String + toBeOverridden_IN: [String!] + toBeOverridden_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_STARTS_WITH: String + verified: Boolean + verifiedDate: DateTime + verifiedDate_GT: DateTime + verifiedDate_GTE: DateTime + verifiedDate_IN: [DateTime!] + verifiedDate_LT: DateTime + verifiedDate_LTE: DateTime + verifiedDate_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + verifiedDate_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + verified_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 7cfa68df27..b6d0b1d2a4 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -911,801 +911,794 @@ describe("@filterable directive", () => { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - node: ActorEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere +} + +input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere +} + +input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + node: ActorEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("enable value and aggregation filters", async () => { @@ -1730,9973 +1723,849 @@ describe("@filterable directive", () => { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + node: ActorEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - \\"\\"\\"\\"\\"\\" + test("enable only aggregation filters", async () => { + const typeDefs = gql` type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - node: ActorEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("enable only aggregation filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - type Movie { - title: String @filterable(byValue: false, byAggregate: true) - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - node: ActorEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated: MovieCreatedEvent! - movieDeleted: MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated: MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - }); - - describe("on RELATIONSHIP FIELD", () => { - test("default arguments should disable aggregation", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - node: ActorEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("enable value and aggregation filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - type Movie { - title: String - actors: [Actor!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: true) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - node: ActorEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("enable only aggregation filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - type Movie { - title: String - actors: [Actor!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: false, byAggregate: true) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - node: ActorEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsAggregate: MovieActorsAggregateInput - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("enable only value filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - type Movie { - title: String - actors: [Actor!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - node: ActorEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - }); - - describe("on INTERFACE RELATIONSHIP FIELD, (aggregation does not exists on abstract types)", () => { - test("default arguments should disable aggregation", async () => { - const typeDefs = gql` - type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - interface Person { - username: String! - } - - type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor implements Person { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload implements PersonEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsConnectFieldInput { - connect: PersonConnectInput - where: PersonConnectWhere - } - - type MovieActorsConnectedRelationship { - node: PersonEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: PersonSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - username: String! - } - - input PersonConnectInput { - _on: PersonImplementationsConnectInput - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - Actor: ActorCreateInput - } - - input PersonDeleteInput { - _on: PersonImplementationsDeleteInput - } - - input PersonDisconnectInput { - _on: PersonImplementationsDisconnectInput - } - - interface PersonEventPayload { - username: String! - } - - input PersonImplementationsConnectInput { - Actor: [ActorConnectInput!] - } - - input PersonImplementationsDeleteInput { - Actor: [ActorDeleteInput!] - } - - input PersonImplementationsDisconnectInput { - Actor: [ActorDisconnectInput!] - } - - input PersonImplementationsSubscriptionWhere { - Actor: ActorSubscriptionWhere - } - - input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput - } - - input PersonImplementationsWhere { - Actor: ActorWhere - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - username: SortDirection - } - - input PersonSubscriptionWhere { - AND: [PersonSubscriptionWhere!] - NOT: PersonSubscriptionWhere - OR: [PersonSubscriptionWhere!] - _on: PersonImplementationsSubscriptionWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - username: String - } - - input PersonWhere { - _on: PersonImplementationsWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("enable value and aggregation filters", async () => { - const typeDefs = gql` - type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - interface Person { - username: String! - } - - type Movie { - title: String - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: true) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor implements Person { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload implements PersonEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsConnectFieldInput { - connect: PersonConnectInput - where: PersonConnectWhere - } - - type MovieActorsConnectedRelationship { - node: PersonEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: PersonSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - username: String! - } - - input PersonConnectInput { - _on: PersonImplementationsConnectInput - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - Actor: ActorCreateInput - } - - input PersonDeleteInput { - _on: PersonImplementationsDeleteInput - } - - input PersonDisconnectInput { - _on: PersonImplementationsDisconnectInput - } - - interface PersonEventPayload { - username: String! - } - - input PersonImplementationsConnectInput { - Actor: [ActorConnectInput!] - } - - input PersonImplementationsDeleteInput { - Actor: [ActorDeleteInput!] - } - - input PersonImplementationsDisconnectInput { - Actor: [ActorDisconnectInput!] - } - - input PersonImplementationsSubscriptionWhere { - Actor: ActorSubscriptionWhere - } - - input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput - } - - input PersonImplementationsWhere { - Actor: ActorWhere - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - username: SortDirection - } - - input PersonSubscriptionWhere { - AND: [PersonSubscriptionWhere!] - NOT: PersonSubscriptionWhere - OR: [PersonSubscriptionWhere!] - _on: PersonImplementationsSubscriptionWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - username: String - } - - input PersonWhere { - _on: PersonImplementationsWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("enable only value filters", async () => { - const typeDefs = gql` - type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - interface Person { - username: String! - } - - type Movie { - title: String - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor implements Person { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload implements PersonEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsConnectFieldInput { - connect: PersonConnectInput - where: PersonConnectWhere - } - - type MovieActorsConnectedRelationship { - node: PersonEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: PersonSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - username: String! - } - - input PersonConnectInput { - _on: PersonImplementationsConnectInput - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - Actor: ActorCreateInput - } - - input PersonDeleteInput { - _on: PersonImplementationsDeleteInput - } - - input PersonDisconnectInput { - _on: PersonImplementationsDisconnectInput - } - - interface PersonEventPayload { - username: String! - } - - input PersonImplementationsConnectInput { - Actor: [ActorConnectInput!] - } - - input PersonImplementationsDeleteInput { - Actor: [ActorDeleteInput!] - } - - input PersonImplementationsDisconnectInput { - Actor: [ActorDisconnectInput!] - } - - input PersonImplementationsSubscriptionWhere { - Actor: ActorSubscriptionWhere - } - - input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput - } - - input PersonImplementationsWhere { - Actor: ActorWhere - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - username: SortDirection - } - - input PersonSubscriptionWhere { - AND: [PersonSubscriptionWhere!] - NOT: PersonSubscriptionWhere - OR: [PersonSubscriptionWhere!] - _on: PersonImplementationsSubscriptionWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - username: String - } - - input PersonWhere { - _on: PersonImplementationsWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - }); - - describe("on UNION RELATIONSHIP FIELD, (aggregation does not exists on abstract types)", () => { - test("default arguments should disable aggregation", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - union Person = Actor | Appearance - - type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Appearance { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input AppearanceConnectInput { - movies: [AppearanceMoviesConnectFieldInput!] - } - - input AppearanceConnectWhere { - node: AppearanceWhere! - } - - type AppearanceConnectedRelationships { - movies: AppearanceMoviesConnectedRelationship - } - - input AppearanceCreateInput { - movies: AppearanceMoviesFieldInput - password: String! - username: String! - } - - type AppearanceCreatedEvent { - createdAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! - } - - input AppearanceDeleteInput { - movies: [AppearanceMoviesDeleteFieldInput!] - } - - type AppearanceDeletedEvent { - deletedAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! - } - - input AppearanceDisconnectInput { - movies: [AppearanceMoviesDisconnectFieldInput!] - } - - type AppearanceEdge { - cursor: String! - node: Appearance! - } - - type AppearanceEventPayload { - password: String! - username: String! - } - - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - - type AppearanceMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input AppearanceMoviesAggregateInput { - AND: [AppearanceMoviesAggregateInput!] - NOT: AppearanceMoviesAggregateInput - OR: [AppearanceMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AppearanceMoviesNodeAggregationWhereInput - } - - input AppearanceMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type AppearanceMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input AppearanceMoviesConnectionSort { - node: MovieSort - } - - input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input AppearanceMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input AppearanceMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceMoviesFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - } - - input AppearanceMoviesNodeAggregationWhereInput { - AND: [AppearanceMoviesNodeAggregationWhereInput!] - NOT: AppearanceMoviesNodeAggregationWhereInput - OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type AppearanceMoviesRelationship { - cursor: String! - node: Movie! - } - - input AppearanceMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input AppearanceMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input AppearanceMoviesUpdateFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - delete: [AppearanceMoviesDeleteFieldInput!] - disconnect: [AppearanceMoviesDisconnectFieldInput!] - update: AppearanceMoviesUpdateConnectionInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AppearanceSort!] - } - - input AppearanceRelationInput { - movies: [AppearanceMoviesCreateFieldInput!] - } - - type AppearanceRelationshipCreatedEvent { - appearance: AppearanceEventPayload! - createdRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input AppearanceRelationshipCreatedSubscriptionWhere { - AND: [AppearanceRelationshipCreatedSubscriptionWhere!] - NOT: AppearanceRelationshipCreatedSubscriptionWhere - OR: [AppearanceRelationshipCreatedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - createdRelationship: AppearanceRelationshipsSubscriptionWhere - } - - type AppearanceRelationshipDeletedEvent { - appearance: AppearanceEventPayload! - deletedRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input AppearanceRelationshipDeletedSubscriptionWhere { - AND: [AppearanceRelationshipDeletedSubscriptionWhere!] - NOT: AppearanceRelationshipDeletedSubscriptionWhere - OR: [AppearanceRelationshipDeletedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - deletedRelationship: AppearanceRelationshipsSubscriptionWhere - } - - input AppearanceRelationshipsSubscriptionWhere { - movies: AppearanceMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. - \\"\\"\\" - input AppearanceSort { - password: SortDirection - username: SortDirection - } - - input AppearanceSubscriptionWhere { - AND: [AppearanceSubscriptionWhere!] - NOT: AppearanceSubscriptionWhere - OR: [AppearanceSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input AppearanceUpdateInput { - movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String - } - - type AppearanceUpdatedEvent { - event: EventType! - previousState: AppearanceEventPayload! - timestamp: Float! - updatedAppearance: AppearanceEventPayload! - } - - input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: AppearanceMoviesAggregateInput - moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Appearances where all of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where none of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Appearances where one of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where some of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - type CreateAppearancesMutationResponse { - appearances: [Appearance!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsActorConnectFieldInput { - connect: [ActorConnectInput!] - where: ActorConnectWhere - } - - input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsActorDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - } - - input MovieActorsActorSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsAppearanceConnectFieldInput { - connect: [AppearanceConnectInput!] - where: AppearanceConnectWhere - } - - input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere - node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsAppearanceCreateFieldInput { - node: AppearanceCreateInput! - } - - input MovieActorsAppearanceDeleteFieldInput { - delete: AppearanceDeleteInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsAppearanceDisconnectFieldInput { - disconnect: AppearanceDisconnectInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsAppearanceFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - } - - input MovieActorsAppearanceSubscriptionWhere { - node: AppearanceSubscriptionWhere - } - - input MovieActorsAppearanceUpdateConnectionInput { - node: AppearanceUpdateInput - } - - input MovieActorsAppearanceUpdateFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - delete: [MovieActorsAppearanceDeleteFieldInput!] - disconnect: [MovieActorsAppearanceDisconnectFieldInput!] - update: MovieActorsAppearanceUpdateConnectionInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Appearance: [MovieActorsAppearanceConnectFieldInput!] - } - - type MovieActorsConnectedRelationship { - node: PersonEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Appearance: [MovieActorsAppearanceCreateFieldInput!] - } - - input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Appearance: MovieActorsAppearanceFieldInput - } - - input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Appearance: [MovieActorsAppearanceDeleteFieldInput!] - } - - input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Appearance: [MovieActorsAppearanceDisconnectFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsRelationshipSubscriptionWhere { - Actor: MovieActorsActorSubscriptionWhere - Appearance: MovieActorsAppearanceSubscriptionWhere - } - - input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Appearance: [MovieActorsAppearanceUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: MovieActorsConnectInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: MovieActorsDeleteInput - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: MovieActorsUpdateInput - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = Actor | Appearance - - union PersonEventPayload = ActorEventPayload | AppearanceEventPayload - - input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! - appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! - appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! - appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! - appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - type UpdateAppearancesMutationResponse { - appearances: [Appearance!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("enable value and aggregation filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - union Person = Actor | Appearance - - type Movie { - title: String - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: true) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Appearance { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input AppearanceConnectInput { - movies: [AppearanceMoviesConnectFieldInput!] - } - - input AppearanceConnectWhere { - node: AppearanceWhere! - } - - type AppearanceConnectedRelationships { - movies: AppearanceMoviesConnectedRelationship - } - - input AppearanceCreateInput { - movies: AppearanceMoviesFieldInput - password: String! - username: String! - } - - type AppearanceCreatedEvent { - createdAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! - } - - input AppearanceDeleteInput { - movies: [AppearanceMoviesDeleteFieldInput!] - } - - type AppearanceDeletedEvent { - deletedAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! - } - - input AppearanceDisconnectInput { - movies: [AppearanceMoviesDisconnectFieldInput!] - } - - type AppearanceEdge { - cursor: String! - node: Appearance! - } - - type AppearanceEventPayload { - password: String! - username: String! - } - - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - - type AppearanceMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input AppearanceMoviesAggregateInput { - AND: [AppearanceMoviesAggregateInput!] - NOT: AppearanceMoviesAggregateInput - OR: [AppearanceMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AppearanceMoviesNodeAggregationWhereInput - } - - input AppearanceMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type AppearanceMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input AppearanceMoviesConnectionSort { - node: MovieSort - } - - input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input AppearanceMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input AppearanceMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceMoviesFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - } - - input AppearanceMoviesNodeAggregationWhereInput { - AND: [AppearanceMoviesNodeAggregationWhereInput!] - NOT: AppearanceMoviesNodeAggregationWhereInput - OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type AppearanceMoviesRelationship { - cursor: String! - node: Movie! - } - - input AppearanceMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input AppearanceMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input AppearanceMoviesUpdateFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - delete: [AppearanceMoviesDeleteFieldInput!] - disconnect: [AppearanceMoviesDisconnectFieldInput!] - update: AppearanceMoviesUpdateConnectionInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AppearanceSort!] - } - - input AppearanceRelationInput { - movies: [AppearanceMoviesCreateFieldInput!] - } - - type AppearanceRelationshipCreatedEvent { - appearance: AppearanceEventPayload! - createdRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input AppearanceRelationshipCreatedSubscriptionWhere { - AND: [AppearanceRelationshipCreatedSubscriptionWhere!] - NOT: AppearanceRelationshipCreatedSubscriptionWhere - OR: [AppearanceRelationshipCreatedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - createdRelationship: AppearanceRelationshipsSubscriptionWhere - } - - type AppearanceRelationshipDeletedEvent { - appearance: AppearanceEventPayload! - deletedRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input AppearanceRelationshipDeletedSubscriptionWhere { - AND: [AppearanceRelationshipDeletedSubscriptionWhere!] - NOT: AppearanceRelationshipDeletedSubscriptionWhere - OR: [AppearanceRelationshipDeletedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - deletedRelationship: AppearanceRelationshipsSubscriptionWhere - } - - input AppearanceRelationshipsSubscriptionWhere { - movies: AppearanceMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. - \\"\\"\\" - input AppearanceSort { - password: SortDirection - username: SortDirection - } - - input AppearanceSubscriptionWhere { - AND: [AppearanceSubscriptionWhere!] - NOT: AppearanceSubscriptionWhere - OR: [AppearanceSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input AppearanceUpdateInput { - movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String - } - - type AppearanceUpdatedEvent { - event: EventType! - previousState: AppearanceEventPayload! - timestamp: Float! - updatedAppearance: AppearanceEventPayload! - } - - input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: AppearanceMoviesAggregateInput - moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Appearances where all of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where none of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Appearances where one of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where some of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - type CreateAppearancesMutationResponse { - appearances: [Appearance!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsActorConnectFieldInput { - connect: [ActorConnectInput!] - where: ActorConnectWhere - } - - input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsActorDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - } - - input MovieActorsActorSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsAppearanceConnectFieldInput { - connect: [AppearanceConnectInput!] - where: AppearanceConnectWhere - } - - input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere - node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsAppearanceCreateFieldInput { - node: AppearanceCreateInput! - } - - input MovieActorsAppearanceDeleteFieldInput { - delete: AppearanceDeleteInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsAppearanceDisconnectFieldInput { - disconnect: AppearanceDisconnectInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsAppearanceFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - } - - input MovieActorsAppearanceSubscriptionWhere { - node: AppearanceSubscriptionWhere - } - - input MovieActorsAppearanceUpdateConnectionInput { - node: AppearanceUpdateInput - } - - input MovieActorsAppearanceUpdateFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - delete: [MovieActorsAppearanceDeleteFieldInput!] - disconnect: [MovieActorsAppearanceDisconnectFieldInput!] - update: MovieActorsAppearanceUpdateConnectionInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Appearance: [MovieActorsAppearanceConnectFieldInput!] - } - - type MovieActorsConnectedRelationship { - node: PersonEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Appearance: [MovieActorsAppearanceCreateFieldInput!] - } - - input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Appearance: MovieActorsAppearanceFieldInput - } - - input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Appearance: [MovieActorsAppearanceDeleteFieldInput!] - } - - input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Appearance: [MovieActorsAppearanceDisconnectFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsRelationshipSubscriptionWhere { - Actor: MovieActorsActorSubscriptionWhere - Appearance: MovieActorsAppearanceSubscriptionWhere - } - - input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Appearance: [MovieActorsAppearanceUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: MovieActorsConnectInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - title: String - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: MovieActorsDeleteInput - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - actors: MovieActorsUpdateInput - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = Actor | Appearance - - union PersonEventPayload = ActorEventPayload | AppearanceEventPayload - - input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! - appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! - appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! - appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! - appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - type UpdateAppearancesMutationResponse { - appearances: [Appearance!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("enable only value filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - union Person = Actor | Appearance - - type Movie { - title: String - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: false) + type Movie { + title: String @filterable(byValue: false, byAggregate: true) + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } `; const neoSchema = new Neo4jGraphQL({ @@ -11706,1210 +2575,10235 @@ describe("@filterable directive", () => { }, }); const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Appearance { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input AppearanceConnectInput { - movies: [AppearanceMoviesConnectFieldInput!] - } - - input AppearanceConnectWhere { - node: AppearanceWhere! - } - - type AppearanceConnectedRelationships { - movies: AppearanceMoviesConnectedRelationship - } - - input AppearanceCreateInput { - movies: AppearanceMoviesFieldInput - password: String! - username: String! - } - - type AppearanceCreatedEvent { - createdAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! - } - - input AppearanceDeleteInput { - movies: [AppearanceMoviesDeleteFieldInput!] - } - - type AppearanceDeletedEvent { - deletedAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! - } - - input AppearanceDisconnectInput { - movies: [AppearanceMoviesDisconnectFieldInput!] - } - - type AppearanceEdge { - cursor: String! - node: Appearance! - } - - type AppearanceEventPayload { - password: String! - username: String! - } - - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - - type AppearanceMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - input AppearanceMoviesAggregateInput { - AND: [AppearanceMoviesAggregateInput!] - NOT: AppearanceMoviesAggregateInput - OR: [AppearanceMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AppearanceMoviesNodeAggregationWhereInput - } - - input AppearanceMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type AppearanceMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input AppearanceMoviesConnectionSort { - node: MovieSort - } - - input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input AppearanceMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input AppearanceMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceMoviesFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - } - - input AppearanceMoviesNodeAggregationWhereInput { - AND: [AppearanceMoviesNodeAggregationWhereInput!] - NOT: AppearanceMoviesNodeAggregationWhereInput - OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type AppearanceMoviesRelationship { - cursor: String! - node: Movie! - } - - input AppearanceMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input AppearanceMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input AppearanceMoviesUpdateFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - delete: [AppearanceMoviesDeleteFieldInput!] - disconnect: [AppearanceMoviesDisconnectFieldInput!] - update: AppearanceMoviesUpdateConnectionInput - where: AppearanceMoviesConnectionWhere - } - - input AppearanceOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AppearanceSort!] - } - - input AppearanceRelationInput { - movies: [AppearanceMoviesCreateFieldInput!] - } - - type AppearanceRelationshipCreatedEvent { - appearance: AppearanceEventPayload! - createdRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input AppearanceRelationshipCreatedSubscriptionWhere { - AND: [AppearanceRelationshipCreatedSubscriptionWhere!] - NOT: AppearanceRelationshipCreatedSubscriptionWhere - OR: [AppearanceRelationshipCreatedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - createdRelationship: AppearanceRelationshipsSubscriptionWhere - } - - type AppearanceRelationshipDeletedEvent { - appearance: AppearanceEventPayload! - deletedRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input AppearanceRelationshipDeletedSubscriptionWhere { - AND: [AppearanceRelationshipDeletedSubscriptionWhere!] - NOT: AppearanceRelationshipDeletedSubscriptionWhere - OR: [AppearanceRelationshipDeletedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - deletedRelationship: AppearanceRelationshipsSubscriptionWhere - } - - input AppearanceRelationshipsSubscriptionWhere { - movies: AppearanceMoviesRelationshipSubscriptionWhere - } - - \\"\\"\\" - Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. - \\"\\"\\" - input AppearanceSort { - password: SortDirection - username: SortDirection - } - - input AppearanceSubscriptionWhere { - AND: [AppearanceSubscriptionWhere!] - NOT: AppearanceSubscriptionWhere - OR: [AppearanceSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input AppearanceUpdateInput { - movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String - } - - type AppearanceUpdatedEvent { - event: EventType! - previousState: AppearanceEventPayload! - timestamp: Float! - updatedAppearance: AppearanceEventPayload! - } - - input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: AppearanceMoviesAggregateInput - moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Appearances where all of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where none of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Appearances where one of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where some of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - type CreateAppearancesMutationResponse { - appearances: [Appearance!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsActorConnectFieldInput { - connect: [ActorConnectInput!] - where: ActorConnectWhere - } - - input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsActorDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - } - - input MovieActorsActorSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsAppearanceConnectFieldInput { - connect: [AppearanceConnectInput!] - where: AppearanceConnectWhere - } - - input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere - node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsAppearanceCreateFieldInput { - node: AppearanceCreateInput! - } - - input MovieActorsAppearanceDeleteFieldInput { - delete: AppearanceDeleteInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsAppearanceDisconnectFieldInput { - disconnect: AppearanceDisconnectInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsAppearanceFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - } - - input MovieActorsAppearanceSubscriptionWhere { - node: AppearanceSubscriptionWhere - } - - input MovieActorsAppearanceUpdateConnectionInput { - node: AppearanceUpdateInput - } - - input MovieActorsAppearanceUpdateFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - delete: [MovieActorsAppearanceDeleteFieldInput!] - disconnect: [MovieActorsAppearanceDisconnectFieldInput!] - update: MovieActorsAppearanceUpdateConnectionInput - where: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Appearance: [MovieActorsAppearanceConnectFieldInput!] - } - - type MovieActorsConnectedRelationship { - node: PersonEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere - } - - input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Appearance: [MovieActorsAppearanceCreateFieldInput!] - } - - input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Appearance: MovieActorsAppearanceFieldInput - } - - input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Appearance: [MovieActorsAppearanceDeleteFieldInput!] - } - - input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Appearance: [MovieActorsAppearanceDisconnectFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + node: ActorEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated: MovieCreatedEvent! + movieDeleted: MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated: MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); + }); - input MovieActorsRelationshipSubscriptionWhere { - Actor: MovieActorsActorSubscriptionWhere - Appearance: MovieActorsAppearanceSubscriptionWhere + describe("on RELATIONSHIP FIELD", () => { + test("default arguments should disable aggregation", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Appearance: [MovieActorsAppearanceUpdateFieldInput!] + type Movie { + title: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + node: ActorEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - input MovieConnectInput { - actors: MovieActorsConnectInput + test("enable value and aggregation filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - input MovieConnectWhere { - node: MovieWhere! + type Movie { + title: String + actors: [Actor!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: true) } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + node: ActorEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship + test("enable only aggregation filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - input MovieCreateInput { - actors: MovieActorsCreateInput - title: String + type Movie { + title: String + actors: [Actor!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: false, byAggregate: true) } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + node: ActorEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsAggregate: MovieActorsAggregateInput + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! + test("enable only value filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - input MovieDeleteInput { - actors: MovieActorsDeleteInput + type Movie { + title: String + actors: [Actor!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: false) } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + node: ActorEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); + }); - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! + describe("on INTERFACE RELATIONSHIP FIELD, (aggregation does not exists on abstract types)", () => { + test("default arguments should disable aggregation", async () => { + const typeDefs = gql` + type Actor implements Person { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput + interface Person { + username: String! } - type MovieEdge { - cursor: String! - node: Movie! + type Movie { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); - type MovieEventPayload { - title: String - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor implements Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload implements PersonEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsConnectFieldInput { + connect: PersonConnectInput + where: PersonConnectWhere +} + +type MovieActorsConnectedRelationship { + node: PersonEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: PersonSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + username: String! +} + +input PersonConnectInput { + _on: PersonImplementationsConnectInput +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + Actor: ActorCreateInput +} + +input PersonDeleteInput { + _on: PersonImplementationsDeleteInput +} + +input PersonDisconnectInput { + _on: PersonImplementationsDisconnectInput +} + +interface PersonEventPayload { + username: String! +} + +input PersonImplementationsConnectInput { + Actor: [ActorConnectInput!] +} + +input PersonImplementationsDeleteInput { + Actor: [ActorDeleteInput!] +} + +input PersonImplementationsDisconnectInput { + Actor: [ActorDisconnectInput!] +} + +input PersonImplementationsSubscriptionWhere { + Actor: ActorSubscriptionWhere +} + +input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput +} + +input PersonImplementationsWhere { + Actor: ActorWhere +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + username: SortDirection +} + +input PersonSubscriptionWhere { + AND: [PersonSubscriptionWhere!] + NOT: PersonSubscriptionWhere + OR: [PersonSubscriptionWhere!] + _on: PersonImplementationsSubscriptionWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + username: String +} + +input PersonWhere { + _on: PersonImplementationsWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [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!] + test("enable value and aggregation filters", async () => { + const typeDefs = gql` + type Actor implements Person { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - input MovieRelationInput { - actors: MovieActorsCreateFieldInput + interface Person { + username: String! } - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! + type Movie { + title: String + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: true) } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor implements Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload implements PersonEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsConnectFieldInput { + connect: PersonConnectInput + where: PersonConnectWhere +} + +type MovieActorsConnectedRelationship { + node: PersonEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: PersonSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + username: String! +} + +input PersonConnectInput { + _on: PersonImplementationsConnectInput +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + Actor: ActorCreateInput +} + +input PersonDeleteInput { + _on: PersonImplementationsDeleteInput +} + +input PersonDisconnectInput { + _on: PersonImplementationsDisconnectInput +} + +interface PersonEventPayload { + username: String! +} + +input PersonImplementationsConnectInput { + Actor: [ActorConnectInput!] +} + +input PersonImplementationsDeleteInput { + Actor: [ActorDeleteInput!] +} + +input PersonImplementationsDisconnectInput { + Actor: [ActorDisconnectInput!] +} + +input PersonImplementationsSubscriptionWhere { + Actor: ActorSubscriptionWhere +} + +input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput +} + +input PersonImplementationsWhere { + Actor: ActorWhere +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + username: SortDirection +} + +input PersonSubscriptionWhere { + AND: [PersonSubscriptionWhere!] + NOT: PersonSubscriptionWhere + OR: [PersonSubscriptionWhere!] + _on: PersonImplementationsSubscriptionWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + username: String +} + +input PersonWhere { + _on: PersonImplementationsWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! + test("enable only value filters", async () => { + const typeDefs = gql` + type Actor implements Person { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere + interface Person { + username: String! } - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere + type Movie { + title: String + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: false) } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); - \\"\\"\\" - 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 - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor implements Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload implements PersonEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsConnectFieldInput { + connect: PersonConnectInput + where: PersonConnectWhere +} + +type MovieActorsConnectedRelationship { + node: PersonEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: PersonSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + username: String! +} + +input PersonConnectInput { + _on: PersonImplementationsConnectInput +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + Actor: ActorCreateInput +} + +input PersonDeleteInput { + _on: PersonImplementationsDeleteInput +} + +input PersonDisconnectInput { + _on: PersonImplementationsDisconnectInput +} + +interface PersonEventPayload { + username: String! +} + +input PersonImplementationsConnectInput { + Actor: [ActorConnectInput!] +} + +input PersonImplementationsDeleteInput { + Actor: [ActorDeleteInput!] +} + +input PersonImplementationsDisconnectInput { + Actor: [ActorDisconnectInput!] +} + +input PersonImplementationsSubscriptionWhere { + Actor: ActorSubscriptionWhere +} + +input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput +} + +input PersonImplementationsWhere { + Actor: ActorWhere +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + username: SortDirection +} + +input PersonSubscriptionWhere { + AND: [PersonSubscriptionWhere!] + NOT: PersonSubscriptionWhere + OR: [PersonSubscriptionWhere!] + _on: PersonImplementationsSubscriptionWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + username: String +} + +input PersonWhere { + _on: PersonImplementationsWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); + }); - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String + describe("on UNION RELATIONSHIP FIELD, (aggregation does not exists on abstract types)", () => { + test("default arguments should disable aggregation", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - input MovieUpdateInput { - actors: MovieActorsUpdateInput - title: String + type Appearance { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } + union Person = Actor | Appearance - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String + type Movie { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Appearance { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! +} + +type AppearanceAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input AppearanceConnectInput { + movies: [AppearanceMoviesConnectFieldInput!] +} + +input AppearanceConnectWhere { + node: AppearanceWhere! +} + +type AppearanceConnectedRelationships { + movies: AppearanceMoviesConnectedRelationship +} + +input AppearanceCreateInput { + movies: AppearanceMoviesFieldInput + password: String! + username: String! +} + +type AppearanceCreatedEvent { + createdAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! +} + +input AppearanceDeleteInput { + movies: [AppearanceMoviesDeleteFieldInput!] +} + +type AppearanceDeletedEvent { + deletedAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! +} + +input AppearanceDisconnectInput { + movies: [AppearanceMoviesDisconnectFieldInput!] +} + +type AppearanceEdge { + cursor: String! + node: Appearance! +} + +type AppearanceEventPayload { + password: String! + username: String! +} + +type AppearanceMovieMoviesAggregationSelection { + count: Int! + node: AppearanceMovieMoviesNodeAggregateSelection +} + +type AppearanceMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input AppearanceMoviesAggregateInput { + AND: [AppearanceMoviesAggregateInput!] + NOT: AppearanceMoviesAggregateInput + OR: [AppearanceMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: AppearanceMoviesNodeAggregationWhereInput +} + +input AppearanceMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type AppearanceMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input AppearanceMoviesConnectionSort { + node: MovieSort +} + +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input AppearanceMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input AppearanceMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceMoviesFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] +} + +input AppearanceMoviesNodeAggregationWhereInput { + AND: [AppearanceMoviesNodeAggregationWhereInput!] + NOT: AppearanceMoviesNodeAggregationWhereInput + OR: [AppearanceMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type AppearanceMoviesRelationship { + cursor: String! + node: Movie! +} + +input AppearanceMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input AppearanceMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input AppearanceMoviesUpdateFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + delete: [AppearanceMoviesDeleteFieldInput!] + disconnect: [AppearanceMoviesDisconnectFieldInput!] + update: AppearanceMoviesUpdateConnectionInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AppearanceSort!] +} + +input AppearanceRelationInput { + movies: [AppearanceMoviesCreateFieldInput!] +} + +type AppearanceRelationshipCreatedEvent { + appearance: AppearanceEventPayload! + createdRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input AppearanceRelationshipCreatedSubscriptionWhere { + AND: [AppearanceRelationshipCreatedSubscriptionWhere!] + NOT: AppearanceRelationshipCreatedSubscriptionWhere + OR: [AppearanceRelationshipCreatedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + createdRelationship: AppearanceRelationshipsSubscriptionWhere +} + +type AppearanceRelationshipDeletedEvent { + appearance: AppearanceEventPayload! + deletedRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input AppearanceRelationshipDeletedSubscriptionWhere { + AND: [AppearanceRelationshipDeletedSubscriptionWhere!] + NOT: AppearanceRelationshipDeletedSubscriptionWhere + OR: [AppearanceRelationshipDeletedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + deletedRelationship: AppearanceRelationshipsSubscriptionWhere +} + +input AppearanceRelationshipsSubscriptionWhere { + movies: AppearanceMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. +\\"\\"\\" +input AppearanceSort { + password: SortDirection + username: SortDirection +} + +input AppearanceSubscriptionWhere { + AND: [AppearanceSubscriptionWhere!] + NOT: AppearanceSubscriptionWhere + OR: [AppearanceSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input AppearanceUpdateInput { + movies: [AppearanceMoviesUpdateFieldInput!] + password: String + username: String +} + +type AppearanceUpdatedEvent { + event: EventType! + previousState: AppearanceEventPayload! + timestamp: Float! + updatedAppearance: AppearanceEventPayload! +} + +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +type CreateAppearancesMutationResponse { + appearances: [Appearance!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsActorConnectFieldInput { + connect: [ActorConnectInput!] + where: ActorConnectWhere +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsActorDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] +} + +input MovieActorsActorSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsAppearanceConnectFieldInput { + connect: [AppearanceConnectInput!] + where: AppearanceConnectWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere + node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsAppearanceCreateFieldInput { + node: AppearanceCreateInput! +} + +input MovieActorsAppearanceDeleteFieldInput { + delete: AppearanceDeleteInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsAppearanceDisconnectFieldInput { + disconnect: AppearanceDisconnectInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsAppearanceFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] +} + +input MovieActorsAppearanceSubscriptionWhere { + node: AppearanceSubscriptionWhere +} + +input MovieActorsAppearanceUpdateConnectionInput { + node: AppearanceUpdateInput +} + +input MovieActorsAppearanceUpdateFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + delete: [MovieActorsAppearanceDeleteFieldInput!] + disconnect: [MovieActorsAppearanceDisconnectFieldInput!] + update: MovieActorsAppearanceUpdateConnectionInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Appearance: [MovieActorsAppearanceConnectFieldInput!] +} + +type MovieActorsConnectedRelationship { + node: PersonEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Appearance: [MovieActorsAppearanceCreateFieldInput!] +} + +input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Appearance: MovieActorsAppearanceFieldInput +} + +input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Appearance: [MovieActorsAppearanceDeleteFieldInput!] +} + +input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Appearance: [MovieActorsAppearanceDisconnectFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsRelationshipSubscriptionWhere { + Actor: MovieActorsActorSubscriptionWhere + Appearance: MovieActorsAppearanceSubscriptionWhere +} + +input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Appearance: [MovieActorsAppearanceUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: MovieActorsUpdateInput + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = Actor | Appearance + +union PersonEventPayload = ActorEventPayload | AppearanceEventPayload + +input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! + appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! + appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! + appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! + appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +type UpdateAppearancesMutationResponse { + appearances: [Appearance!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + test("enable value and aggregation filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String + type Appearance { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } union Person = Actor | Appearance - union PersonEventPayload = ActorEventPayload | AppearanceEventPayload - - input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! + type Movie { + title: String + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: true) } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); - type StringAggregateSelectionNullable { - longest: String - shortest: String - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Appearance { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! +} + +type AppearanceAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input AppearanceConnectInput { + movies: [AppearanceMoviesConnectFieldInput!] +} + +input AppearanceConnectWhere { + node: AppearanceWhere! +} + +type AppearanceConnectedRelationships { + movies: AppearanceMoviesConnectedRelationship +} + +input AppearanceCreateInput { + movies: AppearanceMoviesFieldInput + password: String! + username: String! +} + +type AppearanceCreatedEvent { + createdAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! +} + +input AppearanceDeleteInput { + movies: [AppearanceMoviesDeleteFieldInput!] +} + +type AppearanceDeletedEvent { + deletedAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! +} + +input AppearanceDisconnectInput { + movies: [AppearanceMoviesDisconnectFieldInput!] +} + +type AppearanceEdge { + cursor: String! + node: Appearance! +} + +type AppearanceEventPayload { + password: String! + username: String! +} + +type AppearanceMovieMoviesAggregationSelection { + count: Int! + node: AppearanceMovieMoviesNodeAggregateSelection +} + +type AppearanceMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input AppearanceMoviesAggregateInput { + AND: [AppearanceMoviesAggregateInput!] + NOT: AppearanceMoviesAggregateInput + OR: [AppearanceMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: AppearanceMoviesNodeAggregationWhereInput +} + +input AppearanceMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type AppearanceMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input AppearanceMoviesConnectionSort { + node: MovieSort +} + +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input AppearanceMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input AppearanceMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceMoviesFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] +} + +input AppearanceMoviesNodeAggregationWhereInput { + AND: [AppearanceMoviesNodeAggregationWhereInput!] + NOT: AppearanceMoviesNodeAggregationWhereInput + OR: [AppearanceMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type AppearanceMoviesRelationship { + cursor: String! + node: Movie! +} + +input AppearanceMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input AppearanceMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input AppearanceMoviesUpdateFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + delete: [AppearanceMoviesDeleteFieldInput!] + disconnect: [AppearanceMoviesDisconnectFieldInput!] + update: AppearanceMoviesUpdateConnectionInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AppearanceSort!] +} + +input AppearanceRelationInput { + movies: [AppearanceMoviesCreateFieldInput!] +} + +type AppearanceRelationshipCreatedEvent { + appearance: AppearanceEventPayload! + createdRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input AppearanceRelationshipCreatedSubscriptionWhere { + AND: [AppearanceRelationshipCreatedSubscriptionWhere!] + NOT: AppearanceRelationshipCreatedSubscriptionWhere + OR: [AppearanceRelationshipCreatedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + createdRelationship: AppearanceRelationshipsSubscriptionWhere +} + +type AppearanceRelationshipDeletedEvent { + appearance: AppearanceEventPayload! + deletedRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input AppearanceRelationshipDeletedSubscriptionWhere { + AND: [AppearanceRelationshipDeletedSubscriptionWhere!] + NOT: AppearanceRelationshipDeletedSubscriptionWhere + OR: [AppearanceRelationshipDeletedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + deletedRelationship: AppearanceRelationshipsSubscriptionWhere +} + +input AppearanceRelationshipsSubscriptionWhere { + movies: AppearanceMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. +\\"\\"\\" +input AppearanceSort { + password: SortDirection + username: SortDirection +} + +input AppearanceSubscriptionWhere { + AND: [AppearanceSubscriptionWhere!] + NOT: AppearanceSubscriptionWhere + OR: [AppearanceSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input AppearanceUpdateInput { + movies: [AppearanceMoviesUpdateFieldInput!] + password: String + username: String +} + +type AppearanceUpdatedEvent { + event: EventType! + previousState: AppearanceEventPayload! + timestamp: Float! + updatedAppearance: AppearanceEventPayload! +} + +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +type CreateAppearancesMutationResponse { + appearances: [Appearance!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsActorConnectFieldInput { + connect: [ActorConnectInput!] + where: ActorConnectWhere +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsActorDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] +} + +input MovieActorsActorSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsAppearanceConnectFieldInput { + connect: [AppearanceConnectInput!] + where: AppearanceConnectWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere + node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsAppearanceCreateFieldInput { + node: AppearanceCreateInput! +} + +input MovieActorsAppearanceDeleteFieldInput { + delete: AppearanceDeleteInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsAppearanceDisconnectFieldInput { + disconnect: AppearanceDisconnectInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsAppearanceFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] +} + +input MovieActorsAppearanceSubscriptionWhere { + node: AppearanceSubscriptionWhere +} + +input MovieActorsAppearanceUpdateConnectionInput { + node: AppearanceUpdateInput +} + +input MovieActorsAppearanceUpdateFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + delete: [MovieActorsAppearanceDeleteFieldInput!] + disconnect: [MovieActorsAppearanceDisconnectFieldInput!] + update: MovieActorsAppearanceUpdateConnectionInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Appearance: [MovieActorsAppearanceConnectFieldInput!] +} + +type MovieActorsConnectedRelationship { + node: PersonEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Appearance: [MovieActorsAppearanceCreateFieldInput!] +} + +input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Appearance: MovieActorsAppearanceFieldInput +} + +input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Appearance: [MovieActorsAppearanceDeleteFieldInput!] +} + +input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Appearance: [MovieActorsAppearanceDisconnectFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsRelationshipSubscriptionWhere { + Actor: MovieActorsActorSubscriptionWhere + Appearance: MovieActorsAppearanceSubscriptionWhere +} + +input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Appearance: [MovieActorsAppearanceUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: MovieActorsUpdateInput + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = Actor | Appearance + +union PersonEventPayload = ActorEventPayload | AppearanceEventPayload + +input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! + appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! + appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! + appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! + appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +type UpdateAppearancesMutationResponse { + appearances: [Appearance!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! - appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! - appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! - appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! - appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + test("enable only value filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! + type Appearance { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - type UpdateAppearancesMutationResponse { - appearances: [Appearance!]! - info: UpdateInfo! - } + union Person = Actor | Appearance - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! + type Movie { + title: String + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: false) } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Appearance { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! +} + +type AppearanceAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input AppearanceConnectInput { + movies: [AppearanceMoviesConnectFieldInput!] +} + +input AppearanceConnectWhere { + node: AppearanceWhere! +} + +type AppearanceConnectedRelationships { + movies: AppearanceMoviesConnectedRelationship +} + +input AppearanceCreateInput { + movies: AppearanceMoviesFieldInput + password: String! + username: String! +} + +type AppearanceCreatedEvent { + createdAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! +} + +input AppearanceDeleteInput { + movies: [AppearanceMoviesDeleteFieldInput!] +} + +type AppearanceDeletedEvent { + deletedAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! +} + +input AppearanceDisconnectInput { + movies: [AppearanceMoviesDisconnectFieldInput!] +} + +type AppearanceEdge { + cursor: String! + node: Appearance! +} + +type AppearanceEventPayload { + password: String! + username: String! +} + +type AppearanceMovieMoviesAggregationSelection { + count: Int! + node: AppearanceMovieMoviesNodeAggregateSelection +} + +type AppearanceMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +input AppearanceMoviesAggregateInput { + AND: [AppearanceMoviesAggregateInput!] + NOT: AppearanceMoviesAggregateInput + OR: [AppearanceMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: AppearanceMoviesNodeAggregationWhereInput +} + +input AppearanceMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type AppearanceMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input AppearanceMoviesConnectionSort { + node: MovieSort +} + +input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input AppearanceMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input AppearanceMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceMoviesFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] +} + +input AppearanceMoviesNodeAggregationWhereInput { + AND: [AppearanceMoviesNodeAggregationWhereInput!] + NOT: AppearanceMoviesNodeAggregationWhereInput + OR: [AppearanceMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type AppearanceMoviesRelationship { + cursor: String! + node: Movie! +} + +input AppearanceMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input AppearanceMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input AppearanceMoviesUpdateFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + delete: [AppearanceMoviesDeleteFieldInput!] + disconnect: [AppearanceMoviesDisconnectFieldInput!] + update: AppearanceMoviesUpdateConnectionInput + where: AppearanceMoviesConnectionWhere +} + +input AppearanceOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AppearanceSort!] +} + +input AppearanceRelationInput { + movies: [AppearanceMoviesCreateFieldInput!] +} + +type AppearanceRelationshipCreatedEvent { + appearance: AppearanceEventPayload! + createdRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input AppearanceRelationshipCreatedSubscriptionWhere { + AND: [AppearanceRelationshipCreatedSubscriptionWhere!] + NOT: AppearanceRelationshipCreatedSubscriptionWhere + OR: [AppearanceRelationshipCreatedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + createdRelationship: AppearanceRelationshipsSubscriptionWhere +} + +type AppearanceRelationshipDeletedEvent { + appearance: AppearanceEventPayload! + deletedRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input AppearanceRelationshipDeletedSubscriptionWhere { + AND: [AppearanceRelationshipDeletedSubscriptionWhere!] + NOT: AppearanceRelationshipDeletedSubscriptionWhere + OR: [AppearanceRelationshipDeletedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + deletedRelationship: AppearanceRelationshipsSubscriptionWhere +} + +input AppearanceRelationshipsSubscriptionWhere { + movies: AppearanceMoviesRelationshipSubscriptionWhere +} + +\\"\\"\\" +Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. +\\"\\"\\" +input AppearanceSort { + password: SortDirection + username: SortDirection +} + +input AppearanceSubscriptionWhere { + AND: [AppearanceSubscriptionWhere!] + NOT: AppearanceSubscriptionWhere + OR: [AppearanceSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input AppearanceUpdateInput { + movies: [AppearanceMoviesUpdateFieldInput!] + password: String + username: String +} + +type AppearanceUpdatedEvent { + event: EventType! + previousState: AppearanceEventPayload! + timestamp: Float! + updatedAppearance: AppearanceEventPayload! +} + +input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +type CreateAppearancesMutationResponse { + appearances: [Appearance!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsActorConnectFieldInput { + connect: [ActorConnectInput!] + where: ActorConnectWhere +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsActorDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] +} + +input MovieActorsActorSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsAppearanceConnectFieldInput { + connect: [AppearanceConnectInput!] + where: AppearanceConnectWhere +} + +input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere + node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsAppearanceCreateFieldInput { + node: AppearanceCreateInput! +} + +input MovieActorsAppearanceDeleteFieldInput { + delete: AppearanceDeleteInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsAppearanceDisconnectFieldInput { + disconnect: AppearanceDisconnectInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsAppearanceFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] +} + +input MovieActorsAppearanceSubscriptionWhere { + node: AppearanceSubscriptionWhere +} + +input MovieActorsAppearanceUpdateConnectionInput { + node: AppearanceUpdateInput +} + +input MovieActorsAppearanceUpdateFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + delete: [MovieActorsAppearanceDeleteFieldInput!] + disconnect: [MovieActorsAppearanceDisconnectFieldInput!] + update: MovieActorsAppearanceUpdateConnectionInput + where: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Appearance: [MovieActorsAppearanceConnectFieldInput!] +} + +type MovieActorsConnectedRelationship { + node: PersonEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere +} + +input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Appearance: [MovieActorsAppearanceCreateFieldInput!] +} + +input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Appearance: MovieActorsAppearanceFieldInput +} + +input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Appearance: [MovieActorsAppearanceDeleteFieldInput!] +} + +input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Appearance: [MovieActorsAppearanceDisconnectFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsRelationshipSubscriptionWhere { + Actor: MovieActorsActorSubscriptionWhere + Appearance: MovieActorsAppearanceSubscriptionWhere +} + +input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Appearance: [MovieActorsAppearanceUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + title: String +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + actors: MovieActorsUpdateInput + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = Actor | Appearance + +union PersonEventPayload = ActorEventPayload | AppearanceEventPayload + +input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! + appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! + appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! + appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! + appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +type UpdateAppearancesMutationResponse { + appearances: [Appearance!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); }); diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index 3a788c1be5..6a0fb1e037 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -37,155 +37,152 @@ describe("Plural option", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateTechsMutationResponse { - info: CreateInfo! - techs: [Tech!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createTechs(input: [TechCreateInput!]!): CreateTechsMutationResponse! - deleteTechs(where: TechWhere): DeleteInfo! - updateTechs(update: TechUpdateInput, where: TechWhere): UpdateTechsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - techs(options: TechOptions, where: TechWhere): [Tech!]! - techsAggregate(where: TechWhere): TechAggregateSelection! - techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"\\"\\"\\" - type Tech { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - value: String - } - - type TechAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - value: StringAggregateSelectionNullable! - } - - input TechCreateInput { - name: String - value: String - } - - type TechEdge { - cursor: String! - node: Tech! - } - - input TechOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TechSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TechSort!] - } - - \\"\\"\\" - Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. - \\"\\"\\" - input TechSort { - name: SortDirection - value: SortDirection - } - - input TechUpdateInput { - name: String - value: String - } - - input TechWhere { - AND: [TechWhere!] - NOT: TechWhere - OR: [TechWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - } - - type TechsConnection { - edges: [TechEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateTechsMutationResponse { - info: UpdateInfo! - techs: [Tech!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateTechsMutationResponse { + info: CreateInfo! + techs: [Tech!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createTechs(input: [TechCreateInput!]!): CreateTechsMutationResponse! + deleteTechs(where: TechWhere): DeleteInfo! + updateTechs(update: TechUpdateInput, where: TechWhere): UpdateTechsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + techs(options: TechOptions, where: TechWhere): [Tech!]! + techsAggregate(where: TechWhere): TechAggregateSelection! + techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Tech { + name: String + value: String +} + +type TechAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + value: StringAggregateSelectionNullable! +} + +input TechCreateInput { + name: String + value: String +} + +type TechEdge { + cursor: String! + node: Tech! +} + +input TechOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TechSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TechSort!] +} + +\\"\\"\\" +Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. +\\"\\"\\" +input TechSort { + name: SortDirection + value: SortDirection +} + +input TechUpdateInput { + name: String + value: String +} + +input TechWhere { + AND: [TechWhere!] + NOT: TechWhere + OR: [TechWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +} + +type TechsConnection { + edges: [TechEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateTechsMutationResponse { + info: UpdateInfo! + techs: [Tech!]! +}" +`); }); test("Partial types with same plural in both", async () => { @@ -202,155 +199,152 @@ describe("Plural option", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateTechsMutationResponse { - info: CreateInfo! - techs: [Tech!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createTechs(input: [TechCreateInput!]!): CreateTechsMutationResponse! - deleteTechs(where: TechWhere): DeleteInfo! - updateTechs(update: TechUpdateInput, where: TechWhere): UpdateTechsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - techs(options: TechOptions, where: TechWhere): [Tech!]! - techsAggregate(where: TechWhere): TechAggregateSelection! - techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"\\"\\"\\" - type Tech { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - value: String - } - - type TechAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - value: StringAggregateSelectionNullable! - } - - input TechCreateInput { - name: String - value: String - } - - type TechEdge { - cursor: String! - node: Tech! - } - - input TechOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TechSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TechSort!] - } - - \\"\\"\\" - Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. - \\"\\"\\" - input TechSort { - name: SortDirection - value: SortDirection - } - - input TechUpdateInput { - name: String - value: String - } - - input TechWhere { - AND: [TechWhere!] - NOT: TechWhere - OR: [TechWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - } - - type TechsConnection { - edges: [TechEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateTechsMutationResponse { - info: UpdateInfo! - techs: [Tech!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateTechsMutationResponse { + info: CreateInfo! + techs: [Tech!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createTechs(input: [TechCreateInput!]!): CreateTechsMutationResponse! + deleteTechs(where: TechWhere): DeleteInfo! + updateTechs(update: TechUpdateInput, where: TechWhere): UpdateTechsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + techs(options: TechOptions, where: TechWhere): [Tech!]! + techsAggregate(where: TechWhere): TechAggregateSelection! + techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Tech { + name: String + value: String +} + +type TechAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + value: StringAggregateSelectionNullable! +} + +input TechCreateInput { + name: String + value: String +} + +type TechEdge { + cursor: String! + node: Tech! +} + +input TechOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TechSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TechSort!] +} + +\\"\\"\\" +Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. +\\"\\"\\" +input TechSort { + name: SortDirection + value: SortDirection +} + +input TechUpdateInput { + name: String + value: String +} + +input TechWhere { + AND: [TechWhere!] + NOT: TechWhere + OR: [TechWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +} + +type TechsConnection { + edges: [TechEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateTechsMutationResponse { + info: UpdateInfo! + techs: [Tech!]! +}" +`); }); test("Partial types with different plural", async () => { @@ -367,155 +361,152 @@ describe("Plural option", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateTechnologiesMutationResponse { - info: CreateInfo! - technologies: [Tech!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createTechnologies(input: [TechCreateInput!]!): CreateTechnologiesMutationResponse! - deleteTechnologies(where: TechWhere): DeleteInfo! - updateTechnologies(update: TechUpdateInput, where: TechWhere): UpdateTechnologiesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - technologies(options: TechOptions, where: TechWhere): [Tech!]! - technologiesAggregate(where: TechWhere): TechAggregateSelection! - technologiesConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechnologiesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"\\"\\"\\" - type Tech { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - value: String - } - - type TechAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - value: StringAggregateSelectionNullable! - } - - input TechCreateInput { - name: String - value: String - } - - type TechEdge { - cursor: String! - node: Tech! - } - - input TechOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TechSort objects to sort Technologies by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TechSort!] - } - - \\"\\"\\" - Fields to sort Technologies by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. - \\"\\"\\" - input TechSort { - name: SortDirection - value: SortDirection - } - - input TechUpdateInput { - name: String - value: String - } - - input TechWhere { - AND: [TechWhere!] - NOT: TechWhere - OR: [TechWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - } - - type TechnologiesConnection { - edges: [TechEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateTechnologiesMutationResponse { - info: UpdateInfo! - technologies: [Tech!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateTechnologiesMutationResponse { + info: CreateInfo! + technologies: [Tech!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createTechnologies(input: [TechCreateInput!]!): CreateTechnologiesMutationResponse! + deleteTechnologies(where: TechWhere): DeleteInfo! + updateTechnologies(update: TechUpdateInput, where: TechWhere): UpdateTechnologiesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + technologies(options: TechOptions, where: TechWhere): [Tech!]! + technologiesAggregate(where: TechWhere): TechAggregateSelection! + technologiesConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechnologiesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Tech { + name: String + value: String +} + +type TechAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + value: StringAggregateSelectionNullable! +} + +input TechCreateInput { + name: String + value: String +} + +type TechEdge { + cursor: String! + node: Tech! +} + +input TechOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TechSort objects to sort Technologies by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TechSort!] +} + +\\"\\"\\" +Fields to sort Technologies by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. +\\"\\"\\" +input TechSort { + name: SortDirection + value: SortDirection +} + +input TechUpdateInput { + name: String + value: String +} + +input TechWhere { + AND: [TechWhere!] + NOT: TechWhere + OR: [TechWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +} + +type TechnologiesConnection { + edges: [TechEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateTechnologiesMutationResponse { + info: UpdateInfo! + technologies: [Tech!]! +}" +`); }); test("Collision between Type and plural", async () => { @@ -532,139 +523,137 @@ describe("Plural option", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateTechsMutationResponse { - info: CreateInfo! - techs: [Techs!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createTechs(input: [TechsCreateInput!]!): CreateTechsMutationResponse! - deleteTechs(where: TechsWhere): DeleteInfo! - updateTechs(update: TechsUpdateInput, where: TechsWhere): UpdateTechsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - techs(options: TechsOptions, where: TechsWhere): [Techs!]! - techsAggregate(where: TechsWhere): TechsAggregateSelection! - techsConnection(after: String, first: Int, sort: [TechsSort], where: TechsWhere): TechsConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"\\"\\"\\" - type Techs { - \\"\\"\\"\\"\\"\\" - value: String - } - - type TechsAggregateSelection { - count: Int! - value: StringAggregateSelectionNullable! - } - - type TechsConnection { - edges: [TechsEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input TechsCreateInput { - value: String - } - - type TechsEdge { - cursor: String! - node: Techs! - } - - input TechsOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TechsSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TechsSort!] - } - - \\"\\"\\" - Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechsSort object. - \\"\\"\\" - input TechsSort { - value: SortDirection - } - - input TechsUpdateInput { - value: String - } - - input TechsWhere { - AND: [TechsWhere!] - NOT: TechsWhere - OR: [TechsWhere!] - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateTechsMutationResponse { - info: UpdateInfo! - techs: [Techs!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateTechsMutationResponse { + info: CreateInfo! + techs: [Techs!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createTechs(input: [TechsCreateInput!]!): CreateTechsMutationResponse! + deleteTechs(where: TechsWhere): DeleteInfo! + updateTechs(update: TechsUpdateInput, where: TechsWhere): UpdateTechsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + techs(options: TechsOptions, where: TechsWhere): [Techs!]! + techsAggregate(where: TechsWhere): TechsAggregateSelection! + techsConnection(after: String, first: Int, sort: [TechsSort], where: TechsWhere): TechsConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Techs { + value: String +} + +type TechsAggregateSelection { + count: Int! + value: StringAggregateSelectionNullable! +} + +type TechsConnection { + edges: [TechsEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input TechsCreateInput { + value: String +} + +type TechsEdge { + cursor: String! + node: Techs! +} + +input TechsOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TechsSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TechsSort!] +} + +\\"\\"\\" +Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechsSort object. +\\"\\"\\" +input TechsSort { + value: SortDirection +} + +input TechsUpdateInput { + value: String +} + +input TechsWhere { + AND: [TechsWhere!] + NOT: TechsWhere + OR: [TechsWhere!] + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateTechsMutationResponse { + info: UpdateInfo! + techs: [Techs!]! +}" +`); }); test("Same plural on multiple nodes", async () => { @@ -681,139 +670,137 @@ describe("Plural option", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateTechsMutationResponse { - info: CreateInfo! - techs: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createTechs(input: [UserCreateInput!]!): CreateTechsMutationResponse! - deleteTechs(where: UserWhere): DeleteInfo! - updateTechs(update: UserUpdateInput, where: UserWhere): UpdateTechsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - techs(options: UserOptions, where: UserWhere): [User!]! - techsAggregate(where: UserWhere): UserAggregateSelection! - techsConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): TechsConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type TechsConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateTechsMutationResponse { - info: UpdateInfo! - techs: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - value: String - } - - type UserAggregateSelection { - count: Int! - value: StringAggregateSelectionNullable! - } - - input UserCreateInput { - value: String - } - - type UserEdge { - cursor: String! - node: User! - } - - input UserOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more UserSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [UserSort!] - } - - \\"\\"\\" - Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. - \\"\\"\\" - input UserSort { - value: SortDirection - } - - input UserUpdateInput { - value: String - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateTechsMutationResponse { + info: CreateInfo! + techs: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createTechs(input: [UserCreateInput!]!): CreateTechsMutationResponse! + deleteTechs(where: UserWhere): DeleteInfo! + updateTechs(update: UserUpdateInput, where: UserWhere): UpdateTechsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + techs(options: UserOptions, where: UserWhere): [User!]! + techsAggregate(where: UserWhere): UserAggregateSelection! + techsConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): TechsConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type TechsConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateTechsMutationResponse { + info: UpdateInfo! + techs: [User!]! +} + +type User { + value: String +} + +type UserAggregateSelection { + count: Int! + value: StringAggregateSelectionNullable! +} + +input UserCreateInput { + value: String +} + +type UserEdge { + cursor: String! + node: User! +} + +input UserOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more UserSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [UserSort!] +} + +\\"\\"\\" +Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. +\\"\\"\\" +input UserSort { + value: SortDirection +} + +input UserUpdateInput { + value: String +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +}" +`); }); test("Collision with pluralize", async () => { @@ -830,139 +817,137 @@ describe("Plural option", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - value: String - } - - type UserAggregateSelection { - count: Int! - value: StringAggregateSelectionNullable! - } - - input UserCreateInput { - value: String - } - - type UserEdge { - cursor: String! - node: User! - } - - 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 { - value: SortDirection - } - - input UserUpdateInput { - value: String - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + value: String +} + +type UserAggregateSelection { + count: Int! + value: StringAggregateSelectionNullable! +} + +input UserCreateInput { + value: String +} + +type UserEdge { + cursor: String! + node: User! +} + +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 { + value: SortDirection +} + +input UserUpdateInput { + value: String +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); test("Type collision with pluralize", async () => { @@ -979,138 +964,136 @@ describe("Plural option", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [Users!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createUsers(input: [UsersCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(where: UsersWhere): DeleteInfo! - updateUsers(update: UsersUpdateInput, where: UsersWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - users(options: UsersOptions, where: UsersWhere): [Users!]! - usersAggregate(where: UsersWhere): UsersAggregateSelection! - usersConnection(after: String, first: Int, sort: [UsersSort], where: UsersWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [Users!]! - } - - \\"\\"\\"\\"\\"\\" - type Users { - \\"\\"\\"\\"\\"\\" - value: String - } - - type UsersAggregateSelection { - count: Int! - value: StringAggregateSelectionNullable! - } - - type UsersConnection { - edges: [UsersEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UsersCreateInput { - value: String - } - - type UsersEdge { - cursor: String! - node: Users! - } - - input UsersOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more UsersSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [UsersSort!] - } - - \\"\\"\\" - Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UsersSort object. - \\"\\"\\" - input UsersSort { - value: SortDirection - } - - input UsersUpdateInput { - value: String - } - - input UsersWhere { - AND: [UsersWhere!] - NOT: UsersWhere - OR: [UsersWhere!] - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [Users!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createUsers(input: [UsersCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(where: UsersWhere): DeleteInfo! + updateUsers(update: UsersUpdateInput, where: UsersWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + users(options: UsersOptions, where: UsersWhere): [Users!]! + usersAggregate(where: UsersWhere): UsersAggregateSelection! + usersConnection(after: String, first: Int, sort: [UsersSort], where: UsersWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [Users!]! +} + +type Users { + value: String +} + +type UsersAggregateSelection { + count: Int! + value: StringAggregateSelectionNullable! +} + +type UsersConnection { + edges: [UsersEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UsersCreateInput { + value: String +} + +type UsersEdge { + cursor: String! + node: Users! +} + +input UsersOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more UsersSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [UsersSort!] +} + +\\"\\"\\" +Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UsersSort object. +\\"\\"\\" +input UsersSort { + value: SortDirection +} + +input UsersUpdateInput { + value: String +} + +input UsersWhere { + AND: [UsersWhere!] + NOT: UsersWhere + OR: [UsersWhere!] + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 3158603e4f..1234775adb 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -157,186 +157,181 @@ describe("@populatedBy tests", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - callback1: String! - \\"\\"\\"\\"\\"\\" - callback2: String! - \\"\\"\\"\\"\\"\\" - callback3: String! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - callback1: StringAggregateSelectionNonNullable! - callback2: StringAggregateSelectionNonNullable! - callback3: StringAggregateSelectionNonNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - callback1: SortDirection - callback2: SortDirection - callback3: SortDirection - id: SortDirection - } - - input MovieUpdateInput { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - callback1: String - callback1_CONTAINS: String - callback1_ENDS_WITH: String - callback1_IN: [String!] - callback1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_STARTS_WITH: String - callback2: String - callback2_CONTAINS: String - callback2_ENDS_WITH: String - callback2_IN: [String!] - callback2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_STARTS_WITH: String - callback3: String - callback3_CONTAINS: String - callback3_ENDS_WITH: String - callback3_IN: [String!] - callback3_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_STARTS_WITH: String - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + callback1: String! + callback2: String! + callback3: String! + id: ID +} + +type MovieAggregateSelection { + callback1: StringAggregateSelectionNonNullable! + callback2: StringAggregateSelectionNonNullable! + callback3: StringAggregateSelectionNonNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + callback1: SortDirection + callback2: SortDirection + callback3: SortDirection + id: SortDirection +} + +input MovieUpdateInput { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + callback1: String + callback1_CONTAINS: String + callback1_ENDS_WITH: String + callback1_IN: [String!] + callback1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_STARTS_WITH: String + callback2: String + callback2_CONTAINS: String + callback2_ENDS_WITH: String + callback2_IN: [String!] + callback2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_STARTS_WITH: String + callback3: String + callback3_CONTAINS: String + callback3_ENDS_WITH: String + callback3_IN: [String!] + callback3_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_STARTS_WITH: String + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("PopulatedBy - Int", async () => { @@ -369,182 +364,177 @@ describe("@populatedBy tests", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - callback1: Int! - \\"\\"\\"\\"\\"\\" - callback2: Int! - \\"\\"\\"\\"\\"\\" - callback3: Int! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - callback1: IntAggregateSelectionNonNullable! - callback2: IntAggregateSelectionNonNullable! - callback3: IntAggregateSelectionNonNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - callback1: SortDirection - callback2: SortDirection - callback3: SortDirection - id: SortDirection - } - - input MovieUpdateInput { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - callback1: Int - callback1_GT: Int - callback1_GTE: Int - callback1_IN: [Int!] - callback1_LT: Int - callback1_LTE: Int - callback1_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2: Int - callback2_GT: Int - callback2_GTE: Int - callback2_IN: [Int!] - callback2_LT: Int - callback2_LTE: Int - callback2_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3: Int - callback3_GT: Int - callback3_GTE: Int - callback3_IN: [Int!] - callback3_LT: Int - callback3_LTE: Int - callback3_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie { + callback1: Int! + callback2: Int! + callback3: Int! + id: ID +} + +type MovieAggregateSelection { + callback1: IntAggregateSelectionNonNullable! + callback2: IntAggregateSelectionNonNullable! + callback3: IntAggregateSelectionNonNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + callback1: SortDirection + callback2: SortDirection + callback3: SortDirection + id: SortDirection +} + +input MovieUpdateInput { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + callback1: Int + callback1_GT: Int + callback1_GTE: Int + callback1_IN: [Int!] + callback1_LT: Int + callback1_LTE: Int + callback1_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2: Int + callback2_GT: Int + callback2_GTE: Int + callback2_IN: [Int!] + callback2_LT: Int + callback2_LTE: Int + callback2_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3: Int + callback3_GT: Int + callback3_GTE: Int + callback3_IN: [Int!] + callback3_LT: Int + callback3_LTE: Int + callback3_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); describe("Relationship property tests", () => { @@ -721,578 +711,565 @@ describe("@populatedBy tests", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - id: ID! - } - - type GenreAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - } - - input GenreConnectWhere { - node: GenreWhere! - } - - 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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - genres: [MovieGenresConnectFieldInput!] - } - - input MovieCreateInput { - genres: MovieGenresFieldInput - id: ID - } - - input MovieDeleteInput { - genres: [MovieGenresDeleteFieldInput!] - } - - input MovieDisconnectInput { - genres: [MovieGenresDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieGenreGenresAggregationSelection { - count: Int! - edge: MovieGenreGenresEdgeAggregateSelection - node: MovieGenreGenresNodeAggregateSelection - } - - type MovieGenreGenresEdgeAggregateSelection { - callback1: StringAggregateSelectionNonNullable! - callback2: StringAggregateSelectionNonNullable! - callback3: StringAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - } - - type MovieGenreGenresNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - } - - input MovieGenresAggregateInput { - AND: [MovieGenresAggregateInput!] - NOT: MovieGenresAggregateInput - OR: [MovieGenresAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieGenresEdgeAggregationWhereInput - node: MovieGenresNodeAggregationWhereInput - } - - input MovieGenresConnectFieldInput { - edge: RelPropertiesCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere - } - - type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieGenresConnectionSort { - edge: RelPropertiesSort - node: GenreSort - } - - input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - edge: RelPropertiesWhere - edge_NOT: RelPropertiesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieGenresCreateFieldInput { - edge: RelPropertiesCreateInput! - node: GenreCreateInput! - } - - input MovieGenresDeleteFieldInput { - where: MovieGenresConnectionWhere - } - - input MovieGenresDisconnectFieldInput { - where: MovieGenresConnectionWhere - } - - input MovieGenresEdgeAggregationWhereInput { - AND: [MovieGenresEdgeAggregationWhereInput!] - NOT: MovieGenresEdgeAggregationWhereInput - OR: [MovieGenresEdgeAggregationWhereInput!] - callback1_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_AVERAGE_LENGTH_EQUAL: Float - callback1_AVERAGE_LENGTH_GT: Float - callback1_AVERAGE_LENGTH_GTE: Float - callback1_AVERAGE_LENGTH_LT: Float - callback1_AVERAGE_LENGTH_LTE: Float - callback1_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LONGEST_LENGTH_EQUAL: Int - callback1_LONGEST_LENGTH_GT: Int - callback1_LONGEST_LENGTH_GTE: Int - callback1_LONGEST_LENGTH_LT: Int - callback1_LONGEST_LENGTH_LTE: Int - callback1_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_SHORTEST_LENGTH_EQUAL: Int - callback1_SHORTEST_LENGTH_GT: Int - callback1_SHORTEST_LENGTH_GTE: Int - callback1_SHORTEST_LENGTH_LT: Int - callback1_SHORTEST_LENGTH_LTE: Int - callback1_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_LENGTH_EQUAL: Float - callback2_AVERAGE_LENGTH_GT: Float - callback2_AVERAGE_LENGTH_GTE: Float - callback2_AVERAGE_LENGTH_LT: Float - callback2_AVERAGE_LENGTH_LTE: Float - callback2_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LONGEST_LENGTH_EQUAL: Int - callback2_LONGEST_LENGTH_GT: Int - callback2_LONGEST_LENGTH_GTE: Int - callback2_LONGEST_LENGTH_LT: Int - callback2_LONGEST_LENGTH_LTE: Int - callback2_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_SHORTEST_LENGTH_EQUAL: Int - callback2_SHORTEST_LENGTH_GT: Int - callback2_SHORTEST_LENGTH_GTE: Int - callback2_SHORTEST_LENGTH_LT: Int - callback2_SHORTEST_LENGTH_LTE: Int - callback2_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_LENGTH_EQUAL: Float - callback3_AVERAGE_LENGTH_GT: Float - callback3_AVERAGE_LENGTH_GTE: Float - callback3_AVERAGE_LENGTH_LT: Float - callback3_AVERAGE_LENGTH_LTE: Float - callback3_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LONGEST_LENGTH_EQUAL: Int - callback3_LONGEST_LENGTH_GT: Int - callback3_LONGEST_LENGTH_GTE: Int - callback3_LONGEST_LENGTH_LT: Int - callback3_LONGEST_LENGTH_LTE: Int - callback3_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_SHORTEST_LENGTH_EQUAL: Int - callback3_SHORTEST_LENGTH_GT: Int - callback3_SHORTEST_LENGTH_GTE: Int - callback3_SHORTEST_LENGTH_LT: Int - callback3_SHORTEST_LENGTH_LTE: Int - callback3_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - input MovieGenresFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - } - - input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type MovieGenresRelationship implements RelProperties { - \\"\\"\\"\\"\\"\\" - callback1: String! - \\"\\"\\"\\"\\"\\" - callback2: String! - \\"\\"\\"\\"\\"\\" - callback3: String! - cursor: String! - \\"\\"\\"\\"\\"\\" - id: ID! - node: Genre! - } - - input MovieGenresUpdateConnectionInput { - edge: RelPropertiesUpdateInput - node: GenreUpdateInput - } - - input MovieGenresUpdateFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - delete: [MovieGenresDeleteFieldInput!] - disconnect: [MovieGenresDisconnectFieldInput!] - update: MovieGenresUpdateConnectionInput - where: MovieGenresConnectionWhere - } - - 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!] - } - - input MovieRelationInput { - genres: [MovieGenresCreateFieldInput!] - } - - \\"\\"\\" - 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 { - genres: [MovieGenresUpdateFieldInput!] - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") - genresAggregate: MovieGenresAggregateInput - genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere - genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere - \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere - \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere - genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere - \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - interface RelProperties { - \\"\\"\\"\\"\\"\\" - callback1: String! - \\"\\"\\"\\"\\"\\" - callback2: String! - \\"\\"\\"\\"\\"\\" - callback3: String! - \\"\\"\\"\\"\\"\\" - id: ID! - } - - input RelPropertiesCreateInput { - id: ID! - } - - input RelPropertiesSort { - callback1: SortDirection - callback2: SortDirection - callback3: SortDirection - id: SortDirection - } - - input RelPropertiesUpdateInput { - id: ID - } - - input RelPropertiesWhere { - AND: [RelPropertiesWhere!] - NOT: RelPropertiesWhere - OR: [RelPropertiesWhere!] - callback1: String - callback1_CONTAINS: String - callback1_ENDS_WITH: String - callback1_IN: [String!] - callback1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_STARTS_WITH: String - callback2: String - callback2_CONTAINS: String - callback2_ENDS_WITH: String - callback2_IN: [String!] - callback2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_STARTS_WITH: String - callback3: String - callback3_CONTAINS: String - callback3_ENDS_WITH: String - callback3_IN: [String!] - callback3_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_STARTS_WITH: String - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Genre { + id: ID! +} + +type GenreAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! +} + +input GenreConnectWhere { + node: GenreWhere! +} + +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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection + genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! + id: ID +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + genres: [MovieGenresConnectFieldInput!] +} + +input MovieCreateInput { + genres: MovieGenresFieldInput + id: ID +} + +input MovieDeleteInput { + genres: [MovieGenresDeleteFieldInput!] +} + +input MovieDisconnectInput { + genres: [MovieGenresDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieGenreGenresAggregationSelection { + count: Int! + edge: MovieGenreGenresEdgeAggregateSelection + node: MovieGenreGenresNodeAggregateSelection +} + +type MovieGenreGenresEdgeAggregateSelection { + callback1: StringAggregateSelectionNonNullable! + callback2: StringAggregateSelectionNonNullable! + callback3: StringAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! +} + +type MovieGenreGenresNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! +} + +input MovieGenresAggregateInput { + AND: [MovieGenresAggregateInput!] + NOT: MovieGenresAggregateInput + OR: [MovieGenresAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieGenresEdgeAggregationWhereInput + node: MovieGenresNodeAggregationWhereInput +} + +input MovieGenresConnectFieldInput { + edge: RelPropertiesCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere +} + +type MovieGenresConnection { + edges: [MovieGenresRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieGenresConnectionSort { + edge: RelPropertiesSort + node: GenreSort +} + +input MovieGenresConnectionWhere { + AND: [MovieGenresConnectionWhere!] + NOT: MovieGenresConnectionWhere + OR: [MovieGenresConnectionWhere!] + edge: RelPropertiesWhere + edge_NOT: RelPropertiesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieGenresCreateFieldInput { + edge: RelPropertiesCreateInput! + node: GenreCreateInput! +} + +input MovieGenresDeleteFieldInput { + where: MovieGenresConnectionWhere +} + +input MovieGenresDisconnectFieldInput { + where: MovieGenresConnectionWhere +} + +input MovieGenresEdgeAggregationWhereInput { + AND: [MovieGenresEdgeAggregationWhereInput!] + NOT: MovieGenresEdgeAggregationWhereInput + OR: [MovieGenresEdgeAggregationWhereInput!] + callback1_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_AVERAGE_LENGTH_EQUAL: Float + callback1_AVERAGE_LENGTH_GT: Float + callback1_AVERAGE_LENGTH_GTE: Float + callback1_AVERAGE_LENGTH_LT: Float + callback1_AVERAGE_LENGTH_LTE: Float + callback1_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LONGEST_LENGTH_EQUAL: Int + callback1_LONGEST_LENGTH_GT: Int + callback1_LONGEST_LENGTH_GTE: Int + callback1_LONGEST_LENGTH_LT: Int + callback1_LONGEST_LENGTH_LTE: Int + callback1_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_SHORTEST_LENGTH_EQUAL: Int + callback1_SHORTEST_LENGTH_GT: Int + callback1_SHORTEST_LENGTH_GTE: Int + callback1_SHORTEST_LENGTH_LT: Int + callback1_SHORTEST_LENGTH_LTE: Int + callback1_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_LENGTH_EQUAL: Float + callback2_AVERAGE_LENGTH_GT: Float + callback2_AVERAGE_LENGTH_GTE: Float + callback2_AVERAGE_LENGTH_LT: Float + callback2_AVERAGE_LENGTH_LTE: Float + callback2_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LONGEST_LENGTH_EQUAL: Int + callback2_LONGEST_LENGTH_GT: Int + callback2_LONGEST_LENGTH_GTE: Int + callback2_LONGEST_LENGTH_LT: Int + callback2_LONGEST_LENGTH_LTE: Int + callback2_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_SHORTEST_LENGTH_EQUAL: Int + callback2_SHORTEST_LENGTH_GT: Int + callback2_SHORTEST_LENGTH_GTE: Int + callback2_SHORTEST_LENGTH_LT: Int + callback2_SHORTEST_LENGTH_LTE: Int + callback2_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_LENGTH_EQUAL: Float + callback3_AVERAGE_LENGTH_GT: Float + callback3_AVERAGE_LENGTH_GTE: Float + callback3_AVERAGE_LENGTH_LT: Float + callback3_AVERAGE_LENGTH_LTE: Float + callback3_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LONGEST_LENGTH_EQUAL: Int + callback3_LONGEST_LENGTH_GT: Int + callback3_LONGEST_LENGTH_GTE: Int + callback3_LONGEST_LENGTH_LT: Int + callback3_LONGEST_LENGTH_LTE: Int + callback3_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_SHORTEST_LENGTH_EQUAL: Int + callback3_SHORTEST_LENGTH_GT: Int + callback3_SHORTEST_LENGTH_GTE: Int + callback3_SHORTEST_LENGTH_LT: Int + callback3_SHORTEST_LENGTH_LTE: Int + callback3_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +input MovieGenresFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] +} + +input MovieGenresNodeAggregationWhereInput { + AND: [MovieGenresNodeAggregationWhereInput!] + NOT: MovieGenresNodeAggregationWhereInput + OR: [MovieGenresNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type MovieGenresRelationship implements RelProperties { + callback1: String! + callback2: String! + callback3: String! + cursor: String! + id: ID! + node: Genre! +} + +input MovieGenresUpdateConnectionInput { + edge: RelPropertiesUpdateInput + node: GenreUpdateInput +} + +input MovieGenresUpdateFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + delete: [MovieGenresDeleteFieldInput!] + disconnect: [MovieGenresDisconnectFieldInput!] + update: MovieGenresUpdateConnectionInput + where: MovieGenresConnectionWhere +} + +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!] +} + +input MovieRelationInput { + genres: [MovieGenresCreateFieldInput!] +} + +\\"\\"\\" +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 { + genres: [MovieGenresUpdateFieldInput!] + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") + genresAggregate: MovieGenresAggregateInput + genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_ALL: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_NONE: MovieGenresConnectionWhere + genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SINGLE: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SOME: MovieGenresConnectionWhere + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + genres_ALL: GenreWhere + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + genres_NONE: GenreWhere + genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + genres_SINGLE: GenreWhere + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + genres_SOME: GenreWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +interface RelProperties { + callback1: String! + callback2: String! + callback3: String! + id: ID! +} + +input RelPropertiesCreateInput { + id: ID! +} + +input RelPropertiesSort { + callback1: SortDirection + callback2: SortDirection + callback3: SortDirection + id: SortDirection +} + +input RelPropertiesUpdateInput { + id: ID +} + +input RelPropertiesWhere { + AND: [RelPropertiesWhere!] + NOT: RelPropertiesWhere + OR: [RelPropertiesWhere!] + callback1: String + callback1_CONTAINS: String + callback1_ENDS_WITH: String + callback1_IN: [String!] + callback1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_STARTS_WITH: String + callback2: String + callback2_CONTAINS: String + callback2_ENDS_WITH: String + callback2_IN: [String!] + callback2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_STARTS_WITH: String + callback3: String + callback3_CONTAINS: String + callback3_ENDS_WITH: String + callback3_IN: [String!] + callback3_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_STARTS_WITH: String + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("PopulatedBy - Int", async () => { @@ -1334,544 +1311,531 @@ describe("@populatedBy tests", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - id: ID! - } - - type GenreAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - } - - input GenreConnectWhere { - node: GenreWhere! - } - - 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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - genres: [MovieGenresConnectFieldInput!] - } - - input MovieCreateInput { - genres: MovieGenresFieldInput - id: ID - } - - input MovieDeleteInput { - genres: [MovieGenresDeleteFieldInput!] - } - - input MovieDisconnectInput { - genres: [MovieGenresDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieGenreGenresAggregationSelection { - count: Int! - edge: MovieGenreGenresEdgeAggregateSelection - node: MovieGenreGenresNodeAggregateSelection - } - - type MovieGenreGenresEdgeAggregateSelection { - callback1: IntAggregateSelectionNonNullable! - callback2: IntAggregateSelectionNonNullable! - callback3: IntAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - } - - type MovieGenreGenresNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - } - - input MovieGenresAggregateInput { - AND: [MovieGenresAggregateInput!] - NOT: MovieGenresAggregateInput - OR: [MovieGenresAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieGenresEdgeAggregationWhereInput - node: MovieGenresNodeAggregationWhereInput - } - - input MovieGenresConnectFieldInput { - edge: RelPropertiesCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere - } - - type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieGenresConnectionSort { - edge: RelPropertiesSort - node: GenreSort - } - - input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - edge: RelPropertiesWhere - edge_NOT: RelPropertiesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieGenresCreateFieldInput { - edge: RelPropertiesCreateInput! - node: GenreCreateInput! - } - - input MovieGenresDeleteFieldInput { - where: MovieGenresConnectionWhere - } - - input MovieGenresDisconnectFieldInput { - where: MovieGenresConnectionWhere - } - - input MovieGenresEdgeAggregationWhereInput { - AND: [MovieGenresEdgeAggregationWhereInput!] - NOT: MovieGenresEdgeAggregationWhereInput - OR: [MovieGenresEdgeAggregationWhereInput!] - callback1_AVERAGE_EQUAL: Float - callback1_AVERAGE_GT: Float - callback1_AVERAGE_GTE: Float - callback1_AVERAGE_LT: Float - callback1_AVERAGE_LTE: Float - callback1_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_MAX_EQUAL: Int - callback1_MAX_GT: Int - callback1_MAX_GTE: Int - callback1_MAX_LT: Int - callback1_MAX_LTE: Int - callback1_MIN_EQUAL: Int - callback1_MIN_GT: Int - callback1_MIN_GTE: Int - callback1_MIN_LT: Int - callback1_MIN_LTE: Int - callback1_SUM_EQUAL: Int - callback1_SUM_GT: Int - callback1_SUM_GTE: Int - callback1_SUM_LT: Int - callback1_SUM_LTE: Int - callback2_AVERAGE_EQUAL: Float - callback2_AVERAGE_GT: Float - callback2_AVERAGE_GTE: Float - callback2_AVERAGE_LT: Float - callback2_AVERAGE_LTE: Float - callback2_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_MAX_EQUAL: Int - callback2_MAX_GT: Int - callback2_MAX_GTE: Int - callback2_MAX_LT: Int - callback2_MAX_LTE: Int - callback2_MIN_EQUAL: Int - callback2_MIN_GT: Int - callback2_MIN_GTE: Int - callback2_MIN_LT: Int - callback2_MIN_LTE: Int - callback2_SUM_EQUAL: Int - callback2_SUM_GT: Int - callback2_SUM_GTE: Int - callback2_SUM_LT: Int - callback2_SUM_LTE: Int - callback3_AVERAGE_EQUAL: Float - callback3_AVERAGE_GT: Float - callback3_AVERAGE_GTE: Float - callback3_AVERAGE_LT: Float - callback3_AVERAGE_LTE: Float - callback3_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_MAX_EQUAL: Int - callback3_MAX_GT: Int - callback3_MAX_GTE: Int - callback3_MAX_LT: Int - callback3_MAX_LTE: Int - callback3_MIN_EQUAL: Int - callback3_MIN_GT: Int - callback3_MIN_GTE: Int - callback3_MIN_LT: Int - callback3_MIN_LTE: Int - callback3_SUM_EQUAL: Int - callback3_SUM_GT: Int - callback3_SUM_GTE: Int - callback3_SUM_LT: Int - callback3_SUM_LTE: Int - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - input MovieGenresFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - } - - input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type MovieGenresRelationship implements RelProperties { - \\"\\"\\"\\"\\"\\" - callback1: Int! - \\"\\"\\"\\"\\"\\" - callback2: Int! - \\"\\"\\"\\"\\"\\" - callback3: Int! - cursor: String! - \\"\\"\\"\\"\\"\\" - id: ID! - node: Genre! - } - - input MovieGenresUpdateConnectionInput { - edge: RelPropertiesUpdateInput - node: GenreUpdateInput - } - - input MovieGenresUpdateFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - delete: [MovieGenresDeleteFieldInput!] - disconnect: [MovieGenresDisconnectFieldInput!] - update: MovieGenresUpdateConnectionInput - where: MovieGenresConnectionWhere - } - - 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!] - } - - input MovieRelationInput { - genres: [MovieGenresCreateFieldInput!] - } - - \\"\\"\\" - 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 { - genres: [MovieGenresUpdateFieldInput!] - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") - genresAggregate: MovieGenresAggregateInput - genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere - genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere - \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere - \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere - genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere - \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - interface RelProperties { - \\"\\"\\"\\"\\"\\" - callback1: Int! - \\"\\"\\"\\"\\"\\" - callback2: Int! - \\"\\"\\"\\"\\"\\" - callback3: Int! - \\"\\"\\"\\"\\"\\" - id: ID! - } - - input RelPropertiesCreateInput { - id: ID! - } - - input RelPropertiesSort { - callback1: SortDirection - callback2: SortDirection - callback3: SortDirection - id: SortDirection - } - - input RelPropertiesUpdateInput { - id: ID - } - - input RelPropertiesWhere { - AND: [RelPropertiesWhere!] - NOT: RelPropertiesWhere - OR: [RelPropertiesWhere!] - callback1: Int - callback1_GT: Int - callback1_GTE: Int - callback1_IN: [Int!] - callback1_LT: Int - callback1_LTE: Int - callback1_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2: Int - callback2_GT: Int - callback2_GTE: Int - callback2_IN: [Int!] - callback2_LT: Int - callback2_LTE: Int - callback2_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3: Int - callback3_GT: Int - callback3_GTE: Int - callback3_IN: [Int!] - callback3_LT: Int - callback3_LTE: Int - callback3_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Genre { + id: ID! +} + +type GenreAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! +} + +input GenreConnectWhere { + node: GenreWhere! +} + +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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie { + genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection + genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! + id: ID +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + genres: [MovieGenresConnectFieldInput!] +} + +input MovieCreateInput { + genres: MovieGenresFieldInput + id: ID +} + +input MovieDeleteInput { + genres: [MovieGenresDeleteFieldInput!] +} + +input MovieDisconnectInput { + genres: [MovieGenresDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieGenreGenresAggregationSelection { + count: Int! + edge: MovieGenreGenresEdgeAggregateSelection + node: MovieGenreGenresNodeAggregateSelection +} + +type MovieGenreGenresEdgeAggregateSelection { + callback1: IntAggregateSelectionNonNullable! + callback2: IntAggregateSelectionNonNullable! + callback3: IntAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! +} + +type MovieGenreGenresNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! +} + +input MovieGenresAggregateInput { + AND: [MovieGenresAggregateInput!] + NOT: MovieGenresAggregateInput + OR: [MovieGenresAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieGenresEdgeAggregationWhereInput + node: MovieGenresNodeAggregationWhereInput +} + +input MovieGenresConnectFieldInput { + edge: RelPropertiesCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere +} + +type MovieGenresConnection { + edges: [MovieGenresRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieGenresConnectionSort { + edge: RelPropertiesSort + node: GenreSort +} + +input MovieGenresConnectionWhere { + AND: [MovieGenresConnectionWhere!] + NOT: MovieGenresConnectionWhere + OR: [MovieGenresConnectionWhere!] + edge: RelPropertiesWhere + edge_NOT: RelPropertiesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieGenresCreateFieldInput { + edge: RelPropertiesCreateInput! + node: GenreCreateInput! +} + +input MovieGenresDeleteFieldInput { + where: MovieGenresConnectionWhere +} + +input MovieGenresDisconnectFieldInput { + where: MovieGenresConnectionWhere +} + +input MovieGenresEdgeAggregationWhereInput { + AND: [MovieGenresEdgeAggregationWhereInput!] + NOT: MovieGenresEdgeAggregationWhereInput + OR: [MovieGenresEdgeAggregationWhereInput!] + callback1_AVERAGE_EQUAL: Float + callback1_AVERAGE_GT: Float + callback1_AVERAGE_GTE: Float + callback1_AVERAGE_LT: Float + callback1_AVERAGE_LTE: Float + callback1_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_MAX_EQUAL: Int + callback1_MAX_GT: Int + callback1_MAX_GTE: Int + callback1_MAX_LT: Int + callback1_MAX_LTE: Int + callback1_MIN_EQUAL: Int + callback1_MIN_GT: Int + callback1_MIN_GTE: Int + callback1_MIN_LT: Int + callback1_MIN_LTE: Int + callback1_SUM_EQUAL: Int + callback1_SUM_GT: Int + callback1_SUM_GTE: Int + callback1_SUM_LT: Int + callback1_SUM_LTE: Int + callback2_AVERAGE_EQUAL: Float + callback2_AVERAGE_GT: Float + callback2_AVERAGE_GTE: Float + callback2_AVERAGE_LT: Float + callback2_AVERAGE_LTE: Float + callback2_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_MAX_EQUAL: Int + callback2_MAX_GT: Int + callback2_MAX_GTE: Int + callback2_MAX_LT: Int + callback2_MAX_LTE: Int + callback2_MIN_EQUAL: Int + callback2_MIN_GT: Int + callback2_MIN_GTE: Int + callback2_MIN_LT: Int + callback2_MIN_LTE: Int + callback2_SUM_EQUAL: Int + callback2_SUM_GT: Int + callback2_SUM_GTE: Int + callback2_SUM_LT: Int + callback2_SUM_LTE: Int + callback3_AVERAGE_EQUAL: Float + callback3_AVERAGE_GT: Float + callback3_AVERAGE_GTE: Float + callback3_AVERAGE_LT: Float + callback3_AVERAGE_LTE: Float + callback3_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_MAX_EQUAL: Int + callback3_MAX_GT: Int + callback3_MAX_GTE: Int + callback3_MAX_LT: Int + callback3_MAX_LTE: Int + callback3_MIN_EQUAL: Int + callback3_MIN_GT: Int + callback3_MIN_GTE: Int + callback3_MIN_LT: Int + callback3_MIN_LTE: Int + callback3_SUM_EQUAL: Int + callback3_SUM_GT: Int + callback3_SUM_GTE: Int + callback3_SUM_LT: Int + callback3_SUM_LTE: Int + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +input MovieGenresFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] +} + +input MovieGenresNodeAggregationWhereInput { + AND: [MovieGenresNodeAggregationWhereInput!] + NOT: MovieGenresNodeAggregationWhereInput + OR: [MovieGenresNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type MovieGenresRelationship implements RelProperties { + callback1: Int! + callback2: Int! + callback3: Int! + cursor: String! + id: ID! + node: Genre! +} + +input MovieGenresUpdateConnectionInput { + edge: RelPropertiesUpdateInput + node: GenreUpdateInput +} + +input MovieGenresUpdateFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + delete: [MovieGenresDeleteFieldInput!] + disconnect: [MovieGenresDisconnectFieldInput!] + update: MovieGenresUpdateConnectionInput + where: MovieGenresConnectionWhere +} + +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!] +} + +input MovieRelationInput { + genres: [MovieGenresCreateFieldInput!] +} + +\\"\\"\\" +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 { + genres: [MovieGenresUpdateFieldInput!] + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") + genresAggregate: MovieGenresAggregateInput + genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_ALL: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_NONE: MovieGenresConnectionWhere + genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SINGLE: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SOME: MovieGenresConnectionWhere + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + genres_ALL: GenreWhere + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + genres_NONE: GenreWhere + genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + genres_SINGLE: GenreWhere + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + genres_SOME: GenreWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +interface RelProperties { + callback1: Int! + callback2: Int! + callback3: Int! + id: ID! +} + +input RelPropertiesCreateInput { + id: ID! +} + +input RelPropertiesSort { + callback1: SortDirection + callback2: SortDirection + callback3: SortDirection + id: SortDirection +} + +input RelPropertiesUpdateInput { + id: ID +} + +input RelPropertiesWhere { + AND: [RelPropertiesWhere!] + NOT: RelPropertiesWhere + OR: [RelPropertiesWhere!] + callback1: Int + callback1_GT: Int + callback1_GTE: Int + callback1_IN: [Int!] + callback1_LT: Int + callback1_LTE: Int + callback1_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2: Int + callback2_GT: Int + callback2_GTE: Int + callback2_IN: [Int!] + callback2_LT: Int + callback2_LTE: Int + callback2_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3: Int + callback3_GT: Int + callback3_GTE: Int + callback3_IN: [Int!] + callback3_LT: Int + callback3_LTE: Int + callback3_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); }); diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index 330c5ed17a..b7c350802c 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -40,144 +40,140 @@ describe("@private directive", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User implements UserInterface { - \\"\\"\\"\\"\\"\\" - id: ID - } - - type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input UserCreateInput { - id: ID - } - - type UserEdge { - cursor: String! - node: User! - } - - \\"\\"\\"\\"\\"\\" - interface UserInterface { - \\"\\"\\"\\"\\"\\" - id: ID - } - - 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 { - id: SortDirection - } - - input UserUpdateInput { - id: ID - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User implements UserInterface { + id: ID +} + +type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input UserCreateInput { + id: ID +} + +type UserEdge { + cursor: String! + node: User! +} + +interface UserInterface { + id: ID +} + +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 { + id: SortDirection +} + +input UserUpdateInput { + id: ID +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index 657635a632..df58d7a760 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -222,441 +222,435 @@ describe("@relationship directive, aggregate argument", () => { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - password: String! - username: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - password: SortDirection - username: SortDirection - } - - input ActorUpdateInput { - password: String - username: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorUpdateInput { + password: String + username: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("argument set as true", async () => { @@ -676,452 +670,446 @@ describe("@relationship directive, aggregate argument", () => { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - password: String! - username: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - password: SortDirection - username: SortDirection - } - - input ActorUpdateInput { - password: String - username: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorUpdateInput { + password: String + username: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); describe("on INTERFACE", () => { @@ -1147,1369 +1135,1345 @@ describe("@relationship directive, aggregate argument", () => { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" +"schema { + query: Query + mutation: Mutation +} + +type Actor implements Person { + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorCreateInput { + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorUpdateInput { + password: String + username: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsConnectFieldInput { + where: PersonConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + password: String! + username: String! +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + Actor: ActorCreateInput +} + +input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput +} + +input PersonImplementationsWhere { + Actor: ActorWhere +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + password: SortDirection + username: SortDirection +} + +input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + password: String + username: String +} + +input PersonWhere { + _on: PersonImplementationsWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); + test("aggregate argument set as true, (no-op as abstract does not support aggregation)", async () => { + const typeDefs = gql` type Actor implements Person { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! + username: String! + password: String! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! + interface Person { + username: String! + password: String! } - input ActorCreateInput { - password: String! - username: String! + type Movie { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) } + `; - type ActorEdge { - cursor: String! - node: Actor! - } + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor implements Person { + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorCreateInput { + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorUpdateInput { + password: String + username: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsConnectFieldInput { + where: PersonConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + password: String! + username: String! +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + Actor: ActorCreateInput +} + +input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput +} + +input PersonImplementationsWhere { + Actor: ActorWhere +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + password: SortDirection + username: SortDirection +} + +input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + password: String + username: String +} + +input PersonWhere { + _on: PersonImplementationsWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); + }); - 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!] + describe("on UNION", () => { + test("aggregate argument set as false, (no-op as abstract does not support aggregation)", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! } - \\"\\"\\" - 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 { - password: SortDirection - username: SortDirection + type Person { + name: String! } - input ActorUpdateInput { - password: String - username: String - } + union CastMember = Actor | Person - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String + type Movie { + title: String + actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: false) } + `; - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorUpdateInput { + password: String + username: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +union CastMember = Actor | Person + +input CastMemberWhere { + Actor: ActorWhere + Person: PersonWhere +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsActorConnectFieldInput { + where: ActorConnectWhere +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsActorDeleteFieldInput { + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorDisconnectFieldInput { + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] +} + +input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Person: [MovieActorsPersonConnectFieldInput!] +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Person: MovieActorsPersonConnectionWhere +} + +input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Person: [MovieActorsPersonCreateFieldInput!] +} + +input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Person: MovieActorsPersonFieldInput +} + +input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Person: [MovieActorsPersonDeleteFieldInput!] +} + +input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Person: [MovieActorsPersonDisconnectFieldInput!] +} + +input MovieActorsPersonConnectFieldInput { + where: PersonConnectWhere +} + +input MovieActorsPersonConnectionWhere { + AND: [MovieActorsPersonConnectionWhere!] + NOT: MovieActorsPersonConnectionWhere + OR: [MovieActorsPersonConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsPersonDeleteFieldInput { + where: MovieActorsPersonConnectionWhere +} + +input MovieActorsPersonDisconnectFieldInput { + where: MovieActorsPersonConnectionWhere +} + +input MovieActorsPersonFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] +} + +input MovieActorsPersonUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsPersonUpdateFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + delete: [MovieActorsPersonDeleteFieldInput!] + disconnect: [MovieActorsPersonDisconnectFieldInput!] + update: MovieActorsPersonUpdateConnectionInput + where: MovieActorsPersonConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: CastMember! +} + +input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Person: [MovieActorsPersonUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + title: String +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput +} + +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!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +\\"\\"\\" +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: MovieActorsUpdateInput + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String! +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + name: String! +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); + test("aggregate argument set as true, (no-op as abstract does not support aggregation)", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! } - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! + type Person { + name: String! } - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } + union CastMember = Actor | Person - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsConnectFieldInput { - where: PersonConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - Actor: ActorCreateInput - } - - input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput - } - - input PersonImplementationsWhere { - Actor: ActorWhere - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - password: SortDirection - username: SortDirection - } - - input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - password: String - username: String - } - - input PersonWhere { - _on: PersonImplementationsWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - test("aggregate argument set as true, (no-op as abstract does not support aggregation)", async () => { - const typeDefs = gql` - type Actor implements Person { - username: String! - password: String! - } - - interface Person { - username: String! - password: String! - } - - type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor implements Person { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorCreateInput { - password: String! - username: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - password: SortDirection - username: SortDirection - } - - input ActorUpdateInput { - password: String - username: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsConnectFieldInput { - where: PersonConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - Actor: ActorCreateInput - } - - input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput - } - - input PersonImplementationsWhere { - Actor: ActorWhere - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - password: SortDirection - username: SortDirection - } - - input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - password: String - username: String - } - - input PersonWhere { - _on: PersonImplementationsWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - }); - - describe("on UNION", () => { - test("aggregate argument set as false, (no-op as abstract does not support aggregation)", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - } - - type Person { - name: String! - } - - union CastMember = Actor | Person - - type Movie { - title: String - actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: false) - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - password: String! - username: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - password: SortDirection - username: SortDirection - } - - input ActorUpdateInput { - password: String - username: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - union CastMember = Actor | Person - - input CastMemberWhere { - Actor: ActorWhere - Person: PersonWhere - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsActorConnectFieldInput { - where: ActorConnectWhere - } - - input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsActorDeleteFieldInput { - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorDisconnectFieldInput { - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - } - - input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Person: [MovieActorsPersonConnectFieldInput!] - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Person: MovieActorsPersonConnectionWhere - } - - input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Person: [MovieActorsPersonCreateFieldInput!] - } - - input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Person: MovieActorsPersonFieldInput - } - - input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Person: [MovieActorsPersonDeleteFieldInput!] - } - - input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Person: [MovieActorsPersonDisconnectFieldInput!] - } - - input MovieActorsPersonConnectFieldInput { - where: PersonConnectWhere - } - - input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsPersonDeleteFieldInput { - where: MovieActorsPersonConnectionWhere - } - - input MovieActorsPersonDisconnectFieldInput { - where: MovieActorsPersonConnectionWhere - } - - input MovieActorsPersonFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - } - - input MovieActorsPersonUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsPersonUpdateFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - delete: [MovieActorsPersonDeleteFieldInput!] - disconnect: [MovieActorsPersonDisconnectFieldInput!] - update: MovieActorsPersonUpdateConnectionInput - where: MovieActorsPersonConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: CastMember! - } - - input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Person: [MovieActorsPersonUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: MovieActorsConnectInput - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - title: String - } - - input MovieDeleteInput { - actors: MovieActorsDeleteInput - } - - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - } - - 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!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - \\"\\"\\" - 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: MovieActorsUpdateInput - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String! - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - name: String! - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - test("aggregate argument set as true, (no-op as abstract does not support aggregation)", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - } - - type Person { - name: String! - } - - union CastMember = Actor | Person - - type Movie { - title: String - actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) + type Movie { + title: String + actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) } `; @@ -2517,506 +2481,498 @@ describe("@relationship directive, aggregate argument", () => { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - password: String! - username: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - password: SortDirection - username: SortDirection - } - - input ActorUpdateInput { - password: String - username: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - union CastMember = Actor | Person - - input CastMemberWhere { - Actor: ActorWhere - Person: PersonWhere - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieActorsActorConnectFieldInput { - where: ActorConnectWhere - } - - input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsActorDeleteFieldInput { - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorDisconnectFieldInput { - where: MovieActorsActorConnectionWhere - } - - input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - } - - input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere - } - - input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Person: [MovieActorsPersonConnectFieldInput!] - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Person: MovieActorsPersonConnectionWhere - } - - input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Person: [MovieActorsPersonCreateFieldInput!] - } - - input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Person: MovieActorsPersonFieldInput - } - - input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Person: [MovieActorsPersonDeleteFieldInput!] - } - - input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Person: [MovieActorsPersonDisconnectFieldInput!] - } - - input MovieActorsPersonConnectFieldInput { - where: PersonConnectWhere - } - - input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsPersonDeleteFieldInput { - where: MovieActorsPersonConnectionWhere - } - - input MovieActorsPersonDisconnectFieldInput { - where: MovieActorsPersonConnectionWhere - } - - input MovieActorsPersonFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - } - - input MovieActorsPersonUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsPersonUpdateFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - delete: [MovieActorsPersonDeleteFieldInput!] - disconnect: [MovieActorsPersonDisconnectFieldInput!] - update: MovieActorsPersonUpdateConnectionInput - where: MovieActorsPersonConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: CastMember! - } - - input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Person: [MovieActorsPersonUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: MovieActorsConnectInput - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - title: String - } - - input MovieDeleteInput { - actors: MovieActorsDeleteInput - } - - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - } - - 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!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - \\"\\"\\" - 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: MovieActorsUpdateInput - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String! - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - name: String! - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorUpdateInput { + password: String + username: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +union CastMember = Actor | Person + +input CastMemberWhere { + Actor: ActorWhere + Person: PersonWhere +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +input MovieActorsActorConnectFieldInput { + where: ActorConnectWhere +} + +input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsActorDeleteFieldInput { + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorDisconnectFieldInput { + where: MovieActorsActorConnectionWhere +} + +input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] +} + +input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere +} + +input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Person: [MovieActorsPersonConnectFieldInput!] +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Person: MovieActorsPersonConnectionWhere +} + +input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Person: [MovieActorsPersonCreateFieldInput!] +} + +input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Person: MovieActorsPersonFieldInput +} + +input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Person: [MovieActorsPersonDeleteFieldInput!] +} + +input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Person: [MovieActorsPersonDisconnectFieldInput!] +} + +input MovieActorsPersonConnectFieldInput { + where: PersonConnectWhere +} + +input MovieActorsPersonConnectionWhere { + AND: [MovieActorsPersonConnectionWhere!] + NOT: MovieActorsPersonConnectionWhere + OR: [MovieActorsPersonConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsPersonDeleteFieldInput { + where: MovieActorsPersonConnectionWhere +} + +input MovieActorsPersonDisconnectFieldInput { + where: MovieActorsPersonConnectionWhere +} + +input MovieActorsPersonFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] +} + +input MovieActorsPersonUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsPersonUpdateFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + delete: [MovieActorsPersonDeleteFieldInput!] + disconnect: [MovieActorsPersonDisconnectFieldInput!] + update: MovieActorsPersonUpdateConnectionInput + where: MovieActorsPersonConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: CastMember! +} + +input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Person: [MovieActorsPersonUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + title: String +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput +} + +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!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +\\"\\"\\" +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: MovieActorsUpdateInput + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String! +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + name: String! +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); }); }); }); 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 4c8c47c436..0eacc601fa 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -45,343 +45,3438 @@ describe("Relationship nested operations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +\\"\\"\\" +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - type IDAggregateSelectionNullable { - longest: ID - shortest: ID + test("Single relationship with nested operation CREATE specified", async () => { + const typeDefs = gql` + type Person { + name: String } - \\"\\"\\"\\"\\"\\" type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - type MovieEdge { - cursor: String! - node: Movie! + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - 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!] - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsFieldInput { + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + create: [MovieActorsCreateFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection + test("Single relationship with nested operation CONNECT specified", async () => { + const typeDefs = gql` + type Person { + name: String } - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - \\"\\"\\" - 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 - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PersonConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - input MovieUpdateInput { - id: ID + test("Single relationship with nested operation UPDATE specified", async () => { + const typeDefs = gql` + type Person { + name: String } - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + test("Single relationship with nested operation DELETE specified", async () => { + const typeDefs = gql` + type Person { + name: String } - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + delete: [MovieActorsDeleteFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - \\"\\"\\"\\"\\"\\" + test("Single relationship with nested operation DISCONNECT specified", async () => { + const typeDefs = gql` type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonCreateInput { - name: String + name: String } - type PersonEdge { - cursor: String! - node: Person! + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + disconnect: [MovieActorsDisconnectFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection + test("Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field", async () => { + const typeDefs = gql` + type Person { + name: String } - input PersonUpdateInput { - name: String + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +\\"\\"\\" +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + test("Single relationship to type with unique field with nested operation CONNECT_OR_CREATE specified", async () => { + const typeDefs = gql` + type Person { + id: ID! @id @unique + name: String } - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type StringAggregateSelectionNullable { - longest: String - shortest: String - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectOrCreateFieldInput { + onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! + where: PersonConnectOrCreateWhere! +} + +input MovieActorsConnectOrCreateFieldInputOnCreate { + node: PersonOnCreateInput! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsFieldInput { + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectOrCreateInput { + actors: [MovieActorsConnectOrCreateFieldInput!] +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(connectOrCreate: MovieConnectOrCreateInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + id: ID! + name: String +} + +type PersonAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! +} + +input PersonConnectOrCreateWhere { + node: PersonUniqueWhere! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOnCreateInput { + name: String +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + id: SortDirection + name: SortDirection +} + +input PersonUniqueWhere { + id: ID +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! + test("Two relationships with nested operations specified on one", async () => { + const typeDefs = gql` + type Person { + name: String } - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection + producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PersonConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + producers: [MovieProducersDisconnectFieldInput!] +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +type MoviePersonProducersAggregationSelection { + count: Int! + node: MoviePersonProducersNodeAggregateSelection +} + +type MoviePersonProducersNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieProducersAggregateInput { + AND: [MovieProducersAggregateInput!] + NOT: MovieProducersAggregateInput + OR: [MovieProducersAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieProducersNodeAggregationWhereInput +} + +type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieProducersConnectionSort { + node: PersonSort +} + +input MovieProducersConnectionWhere { + AND: [MovieProducersConnectionWhere!] + NOT: MovieProducersConnectionWhere + OR: [MovieProducersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieProducersDisconnectFieldInput { + where: MovieProducersConnectionWhere +} + +input MovieProducersNodeAggregationWhereInput { + AND: [MovieProducersNodeAggregationWhereInput!] + NOT: MovieProducersNodeAggregationWhereInput + OR: [MovieProducersNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieProducersRelationship { + cursor: String! + node: Person! +} + +input MovieProducersUpdateFieldInput { + disconnect: [MovieProducersDisconnectFieldInput!] + where: MovieProducersConnectionWhere +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID + producers: [MovieProducersUpdateFieldInput!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producers: PersonWhere @deprecated(reason: \\"Use \`producers_SOME\` instead.\\") + producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + producers_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + producers_NONE: PersonWhere + producers_NOT: PersonWhere @deprecated(reason: \\"Use \`producers_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + producers_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + producers_SOME: PersonWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); }); - test("Single relationship with nested operation CREATE specified", async () => { + test("Two relationships with nested operations specified on both", async () => { const typeDefs = gql` type Person { name: String @@ -390,373 +3485,1312 @@ describe("Relationship nested operations", () => { type Movie { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection + producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsFieldInput { + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + create: [MovieActorsCreateFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +input MovieDisconnectInput { + producers: [MovieProducersDisconnectFieldInput!] +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +type MoviePersonProducersAggregationSelection { + count: Int! + node: MoviePersonProducersNodeAggregateSelection +} + +type MoviePersonProducersNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieProducersAggregateInput { + AND: [MovieProducersAggregateInput!] + NOT: MovieProducersAggregateInput + OR: [MovieProducersAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieProducersNodeAggregationWhereInput +} + +type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieProducersConnectionSort { + node: PersonSort +} + +input MovieProducersConnectionWhere { + AND: [MovieProducersConnectionWhere!] + NOT: MovieProducersConnectionWhere + OR: [MovieProducersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieProducersDisconnectFieldInput { + where: MovieProducersConnectionWhere +} + +input MovieProducersNodeAggregationWhereInput { + AND: [MovieProducersNodeAggregationWhereInput!] + NOT: MovieProducersNodeAggregationWhereInput + OR: [MovieProducersNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieProducersRelationship { + cursor: String! + node: Person! +} + +input MovieProducersUpdateFieldInput { + disconnect: [MovieProducersDisconnectFieldInput!] + where: MovieProducersConnectionWhere +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID + producers: [MovieProducersUpdateFieldInput!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producers: PersonWhere @deprecated(reason: \\"Use \`producers_SOME\` instead.\\") + producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + producers_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + producers_NONE: PersonWhere + producers_NOT: PersonWhere @deprecated(reason: \\"Use \`producers_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + producers_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + producers_SOME: PersonWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); + }); - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! + describe("Related to a union type", () => { + test("Should not generate UpdateFieldInput input with no nested operations", async () => { + const typeDefs = gql` + type PersonOne { + name: String } - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! + type PersonTwo { + nameTwo: String } - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } + union Person = PersonOne | PersonTwo - \\"\\"\\"\\"\\"\\" type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsFieldInput { - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - create: [MovieActorsCreateFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const schema = await neoSchema.getSchema(); - input PersonUpdateInput { - name: String - } + const updateFieldInput = schema.getType("MovieActorsUpdateFieldInput") as GraphQLNamedInputType; + expect(updateFieldInput).toBeUndefined(); - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC + test("Single relationship with nested operation CREATE specified", async () => { + const typeDefs = gql` + type PersonOne { + name: String } - type StringAggregateSelectionNullable { - longest: String - shortest: String + type PersonTwo { + nameTwo: String } - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } + union Person = PersonOne | PersonTwo - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsCreateFieldInput { + PersonOne: [MovieActorsPersonOneCreateFieldInput!] + PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] +} + +input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonOneCreateFieldInput { + node: PersonOneCreateInput! +} + +input MovieActorsPersonOneFieldInput { + create: [MovieActorsPersonOneCreateFieldInput!] +} + +input MovieActorsPersonOneUpdateFieldInput { + create: [MovieActorsPersonOneCreateFieldInput!] + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoCreateFieldInput { + node: PersonTwoCreateInput! +} + +input MovieActorsPersonTwoFieldInput { + create: [MovieActorsPersonTwoCreateFieldInput!] +} + +input MovieActorsPersonTwoUpdateFieldInput { + create: [MovieActorsPersonTwoCreateFieldInput!] + where: MovieActorsPersonTwoConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID +} + +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!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +\\"\\"\\" +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: MovieActorsUpdateInput + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); }); test("Single relationship with nested operation CONNECT specified", async () => { const typeDefs = gql` - type Person { + type PersonOne { name: String } + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + type Movie { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) @@ -766,374 +4800,427 @@ describe("Relationship nested operations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsConnectInput { + PersonOne: [MovieActorsPersonOneConnectFieldInput!] + PersonTwo: [MovieActorsPersonTwoConnectFieldInput!] +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput +} + +input MovieActorsPersonOneConnectFieldInput { + where: PersonOneConnectWhere +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonOneFieldInput { + connect: [MovieActorsPersonOneConnectFieldInput!] +} + +input MovieActorsPersonOneUpdateFieldInput { + connect: [MovieActorsPersonOneConnectFieldInput!] + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonTwoConnectFieldInput { + where: PersonTwoConnectWhere +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoFieldInput { + connect: [MovieActorsPersonTwoConnectFieldInput!] +} + +input MovieActorsPersonTwoUpdateFieldInput { + connect: [MovieActorsPersonTwoConnectFieldInput!] + where: MovieActorsPersonTwoConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID +} + +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: MovieActorsUpdateInput + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneConnectWhere { + node: PersonOneWhere! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoConnectWhere { + node: PersonTwoWhere! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! + test("Single relationship with nested operation UPDATE specified", async () => { + const typeDefs = gql` + type PersonOne { + name: String } - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PersonConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! + type PersonTwo { + nameTwo: String } - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - - test("Single relationship with nested operation UPDATE specified", async () => { - const typeDefs = gql` - type Person { - name: String - } + union Person = PersonOne | PersonTwo type Movie { id: ID @@ -1144,11009 +5231,6721 @@ describe("Relationship nested operations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonOneUpdateConnectionInput { + node: PersonOneUpdateInput +} + +input MovieActorsPersonOneUpdateFieldInput { + update: MovieActorsPersonOneUpdateConnectionInput + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoUpdateConnectionInput { + node: PersonTwoUpdateInput +} + +input MovieActorsPersonTwoUpdateFieldInput { + update: MovieActorsPersonTwoUpdateConnectionInput + where: MovieActorsPersonTwoConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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: MovieActorsUpdateInput + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); }); test("Single relationship with nested operation DELETE specified", async () => { const typeDefs = gql` - type Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - delete: [MovieActorsDeleteFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - - test("Single relationship with nested operation DISCONNECT specified", async () => { - const typeDefs = gql` - type Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - disconnect: [MovieActorsDisconnectFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - - test("Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field", async () => { - const typeDefs = gql` - type Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - \\"\\"\\" - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - - test("Single relationship to type with unique field with nested operation CONNECT_OR_CREATE specified", async () => { - const typeDefs = gql` - type Person { - id: ID! @id @unique - name: String - } - - type Movie { - id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectOrCreateFieldInput { - onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! - where: PersonConnectOrCreateWhere! - } - - input MovieActorsConnectOrCreateFieldInputOnCreate { - node: PersonOnCreateInput! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsFieldInput { - connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectOrCreateInput { - actors: [MovieActorsConnectOrCreateFieldInput!] - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(connectOrCreate: MovieConnectOrCreateInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - } - - input PersonConnectOrCreateWhere { - node: PersonUniqueWhere! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOnCreateInput { - name: String - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - id: SortDirection - name: SortDirection - } - - input PersonUniqueWhere { - id: ID - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - - test("Two relationships with nested operations specified on one", async () => { - const typeDefs = gql` - type Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PersonConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - producers: [MovieProducersDisconnectFieldInput!] - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - type MoviePersonProducersAggregationSelection { - count: Int! - node: MoviePersonProducersNodeAggregateSelection - } - - type MoviePersonProducersNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieProducersAggregateInput { - AND: [MovieProducersAggregateInput!] - NOT: MovieProducersAggregateInput - OR: [MovieProducersAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieProducersNodeAggregationWhereInput - } - - type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieProducersConnectionSort { - node: PersonSort - } - - input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieProducersDisconnectFieldInput { - where: MovieProducersConnectionWhere - } - - input MovieProducersNodeAggregationWhereInput { - AND: [MovieProducersNodeAggregationWhereInput!] - NOT: MovieProducersNodeAggregationWhereInput - OR: [MovieProducersNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieProducersRelationship { - cursor: String! - node: Person! - } - - input MovieProducersUpdateFieldInput { - disconnect: [MovieProducersDisconnectFieldInput!] - where: MovieProducersConnectionWhere - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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: ID - producers: [MovieProducersUpdateFieldInput!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producers: PersonWhere @deprecated(reason: \\"Use \`producers_SOME\` instead.\\") - producersAggregate: MovieProducersAggregateInput - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere - \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere - producers_NOT: PersonWhere @deprecated(reason: \\"Use \`producers_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - - test("Two relationships with nested operations specified on both", async () => { - const typeDefs = gql` - type Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsFieldInput { - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - create: [MovieActorsCreateFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - input MovieDisconnectInput { - producers: [MovieProducersDisconnectFieldInput!] - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - type MoviePersonProducersAggregationSelection { - count: Int! - node: MoviePersonProducersNodeAggregateSelection - } - - type MoviePersonProducersNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieProducersAggregateInput { - AND: [MovieProducersAggregateInput!] - NOT: MovieProducersAggregateInput - OR: [MovieProducersAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieProducersNodeAggregationWhereInput - } - - type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieProducersConnectionSort { - node: PersonSort - } - - input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieProducersDisconnectFieldInput { - where: MovieProducersConnectionWhere - } - - input MovieProducersNodeAggregationWhereInput { - AND: [MovieProducersNodeAggregationWhereInput!] - NOT: MovieProducersNodeAggregationWhereInput - OR: [MovieProducersNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieProducersRelationship { - cursor: String! - node: Person! - } - - input MovieProducersUpdateFieldInput { - disconnect: [MovieProducersDisconnectFieldInput!] - where: MovieProducersConnectionWhere - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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: ID - producers: [MovieProducersUpdateFieldInput!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producers: PersonWhere @deprecated(reason: \\"Use \`producers_SOME\` instead.\\") - producersAggregate: MovieProducersAggregateInput - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere - \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere - producers_NOT: PersonWhere @deprecated(reason: \\"Use \`producers_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - }); - - describe("Related to a union type", () => { - test("Should not generate UpdateFieldInput input with no nested operations", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - - const updateFieldInput = schema.getType("MovieActorsUpdateFieldInput") as GraphQLNamedInputType; - expect(updateFieldInput).toBeUndefined(); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation CREATE specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsCreateFieldInput { - PersonOne: [MovieActorsPersonOneCreateFieldInput!] - PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] - } - - input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonOneCreateFieldInput { - node: PersonOneCreateInput! - } - - input MovieActorsPersonOneFieldInput { - create: [MovieActorsPersonOneCreateFieldInput!] - } - - input MovieActorsPersonOneUpdateFieldInput { - create: [MovieActorsPersonOneCreateFieldInput!] - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoCreateFieldInput { - node: PersonTwoCreateInput! - } - - input MovieActorsPersonTwoFieldInput { - create: [MovieActorsPersonTwoCreateFieldInput!] - } - - input MovieActorsPersonTwoUpdateFieldInput { - create: [MovieActorsPersonTwoCreateFieldInput!] - where: MovieActorsPersonTwoConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID - } - - 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!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - \\"\\"\\" - 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: MovieActorsUpdateInput - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation CONNECT specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsConnectInput { - PersonOne: [MovieActorsPersonOneConnectFieldInput!] - PersonTwo: [MovieActorsPersonTwoConnectFieldInput!] - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput - } - - input MovieActorsPersonOneConnectFieldInput { - where: PersonOneConnectWhere - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonOneFieldInput { - connect: [MovieActorsPersonOneConnectFieldInput!] - } - - input MovieActorsPersonOneUpdateFieldInput { - connect: [MovieActorsPersonOneConnectFieldInput!] - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonTwoConnectFieldInput { - where: PersonTwoConnectWhere - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoFieldInput { - connect: [MovieActorsPersonTwoConnectFieldInput!] - } - - input MovieActorsPersonTwoUpdateFieldInput { - connect: [MovieActorsPersonTwoConnectFieldInput!] - where: MovieActorsPersonTwoConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: MovieActorsConnectInput - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID - } - - 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: MovieActorsUpdateInput - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneConnectWhere { - node: PersonOneWhere! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoConnectWhere { - node: PersonTwoWhere! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation UPDATE specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonOneUpdateConnectionInput { - node: PersonOneUpdateInput - } - - input MovieActorsPersonOneUpdateFieldInput { - update: MovieActorsPersonOneUpdateConnectionInput - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoUpdateConnectionInput { - node: PersonTwoUpdateInput - } - - input MovieActorsPersonTwoUpdateFieldInput { - update: MovieActorsPersonTwoUpdateConnectionInput - where: MovieActorsPersonTwoConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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: MovieActorsUpdateInput - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation DELETE specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsDeleteInput { - PersonOne: [MovieActorsPersonOneDeleteFieldInput!] - PersonTwo: [MovieActorsPersonTwoDeleteFieldInput!] - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonOneDeleteFieldInput { - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonOneUpdateFieldInput { - delete: [MovieActorsPersonOneDeleteFieldInput!] - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoDeleteFieldInput { - where: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsPersonTwoUpdateFieldInput { - delete: [MovieActorsPersonTwoDeleteFieldInput!] - where: MovieActorsPersonTwoConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - input MovieDeleteInput { - actors: MovieActorsDeleteInput - } - - 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: MovieActorsUpdateInput - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation DISCONNECT specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsDisconnectInput { - PersonOne: [MovieActorsPersonOneDisconnectFieldInput!] - PersonTwo: [MovieActorsPersonTwoDisconnectFieldInput!] - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonOneDisconnectFieldInput { - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonOneUpdateFieldInput { - disconnect: [MovieActorsPersonOneDisconnectFieldInput!] - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoDisconnectFieldInput { - where: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsPersonTwoUpdateFieldInput { - disconnect: [MovieActorsPersonTwoDisconnectFieldInput!] - where: MovieActorsPersonTwoConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - } - - 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: MovieActorsUpdateInput - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship to type with unique field with nested operation CONNECT_OR_CREATE specified", async () => { - const typeDefs = gql` - type PersonOne { - id: ID! @id @unique - name: String - } - - type PersonTwo { - id: ID! @id @unique - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsConnectOrCreateInput { - PersonOne: [MovieActorsPersonOneConnectOrCreateFieldInput!] - PersonTwo: [MovieActorsPersonTwoConnectOrCreateFieldInput!] - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput - } - - input MovieActorsPersonOneConnectOrCreateFieldInput { - onCreate: MovieActorsPersonOneConnectOrCreateFieldInputOnCreate! - where: PersonOneConnectOrCreateWhere! - } - - input MovieActorsPersonOneConnectOrCreateFieldInputOnCreate { - node: PersonOneOnCreateInput! - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonOneFieldInput { - connectOrCreate: [MovieActorsPersonOneConnectOrCreateFieldInput!] - } - - input MovieActorsPersonOneUpdateFieldInput { - connectOrCreate: [MovieActorsPersonOneConnectOrCreateFieldInput!] - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonTwoConnectOrCreateFieldInput { - onCreate: MovieActorsPersonTwoConnectOrCreateFieldInputOnCreate! - where: PersonTwoConnectOrCreateWhere! - } - - input MovieActorsPersonTwoConnectOrCreateFieldInputOnCreate { - node: PersonTwoOnCreateInput! - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoFieldInput { - connectOrCreate: [MovieActorsPersonTwoConnectOrCreateFieldInput!] - } - - input MovieActorsPersonTwoUpdateFieldInput { - connectOrCreate: [MovieActorsPersonTwoConnectOrCreateFieldInput!] - where: MovieActorsPersonTwoConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectOrCreateInput { - actors: MovieActorsConnectOrCreateInput - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID - } - - 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: MovieActorsUpdateInput - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connectOrCreate: MovieConnectOrCreateInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - } - - input PersonOneConnectOrCreateWhere { - node: PersonOneUniqueWhere! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOnCreateInput { - name: String - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - id: SortDirection - name: SortDirection - } - - input PersonOneUniqueWhere { - id: ID - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoConnectOrCreateWhere { - node: PersonTwoUniqueWhere! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOnCreateInput { - nameTwo: String - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - id: SortDirection - nameTwo: SortDirection - } - - input PersonTwoUniqueWhere { - id: ID - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Two relationships with nested operations specified on one", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! - } - - input MovieActorsConnectInput { - PersonOne: [MovieActorsPersonOneConnectFieldInput!] - PersonTwo: [MovieActorsPersonTwoConnectFieldInput!] - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsCreateFieldInput { - PersonOne: [MovieActorsPersonOneCreateFieldInput!] - PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] - } - - input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput - } - - input MovieActorsDeleteInput { - PersonOne: [MovieActorsPersonOneDeleteFieldInput!] - PersonTwo: [MovieActorsPersonTwoDeleteFieldInput!] - } - - input MovieActorsDisconnectInput { - PersonOne: [MovieActorsPersonOneDisconnectFieldInput!] - PersonTwo: [MovieActorsPersonTwoDisconnectFieldInput!] - } - - input MovieActorsPersonOneConnectFieldInput { - where: PersonOneConnectWhere - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonOneCreateFieldInput { - node: PersonOneCreateInput! - } - - input MovieActorsPersonOneDeleteFieldInput { - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonOneDisconnectFieldInput { - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonOneFieldInput { - connect: [MovieActorsPersonOneConnectFieldInput!] - create: [MovieActorsPersonOneCreateFieldInput!] - } - - input MovieActorsPersonOneUpdateConnectionInput { - node: PersonOneUpdateInput - } - - input MovieActorsPersonOneUpdateFieldInput { - connect: [MovieActorsPersonOneConnectFieldInput!] - create: [MovieActorsPersonOneCreateFieldInput!] - delete: [MovieActorsPersonOneDeleteFieldInput!] - disconnect: [MovieActorsPersonOneDisconnectFieldInput!] - update: MovieActorsPersonOneUpdateConnectionInput - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonTwoConnectFieldInput { - where: PersonTwoConnectWhere - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoCreateFieldInput { - node: PersonTwoCreateInput! - } - - input MovieActorsPersonTwoDeleteFieldInput { - where: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsPersonTwoDisconnectFieldInput { - where: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsPersonTwoFieldInput { - connect: [MovieActorsPersonTwoConnectFieldInput!] - create: [MovieActorsPersonTwoCreateFieldInput!] - } - - input MovieActorsPersonTwoUpdateConnectionInput { - node: PersonTwoUpdateInput - } - - input MovieActorsPersonTwoUpdateFieldInput { - connect: [MovieActorsPersonTwoConnectFieldInput!] - create: [MovieActorsPersonTwoCreateFieldInput!] - delete: [MovieActorsPersonTwoDeleteFieldInput!] - disconnect: [MovieActorsPersonTwoDisconnectFieldInput!] - update: MovieActorsPersonTwoUpdateConnectionInput - where: MovieActorsPersonTwoConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: MovieActorsConnectInput - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID - } - - input MovieDeleteInput { - actors: MovieActorsDeleteInput - } - - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - producers: MovieProducersDisconnectInput - } - - 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!] - } - - type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieProducersConnectionWhere { - PersonOne: MovieProducersPersonOneConnectionWhere - PersonTwo: MovieProducersPersonTwoConnectionWhere - } - - input MovieProducersDisconnectInput { - PersonOne: [MovieProducersPersonOneDisconnectFieldInput!] - PersonTwo: [MovieProducersPersonTwoDisconnectFieldInput!] - } - - input MovieProducersPersonOneConnectionWhere { - AND: [MovieProducersPersonOneConnectionWhere!] - NOT: MovieProducersPersonOneConnectionWhere - OR: [MovieProducersPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieProducersPersonOneDisconnectFieldInput { - where: MovieProducersPersonOneConnectionWhere - } - - input MovieProducersPersonOneUpdateFieldInput { - disconnect: [MovieProducersPersonOneDisconnectFieldInput!] - where: MovieProducersPersonOneConnectionWhere - } - - input MovieProducersPersonTwoConnectionWhere { - AND: [MovieProducersPersonTwoConnectionWhere!] - NOT: MovieProducersPersonTwoConnectionWhere - OR: [MovieProducersPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieProducersPersonTwoDisconnectFieldInput { - where: MovieProducersPersonTwoConnectionWhere - } - - input MovieProducersPersonTwoUpdateFieldInput { - disconnect: [MovieProducersPersonTwoDisconnectFieldInput!] - where: MovieProducersPersonTwoConnectionWhere - } - - type MovieProducersRelationship { - cursor: String! - node: Person! - } - - input MovieProducersUpdateInput { - PersonOne: [MovieProducersPersonOneUpdateFieldInput!] - PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - \\"\\"\\" - 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: MovieActorsUpdateInput - id: ID - producers: MovieProducersUpdateInput - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneConnectWhere { - node: PersonOneWhere! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoConnectWhere { - node: PersonTwoWhere! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Two relationships with nested operations specified on both", async () => { - const typeDefs = gql` - type PersonOne { - name: String - } - - type PersonTwo { - nameTwo: String - } - - union Person = PersonOne | PersonTwo - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsCreateFieldInput { - PersonOne: [MovieActorsPersonOneCreateFieldInput!] - PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] - } - - input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonOneCreateFieldInput { - node: PersonOneCreateInput! - } - - input MovieActorsPersonOneFieldInput { - create: [MovieActorsPersonOneCreateFieldInput!] - } - - input MovieActorsPersonOneUpdateFieldInput { - create: [MovieActorsPersonOneCreateFieldInput!] - where: MovieActorsPersonOneConnectionWhere - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoCreateFieldInput { - node: PersonTwoCreateInput! - } - - input MovieActorsPersonTwoFieldInput { - create: [MovieActorsPersonTwoCreateFieldInput!] - } - - input MovieActorsPersonTwoUpdateFieldInput { - create: [MovieActorsPersonTwoCreateFieldInput!] - where: MovieActorsPersonTwoConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID - } - - input MovieDisconnectInput { - producers: MovieProducersDisconnectInput - } - - 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!] - } - - type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieProducersConnectionWhere { - PersonOne: MovieProducersPersonOneConnectionWhere - PersonTwo: MovieProducersPersonTwoConnectionWhere - } - - input MovieProducersDisconnectInput { - PersonOne: [MovieProducersPersonOneDisconnectFieldInput!] - PersonTwo: [MovieProducersPersonTwoDisconnectFieldInput!] - } - - input MovieProducersPersonOneConnectionWhere { - AND: [MovieProducersPersonOneConnectionWhere!] - NOT: MovieProducersPersonOneConnectionWhere - OR: [MovieProducersPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieProducersPersonOneDisconnectFieldInput { - where: MovieProducersPersonOneConnectionWhere - } - - input MovieProducersPersonOneUpdateFieldInput { - disconnect: [MovieProducersPersonOneDisconnectFieldInput!] - where: MovieProducersPersonOneConnectionWhere - } - - input MovieProducersPersonTwoConnectionWhere { - AND: [MovieProducersPersonTwoConnectionWhere!] - NOT: MovieProducersPersonTwoConnectionWhere - OR: [MovieProducersPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieProducersPersonTwoDisconnectFieldInput { - where: MovieProducersPersonTwoConnectionWhere - } - - input MovieProducersPersonTwoUpdateFieldInput { - disconnect: [MovieProducersPersonTwoDisconnectFieldInput!] - where: MovieProducersPersonTwoConnectionWhere - } - - type MovieProducersRelationship { - cursor: String! - node: Person! - } - - input MovieProducersUpdateInput { - PersonOne: [MovieProducersPersonOneUpdateFieldInput!] - PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - \\"\\"\\" - 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: MovieActorsUpdateInput - id: ID - producers: MovieProducersUpdateInput - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - }); - - describe("Related to an interface type", () => { - test("Should not generate UpdateFieldInput input with no nested operations", async () => { - const typeDefs = gql` - interface Person { - name: String - } - - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! - } - - type PersonTwo implements Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - - const updateFieldInput = schema.getType("MovieActorsUpdateFieldInput") as GraphQLNamedInputType; - expect(updateFieldInput).toBeUndefined(); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - \\"\\"\\"\\"\\"\\" - type PersonOne implements Person { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - someExtraProp: [Int!]! - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo implements Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - name: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - name: SortDirection - } - - input PersonTwoUpdateInput { - name: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation CREATE specified", async () => { - const typeDefs = gql` - interface Person { - name: String - } - - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! - } - - type PersonTwo implements Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsFieldInput { - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - create: [MovieActorsCreateFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - input PersonCreateInput { - PersonOne: PersonOneCreateInput - PersonTwo: PersonTwoCreateInput - } - - input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - \\"\\"\\"\\"\\"\\" - type PersonOne implements Person { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - someExtraProp: [Int!]! - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo implements Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - name: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - name: SortDirection - } - - input PersonTwoUpdateInput { - name: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation CONNECT specified", async () => { - const typeDefs = gql` - interface Person { - name: String - } - - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! - } - - type PersonTwo implements Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsConnectFieldInput { - where: PersonConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - \\"\\"\\"\\"\\"\\" - type PersonOne implements Person { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - someExtraProp: [Int!]! - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo implements Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - name: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - name: SortDirection - } - - input PersonTwoUpdateInput { - name: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation UPDATE specified", async () => { - const typeDefs = gql` - interface Person { - name: String - } - - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! - } - - type PersonTwo implements Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - input PersonImplementationsUpdateInput { - PersonOne: PersonOneUpdateInput - PersonTwo: PersonTwoUpdateInput - } - - input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - \\"\\"\\"\\"\\"\\" - type PersonOne implements Person { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - someExtraProp: [Int!]! - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo implements Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - name: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - name: SortDirection - } - - input PersonTwoUpdateInput { - name: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - name: String - } - - input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation DELETE specified", async () => { - const typeDefs = gql` - interface Person { - name: String - } - - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! - } - - type PersonTwo implements Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - delete: [MovieActorsDeleteFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - \\"\\"\\"\\"\\"\\" - type PersonOne implements Person { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - someExtraProp: [Int!]! - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo implements Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - name: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - name: SortDirection - } - - input PersonTwoUpdateInput { - name: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Single relationship with nested operation DISCONNECT specified", async () => { - const typeDefs = gql` - interface Person { - name: String - } - - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! - } - - type PersonTwo implements Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateFieldInput { - disconnect: [MovieActorsDisconnectFieldInput!] - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - \\"\\"\\"\\"\\"\\" - type PersonOne implements Person { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - someExtraProp: [Int!]! - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo implements Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - name: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - name: SortDirection - } - - input PersonTwoUpdateInput { - name: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Two relationships with nested operations specified on one", async () => { - const typeDefs = gql` - interface Person { - name: String - } - - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! - } - - type PersonTwo implements Person { - name: String - } - - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! - } - - input MovieActorsConnectFieldInput { - where: PersonConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - producers: [MovieProducersDisconnectFieldInput!] - } - - 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!] - } - - type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieProducersConnectionSort { - node: PersonSort - } - - input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieProducersDisconnectFieldInput { - where: MovieProducersConnectionWhere - } - - type MovieProducersRelationship { - cursor: String! - node: Person! - } - - input MovieProducersUpdateFieldInput { - disconnect: [MovieProducersDisconnectFieldInput!] - where: MovieProducersConnectionWhere - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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: ID - producers: [MovieProducersUpdateFieldInput!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - PersonOne: PersonOneCreateInput - PersonTwo: PersonTwoCreateInput - } - - input PersonImplementationsUpdateInput { - PersonOne: PersonOneUpdateInput - PersonTwo: PersonTwoUpdateInput - } - - input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - \\"\\"\\"\\"\\"\\" - type PersonOne implements Person { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - someExtraProp: [Int!]! - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo implements Person { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - name: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - name: SortDirection - } - - input PersonTwoUpdateInput { - name: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - name: String - } - - input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); - }); - - test("Two relationships with nested operations specified on both", async () => { - const typeDefs = gql` - interface Person { - name: String - } - - type PersonOne implements Person { + type PersonOne { name: String - someExtraProp: [Int!]! } - type PersonTwo implements Person { - name: String + type PersonTwo { + nameTwo: String } + union Person = PersonOne | PersonTwo + type Movie { id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE, DELETE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsDeleteInput { + PersonOne: [MovieActorsPersonOneDeleteFieldInput!] + PersonTwo: [MovieActorsPersonTwoDeleteFieldInput!] +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonOneDeleteFieldInput { + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonOneUpdateFieldInput { + delete: [MovieActorsPersonOneDeleteFieldInput!] + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoDeleteFieldInput { + where: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsPersonTwoUpdateFieldInput { + delete: [MovieActorsPersonTwoDeleteFieldInput!] + where: MovieActorsPersonTwoConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +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: MovieActorsUpdateInput + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! + test("Single relationship with nested operation DISCONNECT specified", async () => { + const typeDefs = gql` + type PersonOne { + name: String } - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! + type PersonTwo { + nameTwo: String } - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } + union Person = PersonOne | PersonTwo - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsDisconnectInput { + PersonOne: [MovieActorsPersonOneDisconnectFieldInput!] + PersonTwo: [MovieActorsPersonTwoDisconnectFieldInput!] +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonOneDisconnectFieldInput { + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonOneUpdateFieldInput { + disconnect: [MovieActorsPersonOneDisconnectFieldInput!] + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoDisconnectFieldInput { + where: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsPersonTwoUpdateFieldInput { + disconnect: [MovieActorsPersonTwoDisconnectFieldInput!] + where: MovieActorsPersonTwoConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput +} + +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: MovieActorsUpdateInput + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - type IDAggregateSelectionNullable { - longest: ID - shortest: ID + test("Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field", async () => { + const typeDefs = gql` + type PersonOne { + name: String } - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + type PersonTwo { + nameTwo: String } - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } + union Person = PersonOne | PersonTwo - input MovieActorsConnectionSort { - node: PersonSort + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - input MovieActorsCreateFieldInput { - node: PersonCreateInput! + test("Single relationship to type with unique field with nested operation CONNECT_OR_CREATE specified", async () => { + const typeDefs = gql` + type PersonOne { + id: ID! @id @unique + name: String } - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere + type PersonTwo { + id: ID! @id @unique + nameTwo: String } - input MovieActorsFieldInput { - create: [MovieActorsCreateFieldInput!] - } + union Person = PersonOne | PersonTwo - type MovieActorsRelationship { - cursor: String! - node: Person! + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input MovieActorsUpdateFieldInput { - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - where: MovieActorsConnectionWhere - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsConnectOrCreateInput { + PersonOne: [MovieActorsPersonOneConnectOrCreateFieldInput!] + PersonTwo: [MovieActorsPersonTwoConnectOrCreateFieldInput!] +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput +} + +input MovieActorsPersonOneConnectOrCreateFieldInput { + onCreate: MovieActorsPersonOneConnectOrCreateFieldInputOnCreate! + where: PersonOneConnectOrCreateWhere! +} + +input MovieActorsPersonOneConnectOrCreateFieldInputOnCreate { + node: PersonOneOnCreateInput! +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonOneFieldInput { + connectOrCreate: [MovieActorsPersonOneConnectOrCreateFieldInput!] +} + +input MovieActorsPersonOneUpdateFieldInput { + connectOrCreate: [MovieActorsPersonOneConnectOrCreateFieldInput!] + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonTwoConnectOrCreateFieldInput { + onCreate: MovieActorsPersonTwoConnectOrCreateFieldInputOnCreate! + where: PersonTwoConnectOrCreateWhere! +} + +input MovieActorsPersonTwoConnectOrCreateFieldInputOnCreate { + node: PersonTwoOnCreateInput! +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoFieldInput { + connectOrCreate: [MovieActorsPersonTwoConnectOrCreateFieldInput!] +} + +input MovieActorsPersonTwoUpdateFieldInput { + connectOrCreate: [MovieActorsPersonTwoConnectOrCreateFieldInput!] + where: MovieActorsPersonTwoConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectOrCreateInput { + actors: MovieActorsConnectOrCreateInput +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID +} + +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: MovieActorsUpdateInput + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connectOrCreate: MovieConnectOrCreateInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + id: ID! + name: String +} + +type PersonOneAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! +} + +input PersonOneConnectOrCreateWhere { + node: PersonOneUniqueWhere! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOnCreateInput { + name: String +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + id: SortDirection + name: SortDirection +} + +input PersonOneUniqueWhere { + id: ID +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + id: ID! + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoConnectOrCreateWhere { + node: PersonTwoUniqueWhere! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOnCreateInput { + nameTwo: String +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + id: SortDirection + nameTwo: SortDirection +} + +input PersonTwoUniqueWhere { + id: ID +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! + test("Two relationships with nested operations specified on one", async () => { + const typeDefs = gql` + type PersonOne { + name: String } - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID + type PersonTwo { + nameTwo: String } - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } + union Person = PersonOne | PersonTwo - input MovieDisconnectInput { - producers: [MovieProducersDisconnectFieldInput!] + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type MovieEdge { - cursor: String! - node: Movie! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! +} + +input MovieActorsConnectInput { + PersonOne: [MovieActorsPersonOneConnectFieldInput!] + PersonTwo: [MovieActorsPersonTwoConnectFieldInput!] +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsCreateFieldInput { + PersonOne: [MovieActorsPersonOneCreateFieldInput!] + PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] +} + +input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput +} + +input MovieActorsDeleteInput { + PersonOne: [MovieActorsPersonOneDeleteFieldInput!] + PersonTwo: [MovieActorsPersonTwoDeleteFieldInput!] +} + +input MovieActorsDisconnectInput { + PersonOne: [MovieActorsPersonOneDisconnectFieldInput!] + PersonTwo: [MovieActorsPersonTwoDisconnectFieldInput!] +} + +input MovieActorsPersonOneConnectFieldInput { + where: PersonOneConnectWhere +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonOneCreateFieldInput { + node: PersonOneCreateInput! +} + +input MovieActorsPersonOneDeleteFieldInput { + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonOneDisconnectFieldInput { + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonOneFieldInput { + connect: [MovieActorsPersonOneConnectFieldInput!] + create: [MovieActorsPersonOneCreateFieldInput!] +} + +input MovieActorsPersonOneUpdateConnectionInput { + node: PersonOneUpdateInput +} + +input MovieActorsPersonOneUpdateFieldInput { + connect: [MovieActorsPersonOneConnectFieldInput!] + create: [MovieActorsPersonOneCreateFieldInput!] + delete: [MovieActorsPersonOneDeleteFieldInput!] + disconnect: [MovieActorsPersonOneDisconnectFieldInput!] + update: MovieActorsPersonOneUpdateConnectionInput + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonTwoConnectFieldInput { + where: PersonTwoConnectWhere +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoCreateFieldInput { + node: PersonTwoCreateInput! +} + +input MovieActorsPersonTwoDeleteFieldInput { + where: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsPersonTwoDisconnectFieldInput { + where: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsPersonTwoFieldInput { + connect: [MovieActorsPersonTwoConnectFieldInput!] + create: [MovieActorsPersonTwoCreateFieldInput!] +} + +input MovieActorsPersonTwoUpdateConnectionInput { + node: PersonTwoUpdateInput +} + +input MovieActorsPersonTwoUpdateFieldInput { + connect: [MovieActorsPersonTwoConnectFieldInput!] + create: [MovieActorsPersonTwoCreateFieldInput!] + delete: [MovieActorsPersonTwoDeleteFieldInput!] + disconnect: [MovieActorsPersonTwoDisconnectFieldInput!] + update: MovieActorsPersonTwoUpdateConnectionInput + where: MovieActorsPersonTwoConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + producers: MovieProducersDisconnectInput +} + +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!] +} + +type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieProducersConnectionWhere { + PersonOne: MovieProducersPersonOneConnectionWhere + PersonTwo: MovieProducersPersonTwoConnectionWhere +} + +input MovieProducersDisconnectInput { + PersonOne: [MovieProducersPersonOneDisconnectFieldInput!] + PersonTwo: [MovieProducersPersonTwoDisconnectFieldInput!] +} + +input MovieProducersPersonOneConnectionWhere { + AND: [MovieProducersPersonOneConnectionWhere!] + NOT: MovieProducersPersonOneConnectionWhere + OR: [MovieProducersPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieProducersPersonOneDisconnectFieldInput { + where: MovieProducersPersonOneConnectionWhere +} + +input MovieProducersPersonOneUpdateFieldInput { + disconnect: [MovieProducersPersonOneDisconnectFieldInput!] + where: MovieProducersPersonOneConnectionWhere +} + +input MovieProducersPersonTwoConnectionWhere { + AND: [MovieProducersPersonTwoConnectionWhere!] + NOT: MovieProducersPersonTwoConnectionWhere + OR: [MovieProducersPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieProducersPersonTwoDisconnectFieldInput { + where: MovieProducersPersonTwoConnectionWhere +} + +input MovieProducersPersonTwoUpdateFieldInput { + disconnect: [MovieProducersPersonTwoDisconnectFieldInput!] + where: MovieProducersPersonTwoConnectionWhere +} + +type MovieProducersRelationship { + cursor: String! + node: Person! +} + +input MovieProducersUpdateInput { + PersonOne: [MovieProducersPersonOneUpdateFieldInput!] + PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +\\"\\"\\" +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: MovieActorsUpdateInput + id: ID + producers: MovieProducersUpdateInput +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneConnectWhere { + node: PersonOneWhere! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoConnectWhere { + node: PersonTwoWhere! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - 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!] + test("Two relationships with nested operations specified on both", async () => { + const typeDefs = gql` + type PersonOne { + name: String } - type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! + type PersonTwo { + nameTwo: String } - input MovieProducersConnectionSort { - node: PersonSort - } + union Person = PersonOne | PersonTwo - input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input MovieProducersDisconnectFieldInput { - where: MovieProducersConnectionWhere - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsCreateFieldInput { + PersonOne: [MovieActorsPersonOneCreateFieldInput!] + PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] +} + +input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonOneCreateFieldInput { + node: PersonOneCreateInput! +} + +input MovieActorsPersonOneFieldInput { + create: [MovieActorsPersonOneCreateFieldInput!] +} + +input MovieActorsPersonOneUpdateFieldInput { + create: [MovieActorsPersonOneCreateFieldInput!] + where: MovieActorsPersonOneConnectionWhere +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoCreateFieldInput { + node: PersonTwoCreateInput! +} + +input MovieActorsPersonTwoFieldInput { + create: [MovieActorsPersonTwoCreateFieldInput!] +} + +input MovieActorsPersonTwoUpdateFieldInput { + create: [MovieActorsPersonTwoCreateFieldInput!] + where: MovieActorsPersonTwoConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID +} + +input MovieDisconnectInput { + producers: MovieProducersDisconnectInput +} + +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!] +} + +type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieProducersConnectionWhere { + PersonOne: MovieProducersPersonOneConnectionWhere + PersonTwo: MovieProducersPersonTwoConnectionWhere +} + +input MovieProducersDisconnectInput { + PersonOne: [MovieProducersPersonOneDisconnectFieldInput!] + PersonTwo: [MovieProducersPersonTwoDisconnectFieldInput!] +} + +input MovieProducersPersonOneConnectionWhere { + AND: [MovieProducersPersonOneConnectionWhere!] + NOT: MovieProducersPersonOneConnectionWhere + OR: [MovieProducersPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieProducersPersonOneDisconnectFieldInput { + where: MovieProducersPersonOneConnectionWhere +} + +input MovieProducersPersonOneUpdateFieldInput { + disconnect: [MovieProducersPersonOneDisconnectFieldInput!] + where: MovieProducersPersonOneConnectionWhere +} + +input MovieProducersPersonTwoConnectionWhere { + AND: [MovieProducersPersonTwoConnectionWhere!] + NOT: MovieProducersPersonTwoConnectionWhere + OR: [MovieProducersPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieProducersPersonTwoDisconnectFieldInput { + where: MovieProducersPersonTwoConnectionWhere +} + +input MovieProducersPersonTwoUpdateFieldInput { + disconnect: [MovieProducersPersonTwoDisconnectFieldInput!] + where: MovieProducersPersonTwoConnectionWhere +} + +type MovieProducersRelationship { + cursor: String! + node: Person! +} + +input MovieProducersUpdateInput { + PersonOne: [MovieProducersPersonOneUpdateFieldInput!] + PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +\\"\\"\\" +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: MovieActorsUpdateInput + id: ID + producers: MovieProducersUpdateInput +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); + }); - type MovieProducersRelationship { - cursor: String! - node: Person! + describe("Related to an interface type", () => { + test("Should not generate UpdateFieldInput input with no nested operations", async () => { + const typeDefs = gql` + interface Person { + name: String } - input MovieProducersUpdateFieldInput { - disconnect: [MovieProducersDisconnectFieldInput!] - where: MovieProducersConnectionWhere + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! } - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] + type PersonTwo implements Person { + name: String } - \\"\\"\\" - 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 + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const schema = await neoSchema.getSchema(); - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - id: ID - producers: [MovieProducersUpdateFieldInput!] - } + const updateFieldInput = schema.getType("MovieActorsUpdateFieldInput") as GraphQLNamedInputType; + expect(updateFieldInput).toBeUndefined(); - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + name: String +} + +input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type PersonOne implements Person { + name: String + someExtraProp: [Int!]! +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +type PersonTwo implements Person { + name: String +} + +type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + name: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + name: SortDirection +} + +input PersonTwoUpdateInput { + name: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + test("Single relationship with nested operation CREATE specified", async () => { + const typeDefs = gql` + interface Person { + name: String } - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! } - interface Person { - \\"\\"\\"\\"\\"\\" - name: String + type PersonTwo implements Person { + name: String } - input PersonCreateInput { - PersonOne: PersonOneCreateInput - PersonTwo: PersonTwoCreateInput + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsFieldInput { + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + create: [MovieActorsCreateFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + name: String +} + +input PersonCreateInput { + PersonOne: PersonOneCreateInput + PersonTwo: PersonTwoCreateInput +} + +input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type PersonOne implements Person { + name: String + someExtraProp: [Int!]! +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +type PersonTwo implements Person { + name: String +} + +type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + name: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + name: SortDirection +} + +input PersonTwoUpdateInput { + name: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere + test("Single relationship with nested operation CONNECT specified", async () => { + const typeDefs = gql` + interface Person { + name: String } - \\"\\"\\"\\"\\"\\" type PersonOne implements Person { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - someExtraProp: [Int!]! + name: String + someExtraProp: [Int!]! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! + type PersonTwo implements Person { + name: String } - input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type PersonOneEdge { - cursor: String! - node: PersonOne! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsConnectFieldInput { + where: PersonConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + name: String +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type PersonOne implements Person { + name: String + someExtraProp: [Int!]! +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +type PersonTwo implements Person { + name: String +} + +type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + name: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + name: SortDirection +} + +input PersonTwoUpdateInput { + name: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] + test("Single relationship with nested operation UPDATE specified", async () => { + const typeDefs = gql` + interface Person { + name: String } - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! } - input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] + type PersonTwo implements Person { + name: String } - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + name: String +} + +input PersonImplementationsUpdateInput { + PersonOne: PersonOneUpdateInput + PersonTwo: PersonTwoUpdateInput +} + +input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type PersonOne implements Person { + name: String + someExtraProp: [Int!]! +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +type PersonTwo implements Person { + name: String +} + +type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + name: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + name: SortDirection +} + +input PersonTwoUpdateInput { + name: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + name: String +} + +input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] + test("Single relationship with nested operation DELETE specified", async () => { + const typeDefs = gql` + interface Person { + name: String } - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! } - \\"\\"\\"\\"\\"\\" type PersonTwo implements Person { - \\"\\"\\"\\"\\"\\" - name: String + name: String } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input PersonTwoCreateInput { - name: String - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + delete: [MovieActorsDeleteFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + name: String +} + +input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type PersonOne implements Person { + name: String + someExtraProp: [Int!]! +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +type PersonTwo implements Person { + name: String +} + +type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + name: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + name: SortDirection +} + +input PersonTwoUpdateInput { + name: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - type PersonTwoEdge { - cursor: String! - node: PersonTwo! + test("Single relationship with nested operation DISCONNECT specified", async () => { + const typeDefs = gql` + interface Person { + name: String } - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! } - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - name: SortDirection + type PersonTwo implements Person { + name: String } - input PersonTwoUpdateInput { - name: String + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + disconnect: [MovieActorsDisconnectFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + name: String +} + +input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type PersonOne implements Person { + name: String + someExtraProp: [Int!]! +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +type PersonTwo implements Person { + name: String +} + +type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + name: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + name: SortDirection +} + +input PersonTwoUpdateInput { + name: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! + test("Two relationships with nested operations specified on one", async () => { + const typeDefs = gql` + interface Person { + name: String } - input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! } - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + type PersonTwo implements Person { + name: String } - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! +} + +input MovieActorsConnectFieldInput { + where: PersonConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + producers: [MovieProducersDisconnectFieldInput!] +} + +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!] +} + +type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieProducersConnectionSort { + node: PersonSort +} + +input MovieProducersConnectionWhere { + AND: [MovieProducersConnectionWhere!] + NOT: MovieProducersConnectionWhere + OR: [MovieProducersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieProducersDisconnectFieldInput { + where: MovieProducersConnectionWhere +} + +type MovieProducersRelationship { + cursor: String! + node: Person! +} + +input MovieProducersUpdateFieldInput { + disconnect: [MovieProducersDisconnectFieldInput!] + where: MovieProducersConnectionWhere +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID + producers: [MovieProducersUpdateFieldInput!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + name: String +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + PersonOne: PersonOneCreateInput + PersonTwo: PersonTwoCreateInput +} + +input PersonImplementationsUpdateInput { + PersonOne: PersonOneUpdateInput + PersonTwo: PersonTwoUpdateInput +} + +input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type PersonOne implements Person { + name: String + someExtraProp: [Int!]! +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +type PersonTwo implements Person { + name: String +} + +type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + name: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + name: SortDirection +} + +input PersonTwoUpdateInput { + name: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + name: String +} + +input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); + }); - type StringAggregateSelectionNullable { - longest: String - shortest: String + test("Two relationships with nested operations specified on both", async () => { + const typeDefs = gql` + interface Person { + name: String } - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! } - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! + type PersonTwo implements Person { + name: String } - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE, DELETE]) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +input MovieActorsUpdateFieldInput { + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +input MovieDisconnectInput { + producers: [MovieProducersDisconnectFieldInput!] +} + +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!] +} + +type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieProducersConnectionSort { + node: PersonSort +} + +input MovieProducersConnectionWhere { + AND: [MovieProducersConnectionWhere!] + NOT: MovieProducersConnectionWhere + OR: [MovieProducersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieProducersDisconnectFieldInput { + where: MovieProducersConnectionWhere +} + +type MovieProducersRelationship { + cursor: String! + node: Person! +} + +input MovieProducersUpdateFieldInput { + disconnect: [MovieProducersDisconnectFieldInput!] + where: MovieProducersConnectionWhere +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID + producers: [MovieProducersUpdateFieldInput!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Person { + name: String +} + +input PersonCreateInput { + PersonOne: PersonOneCreateInput + PersonTwo: PersonTwoCreateInput +} + +input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type PersonOne implements Person { + name: String + someExtraProp: [Int!]! +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +type PersonTwo implements Person { + name: String +} + +type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + name: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + name: SortDirection +} + +input PersonTwoUpdateInput { + name: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); }); }); }); diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index a4baf38cd8..b59b811348 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -45,740 +45,725 @@ describe("Relationship-properties", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - leadRole: Boolean! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - \\"\\"\\"\\"\\"\\" - startDate: Date! - } - - 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 - leadRole_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - startDate: Date - startDate_GT: Date - startDate_GTE: Date - startDate_IN: [Date!] - startDate_LT: Date - startDate_LTE: Date - startDate_NOT: Date @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - startDate_NOT_IN: [Date!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - 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: IntAggregateSelectionNonNullable! - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorMoviesEdgeAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesEdgeAggregationWhereInput { - AND: [ActorMoviesEdgeAggregationWhereInput!] - NOT: ActorMoviesEdgeAggregationWhereInput - OR: [ActorMoviesEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship implements ActedIn { - cursor: String! - \\"\\"\\"\\"\\"\\" - leadRole: Boolean! - node: Movie! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - \\"\\"\\"\\"\\"\\" - startDate: Date! - } - - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" - scalar Date - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelectionNonNullable! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship implements ActedIn { - cursor: String! - \\"\\"\\"\\"\\"\\" - leadRole: Boolean! - node: Actor! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - \\"\\"\\"\\"\\"\\" - startDate: Date! - } - - 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: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + leadRole: Boolean! + screenTime: Int! + startDate: Date! +} + +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 + leadRole_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + startDate: Date + startDate_GT: Date + startDate_GTE: Date + startDate_IN: [Date!] + startDate_LT: Date + startDate_LTE: Date + startDate_NOT: Date @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + startDate_NOT_IN: [Date!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +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: IntAggregateSelectionNonNullable! +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! +} + +input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere +} + +input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere +} + +input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] +} + +input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship implements ActedIn { + cursor: String! + leadRole: Boolean! + node: Movie! + screenTime: Int! + startDate: Date! +} + +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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" +scalar Date + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship implements ActedIn { + cursor: String! + leadRole: Boolean! + node: Actor! + screenTime: Int! + startDate: Date! +} + +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: StringAggregateSelectionNonNullable! +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("should filter out generated fields", async () => { @@ -803,790 +788,775 @@ describe("Relationship-properties", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - \\"\\"\\"\\"\\"\\" - timestamp: DateTime! - } - - input ActedInCreateInput { - screenTime: Int! - } - - input ActedInSort { - id: SortDirection - screenTime: SortDirection - timestamp: SortDirection - } - - input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - timestamp: DateTime - timestamp_GT: DateTime - timestamp_GTE: DateTime - timestamp_IN: [DateTime!] - timestamp_LT: DateTime - timestamp_LTE: DateTime - timestamp_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - 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 { - id: IDAggregateSelectionNonNullable! - screenTime: IntAggregateSelectionNonNullable! - timestamp: DateTimeAggregateSelectionNonNullable! - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorMoviesEdgeAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesEdgeAggregationWhereInput { - AND: [ActorMoviesEdgeAggregationWhereInput!] - NOT: ActorMoviesEdgeAggregationWhereInput - OR: [ActorMoviesEdgeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 - timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime - } - - input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship implements ActedIn { - cursor: String! - \\"\\"\\"\\"\\"\\" - id: ID! - node: Movie! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - \\"\\"\\"\\"\\"\\" - timestamp: DateTime! - } - - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - id: IDAggregateSelectionNonNullable! - screenTime: IntAggregateSelectionNonNullable! - timestamp: DateTimeAggregateSelectionNonNullable! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 - timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship implements ActedIn { - cursor: String! - \\"\\"\\"\\"\\"\\" - id: ID! - node: Actor! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - \\"\\"\\"\\"\\"\\" - timestamp: DateTime! - } - - 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: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + id: ID! + screenTime: Int! + timestamp: DateTime! +} + +input ActedInCreateInput { + screenTime: Int! +} + +input ActedInSort { + id: SortDirection + screenTime: SortDirection + timestamp: SortDirection +} + +input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + timestamp: DateTime + timestamp_GT: DateTime + timestamp_GTE: DateTime + timestamp_IN: [DateTime!] + timestamp_LT: DateTime + timestamp_LTE: DateTime + timestamp_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +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 { + id: IDAggregateSelectionNonNullable! + screenTime: IntAggregateSelectionNonNullable! + timestamp: DateTimeAggregateSelectionNonNullable! +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! +} + +input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere +} + +input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere +} + +input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 + timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_MAX_EQUAL: DateTime + timestamp_MAX_GT: DateTime + timestamp_MAX_GTE: DateTime + timestamp_MAX_LT: DateTime + timestamp_MAX_LTE: DateTime + timestamp_MIN_EQUAL: DateTime + timestamp_MIN_GT: DateTime + timestamp_MIN_GTE: DateTime + timestamp_MIN_LT: DateTime + timestamp_MIN_LTE: DateTime +} + +input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] +} + +input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship implements ActedIn { + cursor: String! + id: ID! + node: Movie! + screenTime: Int! + timestamp: DateTime! +} + +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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsEdgeAggregateSelection { + id: IDAggregateSelectionNonNullable! + screenTime: IntAggregateSelectionNonNullable! + timestamp: DateTimeAggregateSelectionNonNullable! +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 + timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_MAX_EQUAL: DateTime + timestamp_MAX_GT: DateTime + timestamp_MAX_GTE: DateTime + timestamp_MAX_LT: DateTime + timestamp_MAX_LTE: DateTime + timestamp_MIN_EQUAL: DateTime + timestamp_MIN_GT: DateTime + timestamp_MIN_GTE: DateTime + timestamp_MIN_LT: DateTime + timestamp_MIN_LTE: DateTime +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship implements ActedIn { + cursor: String! + id: ID! + node: Actor! + screenTime: Int! + timestamp: DateTime! +} + +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: StringAggregateSelectionNonNullable! +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("should not create or use {Create,Update}Input if only generated fields", async () => { @@ -1610,699 +1580,687 @@ describe("Relationship-properties", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - timestamp: DateTime! - } - - input ActedInSort { - id: SortDirection - timestamp: SortDirection - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - timestamp: DateTime - timestamp_GT: DateTime - timestamp_GTE: DateTime - timestamp_IN: [DateTime!] - timestamp_LT: DateTime - timestamp_LTE: DateTime - timestamp_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - 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 { - id: IDAggregateSelectionNonNullable! - timestamp: DateTimeAggregateSelectionNonNullable! - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorMoviesEdgeAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesEdgeAggregationWhereInput { - AND: [ActorMoviesEdgeAggregationWhereInput!] - NOT: ActorMoviesEdgeAggregationWhereInput - OR: [ActorMoviesEdgeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime - } - - input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship implements ActedIn { - cursor: String! - \\"\\"\\"\\"\\"\\" - id: ID! - node: Movie! - \\"\\"\\"\\"\\"\\" - timestamp: DateTime! - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - id: IDAggregateSelectionNonNullable! - timestamp: DateTimeAggregateSelectionNonNullable! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship implements ActedIn { - cursor: String! - \\"\\"\\"\\"\\"\\" - id: ID! - node: Actor! - \\"\\"\\"\\"\\"\\" - timestamp: DateTime! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + id: ID! + timestamp: DateTime! +} + +input ActedInSort { + id: SortDirection + timestamp: SortDirection +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + timestamp: DateTime + timestamp_GT: DateTime + timestamp_GTE: DateTime + timestamp_IN: [DateTime!] + timestamp_LT: DateTime + timestamp_LTE: DateTime + timestamp_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +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 { + id: IDAggregateSelectionNonNullable! + timestamp: DateTimeAggregateSelectionNonNullable! +} + +type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere +} + +input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere +} + +input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_MAX_EQUAL: DateTime + timestamp_MAX_GT: DateTime + timestamp_MAX_GTE: DateTime + timestamp_MAX_LT: DateTime + timestamp_MAX_LTE: DateTime + timestamp_MIN_EQUAL: DateTime + timestamp_MIN_GT: DateTime + timestamp_MIN_GTE: DateTime + timestamp_MIN_LT: DateTime + timestamp_MIN_LTE: DateTime +} + +input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] +} + +input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship implements ActedIn { + cursor: String! + id: ID! + node: Movie! + timestamp: DateTime! +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsEdgeAggregateSelection { + id: IDAggregateSelectionNonNullable! + timestamp: DateTimeAggregateSelectionNonNullable! +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_MAX_EQUAL: DateTime + timestamp_MAX_GT: DateTime + timestamp_MAX_GTE: DateTime + timestamp_MAX_LT: DateTime + timestamp_MAX_LTE: DateTime + timestamp_MIN_EQUAL: DateTime + timestamp_MIN_GT: DateTime + timestamp_MIN_GTE: DateTime + timestamp_MIN_LT: DateTime + timestamp_MIN_LTE: DateTime +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship implements ActedIn { + cursor: String! + id: ID! + node: Actor! + timestamp: DateTime! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index 7184f65a1e..a28e86da35 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -38,400 +38,395 @@ describe("Relationship", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + name: String +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + name: String +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Multi Relationship", async () => { @@ -450,549 +445,543 @@ describe("Relationship", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - 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! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesUpdateConnectionInput { - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +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! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesUpdateConnectionInput { + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index fffeb95296..d49c3514c8 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -40,158 +40,156 @@ describe("@selectable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Disable aggregation fields", async () => { @@ -204,154 +202,151 @@ describe("@selectable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Disable read and aggregate fields", async () => { @@ -364,152 +359,150 @@ describe("@selectable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + title: String! +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Disable read fields on subscriptions", async () => { @@ -522,222 +515,220 @@ describe("@selectable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionMechanism } }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - description: String - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + description: String + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); describe("relationships fields to a concrete type", () => { @@ -758,2447 +749,2409 @@ describe("@selectable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + name: String! +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input ActorActedInUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); + test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String } - input ActorActedInCreateFieldInput { - node: MovieCreateInput! + type Actor @query(aggregate: true) { + name: String! + actedIn: [Movie!]! + @relationship(type: "ACTED_IN", direction: OUT) + @selectable(onRead: true, onAggregate: true) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: MovieSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorActedInRelationship { + cursor: String! + node: Movie! +} + +input ActorActedInUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); + }); - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere + describe("relationships fields to a union type", () => { + test("Disable read on relationship field", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String } - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere + type Series @query(aggregate: true) { + name: String! + description: String } - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } + union Production = Movie | Series - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @selectable(onRead: false, onAggregate: true) } - - input ActorActedInUpdateConnectionInput { - node: MovieUpdateInput + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + name: String! +} + +input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] +} + +input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere +} + +input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput +} + +input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] +} + +input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] +} + +input ActorActedInMovieConnectFieldInput { + where: MovieConnectWhere +} + +input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] +} + +input ActorActedInMovieUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere +} + +input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! +} + +input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInSeriesUpdateConnectionInput { + node: SeriesUpdateInput +} + +input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: ActorActedInConnectInput +} + +input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! +} + +input ActorDeleteInput { + actedIn: ActorActedInDeleteInput +} + +input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput +} + +\\"\\"\\" +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 { + actedIn: ActorActedInUpdateInput + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series { + description: String + name: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! +} + +input SeriesConnectWhere { + node: SeriesWhere! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + name: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + name: SortDirection +} + +input SeriesUpdateInput { + description: String + name: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); + test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String } - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere + type Series @query(aggregate: true) { + name: String! + description: String } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } + union Production = Movie | Series - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @selectable(onRead: true, onAggregate: false) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere +} + +input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput +} + +input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] +} + +input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] +} + +input ActorActedInMovieConnectFieldInput { + where: MovieConnectWhere +} + +input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] +} + +input ActorActedInMovieUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere +} + +input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! +} + +input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInSeriesUpdateConnectionInput { + node: SeriesUpdateInput +} + +input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: ActorActedInConnectInput +} + +input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! +} + +input ActorDeleteInput { + actedIn: ActorActedInDeleteInput +} + +input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput +} + +\\"\\"\\" +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 { + actedIn: ActorActedInUpdateInput + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Production = Movie | Series + +input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +type Series { + description: String + name: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! +} + +input SeriesConnectWhere { + node: SeriesWhere! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + name: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + name: SortDirection +} + +input SeriesUpdateInput { + description: String + name: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); + }); - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! + describe("relationships fields to an interface type", () => { + test("Disable read on relationship field", async () => { + const typeDefs = gql` + interface Production { + title: String! + description: String } - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] + type Movie implements Production @query(aggregate: true) { + title: String! + description: String } - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] + type Series implements Production @query(aggregate: true) { + title: String! + description: String } - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - } - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Movie!]! - @relationship(type: "ACTED_IN", direction: OUT) - @selectable(onRead: true, onAggregate: true) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: MovieSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorActedInRelationship { - cursor: String! - node: Movie! - } - - input ActorActedInUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - }); - - describe("relationships fields to a union type", () => { - test("Disable read on relationship field", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - } - - type Series @query(aggregate: true) { - name: String! - description: String - } - - union Production = Movie | Series - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @selectable(onRead: false, onAggregate: true) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] - } - - input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere - } - - input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput - } - - input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] - } - - input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] - } - - input ActorActedInMovieConnectFieldInput { - where: MovieConnectWhere - } - - input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - } - - input ActorActedInMovieUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere - } - - input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! - } - - input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInSeriesUpdateConnectionInput { - node: SeriesUpdateInput - } - - input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: ActorActedInConnectInput - } - - input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! - } - - input ActorDeleteInput { - actedIn: ActorActedInDeleteInput - } - - input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput - } - - \\"\\"\\" - 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 { - actedIn: ActorActedInUpdateInput - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! - } - - input SeriesConnectWhere { - node: SeriesWhere! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - name: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - name: SortDirection - } - - input SeriesUpdateInput { - description: String - name: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - } - - type Series @query(aggregate: true) { - name: String! - description: String - } - - union Production = Movie | Series - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @selectable(onRead: true, onAggregate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere - } - - input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput - } - - input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] - } - - input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] - } - - input ActorActedInMovieConnectFieldInput { - where: MovieConnectWhere - } - - input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - } - - input ActorActedInMovieUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere - } - - input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! - } - - input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInSeriesUpdateConnectionInput { - node: SeriesUpdateInput - } - - input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: ActorActedInConnectInput - } - - input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! - } - - input ActorDeleteInput { - actedIn: ActorActedInDeleteInput - } - - input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput - } - - \\"\\"\\" - 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 { - actedIn: ActorActedInUpdateInput - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Production = Movie | Series - - input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"\\"\\"\\" - type Series { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! - } - - input SeriesConnectWhere { - node: SeriesWhere! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - name: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - name: SortDirection - } - - input SeriesUpdateInput { - description: String - name: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - }); - - describe("relationships fields to an interface type", () => { - test("Disable read on relationship field", async () => { - const typeDefs = gql` - interface Production { - title: String! - description: String - } - - type Movie implements Production @query(aggregate: true) { - title: String! - description: String - } - - type Series implements Production @query(aggregate: true) { - title: String! - description: String - } - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @selectable(onRead: false, onAggregate: true) + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @selectable(onRead: false, onAggregate: true) } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - where: ProductionConnectWhere - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInUpdateConnectionInput { - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - description: String - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - title: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - description: String - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + name: String! +} + +input ActorActedInConnectFieldInput { + where: ProductionConnectWhere +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +input ActorActedInUpdateConnectionInput { + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie implements Production { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + description: String + title: String! +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + description: String + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + description: String + title: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + title: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + description: String + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { const typeDefs = gql` @@ -3227,501 +3180,490 @@ describe("@selectable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - input ActorActedInUpdateConnectionInput { - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 { - description: SortDirection - title: SortDirection - } - - input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - description: String - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - title: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - description: String - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +input ActorActedInUpdateConnectionInput { + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie implements Production { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + description: String + title: String! +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 { + description: SortDirection + title: SortDirection +} + +input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + description: String + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + description: String + title: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + title: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + description: String + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); }); }); diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index cbaffde9d8..5d462fac8e 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -40,159 +40,156 @@ describe("@settable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Disable update fields", async () => { @@ -205,159 +202,156 @@ describe("@settable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Disable create and update fields", async () => { @@ -370,223 +364,220 @@ describe("@settable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionMechanism } }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - title: String! - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + title: String! +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); describe("Relationships to a concrete type", () => { @@ -607,6546 +598,5548 @@ describe("@settable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: MovieSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorActedInRelationship { + cursor: String! + node: Movie! +} + +input ActorActedInUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! + test("Prevent relationship field update", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String } - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput + type Actor @query(aggregate: true) { + name: String! + actedIn: [Movie!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: true, onUpdate: false) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: MovieSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorActedInRelationship { + cursor: String! + node: Movie! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - input ActorActedInConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere + test("Prevent update on nested relationships", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! + type Actor @query(aggregate: true) { + name: String! + actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: MovieSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorActedInRelationship { + cursor: String! + node: Movie! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + description: String + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + description: String + 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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - input ActorActedInConnectionSort { - node: MovieSort + test("Prevent create on nested relationships", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + type Actor @query(aggregate: true) { + name: String! + actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) } - - input ActorActedInCreateFieldInput { - node: MovieCreateInput! + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: MovieSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorActedInRelationship { + cursor: String! + node: Movie! +} + +input ActorActedInUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + description: String + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + description: String + 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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); + }); + describe("Relationships to a union type", () => { + test("Prevent relationship field creation", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String } - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere + type Series @query(aggregate: true) { + name: String! + description: String } - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } + union Production = Movie | Series - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: false, onUpdate: true) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere +} + +input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] +} + +input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] +} + +input ActorActedInMovieConnectFieldInput { + where: MovieConnectWhere +} + +input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere +} + +input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! +} + +input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesUpdateConnectionInput { + node: SeriesUpdateInput +} + +input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: ActorActedInConnectInput +} + +input ActorCreateInput { + name: String! +} + +input ActorDeleteInput { + actedIn: ActorActedInDeleteInput +} + +input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput +} + +\\"\\"\\" +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 { + actedIn: ActorActedInUpdateInput + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Production = Movie | Series + +input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +type Series { + description: String + name: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! +} + +input SeriesConnectWhere { + node: SeriesWhere! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + name: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + name: SortDirection +} + +input SeriesUpdateInput { + description: String + name: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); - type ActorActedInRelationship { - cursor: String! - node: Movie! + test("Prevent relationship field update", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String } - input ActorActedInUpdateConnectionInput { - node: MovieUpdateInput + type Series @query(aggregate: true) { + name: String! + description: String } - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } + union Production = Movie | Series - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: true, onUpdate: false) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere +} + +input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput +} + +input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] +} + +input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] +} + +input ActorActedInMovieConnectFieldInput { + where: MovieConnectWhere +} + +input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere +} + +input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! +} + +input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: ActorActedInConnectInput +} + +input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! +} + +input ActorDeleteInput { + actedIn: ActorActedInDeleteInput +} + +input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput +} + +\\"\\"\\" +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Production = Movie | Series + +input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +type Series { + description: String + name: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! +} + +input SeriesConnectWhere { + node: SeriesWhere! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + name: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + name: SortDirection +} + +input SeriesUpdateInput { + description: String + name: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] + test("Prevent update on nested relationships", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - input ActorCreateInput { - name: String! + type Series @query(aggregate: true) { + name: String! + description: String } - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } + union Production = Movie | Series - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere +} + +input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput +} + +input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] +} + +input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] +} + +input ActorActedInMovieConnectFieldInput { + connect: [MovieConnectInput!] + where: MovieConnectWhere +} + +input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInMovieDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere +} + +input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! +} + +input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: ActorActedInConnectInput +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! +} + +input ActorDeleteInput { + actedIn: ActorActedInDeleteInput +} + +input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput +} + +\\"\\"\\" +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + description: String + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + description: String + 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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Production = Movie | Series + +input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +type Series { + description: String + name: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! +} + +input SeriesConnectWhere { + node: SeriesWhere! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + name: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + name: SortDirection +} + +input SeriesUpdateInput { + description: String + name: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); - type ActorEdge { - cursor: String! - node: Actor! + test("Prevent create on nested relationships", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection + type Series @query(aggregate: true) { + name: String! + description: String } - type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } + union Production = Movie | Series - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("Prevent relationship field update", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - } - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Movie!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: true, onUpdate: false) + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: MovieSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorActedInRelationship { - cursor: String! - node: Movie! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere +} + +input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] +} + +input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] +} + +input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] +} + +input ActorActedInMovieConnectFieldInput { + connect: [MovieConnectInput!] + where: MovieConnectWhere +} + +input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! +} + +input ActorActedInMovieDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInMovieConnectionWhere +} + +input ActorActedInMovieUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere +} + +input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! +} + +input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInSeriesUpdateConnectionInput { + node: SeriesUpdateInput +} + +input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere +} + +input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: ActorActedInConnectInput +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + name: String! +} + +input ActorDeleteInput { + actedIn: ActorActedInDeleteInput +} + +input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput +} + +\\"\\"\\" +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 { + actedIn: ActorActedInUpdateInput + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + description: String + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + description: String + 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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Production = Movie | Series + +input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +type Series { + description: String + name: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! +} + +input SeriesConnectWhere { + node: SeriesWhere! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + name: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + name: SortDirection +} + +input SeriesUpdateInput { + description: String + name: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); + }); - test("Prevent update on nested relationships", async () => { + describe("Relationships to an interface type", () => { + test("Prevent relationship field creation", async () => { const typeDefs = gql` - type Movie @query(aggregate: true) { + interface Production { title: String! description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: MovieSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorActedInRelationship { - cursor: String! - node: Movie! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - description: String - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("Prevent create on nested relationships", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: MovieSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorActedInRelationship { - cursor: String! - node: Movie! - } - - input ActorActedInUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - description: String - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - }); - describe("Relationships to a union type", () => { - test("Prevent relationship field creation", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - } - - type Series @query(aggregate: true) { - name: String! - description: String - } - - union Production = Movie | Series - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: false, onUpdate: true) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere - } - - input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] - } - - input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] - } - - input ActorActedInMovieConnectFieldInput { - where: MovieConnectWhere - } - - input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere - } - - input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! - } - - input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesUpdateConnectionInput { - node: SeriesUpdateInput - } - - input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: ActorActedInConnectInput - } - - input ActorCreateInput { - name: String! - } - - input ActorDeleteInput { - actedIn: ActorActedInDeleteInput - } - - input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput - } - - \\"\\"\\" - 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 { - actedIn: ActorActedInUpdateInput - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Production = Movie | Series - - input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"\\"\\"\\" - type Series { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! - } - - input SeriesConnectWhere { - node: SeriesWhere! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - name: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - name: SortDirection - } - - input SeriesUpdateInput { - description: String - name: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Prevent relationship field update", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - } - - type Series @query(aggregate: true) { - name: String! - description: String - } - - union Production = Movie | Series - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: true, onUpdate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere - } - - input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput - } - - input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] - } - - input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] - } - - input ActorActedInMovieConnectFieldInput { - where: MovieConnectWhere - } - - input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere - } - - input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! - } - - input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: ActorActedInConnectInput - } - - input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! - } - - input ActorDeleteInput { - actedIn: ActorActedInDeleteInput - } - - input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput - } - - \\"\\"\\" - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Production = Movie | Series - - input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"\\"\\"\\" - type Series { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! - } - - input SeriesConnectWhere { - node: SeriesWhere! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - name: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - name: SortDirection - } - - input SeriesUpdateInput { - description: String - name: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Prevent update on nested relationships", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type Series @query(aggregate: true) { - name: String! - description: String - } - - union Production = Movie | Series - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere - } - - input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput - } - - input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] - } - - input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] - } - - input ActorActedInMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere - } - - input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInMovieDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere - } - - input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! - } - - input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: ActorActedInConnectInput - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! - } - - input ActorDeleteInput { - actedIn: ActorActedInDeleteInput - } - - input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput - } - - \\"\\"\\" - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - description: String - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Production = Movie | Series - - input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"\\"\\"\\" - type Series { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! - } - - input SeriesConnectWhere { - node: SeriesWhere! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - name: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - name: SortDirection - } - - input SeriesUpdateInput { - description: String - name: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Prevent create on nested relationships", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type Series @query(aggregate: true) { - name: String! - description: String - } - - union Production = Movie | Series - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere - } - - input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] - } - - input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] - } - - input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] - } - - input ActorActedInMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere - } - - input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! - } - - input ActorActedInMovieDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInMovieConnectionWhere - } - - input ActorActedInMovieUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere - } - - input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! - } - - input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInSeriesUpdateConnectionInput { - node: SeriesUpdateInput - } - - input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere - } - - input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: ActorActedInConnectInput - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String! - } - - input ActorDeleteInput { - actedIn: ActorActedInDeleteInput - } - - input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput - } - - \\"\\"\\" - 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 { - actedIn: ActorActedInUpdateInput - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - description: String - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Production = Movie | Series - - input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"\\"\\"\\" - type Series { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! - } - - input SeriesConnectWhere { - node: SeriesWhere! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - name: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - name: SortDirection - } - - input SeriesUpdateInput { - description: String - name: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - }); - - describe("Relationships to an interface type", () => { - test("Prevent relationship field creation", async () => { - const typeDefs = gql` - interface Production { - title: String! - description: String - } - - type Movie implements Production @query(aggregate: true) { - title: String! - description: String - } - - type Series implements Production @query(aggregate: true) { - title: String! - description: String - } - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: false, onUpdate: true) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - input ActorActedInUpdateConnectionInput { - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 { - description: SortDirection - title: SortDirection - } - - input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - description: String - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - title: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - description: String - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Prevent relationship field update", async () => { - const typeDefs = gql` - interface Production { - title: String! - description: String - } - - type Movie implements Production @query(aggregate: true) { - title: String! - description: String - } - - type Series implements Production @query(aggregate: true) { - title: String! - description: String - } - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: true, onUpdate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - description: String - title: String! - } - - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 { - description: SortDirection - title: SortDirection - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - description: String - title: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - description: String - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Prevent update on nested relationships", async () => { - const typeDefs = gql` - interface Production { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type Movie implements Production @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type Series implements Production @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] - } - - input MovieCreateInput { - actors: ProductionActorsFieldInput - description: String - title: String! - } - - input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] - } - - input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionActorsAggregateInput { - AND: [ProductionActorsAggregateInput!] - NOT: ProductionActorsAggregateInput - OR: [ProductionActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ProductionActorsNodeAggregationWhereInput - } - - input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ProductionActorsConnectionSort { - node: ActorSort - } - - input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ProductionActorsCreateFieldInput { - node: ActorCreateInput! - } - - input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - } - - input ProductionActorsNodeAggregationWhereInput { - AND: [ProductionActorsNodeAggregationWhereInput!] - NOT: ProductionActorsNodeAggregationWhereInput - OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ProductionActorsRelationship { - cursor: String! - node: Actor! - } - - input ProductionActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere - } - - input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - actors: [ProductionActorsConnectFieldInput!] - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - actors: [ProductionActorsDeleteFieldInput!] - } - - input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - actors: [ProductionActorsDisconnectFieldInput!] - } - - input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] - } - - input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] - } - - input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 { - description: SortDirection - title: SortDirection - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: ProductionActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Productions where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Productions where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesActorActorsAggregationSelection { - count: Int! - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesActorsNodeAggregationWhereInput - } - - input SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - actors: ProductionActorsFieldInput - description: String - title: String! - } - - input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] - } - - input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String } - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String + type Movie implements Production @query(aggregate: true) { + title: String! + description: String } - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC + type Series implements Production @query(aggregate: true) { + title: String! + description: String } - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: false, onUpdate: true) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +input ActorActedInUpdateConnectionInput { + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie implements Production { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + description: String + title: String! +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 { + description: SortDirection + title: SortDirection +} + +input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + description: String + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + description: String + title: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + title: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + description: String + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); - type StringAggregateSelectionNullable { - longest: String - shortest: String + test("Prevent relationship field update", async () => { + const typeDefs = gql` + interface Production { + title: String! + description: String } - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! + type Movie implements Production @query(aggregate: true) { + title: String! + description: String } - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! + type Series implements Production @query(aggregate: true) { + title: String! + description: String } - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: true, onUpdate: false) } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie implements Production { + description: String + title: String! +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + description: String + title: String! +} + +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + description: String + title: String! +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 { + description: SortDirection + title: SortDirection +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + description: String + title: String! +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + description: String + title: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + description: String + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); - test("Prevent create on nested relationships", async () => { + test("Prevent update on nested relationships", async () => { const typeDefs = gql` interface Production { title: String! @@ -7168,914 +6161,1798 @@ describe("@settable", () => { type Actor @query(aggregate: true) { name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - } - - input ActorActedInUpdateConnectionInput { - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] - } - - input MovieCreateInput { - actors: ProductionActorsFieldInput - description: String - title: String! - } - - input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] - } - - input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - description: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] +} + +input MovieCreateInput { + actors: ProductionActorsFieldInput + description: String + title: String! +} + +input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] +} + +input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! +} + +input ProductionActorsAggregateInput { + AND: [ProductionActorsAggregateInput!] + NOT: ProductionActorsAggregateInput + OR: [ProductionActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ProductionActorsNodeAggregationWhereInput +} + +input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ProductionActorsConnectionSort { + node: ActorSort +} + +input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ProductionActorsCreateFieldInput { + node: ActorCreateInput! +} + +input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] +} + +input ProductionActorsNodeAggregationWhereInput { + AND: [ProductionActorsNodeAggregationWhereInput!] + NOT: ProductionActorsNodeAggregationWhereInput + OR: [ProductionActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ProductionActorsRelationship { + cursor: String! + node: Actor! +} + +input ProductionActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere +} + +input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + actors: [ProductionActorsConnectFieldInput!] +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + actors: [ProductionActorsDeleteFieldInput!] +} + +input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + actors: [ProductionActorsDisconnectFieldInput!] +} + +input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] +} + +input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] +} + +input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 { + description: SortDirection + title: SortDirection +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! +} + +type SeriesActorActorsAggregationSelection { + count: Int! + node: SeriesActorActorsNodeAggregateSelection +} + +type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesActorsNodeAggregationWhereInput +} + +input SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + actors: ProductionActorsFieldInput + description: String + title: String! +} + +input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] +} + +input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); + test("Prevent create on nested relationships", async () => { + const typeDefs = gql` interface Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionActorsAggregateInput { - AND: [ProductionActorsAggregateInput!] - NOT: ProductionActorsAggregateInput - OR: [ProductionActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ProductionActorsNodeAggregationWhereInput - } - - input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ProductionActorsConnectionSort { - node: ActorSort - } - - input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ProductionActorsCreateFieldInput { - node: ActorCreateInput! - } - - input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - } - - input ProductionActorsNodeAggregationWhereInput { - AND: [ProductionActorsNodeAggregationWhereInput!] - NOT: ProductionActorsNodeAggregationWhereInput - OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ProductionActorsRelationship { - cursor: String! - node: Actor! - } - - input ProductionActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere - } - - input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - actors: [ProductionActorsConnectFieldInput!] - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - actors: [ProductionActorsDeleteFieldInput!] - } - - input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - actors: [ProductionActorsDisconnectFieldInput!] - } - - input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] - } - - input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] - } - - input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 { - description: SortDirection - title: SortDirection - } - - input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: ProductionActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Productions where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Productions where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesActorActorsAggregationSelection { - count: Int! - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesActorsNodeAggregationWhereInput - } - - input SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - actors: ProductionActorsFieldInput - description: String - title: String! - } - - input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] - } - - input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - description: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! + type Movie implements Production @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! + type Series implements Production @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere +} + +type ActorActedInRelationship { + cursor: String! + node: Production! +} + +input ActorActedInUpdateConnectionInput { + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] +} + +input MovieCreateInput { + actors: ProductionActorsFieldInput + description: String + title: String! +} + +input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] +} + +input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + description: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! +} + +input ProductionActorsAggregateInput { + AND: [ProductionActorsAggregateInput!] + NOT: ProductionActorsAggregateInput + OR: [ProductionActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ProductionActorsNodeAggregationWhereInput +} + +input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ProductionActorsConnectionSort { + node: ActorSort +} + +input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ProductionActorsCreateFieldInput { + node: ActorCreateInput! +} + +input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] +} + +input ProductionActorsNodeAggregationWhereInput { + AND: [ProductionActorsNodeAggregationWhereInput!] + NOT: ProductionActorsNodeAggregationWhereInput + OR: [ProductionActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ProductionActorsRelationship { + cursor: String! + node: Actor! +} + +input ProductionActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere +} + +input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + actors: [ProductionActorsConnectFieldInput!] +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + actors: [ProductionActorsDeleteFieldInput!] +} + +input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + actors: [ProductionActorsDisconnectFieldInput!] +} + +input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] +} + +input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] +} + +input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 { + description: SortDirection + title: SortDirection +} + +input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! +} + +type SeriesActorActorsAggregationSelection { + count: Int! + node: SeriesActorActorsNodeAggregateSelection +} + +type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesActorsNodeAggregationWhereInput +} + +input SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + actors: ProductionActorsFieldInput + description: String + title: String! +} + +input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] +} + +input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + description: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); }); }); diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 8bca6d28b4..17786257c4 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -35,170 +35,166 @@ describe("Timestamps", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - createdAt: DateTime! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - updatedAt: DateTime! - } - - type MovieAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNullable! - updatedAt: DateTimeAggregateSelectionNonNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - createdAt: SortDirection - id: SortDirection - updatedAt: SortDirection - } - - input MovieUpdateInput { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - updatedAt: DateTime - updatedAt_GT: DateTime - updatedAt_GTE: DateTime - updatedAt_IN: [DateTime!] - updatedAt_LT: DateTime - updatedAt_LTE: DateTime - updatedAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - updatedAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + createdAt: DateTime! + id: ID + updatedAt: DateTime! +} + +type MovieAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNullable! + updatedAt: DateTimeAggregateSelectionNonNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + createdAt: SortDirection + id: SortDirection + updatedAt: SortDirection +} + +input MovieUpdateInput { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime!] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + updatedAt: DateTime + updatedAt_GT: DateTime + updatedAt_GTE: DateTime + updatedAt_IN: [DateTime!] + updatedAt_LT: DateTime + updatedAt_LTE: DateTime + updatedAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + updatedAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/enum.test.ts b/packages/graphql/tests/schema/enum.test.ts index 39f81a745b..0a64e2d24c 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -39,132 +39,130 @@ describe("Enum", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - status: Status - } - - type MovieAggregateSelection { - count: Int! - } - - input MovieCreateInput { - status: Status - } - - 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 { - status: SortDirection - } - - input MovieUpdateInput { - status: Status - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - status: Status - status_IN: [Status] - status_NOT: Status @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - status_NOT_IN: [Status] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - enum Status { - ACTIVE - INACTIVE - PENDING - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + status: Status +} + +type MovieAggregateSelection { + count: Int! +} + +input MovieCreateInput { + status: Status +} + +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 { + status: SortDirection +} + +input MovieUpdateInput { + status: Status +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + status: Status + status_IN: [Status] + status_NOT: Status @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + status_NOT_IN: [Status] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +enum Status { + ACTIVE + INACTIVE + PENDING +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index c48e09808b..3550bace73 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -37,159 +37,156 @@ describe("Extend", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - name: String - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - name: String - } - - 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 - name: SortDirection - } - - input MovieUpdateInput { - id: ID - name: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID + name: String +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + name: StringAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID + name: String +} + +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 + name: SortDirection +} + +input MovieUpdateInput { + id: ID + name: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index 439e7c5606..87df84fe5a 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -44,597 +44,591 @@ describe("Apollo Federation", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@shareable\\"]) { - query: Query - mutation: Mutation - } - - directive @federation__extends on INTERFACE | OBJECT - - directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - - directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @federation__key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - - directive @federation__override(from: String!) on FIELD_DEFINITION - - directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - - directive @shareable on FIELD_DEFINITION | OBJECT - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! - } - - type CreateUsersMutationResponse @shareable { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! @shareable - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! @shareable - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! @shareable - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"\\"\\"\\" - type Post { - \\"\\"\\"\\"\\"\\" - author: User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! - \\"\\"\\"\\"\\"\\" - content: String! - } - - type PostAggregateSelection { - content: StringAggregateSelectionNonNullable! - count: Int! - } - - input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput - } - - input PostAuthorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type PostAuthorConnection { - edges: [PostAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PostAuthorConnectionSort { - node: UserSort - } - - input PostAuthorConnectionWhere { - AND: [PostAuthorConnectionWhere!] - NOT: PostAuthorConnectionWhere - OR: [PostAuthorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PostAuthorCreateFieldInput { - node: UserCreateInput! - } - - input PostAuthorDeleteFieldInput { - delete: UserDeleteInput - where: PostAuthorConnectionWhere - } - - input PostAuthorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: PostAuthorConnectionWhere - } - - input PostAuthorFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - } - - input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type PostAuthorRelationship { - cursor: String! - node: User! - } - - input PostAuthorUpdateConnectionInput { - node: UserUpdateInput - } - - input PostAuthorUpdateFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - delete: PostAuthorDeleteFieldInput - disconnect: PostAuthorDisconnectFieldInput - update: PostAuthorUpdateConnectionInput - where: PostAuthorConnectionWhere - } - - input PostConnectInput { - author: PostAuthorConnectFieldInput - } - - input PostConnectWhere { - node: PostWhere! - } - - input PostCreateInput { - author: PostAuthorFieldInput - content: String! - } - - input PostDeleteInput { - author: PostAuthorDeleteFieldInput - } - - input PostDisconnectInput { - author: PostAuthorDisconnectFieldInput - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] - } - - input PostRelationInput { - author: PostAuthorCreateFieldInput - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - content: SortDirection - } - - input PostUpdateInput { - author: PostAuthorUpdateFieldInput - content: String - } - - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - - type PostUserAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - author: UserWhere - authorAggregate: PostAuthorAggregateInput - authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String!] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - } - - type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - _service: _Service! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! @shareable - usersAggregate(where: UserWhere): UserAggregateSelection! @shareable - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! @shareable - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! - } - - type UpdateUsersMutationResponse @shareable { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User @shareable { - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! - } - - type UserAggregateSelection @shareable { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input UserConnectInput { - posts: [UserPostsConnectFieldInput!] - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - name: String! - posts: UserPostsFieldInput - } - - input UserDeleteInput { - posts: [UserPostsDeleteFieldInput!] - } - - input UserDisconnectInput { - posts: [UserPostsDisconnectFieldInput!] - } - - type UserEdge @shareable { - cursor: String! - node: User! - } - - 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!] - } - - type UserPostPostsAggregationSelection { - count: Int! - node: UserPostPostsNodeAggregateSelection - } - - type UserPostPostsNodeAggregateSelection { - content: StringAggregateSelectionNonNullable! - } - - input UserPostsAggregateInput { - AND: [UserPostsAggregateInput!] - NOT: UserPostsAggregateInput - OR: [UserPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserPostsNodeAggregationWhereInput - } - - input UserPostsConnectFieldInput { - connect: [PostConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere - } - - type UserPostsConnection { - edges: [UserPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserPostsConnectionSort { - node: PostSort - } - - input UserPostsConnectionWhere { - AND: [UserPostsConnectionWhere!] - NOT: UserPostsConnectionWhere - OR: [UserPostsConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input UserPostsCreateFieldInput { - node: PostCreateInput! - } - - input UserPostsDeleteFieldInput { - delete: PostDeleteInput - where: UserPostsConnectionWhere - } - - input UserPostsDisconnectFieldInput { - disconnect: PostDisconnectInput - where: UserPostsConnectionWhere - } - - input UserPostsFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - } - - input UserPostsNodeAggregationWhereInput { - AND: [UserPostsNodeAggregationWhereInput!] - NOT: UserPostsNodeAggregationWhereInput - OR: [UserPostsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type UserPostsRelationship { - cursor: String! - node: Post! - } - - input UserPostsUpdateConnectionInput { - node: PostUpdateInput - } - - input UserPostsUpdateFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - delete: [UserPostsDeleteFieldInput!] - disconnect: [UserPostsDisconnectFieldInput!] - update: UserPostsUpdateConnectionInput - where: UserPostsConnectionWhere - } - - input UserRelationInput { - posts: [UserPostsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: String - posts: [UserPostsUpdateFieldInput!] - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: UserPostsAggregateInput - postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere - postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere - \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere - \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere - posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere - \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere - } - - type UsersConnection @shareable { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - scalar _Any - - type _Service { - sdl: String - } - - scalar federation__FieldSet - - scalar link__Import - - enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY - }" - `); +"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@shareable\\"]) { + query: Query + mutation: Mutation +} + +directive @federation__extends on INTERFACE | OBJECT + +directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + +directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @federation__key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + +directive @federation__override(from: String!) on FIELD_DEFINITION + +directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + +directive @shareable on FIELD_DEFINITION | OBJECT + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! +} + +type CreateUsersMutationResponse @shareable { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! @shareable + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! @shareable + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! @shareable +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Post { + author: User! + authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + content: String! +} + +type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! +} + +input PostAuthorAggregateInput { + AND: [PostAuthorAggregateInput!] + NOT: PostAuthorAggregateInput + OR: [PostAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostAuthorNodeAggregationWhereInput +} + +input PostAuthorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PostAuthorConnectionSort { + node: UserSort +} + +input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PostAuthorCreateFieldInput { + node: UserCreateInput! +} + +input PostAuthorDeleteFieldInput { + delete: UserDeleteInput + where: PostAuthorConnectionWhere +} + +input PostAuthorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostAuthorConnectionWhere +} + +input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput +} + +input PostAuthorNodeAggregationWhereInput { + AND: [PostAuthorNodeAggregationWhereInput!] + NOT: PostAuthorNodeAggregationWhereInput + OR: [PostAuthorNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type PostAuthorRelationship { + cursor: String! + node: User! +} + +input PostAuthorUpdateConnectionInput { + node: UserUpdateInput +} + +input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere +} + +input PostConnectInput { + author: PostAuthorConnectFieldInput +} + +input PostConnectWhere { + node: PostWhere! +} + +input PostCreateInput { + author: PostAuthorFieldInput + content: String! +} + +input PostDeleteInput { + author: PostAuthorDeleteFieldInput +} + +input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput +} + +type PostEdge { + cursor: String! + node: Post! +} + +input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] +} + +input PostRelationInput { + author: PostAuthorCreateFieldInput +} + +\\"\\"\\" +Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. +\\"\\"\\" +input PostSort { + content: SortDirection +} + +input PostUpdateInput { + author: PostAuthorUpdateFieldInput + content: String +} + +type PostUserAuthorAggregationSelection { + count: Int! + node: PostUserAuthorNodeAggregateSelection +} + +type PostUserAuthorNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String +} + +type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Query { + _service: _Service! + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! @shareable + usersAggregate(where: UserWhere): UserAggregateSelection! @shareable + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! @shareable +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! +} + +type UpdateUsersMutationResponse @shareable { + info: UpdateInfo! + users: [User!]! +} + +type User @shareable { + name: String! + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! +} + +type UserAggregateSelection @shareable { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input UserConnectInput { + posts: [UserPostsConnectFieldInput!] +} + +input UserConnectWhere { + node: UserWhere! +} + +input UserCreateInput { + name: String! + posts: UserPostsFieldInput +} + +input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] +} + +input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] +} + +type UserEdge @shareable { + cursor: String! + node: User! +} + +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!] +} + +type UserPostPostsAggregationSelection { + count: Int! + node: UserPostPostsNodeAggregateSelection +} + +type UserPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNonNullable! +} + +input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput +} + +input UserPostsConnectFieldInput { + connect: [PostConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere +} + +type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserPostsConnectionSort { + node: PostSort +} + +input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input UserPostsCreateFieldInput { + node: PostCreateInput! +} + +input UserPostsDeleteFieldInput { + delete: PostDeleteInput + where: UserPostsConnectionWhere +} + +input UserPostsDisconnectFieldInput { + disconnect: PostDisconnectInput + where: UserPostsConnectionWhere +} + +input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] +} + +input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type UserPostsRelationship { + cursor: String! + node: Post! +} + +input UserPostsUpdateConnectionInput { + node: PostUpdateInput +} + +input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere +} + +input UserRelationInput { + posts: [UserPostsCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: String + posts: [UserPostsUpdateFieldInput!] +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere +} + +type UsersConnection @shareable { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +scalar _Any + +type _Service { + sdl: String +} + +scalar federation__FieldSet + +scalar link__Import + +enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY +}" +`); }); test("@key(resolvable: false)", async () => { @@ -657,415 +651,410 @@ describe("Apollo Federation", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\"]) { - query: Query - mutation: Mutation - } - - directive @federation__extends on INTERFACE | OBJECT - - directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - - directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @federation__override(from: String!) on FIELD_DEFINITION - - directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__shareable on FIELD_DEFINITION | OBJECT - - directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - - directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo @federation__shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo @federation__shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo @federation__shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"\\"\\"\\" - type Post { - \\"\\"\\"\\"\\"\\" - author: User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! - \\"\\"\\"\\"\\"\\" - content: String! - } - - type PostAggregateSelection { - content: StringAggregateSelectionNonNullable! - count: Int! - } - - input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput - } - - input PostAuthorConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type PostAuthorConnection { - edges: [PostAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PostAuthorConnectionSort { - node: UserSort - } - - input PostAuthorConnectionWhere { - AND: [PostAuthorConnectionWhere!] - NOT: PostAuthorConnectionWhere - OR: [PostAuthorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PostAuthorCreateFieldInput { - node: UserCreateInput! - } - - input PostAuthorDeleteFieldInput { - where: PostAuthorConnectionWhere - } - - input PostAuthorDisconnectFieldInput { - where: PostAuthorConnectionWhere - } - - input PostAuthorFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - } - - input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type PostAuthorRelationship { - cursor: String! - node: User! - } - - input PostAuthorUpdateConnectionInput { - node: UserUpdateInput - } - - input PostAuthorUpdateFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - delete: PostAuthorDeleteFieldInput - disconnect: PostAuthorDisconnectFieldInput - update: PostAuthorUpdateConnectionInput - where: PostAuthorConnectionWhere - } - - input PostConnectInput { - author: PostAuthorConnectFieldInput - } - - input PostCreateInput { - author: PostAuthorFieldInput - content: String! - } - - input PostDeleteInput { - author: PostAuthorDeleteFieldInput - } - - input PostDisconnectInput { - author: PostAuthorDisconnectFieldInput - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] - } - - input PostRelationInput { - author: PostAuthorCreateFieldInput - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - content: SortDirection - } - - input PostUpdateInput { - author: PostAuthorUpdateFieldInput - content: String - } - - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - - type PostUserAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - author: UserWhere - authorAggregate: PostAuthorAggregateInput - authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String!] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - } - - type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - _entities(representations: [_Any!]!): [_Entity]! - _service: _Service! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable @federation__shareable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo @federation__shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User @key(fields: \\"name\\", resolvable: false) { - \\"\\"\\"\\"\\"\\" - name: String! - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - name: String! - } - - type UserEdge { - cursor: String! - node: User! - } - - 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 { - name: String - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - scalar _Any - - union _Entity = User - - type _Service { - sdl: String - } - - scalar federation__FieldSet - - scalar link__Import - - enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY - }" - `); +"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\"]) { + query: Query + mutation: Mutation +} + +directive @federation__extends on INTERFACE | OBJECT + +directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + +directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @federation__override(from: String!) on FIELD_DEFINITION + +directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__shareable on FIELD_DEFINITION | OBJECT + +directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + +directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo @federation__shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo @federation__shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo @federation__shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Post { + author: User! + authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + content: String! +} + +type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! +} + +input PostAuthorAggregateInput { + AND: [PostAuthorAggregateInput!] + NOT: PostAuthorAggregateInput + OR: [PostAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostAuthorNodeAggregationWhereInput +} + +input PostAuthorConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PostAuthorConnectionSort { + node: UserSort +} + +input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PostAuthorCreateFieldInput { + node: UserCreateInput! +} + +input PostAuthorDeleteFieldInput { + where: PostAuthorConnectionWhere +} + +input PostAuthorDisconnectFieldInput { + where: PostAuthorConnectionWhere +} + +input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput +} + +input PostAuthorNodeAggregationWhereInput { + AND: [PostAuthorNodeAggregationWhereInput!] + NOT: PostAuthorNodeAggregationWhereInput + OR: [PostAuthorNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type PostAuthorRelationship { + cursor: String! + node: User! +} + +input PostAuthorUpdateConnectionInput { + node: UserUpdateInput +} + +input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere +} + +input PostConnectInput { + author: PostAuthorConnectFieldInput +} + +input PostCreateInput { + author: PostAuthorFieldInput + content: String! +} + +input PostDeleteInput { + author: PostAuthorDeleteFieldInput +} + +input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput +} + +type PostEdge { + cursor: String! + node: Post! +} + +input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] +} + +input PostRelationInput { + author: PostAuthorCreateFieldInput +} + +\\"\\"\\" +Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. +\\"\\"\\" +input PostSort { + content: SortDirection +} + +input PostUpdateInput { + author: PostAuthorUpdateFieldInput + content: String +} + +type PostUserAuthorAggregationSelection { + count: Int! + node: PostUserAuthorNodeAggregateSelection +} + +type PostUserAuthorNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String +} + +type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Query { + _entities(representations: [_Any!]!): [_Entity]! + _service: _Service! + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable @federation__shareable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo @federation__shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User @key(fields: \\"name\\", resolvable: false) { + name: String! +} + +type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input UserConnectWhere { + node: UserWhere! +} + +input UserCreateInput { + name: String! +} + +type UserEdge { + cursor: String! + node: User! +} + +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 { + name: String +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +scalar _Any + +union _Entity = User + +type _Service { + sdl: String +} + +scalar federation__FieldSet + +scalar link__Import + +enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY +}" +`); }); }); diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index d1e869e33b..5429920514 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -41,221 +41,218 @@ describe("@fulltext schema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } +"schema { + query: Query + mutation: Mutation +} - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} - \\"\\"\\"The input for filtering a float\\"\\"\\" - input FloatWhere { - max: Float - min: Float - } +\\"\\"\\"The input for filtering a float\\"\\"\\" +input FloatWhere { + max: Float + min: Float +} - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - description: String - \\"\\"\\"\\"\\"\\" - title: String - } +type Movie { + description: String + title: String +} - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - } +type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNullable! +} - input MovieCreateInput { - description: String - title: String - } +input MovieCreateInput { + description: String + title: String +} - type MovieEdge { - cursor: String! - node: Movie! - } +type MovieEdge { + cursor: String! + node: Movie! +} - input MovieFulltext { - MovieDescription: MovieMovieDescriptionFulltext - MovieTitle: MovieMovieTitleFulltext - } +input MovieFulltext { + MovieDescription: MovieMovieDescriptionFulltext + MovieTitle: MovieMovieTitleFulltext +} - \\"\\"\\"The result of a fulltext search on an index of Movie\\"\\"\\" - type MovieFulltextResult { - movie: Movie! - score: Float! - } +\\"\\"\\"The result of a fulltext search on an index of Movie\\"\\"\\" +type MovieFulltextResult { + movie: Movie! + score: Float! +} - \\"\\"\\"The input for sorting a fulltext query on an index of Movie\\"\\"\\" - input MovieFulltextSort { - movie: MovieSort - score: SortDirection - } +\\"\\"\\"The input for sorting a fulltext query on an index of Movie\\"\\"\\" +input MovieFulltextSort { + movie: MovieSort + score: SortDirection +} - \\"\\"\\"The input for filtering a fulltext query on an index of Movie\\"\\"\\" - input MovieFulltextWhere { - movie: MovieWhere - score: FloatWhere - } +\\"\\"\\"The input for filtering a fulltext query on an index of Movie\\"\\"\\" +input MovieFulltextWhere { + movie: MovieWhere + score: FloatWhere +} - input MovieMovieDescriptionFulltext { - phrase: String! - } +input MovieMovieDescriptionFulltext { + phrase: String! +} - input MovieMovieTitleFulltext { - phrase: String! - } +input MovieMovieTitleFulltext { + phrase: String! +} - 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!] - } +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 { - description: SortDirection - title: SortDirection - } +\\"\\"\\" +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 { + description: SortDirection + title: SortDirection +} - input MovieUpdateInput { - description: String - title: String - } +input MovieUpdateInput { + description: String + title: String +} - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} - type Query { - movies( - \\"\\"\\" - Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. - \\"\\"\\" - fulltext: MovieFulltext - options: MovieOptions - where: MovieWhere - ): [Movie!]! - moviesAggregate( - \\"\\"\\" - Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. - \\"\\"\\" - fulltext: MovieFulltext - where: MovieWhere - ): MovieAggregateSelection! - moviesConnection( - after: String - first: Int - \\"\\"\\" - Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. - \\"\\"\\" - fulltext: MovieFulltext - sort: [MovieSort] - where: MovieWhere - ): MoviesConnection! - \\"\\"\\" - Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the \`fulltext\` argument under other queries for this functionality. - \\"\\"\\" - moviesFulltextMovieDescription(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! - \\"\\"\\" - Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the \`fulltext\` argument under other queries for this functionality. - \\"\\"\\" - moviesFulltextMovieTitle(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! - } +type Query { + movies( + \\"\\"\\" + Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. + \\"\\"\\" + fulltext: MovieFulltext + options: MovieOptions + where: MovieWhere + ): [Movie!]! + moviesAggregate( + \\"\\"\\" + Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. + \\"\\"\\" + fulltext: MovieFulltext + where: MovieWhere + ): MovieAggregateSelection! + moviesConnection( + after: String + first: Int + \\"\\"\\" + Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. + \\"\\"\\" + fulltext: MovieFulltext + sort: [MovieSort] + where: MovieWhere + ): MoviesConnection! + \\"\\"\\" + Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the \`fulltext\` argument under other queries for this functionality. + \\"\\"\\" + moviesFulltextMovieDescription(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! + \\"\\"\\" + Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the \`fulltext\` argument under other queries for this functionality. + \\"\\"\\" + moviesFulltextMovieTitle(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! +} - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} - type StringAggregateSelectionNullable { - longest: String - shortest: String - } +type StringAggregateSelectionNullable { + longest: String + shortest: String +} - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index a0228de8df..08d57d3a60 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -34,172 +34,169 @@ describe("Node Interface Types", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Node { - id: ID! - \\"\\"\\"\\"\\"\\" - imdb: ID! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - imdb: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - imdb: ID! - title: String! - } - - 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 { - imdb: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - imdb: ID - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - imdb: ID - imdb_CONTAINS: ID - imdb_ENDS_WITH: ID - imdb_IN: [ID!] - imdb_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"An object with an ID\\"\\"\\" - interface Node { - \\"\\"\\"The id of the object.\\"\\"\\" - id: ID! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - \\"\\"\\"Fetches an object given its ID\\"\\"\\" - node( - \\"\\"\\"The ID of an object\\"\\"\\" - id: ID! - ): Node - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Movie implements Node { + id: ID! + imdb: ID! + title: String! +} + +type MovieAggregateSelection { + count: Int! + imdb: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + imdb: ID! + title: String! +} + +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 { + imdb: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + imdb: ID + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + imdb: ID + imdb_CONTAINS: ID + imdb_ENDS_WITH: ID + imdb_IN: [ID!] + imdb_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"An object with an ID\\"\\"\\" +interface Node { + \\"\\"\\"The id of the object.\\"\\"\\" + id: ID! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + \\"\\"\\"Fetches an object given its ID\\"\\"\\" + node( + \\"\\"\\"The ID of an object\\"\\"\\" + id: ID! + ): Node +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index 195bc05b42..a89fb80e61 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -41,143 +41,141 @@ describe("Inputs", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - input NodeInput { - id: ID - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - name(input: NodeInput): String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +input NodeInput { + id: ID +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + name(input: NodeInput): String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 1fb619e44a..42cca69819 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -52,530 +52,518 @@ describe("Interface Relationships", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActedInCreateInput { - screenTime: Int! - } - - input ActedInSort { - screenTime: SortDirection - } - - input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - edge: ActedInCreateInput! - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - runtime: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - runtime: Int! - title: String! - } - - 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 { - runtime: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - episodes: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - episodes: Int! - title: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - episodes: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - episodes: Int - episodes_DECREMENT: Int - episodes_INCREMENT: Int - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + screenTime: Int! +} + +input ActedInCreateInput { + screenTime: Int! +} + +input ActedInSort { + screenTime: SortDirection +} + +input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + edge: ActedInCreateInput! + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + screenTime: Int! +} + +input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie implements Production { + runtime: Int! + title: String! +} + +type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + runtime: Int! + title: String! +} + +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 { + runtime: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + title: String! +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + episodes: Int! + title: String! +} + +type SeriesAggregateSelection { + count: Int! + episodes: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + episodes: Int! + title: String! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + episodes: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + episodes: Int + episodes_DECREMENT: Int + episodes_INCREMENT: Int + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + episodes: Int + episodes_GT: Int + episodes_GTE: Int + episodes_IN: [Int!] + episodes_LT: Int + episodes_LTE: Int + episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); test("Interface Relationships - multiple", async () => { @@ -616,3639 +604,3586 @@ describe("Interface Relationships", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActedInCreateInput { - screenTime: Int! - } - - input ActedInSort { - screenTime: SortDirection - } - - input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - edge: ActedInCreateInput! - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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!] - } +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + screenTime: Int! +} + +input ActedInCreateInput { + screenTime: Int! +} + +input ActedInSort { + screenTime: SortDirection +} + +input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! +} + +input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + edge: ActedInCreateInput! + where: ProductionConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + screenTime: Int! +} + +input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +type CreateEpisodesMutationResponse { + episodes: [Episode!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Episode { + runtime: Int! + series(directed: Boolean = true, options: SeriesOptions, where: SeriesWhere): Series! + seriesAggregate(directed: Boolean = true, where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection + seriesConnection(after: String, directed: Boolean = true, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! +} + +type EpisodeAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! +} + +input EpisodeConnectInput { + series: EpisodeSeriesConnectFieldInput +} + +input EpisodeConnectWhere { + node: EpisodeWhere! +} + +input EpisodeCreateInput { + runtime: Int! + series: EpisodeSeriesFieldInput +} + +input EpisodeDeleteInput { + series: EpisodeSeriesDeleteFieldInput +} + +input EpisodeDisconnectInput { + series: EpisodeSeriesDisconnectFieldInput +} + +type EpisodeEdge { + cursor: String! + node: Episode! +} + +input EpisodeOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more EpisodeSort objects to sort Episodes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [EpisodeSort!] +} + +input EpisodeRelationInput { + series: EpisodeSeriesCreateFieldInput +} + +input EpisodeSeriesAggregateInput { + AND: [EpisodeSeriesAggregateInput!] + NOT: EpisodeSeriesAggregateInput + OR: [EpisodeSeriesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: EpisodeSeriesNodeAggregationWhereInput +} + +input EpisodeSeriesConnectFieldInput { + connect: SeriesConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: SeriesConnectWhere +} + +type EpisodeSeriesConnection { + edges: [EpisodeSeriesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input EpisodeSeriesConnectionSort { + node: SeriesSort +} + +input EpisodeSeriesConnectionWhere { + AND: [EpisodeSeriesConnectionWhere!] + NOT: EpisodeSeriesConnectionWhere + OR: [EpisodeSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input EpisodeSeriesCreateFieldInput { + node: SeriesCreateInput! +} + +input EpisodeSeriesDeleteFieldInput { + delete: SeriesDeleteInput + where: EpisodeSeriesConnectionWhere +} + +input EpisodeSeriesDisconnectFieldInput { + disconnect: SeriesDisconnectInput + where: EpisodeSeriesConnectionWhere +} + +input EpisodeSeriesFieldInput { + connect: EpisodeSeriesConnectFieldInput + create: EpisodeSeriesCreateFieldInput +} + +input EpisodeSeriesNodeAggregationWhereInput { + AND: [EpisodeSeriesNodeAggregationWhereInput!] + NOT: EpisodeSeriesNodeAggregationWhereInput + OR: [EpisodeSeriesNodeAggregationWhereInput!] + episodeCount_AVERAGE_EQUAL: Float + episodeCount_AVERAGE_GT: Float + episodeCount_AVERAGE_GTE: Float + episodeCount_AVERAGE_LT: Float + episodeCount_AVERAGE_LTE: Float + episodeCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_MAX_EQUAL: Int + episodeCount_MAX_GT: Int + episodeCount_MAX_GTE: Int + episodeCount_MAX_LT: Int + episodeCount_MAX_LTE: Int + episodeCount_MIN_EQUAL: Int + episodeCount_MIN_GT: Int + episodeCount_MIN_GTE: Int + episodeCount_MIN_LT: Int + episodeCount_MIN_LTE: Int + episodeCount_SUM_EQUAL: Int + episodeCount_SUM_GT: Int + episodeCount_SUM_GTE: Int + episodeCount_SUM_LT: Int + episodeCount_SUM_LTE: Int + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type EpisodeSeriesRelationship { + cursor: String! + node: Series! +} + +type EpisodeSeriesSeriesAggregationSelection { + count: Int! + node: EpisodeSeriesSeriesNodeAggregateSelection +} + +type EpisodeSeriesSeriesNodeAggregateSelection { + episodeCount: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input EpisodeSeriesUpdateConnectionInput { + node: SeriesUpdateInput +} + +input EpisodeSeriesUpdateFieldInput { + connect: EpisodeSeriesConnectFieldInput + create: EpisodeSeriesCreateFieldInput + delete: EpisodeSeriesDeleteFieldInput + disconnect: EpisodeSeriesDisconnectFieldInput + update: EpisodeSeriesUpdateConnectionInput + where: EpisodeSeriesConnectionWhere +} + +\\"\\"\\" +Fields to sort Episodes by. The order in which sorts are applied is not guaranteed when specifying many fields in one EpisodeSort object. +\\"\\"\\" +input EpisodeSort { + runtime: SortDirection +} + +input EpisodeUpdateInput { + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + series: EpisodeSeriesUpdateFieldInput +} + +input EpisodeWhere { + AND: [EpisodeWhere!] + NOT: EpisodeWhere + OR: [EpisodeWhere!] + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + series: SeriesWhere + seriesAggregate: EpisodeSeriesAggregateInput + seriesConnection: EpisodeSeriesConnectionWhere + seriesConnection_NOT: EpisodeSeriesConnectionWhere + series_NOT: SeriesWhere +} + +type EpisodesConnection { + edges: [EpisodeEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + runtime: Int! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] +} + +input MovieCreateInput { + actors: ProductionActorsFieldInput + runtime: Int! + title: String! +} + +input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] +} + +input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + runtime: SortDirection + title: SortDirection +} + +input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createEpisodes(input: [EpisodeCreateInput!]!): CreateEpisodesMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteEpisodes(delete: EpisodeDeleteInput, where: EpisodeWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateEpisodes(connect: EpisodeConnectInput, create: EpisodeRelationInput, delete: EpisodeDeleteInput, disconnect: EpisodeDisconnectInput, update: EpisodeUpdateInput, where: EpisodeWhere): UpdateEpisodesMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + title: String! +} + +input ProductionActorsAggregateInput { + AND: [ProductionActorsAggregateInput!] + NOT: ProductionActorsAggregateInput + OR: [ProductionActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ProductionActorsEdgeAggregationWhereInput + node: ProductionActorsNodeAggregationWhereInput +} + +input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ProductionActorsConnectionSort { + edge: ActedInSort + node: ActorSort +} + +input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ProductionActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! +} + +input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere +} + +input ProductionActorsEdgeAggregationWhereInput { + AND: [ProductionActorsEdgeAggregationWhereInput!] + NOT: ProductionActorsEdgeAggregationWhereInput + OR: [ProductionActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] +} + +input ProductionActorsNodeAggregationWhereInput { + AND: [ProductionActorsNodeAggregationWhereInput!] + NOT: ProductionActorsNodeAggregationWhereInput + OR: [ProductionActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ProductionActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + screenTime: Int! +} + +input ProductionActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput +} + +input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere +} + +input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + actors: [ProductionActorsConnectFieldInput!] +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + actors: [ProductionActorsDeleteFieldInput!] +} + +input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + actors: [ProductionActorsDisconnectFieldInput!] +} + +input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] +} + +input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] +} + +input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + actors: [ProductionActorsUpdateFieldInput!] + title: String +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + episodes(options: EpisodeOptions, where: EpisodeWhere): [Episode!]! + episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! + episodesConnection(after: String, first: Int, sort: [EpisodeSort], where: EpisodeWhere): EpisodesConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + episodeCount: Int! + episodes(directed: Boolean = true, options: EpisodeOptions, where: EpisodeWhere): [Episode!]! + episodesAggregate(directed: Boolean = true, where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection + episodesConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! + title: String! +} + +type SeriesActorActorsAggregationSelection { + count: Int! + edge: SeriesActorActorsEdgeAggregateSelection + node: SeriesActorActorsNodeAggregateSelection +} + +type SeriesActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! +} + +type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: SeriesActorsEdgeAggregationWhereInput + node: SeriesActorsNodeAggregationWhereInput +} + +input SeriesActorsEdgeAggregationWhereInput { + AND: [SeriesActorsEdgeAggregationWhereInput!] + NOT: SeriesActorsEdgeAggregationWhereInput + OR: [SeriesActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type SeriesAggregateSelection { + count: Int! + episodeCount: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] + episodes: [SeriesEpisodesConnectFieldInput!] +} + +input SeriesConnectWhere { + node: SeriesWhere! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + actors: ProductionActorsFieldInput + episodeCount: Int! + episodes: SeriesEpisodesFieldInput + title: String! +} + +input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] + episodes: [SeriesEpisodesDeleteFieldInput!] +} + +input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] + episodes: [SeriesEpisodesDisconnectFieldInput!] +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +type SeriesEpisodeEpisodesAggregationSelection { + count: Int! + node: SeriesEpisodeEpisodesNodeAggregateSelection +} + +type SeriesEpisodeEpisodesNodeAggregateSelection { + runtime: IntAggregateSelectionNonNullable! +} + +input SeriesEpisodesAggregateInput { + AND: [SeriesEpisodesAggregateInput!] + NOT: SeriesEpisodesAggregateInput + OR: [SeriesEpisodesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesEpisodesNodeAggregationWhereInput +} + +input SeriesEpisodesConnectFieldInput { + connect: [EpisodeConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: EpisodeConnectWhere +} + +type SeriesEpisodesConnection { + edges: [SeriesEpisodesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesEpisodesConnectionSort { + node: EpisodeSort +} + +input SeriesEpisodesConnectionWhere { + AND: [SeriesEpisodesConnectionWhere!] + NOT: SeriesEpisodesConnectionWhere + OR: [SeriesEpisodesConnectionWhere!] + node: EpisodeWhere + node_NOT: EpisodeWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input SeriesEpisodesCreateFieldInput { + node: EpisodeCreateInput! +} + +input SeriesEpisodesDeleteFieldInput { + delete: EpisodeDeleteInput + where: SeriesEpisodesConnectionWhere +} + +input SeriesEpisodesDisconnectFieldInput { + disconnect: EpisodeDisconnectInput + where: SeriesEpisodesConnectionWhere +} + +input SeriesEpisodesFieldInput { + connect: [SeriesEpisodesConnectFieldInput!] + create: [SeriesEpisodesCreateFieldInput!] +} + +input SeriesEpisodesNodeAggregationWhereInput { + AND: [SeriesEpisodesNodeAggregationWhereInput!] + NOT: SeriesEpisodesNodeAggregationWhereInput + OR: [SeriesEpisodesNodeAggregationWhereInput!] + runtime_AVERAGE_EQUAL: Float + runtime_AVERAGE_GT: Float + runtime_AVERAGE_GTE: Float + runtime_AVERAGE_LT: Float + runtime_AVERAGE_LTE: Float + runtime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_MAX_EQUAL: Int + runtime_MAX_GT: Int + runtime_MAX_GTE: Int + runtime_MAX_LT: Int + runtime_MAX_LTE: Int + runtime_MIN_EQUAL: Int + runtime_MIN_GT: Int + runtime_MIN_GTE: Int + runtime_MIN_LT: Int + runtime_MIN_LTE: Int + runtime_SUM_EQUAL: Int + runtime_SUM_GT: Int + runtime_SUM_GTE: Int + runtime_SUM_LT: Int + runtime_SUM_LTE: Int +} + +type SeriesEpisodesRelationship { + cursor: String! + node: Episode! +} + +input SeriesEpisodesUpdateConnectionInput { + node: EpisodeUpdateInput +} + +input SeriesEpisodesUpdateFieldInput { + connect: [SeriesEpisodesConnectFieldInput!] + create: [SeriesEpisodesCreateFieldInput!] + delete: [SeriesEpisodesDeleteFieldInput!] + disconnect: [SeriesEpisodesDisconnectFieldInput!] + update: SeriesEpisodesUpdateConnectionInput + where: SeriesEpisodesConnectionWhere +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] + episodes: [SeriesEpisodesCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + episodeCount: SortDirection + title: SortDirection +} + +input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + episodeCount: Int + episodeCount_DECREMENT: Int + episodeCount_INCREMENT: Int + episodes: [SeriesEpisodesUpdateFieldInput!] + title: String +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + episodeCount: Int + episodeCount_GT: Int + episodeCount_GTE: Int + episodeCount_IN: [Int!] + episodeCount_LT: Int + episodeCount_LTE: Int + episodeCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodeCount_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes: EpisodeWhere @deprecated(reason: \\"Use \`episodes_SOME\` instead.\\") + episodesAggregate: SeriesEpisodesAggregateInput + episodesConnection: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Use \`episodesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + episodesConnection_ALL: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where none of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + episodesConnection_NONE: SeriesEpisodesConnectionWhere + episodesConnection_NOT: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Use \`episodesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + episodesConnection_SINGLE: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where some of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + episodesConnection_SOME: SeriesEpisodesConnectionWhere + \\"\\"\\"Return Series where all of the related Episodes match this filter\\"\\"\\" + episodes_ALL: EpisodeWhere + \\"\\"\\"Return Series where none of the related Episodes match this filter\\"\\"\\" + episodes_NONE: EpisodeWhere + episodes_NOT: EpisodeWhere @deprecated(reason: \\"Use \`episodes_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Episodes match this filter\\"\\"\\" + episodes_SINGLE: EpisodeWhere + \\"\\"\\"Return Series where some of the related Episodes match this filter\\"\\"\\" + episodes_SOME: EpisodeWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +type UpdateEpisodesMutationResponse { + episodes: [Episode!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] + test("Interface Relationships - nested interface relationships", async () => { + const typeDefs = gql` + interface Interface1 { + field1: String! + interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) } - \\"\\"\\" - 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 + interface Interface2 { + field2: String } - input ActorUpdateInput { - actedIn: [ActorActedInUpdateFieldInput!] - name: String + type Type1Interface1 implements Interface1 { + field1: String! + interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) } - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String + type Type2Interface1 implements Interface1 { + field1: String! + interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) } - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! + type Type1Interface2 implements Interface2 { + field2: String! } - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! + type Type2Interface2 implements Interface2 { + field2: String! } - type CreateEpisodesMutationResponse { - episodes: [Episode!]! - info: CreateInfo! + type Type1 { + field1: String! + interface1: [Interface1!]! @relationship(type: "INTERFACE_ONE", direction: OUT) } + `; - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateType1Interface1sMutationResponse { + info: CreateInfo! + type1Interface1s: [Type1Interface1!]! +} + +type CreateType1Interface2sMutationResponse { + info: CreateInfo! + type1Interface2s: [Type1Interface2!]! +} + +type CreateType1sMutationResponse { + info: CreateInfo! + type1s: [Type1!]! +} + +type CreateType2Interface1sMutationResponse { + info: CreateInfo! + type2Interface1s: [Type2Interface1!]! +} + +type CreateType2Interface2sMutationResponse { + info: CreateInfo! + type2Interface2s: [Type2Interface2!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +interface Interface1 { + field1: String! + interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! + interface2Connection(after: String, directed: Boolean = true, first: Int, where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! +} + +input Interface1ConnectInput { + _on: Interface1ImplementationsConnectInput + interface2: [Interface1Interface2ConnectFieldInput!] +} + +input Interface1ConnectWhere { + node: Interface1Where! +} + +input Interface1CreateInput { + Type1Interface1: Type1Interface1CreateInput + Type2Interface1: Type2Interface1CreateInput +} + +input Interface1DeleteInput { + _on: Interface1ImplementationsDeleteInput + interface2: [Interface1Interface2DeleteFieldInput!] +} + +input Interface1DisconnectInput { + _on: Interface1ImplementationsDisconnectInput + interface2: [Interface1Interface2DisconnectFieldInput!] +} + +input Interface1ImplementationsConnectInput { + Type1Interface1: [Type1Interface1ConnectInput!] + Type2Interface1: [Type2Interface1ConnectInput!] +} + +input Interface1ImplementationsDeleteInput { + Type1Interface1: [Type1Interface1DeleteInput!] + Type2Interface1: [Type2Interface1DeleteInput!] +} + +input Interface1ImplementationsDisconnectInput { + Type1Interface1: [Type1Interface1DisconnectInput!] + Type2Interface1: [Type2Interface1DisconnectInput!] +} + +input Interface1ImplementationsUpdateInput { + Type1Interface1: Type1Interface1UpdateInput + Type2Interface1: Type2Interface1UpdateInput +} + +input Interface1ImplementationsWhere { + Type1Interface1: Type1Interface1Where + Type2Interface1: Type2Interface1Where +} + +input Interface1Interface2ConnectFieldInput { + where: Interface2ConnectWhere +} + +type Interface1Interface2Connection { + edges: [Interface1Interface2Relationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input Interface1Interface2ConnectionSort { + node: Interface2Sort +} + +input Interface1Interface2ConnectionWhere { + AND: [Interface1Interface2ConnectionWhere!] + NOT: Interface1Interface2ConnectionWhere + OR: [Interface1Interface2ConnectionWhere!] + node: Interface2Where + node_NOT: Interface2Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input Interface1Interface2CreateFieldInput { + node: Interface2CreateInput! +} + +input Interface1Interface2DeleteFieldInput { + where: Interface1Interface2ConnectionWhere +} + +input Interface1Interface2DisconnectFieldInput { + where: Interface1Interface2ConnectionWhere +} + +input Interface1Interface2FieldInput { + connect: [Interface1Interface2ConnectFieldInput!] + create: [Interface1Interface2CreateFieldInput!] +} + +type Interface1Interface2Relationship { + cursor: String! + node: Interface2! +} + +input Interface1Interface2UpdateConnectionInput { + node: Interface2UpdateInput +} + +input Interface1Interface2UpdateFieldInput { + connect: [Interface1Interface2ConnectFieldInput!] + create: [Interface1Interface2CreateFieldInput!] + delete: [Interface1Interface2DeleteFieldInput!] + disconnect: [Interface1Interface2DisconnectFieldInput!] + update: Interface1Interface2UpdateConnectionInput + where: Interface1Interface2ConnectionWhere +} + +input Interface1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Interface1Sort objects to sort Interface1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Interface1Sort] +} + +\\"\\"\\" +Fields to sort Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface1Sort object. +\\"\\"\\" +input Interface1Sort { + field1: SortDirection +} + +input Interface1UpdateInput { + _on: Interface1ImplementationsUpdateInput + field1: String + interface2: [Interface1Interface2UpdateFieldInput!] +} + +input Interface1Where { + _on: Interface1ImplementationsWhere + field1: String + field1_CONTAINS: String + field1_ENDS_WITH: String + field1_IN: [String!] + field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_STARTS_WITH: String + interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") + \\"\\"\\" + Return Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_ALL: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") + \\"\\"\\" + Return Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SOME: Interface1Interface2ConnectionWhere +} + +interface Interface2 { + field2: String +} + +input Interface2ConnectWhere { + node: Interface2Where! +} + +input Interface2CreateInput { + Type1Interface2: Type1Interface2CreateInput + Type2Interface2: Type2Interface2CreateInput +} + +input Interface2ImplementationsUpdateInput { + Type1Interface2: Type1Interface2UpdateInput + Type2Interface2: Type2Interface2UpdateInput +} + +input Interface2ImplementationsWhere { + Type1Interface2: Type1Interface2Where + Type2Interface2: Type2Interface2Where +} + +input Interface2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Interface2Sort objects to sort Interface2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Interface2Sort] +} + +\\"\\"\\" +Fields to sort Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface2Sort object. +\\"\\"\\" +input Interface2Sort { + field2: SortDirection +} + +input Interface2UpdateInput { + _on: Interface2ImplementationsUpdateInput + field2: String +} + +input Interface2Where { + _on: Interface2ImplementationsWhere + field2: String + field2_CONTAINS: String + field2_ENDS_WITH: String + field2_IN: [String] + field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_STARTS_WITH: String +} + +type Mutation { + createType1Interface1s(input: [Type1Interface1CreateInput!]!): CreateType1Interface1sMutationResponse! + createType1Interface2s(input: [Type1Interface2CreateInput!]!): CreateType1Interface2sMutationResponse! + createType1s(input: [Type1CreateInput!]!): CreateType1sMutationResponse! + createType2Interface1s(input: [Type2Interface1CreateInput!]!): CreateType2Interface1sMutationResponse! + createType2Interface2s(input: [Type2Interface2CreateInput!]!): CreateType2Interface2sMutationResponse! + deleteType1Interface1s(delete: Type1Interface1DeleteInput, where: Type1Interface1Where): DeleteInfo! + deleteType1Interface2s(where: Type1Interface2Where): DeleteInfo! + deleteType1s(delete: Type1DeleteInput, where: Type1Where): DeleteInfo! + deleteType2Interface1s(delete: Type2Interface1DeleteInput, where: Type2Interface1Where): DeleteInfo! + deleteType2Interface2s(where: Type2Interface2Where): DeleteInfo! + updateType1Interface1s(connect: Type1Interface1ConnectInput, create: Type1Interface1RelationInput, delete: Type1Interface1DeleteInput, disconnect: Type1Interface1DisconnectInput, update: Type1Interface1UpdateInput, where: Type1Interface1Where): UpdateType1Interface1sMutationResponse! + updateType1Interface2s(update: Type1Interface2UpdateInput, where: Type1Interface2Where): UpdateType1Interface2sMutationResponse! + updateType1s(connect: Type1ConnectInput, create: Type1RelationInput, delete: Type1DeleteInput, disconnect: Type1DisconnectInput, update: Type1UpdateInput, where: Type1Where): UpdateType1sMutationResponse! + updateType2Interface1s(connect: Type2Interface1ConnectInput, create: Type2Interface1RelationInput, delete: Type2Interface1DeleteInput, disconnect: Type2Interface1DisconnectInput, update: Type2Interface1UpdateInput, where: Type2Interface1Where): UpdateType2Interface1sMutationResponse! + updateType2Interface2s(update: Type2Interface2UpdateInput, where: Type2Interface2Where): UpdateType2Interface2sMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + type1Interface1s(options: Type1Interface1Options, where: Type1Interface1Where): [Type1Interface1!]! + type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! + type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort], where: Type1Interface1Where): Type1Interface1sConnection! + type1Interface2s(options: Type1Interface2Options, where: Type1Interface2Where): [Type1Interface2!]! + type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! + type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort], where: Type1Interface2Where): Type1Interface2sConnection! + type1s(options: Type1Options, where: Type1Where): [Type1!]! + type1sAggregate(where: Type1Where): Type1AggregateSelection! + type1sConnection(after: String, first: Int, sort: [Type1Sort], where: Type1Where): Type1sConnection! + type2Interface1s(options: Type2Interface1Options, where: Type2Interface1Where): [Type2Interface1!]! + type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! + type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort], where: Type2Interface1Where): Type2Interface1sConnection! + type2Interface2s(options: Type2Interface2Options, where: Type2Interface2Where): [Type2Interface2!]! + type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! + type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort], where: Type2Interface2Where): Type2Interface2sConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type Type1 { + field1: String! + interface1(directed: Boolean = true, options: Interface1Options, where: Interface1Where): [Interface1!]! + interface1Connection(after: String, directed: Boolean = true, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! +} + +type Type1AggregateSelection { + count: Int! + field1: StringAggregateSelectionNonNullable! +} + +input Type1ConnectInput { + interface1: [Type1Interface1ConnectFieldInput!] +} + +input Type1CreateInput { + field1: String! + interface1: Type1Interface1FieldInput +} + +input Type1DeleteInput { + interface1: [Type1Interface1DeleteFieldInput!] +} + +input Type1DisconnectInput { + interface1: [Type1Interface1DisconnectFieldInput!] +} + +type Type1Edge { + cursor: String! + node: Type1! +} + +type Type1Interface1 implements Interface1 { + field1: String! + interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! + interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! +} + +type Type1Interface1AggregateSelection { + count: Int! + field1: StringAggregateSelectionNonNullable! +} + +input Type1Interface1ConnectFieldInput { + connect: Interface1ConnectInput + where: Interface1ConnectWhere +} + +input Type1Interface1ConnectInput { + interface2: [Type1Interface1Interface2ConnectFieldInput!] +} + +type Type1Interface1Connection { + edges: [Type1Interface1Relationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input Type1Interface1ConnectionSort { + node: Interface1Sort +} + +input Type1Interface1ConnectionWhere { + AND: [Type1Interface1ConnectionWhere!] + NOT: Type1Interface1ConnectionWhere + OR: [Type1Interface1ConnectionWhere!] + node: Interface1Where + node_NOT: Interface1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input Type1Interface1CreateFieldInput { + node: Interface1CreateInput! +} + +input Type1Interface1CreateInput { + field1: String! + interface2: Interface1Interface2FieldInput +} + +input Type1Interface1DeleteFieldInput { + delete: Interface1DeleteInput + where: Type1Interface1ConnectionWhere +} + +input Type1Interface1DeleteInput { + interface2: [Type1Interface1Interface2DeleteFieldInput!] +} + +input Type1Interface1DisconnectFieldInput { + disconnect: Interface1DisconnectInput + where: Type1Interface1ConnectionWhere +} + +input Type1Interface1DisconnectInput { + interface2: [Type1Interface1Interface2DisconnectFieldInput!] +} + +type Type1Interface1Edge { + cursor: String! + node: Type1Interface1! +} + +input Type1Interface1FieldInput { + connect: [Type1Interface1ConnectFieldInput!] + create: [Type1Interface1CreateFieldInput!] +} + +input Type1Interface1Interface2ConnectFieldInput { + where: Interface2ConnectWhere +} + +input Type1Interface1Interface2CreateFieldInput { + node: Interface2CreateInput! +} + +input Type1Interface1Interface2DeleteFieldInput { + where: Interface1Interface2ConnectionWhere +} + +input Type1Interface1Interface2DisconnectFieldInput { + where: Interface1Interface2ConnectionWhere +} + +input Type1Interface1Interface2UpdateConnectionInput { + node: Interface2UpdateInput +} + +input Type1Interface1Interface2UpdateFieldInput { + connect: [Type1Interface1Interface2ConnectFieldInput!] + create: [Type1Interface1Interface2CreateFieldInput!] + delete: [Type1Interface1Interface2DeleteFieldInput!] + disconnect: [Type1Interface1Interface2DisconnectFieldInput!] + update: Type1Interface1Interface2UpdateConnectionInput + where: Interface1Interface2ConnectionWhere +} + +input Type1Interface1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type1Interface1Sort objects to sort Type1Interface1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type1Interface1Sort!] +} + +input Type1Interface1RelationInput { + interface2: [Type1Interface1Interface2CreateFieldInput!] +} + +type Type1Interface1Relationship { + cursor: String! + node: Interface1! +} + +\\"\\"\\" +Fields to sort Type1Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface1Sort object. +\\"\\"\\" +input Type1Interface1Sort { + field1: SortDirection +} + +input Type1Interface1UpdateConnectionInput { + node: Interface1UpdateInput +} + +input Type1Interface1UpdateFieldInput { + connect: [Type1Interface1ConnectFieldInput!] + create: [Type1Interface1CreateFieldInput!] + delete: [Type1Interface1DeleteFieldInput!] + disconnect: [Type1Interface1DisconnectFieldInput!] + update: Type1Interface1UpdateConnectionInput + where: Type1Interface1ConnectionWhere +} + +input Type1Interface1UpdateInput { + field1: String + interface2: [Type1Interface1Interface2UpdateFieldInput!] +} + +input Type1Interface1Where { + AND: [Type1Interface1Where!] + NOT: Type1Interface1Where + OR: [Type1Interface1Where!] + field1: String + field1_CONTAINS: String + field1_ENDS_WITH: String + field1_IN: [String!] + field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_STARTS_WITH: String + interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") + \\"\\"\\" + Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_ALL: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") + \\"\\"\\" + Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SOME: Interface1Interface2ConnectionWhere +} + +type Type1Interface1sConnection { + edges: [Type1Interface1Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Type1Interface2 implements Interface2 { + field2: String! +} + +type Type1Interface2AggregateSelection { + count: Int! + field2: StringAggregateSelectionNonNullable! +} + +input Type1Interface2CreateInput { + field2: String! +} + +type Type1Interface2Edge { + cursor: String! + node: Type1Interface2! +} + +input Type1Interface2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type1Interface2Sort objects to sort Type1Interface2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type1Interface2Sort!] +} + +\\"\\"\\" +Fields to sort Type1Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface2Sort object. +\\"\\"\\" +input Type1Interface2Sort { + field2: SortDirection +} + +input Type1Interface2UpdateInput { + field2: String +} + +input Type1Interface2Where { + AND: [Type1Interface2Where!] + NOT: Type1Interface2Where + OR: [Type1Interface2Where!] + field2: String + field2_CONTAINS: String + field2_ENDS_WITH: String + field2_IN: [String!] + field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_STARTS_WITH: String +} + +type Type1Interface2sConnection { + edges: [Type1Interface2Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input Type1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type1Sort objects to sort Type1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type1Sort!] +} + +input Type1RelationInput { + interface1: [Type1Interface1CreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Type1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Sort object. +\\"\\"\\" +input Type1Sort { + field1: SortDirection +} + +input Type1UpdateInput { + field1: String + interface1: [Type1Interface1UpdateFieldInput!] +} + +input Type1Where { + AND: [Type1Where!] + NOT: Type1Where + OR: [Type1Where!] + field1: String + field1_CONTAINS: String + field1_ENDS_WITH: String + field1_IN: [String!] + field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_STARTS_WITH: String + interface1Connection: Type1Interface1ConnectionWhere @deprecated(reason: \\"Use \`interface1Connection_SOME\` instead.\\") + \\"\\"\\" + Return Type1s where all of the related Type1Interface1Connections match this filter + \\"\\"\\" + interface1Connection_ALL: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where none of the related Type1Interface1Connections match this filter + \\"\\"\\" + interface1Connection_NONE: Type1Interface1ConnectionWhere + interface1Connection_NOT: Type1Interface1ConnectionWhere @deprecated(reason: \\"Use \`interface1Connection_NONE\` instead.\\") + \\"\\"\\" + Return Type1s where one of the related Type1Interface1Connections match this filter + \\"\\"\\" + interface1Connection_SINGLE: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where some of the related Type1Interface1Connections match this filter + \\"\\"\\" + interface1Connection_SOME: Type1Interface1ConnectionWhere +} + +type Type1sConnection { + edges: [Type1Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Type2Interface1 implements Interface1 { + field1: String! + interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! + interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! +} + +type Type2Interface1AggregateSelection { + count: Int! + field1: StringAggregateSelectionNonNullable! +} + +input Type2Interface1ConnectInput { + interface2: [Type2Interface1Interface2ConnectFieldInput!] +} + +input Type2Interface1CreateInput { + field1: String! + interface2: Interface1Interface2FieldInput +} + +input Type2Interface1DeleteInput { + interface2: [Type2Interface1Interface2DeleteFieldInput!] +} + +input Type2Interface1DisconnectInput { + interface2: [Type2Interface1Interface2DisconnectFieldInput!] +} + +type Type2Interface1Edge { + cursor: String! + node: Type2Interface1! +} + +input Type2Interface1Interface2ConnectFieldInput { + where: Interface2ConnectWhere +} + +input Type2Interface1Interface2CreateFieldInput { + node: Interface2CreateInput! +} + +input Type2Interface1Interface2DeleteFieldInput { + where: Interface1Interface2ConnectionWhere +} + +input Type2Interface1Interface2DisconnectFieldInput { + where: Interface1Interface2ConnectionWhere +} + +input Type2Interface1Interface2UpdateConnectionInput { + node: Interface2UpdateInput +} + +input Type2Interface1Interface2UpdateFieldInput { + connect: [Type2Interface1Interface2ConnectFieldInput!] + create: [Type2Interface1Interface2CreateFieldInput!] + delete: [Type2Interface1Interface2DeleteFieldInput!] + disconnect: [Type2Interface1Interface2DisconnectFieldInput!] + update: Type2Interface1Interface2UpdateConnectionInput + where: Interface1Interface2ConnectionWhere +} + +input Type2Interface1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type2Interface1Sort objects to sort Type2Interface1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type2Interface1Sort!] +} + +input Type2Interface1RelationInput { + interface2: [Type2Interface1Interface2CreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Type2Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type2Interface1Sort object. +\\"\\"\\" +input Type2Interface1Sort { + field1: SortDirection +} + +input Type2Interface1UpdateInput { + field1: String + interface2: [Type2Interface1Interface2UpdateFieldInput!] +} + +input Type2Interface1Where { + AND: [Type2Interface1Where!] + NOT: Type2Interface1Where + OR: [Type2Interface1Where!] + field1: String + field1_CONTAINS: String + field1_ENDS_WITH: String + field1_IN: [String!] + field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_STARTS_WITH: String + interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") + \\"\\"\\" + Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_ALL: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") + \\"\\"\\" + Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SOME: Interface1Interface2ConnectionWhere +} + +type Type2Interface1sConnection { + edges: [Type2Interface1Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Type2Interface2 implements Interface2 { + field2: String! +} + +type Type2Interface2AggregateSelection { + count: Int! + field2: StringAggregateSelectionNonNullable! +} + +input Type2Interface2CreateInput { + field2: String! +} + +type Type2Interface2Edge { + cursor: String! + node: Type2Interface2! +} + +input Type2Interface2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type2Interface2Sort objects to sort Type2Interface2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type2Interface2Sort!] +} + +\\"\\"\\" +Fields to sort Type2Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type2Interface2Sort object. +\\"\\"\\" +input Type2Interface2Sort { + field2: SortDirection +} + +input Type2Interface2UpdateInput { + field2: String +} + +input Type2Interface2Where { + AND: [Type2Interface2Where!] + NOT: Type2Interface2Where + OR: [Type2Interface2Where!] + field2: String + field2_CONTAINS: String + field2_ENDS_WITH: String + field2_IN: [String!] + field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_STARTS_WITH: String +} + +type Type2Interface2sConnection { + edges: [Type2Interface2Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateType1Interface1sMutationResponse { + info: UpdateInfo! + type1Interface1s: [Type1Interface1!]! +} + +type UpdateType1Interface2sMutationResponse { + info: UpdateInfo! + type1Interface2s: [Type1Interface2!]! +} + +type UpdateType1sMutationResponse { + info: UpdateInfo! + type1s: [Type1!]! +} + +type UpdateType2Interface1sMutationResponse { + info: UpdateInfo! + type2Interface1s: [Type2Interface1!]! +} + +type UpdateType2Interface2sMutationResponse { + info: UpdateInfo! + type2Interface2s: [Type2Interface2!]! +}" +`); - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } + // expect(() => { + // // eslint-disable-next-line @typescript-eslint/no-unused-vars + // const neoSchema = new Neo4jGraphQL({ typeDefs }); + // }).toThrowError("Nested interface relationship fields are not supported: Interface1.interface2"); + }); - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! + test("Interface Relationships - nested relationships", async () => { + const typeDefs = gql` + interface Content { + id: ID + content: String + creator: User! @relationship(type: "HAS_CONTENT", direction: IN) } - \\"\\"\\"\\"\\"\\" - type Episode { - \\"\\"\\"\\"\\"\\" - runtime: Int! - \\"\\"\\"\\"\\"\\" - series(directed: Boolean = true, options: SeriesOptions, where: SeriesWhere): Series! - seriesAggregate(directed: Boolean = true, where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection - seriesConnection(after: String, directed: Boolean = true, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! + type Comment implements Content { + id: ID + content: String + creator: User! + post: Post! @relationship(type: "HAS_COMMENT", direction: IN) } - type EpisodeAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! + type Post implements Content { + id: ID + content: String + creator: User! + comments: [Comment!]! @relationship(type: "HAS_COMMENT", direction: OUT) } - input EpisodeConnectInput { - series: EpisodeSeriesConnectFieldInput + type User { + id: ID + name: String + content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) } + `; - input EpisodeConnectWhere { - node: EpisodeWhere! - } + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input EpisodeCreateInput { - runtime: Int! - series: EpisodeSeriesFieldInput - } - - input EpisodeDeleteInput { - series: EpisodeSeriesDeleteFieldInput - } - - input EpisodeDisconnectInput { - series: EpisodeSeriesDisconnectFieldInput - } - - type EpisodeEdge { - cursor: String! - node: Episode! - } - - input EpisodeOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more EpisodeSort objects to sort Episodes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [EpisodeSort!] - } - - input EpisodeRelationInput { - series: EpisodeSeriesCreateFieldInput - } - - input EpisodeSeriesAggregateInput { - AND: [EpisodeSeriesAggregateInput!] - NOT: EpisodeSeriesAggregateInput - OR: [EpisodeSeriesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: EpisodeSeriesNodeAggregationWhereInput - } - - input EpisodeSeriesConnectFieldInput { - connect: SeriesConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: SeriesConnectWhere - } - - type EpisodeSeriesConnection { - edges: [EpisodeSeriesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input EpisodeSeriesConnectionSort { - node: SeriesSort - } - - input EpisodeSeriesConnectionWhere { - AND: [EpisodeSeriesConnectionWhere!] - NOT: EpisodeSeriesConnectionWhere - OR: [EpisodeSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input EpisodeSeriesCreateFieldInput { - node: SeriesCreateInput! - } - - input EpisodeSeriesDeleteFieldInput { - delete: SeriesDeleteInput - where: EpisodeSeriesConnectionWhere - } - - input EpisodeSeriesDisconnectFieldInput { - disconnect: SeriesDisconnectInput - where: EpisodeSeriesConnectionWhere - } - - input EpisodeSeriesFieldInput { - connect: EpisodeSeriesConnectFieldInput - create: EpisodeSeriesCreateFieldInput - } - - input EpisodeSeriesNodeAggregationWhereInput { - AND: [EpisodeSeriesNodeAggregationWhereInput!] - NOT: EpisodeSeriesNodeAggregationWhereInput - OR: [EpisodeSeriesNodeAggregationWhereInput!] - episodeCount_AVERAGE_EQUAL: Float - episodeCount_AVERAGE_GT: Float - episodeCount_AVERAGE_GTE: Float - episodeCount_AVERAGE_LT: Float - episodeCount_AVERAGE_LTE: Float - episodeCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_MAX_EQUAL: Int - episodeCount_MAX_GT: Int - episodeCount_MAX_GTE: Int - episodeCount_MAX_LT: Int - episodeCount_MAX_LTE: Int - episodeCount_MIN_EQUAL: Int - episodeCount_MIN_GT: Int - episodeCount_MIN_GTE: Int - episodeCount_MIN_LT: Int - episodeCount_MIN_LTE: Int - episodeCount_SUM_EQUAL: Int - episodeCount_SUM_GT: Int - episodeCount_SUM_GTE: Int - episodeCount_SUM_LT: Int - episodeCount_SUM_LTE: Int - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type EpisodeSeriesRelationship { - cursor: String! - node: Series! - } - - type EpisodeSeriesSeriesAggregationSelection { - count: Int! - node: EpisodeSeriesSeriesNodeAggregateSelection - } - - type EpisodeSeriesSeriesNodeAggregateSelection { - episodeCount: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input EpisodeSeriesUpdateConnectionInput { - node: SeriesUpdateInput - } - - input EpisodeSeriesUpdateFieldInput { - connect: EpisodeSeriesConnectFieldInput - create: EpisodeSeriesCreateFieldInput - delete: EpisodeSeriesDeleteFieldInput - disconnect: EpisodeSeriesDisconnectFieldInput - update: EpisodeSeriesUpdateConnectionInput - where: EpisodeSeriesConnectionWhere - } - - \\"\\"\\" - Fields to sort Episodes by. The order in which sorts are applied is not guaranteed when specifying many fields in one EpisodeSort object. - \\"\\"\\" - input EpisodeSort { - runtime: SortDirection - } - - input EpisodeUpdateInput { - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - series: EpisodeSeriesUpdateFieldInput - } - - input EpisodeWhere { - AND: [EpisodeWhere!] - NOT: EpisodeWhere - OR: [EpisodeWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - series: SeriesWhere - seriesAggregate: EpisodeSeriesAggregateInput - seriesConnection: EpisodeSeriesConnectionWhere - seriesConnection_NOT: EpisodeSeriesConnectionWhere - series_NOT: SeriesWhere - } - - type EpisodesConnection { - edges: [EpisodeEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - runtime: Int! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelectionNonNullable! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] - } - - input MovieCreateInput { - actors: ProductionActorsFieldInput - runtime: Int! - title: String! - } - - input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] - } - - input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - runtime: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createEpisodes(input: [EpisodeCreateInput!]!): CreateEpisodesMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteEpisodes(delete: EpisodeDeleteInput, where: EpisodeWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateEpisodes(connect: EpisodeConnectInput, create: EpisodeRelationInput, delete: EpisodeDeleteInput, disconnect: EpisodeDisconnectInput, update: EpisodeUpdateInput, where: EpisodeWhere): UpdateEpisodesMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - input ProductionActorsAggregateInput { - AND: [ProductionActorsAggregateInput!] - NOT: ProductionActorsAggregateInput - OR: [ProductionActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ProductionActorsEdgeAggregationWhereInput - node: ProductionActorsNodeAggregationWhereInput - } - - input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ProductionActorsConnectionSort { - edge: ActedInSort - node: ActorSort - } - - input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ProductionActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! - } - - input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere - } - - input ProductionActorsEdgeAggregationWhereInput { - AND: [ProductionActorsEdgeAggregationWhereInput!] - NOT: ProductionActorsEdgeAggregationWhereInput - OR: [ProductionActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - } - - input ProductionActorsNodeAggregationWhereInput { - AND: [ProductionActorsNodeAggregationWhereInput!] - NOT: ProductionActorsNodeAggregationWhereInput - OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ProductionActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ProductionActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput - } - - input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere - } - - input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - actors: [ProductionActorsConnectFieldInput!] - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - actors: [ProductionActorsDeleteFieldInput!] - } - - input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - actors: [ProductionActorsDisconnectFieldInput!] - } - - input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] - } - - input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] - } - - input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - actors: [ProductionActorsUpdateFieldInput!] - title: String - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: ProductionActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Productions where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Productions where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - episodes(options: EpisodeOptions, where: EpisodeWhere): [Episode!]! - episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! - episodesConnection(after: String, first: Int, sort: [EpisodeSort], where: EpisodeWhere): EpisodesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - \\"\\"\\"\\"\\"\\" - episodeCount: Int! - \\"\\"\\"\\"\\"\\" - episodes(directed: Boolean = true, options: EpisodeOptions, where: EpisodeWhere): [Episode!]! - episodesAggregate(directed: Boolean = true, where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection - episodesConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelectionNonNullable! - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: SeriesActorsEdgeAggregationWhereInput - node: SeriesActorsNodeAggregationWhereInput - } - - input SeriesActorsEdgeAggregationWhereInput { - AND: [SeriesActorsEdgeAggregationWhereInput!] - NOT: SeriesActorsEdgeAggregationWhereInput - OR: [SeriesActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type SeriesAggregateSelection { - count: Int! - episodeCount: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] - episodes: [SeriesEpisodesConnectFieldInput!] - } - - input SeriesConnectWhere { - node: SeriesWhere! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - actors: ProductionActorsFieldInput - episodeCount: Int! - episodes: SeriesEpisodesFieldInput - title: String! - } - - input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] - episodes: [SeriesEpisodesDeleteFieldInput!] - } - - input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] - episodes: [SeriesEpisodesDisconnectFieldInput!] - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - type SeriesEpisodeEpisodesAggregationSelection { - count: Int! - node: SeriesEpisodeEpisodesNodeAggregateSelection - } - - type SeriesEpisodeEpisodesNodeAggregateSelection { - runtime: IntAggregateSelectionNonNullable! - } - - input SeriesEpisodesAggregateInput { - AND: [SeriesEpisodesAggregateInput!] - NOT: SeriesEpisodesAggregateInput - OR: [SeriesEpisodesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesEpisodesNodeAggregationWhereInput - } - - input SeriesEpisodesConnectFieldInput { - connect: [EpisodeConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: EpisodeConnectWhere - } - - type SeriesEpisodesConnection { - edges: [SeriesEpisodesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesEpisodesConnectionSort { - node: EpisodeSort - } - - input SeriesEpisodesConnectionWhere { - AND: [SeriesEpisodesConnectionWhere!] - NOT: SeriesEpisodesConnectionWhere - OR: [SeriesEpisodesConnectionWhere!] - node: EpisodeWhere - node_NOT: EpisodeWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input SeriesEpisodesCreateFieldInput { - node: EpisodeCreateInput! - } - - input SeriesEpisodesDeleteFieldInput { - delete: EpisodeDeleteInput - where: SeriesEpisodesConnectionWhere - } - - input SeriesEpisodesDisconnectFieldInput { - disconnect: EpisodeDisconnectInput - where: SeriesEpisodesConnectionWhere - } - - input SeriesEpisodesFieldInput { - connect: [SeriesEpisodesConnectFieldInput!] - create: [SeriesEpisodesCreateFieldInput!] - } - - input SeriesEpisodesNodeAggregationWhereInput { - AND: [SeriesEpisodesNodeAggregationWhereInput!] - NOT: SeriesEpisodesNodeAggregationWhereInput - OR: [SeriesEpisodesNodeAggregationWhereInput!] - runtime_AVERAGE_EQUAL: Float - runtime_AVERAGE_GT: Float - runtime_AVERAGE_GTE: Float - runtime_AVERAGE_LT: Float - runtime_AVERAGE_LTE: Float - runtime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_MAX_EQUAL: Int - runtime_MAX_GT: Int - runtime_MAX_GTE: Int - runtime_MAX_LT: Int - runtime_MAX_LTE: Int - runtime_MIN_EQUAL: Int - runtime_MIN_GT: Int - runtime_MIN_GTE: Int - runtime_MIN_LT: Int - runtime_MIN_LTE: Int - runtime_SUM_EQUAL: Int - runtime_SUM_GT: Int - runtime_SUM_GTE: Int - runtime_SUM_LT: Int - runtime_SUM_LTE: Int - } - - type SeriesEpisodesRelationship { - cursor: String! - node: Episode! - } - - input SeriesEpisodesUpdateConnectionInput { - node: EpisodeUpdateInput - } - - input SeriesEpisodesUpdateFieldInput { - connect: [SeriesEpisodesConnectFieldInput!] - create: [SeriesEpisodesCreateFieldInput!] - delete: [SeriesEpisodesDeleteFieldInput!] - disconnect: [SeriesEpisodesDisconnectFieldInput!] - update: SeriesEpisodesUpdateConnectionInput - where: SeriesEpisodesConnectionWhere - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] - episodes: [SeriesEpisodesCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - episodeCount: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - episodeCount: Int - episodeCount_DECREMENT: Int - episodeCount_INCREMENT: Int - episodes: [SeriesEpisodesUpdateFieldInput!] - title: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodeCount: Int - episodeCount_GT: Int - episodeCount_GTE: Int - episodeCount_IN: [Int!] - episodeCount_LT: Int - episodeCount_LTE: Int - episodeCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodeCount_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes: EpisodeWhere @deprecated(reason: \\"Use \`episodes_SOME\` instead.\\") - episodesAggregate: SeriesEpisodesAggregateInput - episodesConnection: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Use \`episodesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related SeriesEpisodesConnections match this filter - \\"\\"\\" - episodesConnection_ALL: SeriesEpisodesConnectionWhere - \\"\\"\\" - Return Series where none of the related SeriesEpisodesConnections match this filter - \\"\\"\\" - episodesConnection_NONE: SeriesEpisodesConnectionWhere - episodesConnection_NOT: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Use \`episodesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related SeriesEpisodesConnections match this filter - \\"\\"\\" - episodesConnection_SINGLE: SeriesEpisodesConnectionWhere - \\"\\"\\" - Return Series where some of the related SeriesEpisodesConnections match this filter - \\"\\"\\" - episodesConnection_SOME: SeriesEpisodesConnectionWhere - \\"\\"\\"Return Series where all of the related Episodes match this filter\\"\\"\\" - episodes_ALL: EpisodeWhere - \\"\\"\\"Return Series where none of the related Episodes match this filter\\"\\"\\" - episodes_NONE: EpisodeWhere - episodes_NOT: EpisodeWhere @deprecated(reason: \\"Use \`episodes_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Episodes match this filter\\"\\"\\" - episodes_SINGLE: EpisodeWhere - \\"\\"\\"Return Series where some of the related Episodes match this filter\\"\\"\\" - episodes_SOME: EpisodeWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - type UpdateEpisodesMutationResponse { - episodes: [Episode!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Interface Relationships - nested interface relationships", async () => { - const typeDefs = gql` - interface Interface1 { - field1: String! - interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) - } - - interface Interface2 { - field2: String - } - - type Type1Interface1 implements Interface1 { - field1: String! - interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) - } - - type Type2Interface1 implements Interface1 { - field1: String! - interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) - } - - type Type1Interface2 implements Interface2 { - field2: String! - } - - type Type2Interface2 implements Interface2 { - field2: String! - } - - type Type1 { - field1: String! - interface1: [Interface1!]! @relationship(type: "INTERFACE_ONE", direction: OUT) - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateType1Interface1sMutationResponse { - info: CreateInfo! - type1Interface1s: [Type1Interface1!]! - } - - type CreateType1Interface2sMutationResponse { - info: CreateInfo! - type1Interface2s: [Type1Interface2!]! - } - - type CreateType1sMutationResponse { - info: CreateInfo! - type1s: [Type1!]! - } - - type CreateType2Interface1sMutationResponse { - info: CreateInfo! - type2Interface1s: [Type2Interface1!]! - } - - type CreateType2Interface2sMutationResponse { - info: CreateInfo! - type2Interface2s: [Type2Interface2!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - interface Interface1 { - \\"\\"\\"\\"\\"\\" - field1: String! - \\"\\"\\"\\"\\"\\" - interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! - interface2Connection(after: String, directed: Boolean = true, first: Int, where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! - } - - input Interface1ConnectInput { - _on: Interface1ImplementationsConnectInput - interface2: [Interface1Interface2ConnectFieldInput!] - } - - input Interface1ConnectWhere { - node: Interface1Where! - } - - input Interface1CreateInput { - Type1Interface1: Type1Interface1CreateInput - Type2Interface1: Type2Interface1CreateInput - } - - input Interface1DeleteInput { - _on: Interface1ImplementationsDeleteInput - interface2: [Interface1Interface2DeleteFieldInput!] - } - - input Interface1DisconnectInput { - _on: Interface1ImplementationsDisconnectInput - interface2: [Interface1Interface2DisconnectFieldInput!] - } - - input Interface1ImplementationsConnectInput { - Type1Interface1: [Type1Interface1ConnectInput!] - Type2Interface1: [Type2Interface1ConnectInput!] - } - - input Interface1ImplementationsDeleteInput { - Type1Interface1: [Type1Interface1DeleteInput!] - Type2Interface1: [Type2Interface1DeleteInput!] - } - - input Interface1ImplementationsDisconnectInput { - Type1Interface1: [Type1Interface1DisconnectInput!] - Type2Interface1: [Type2Interface1DisconnectInput!] - } - - input Interface1ImplementationsUpdateInput { - Type1Interface1: Type1Interface1UpdateInput - Type2Interface1: Type2Interface1UpdateInput - } - - input Interface1ImplementationsWhere { - Type1Interface1: Type1Interface1Where - Type2Interface1: Type2Interface1Where - } - - input Interface1Interface2ConnectFieldInput { - where: Interface2ConnectWhere - } - - type Interface1Interface2Connection { - edges: [Interface1Interface2Relationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input Interface1Interface2ConnectionSort { - node: Interface2Sort - } - - input Interface1Interface2ConnectionWhere { - AND: [Interface1Interface2ConnectionWhere!] - NOT: Interface1Interface2ConnectionWhere - OR: [Interface1Interface2ConnectionWhere!] - node: Interface2Where - node_NOT: Interface2Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input Interface1Interface2CreateFieldInput { - node: Interface2CreateInput! - } - - input Interface1Interface2DeleteFieldInput { - where: Interface1Interface2ConnectionWhere - } - - input Interface1Interface2DisconnectFieldInput { - where: Interface1Interface2ConnectionWhere - } - - input Interface1Interface2FieldInput { - connect: [Interface1Interface2ConnectFieldInput!] - create: [Interface1Interface2CreateFieldInput!] - } - - type Interface1Interface2Relationship { - cursor: String! - node: Interface2! - } - - input Interface1Interface2UpdateConnectionInput { - node: Interface2UpdateInput - } - - input Interface1Interface2UpdateFieldInput { - connect: [Interface1Interface2ConnectFieldInput!] - create: [Interface1Interface2CreateFieldInput!] - delete: [Interface1Interface2DeleteFieldInput!] - disconnect: [Interface1Interface2DisconnectFieldInput!] - update: Interface1Interface2UpdateConnectionInput - where: Interface1Interface2ConnectionWhere - } - - input Interface1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Interface1Sort objects to sort Interface1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Interface1Sort] - } - - \\"\\"\\" - Fields to sort Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface1Sort object. - \\"\\"\\" - input Interface1Sort { - field1: SortDirection - } - - input Interface1UpdateInput { - _on: Interface1ImplementationsUpdateInput - field1: String - interface2: [Interface1Interface2UpdateFieldInput!] - } - - input Interface1Where { - _on: Interface1ImplementationsWhere - field1: String - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_IN: [String!] - field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_STARTS_WITH: String - interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") - \\"\\"\\" - Return Interface1s where all of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Interface1s where none of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere - interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") - \\"\\"\\" - Return Interface1s where one of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Interface1s where some of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere - } - - interface Interface2 { - \\"\\"\\"\\"\\"\\" - field2: String - } - - input Interface2ConnectWhere { - node: Interface2Where! - } - - input Interface2CreateInput { - Type1Interface2: Type1Interface2CreateInput - Type2Interface2: Type2Interface2CreateInput - } - - input Interface2ImplementationsUpdateInput { - Type1Interface2: Type1Interface2UpdateInput - Type2Interface2: Type2Interface2UpdateInput - } - - input Interface2ImplementationsWhere { - Type1Interface2: Type1Interface2Where - Type2Interface2: Type2Interface2Where - } - - input Interface2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Interface2Sort objects to sort Interface2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Interface2Sort] - } - - \\"\\"\\" - Fields to sort Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface2Sort object. - \\"\\"\\" - input Interface2Sort { - field2: SortDirection - } - - input Interface2UpdateInput { - _on: Interface2ImplementationsUpdateInput - field2: String - } - - input Interface2Where { - _on: Interface2ImplementationsWhere - field2: String - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_IN: [String] - field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_STARTS_WITH: String - } - - type Mutation { - createType1Interface1s(input: [Type1Interface1CreateInput!]!): CreateType1Interface1sMutationResponse! - createType1Interface2s(input: [Type1Interface2CreateInput!]!): CreateType1Interface2sMutationResponse! - createType1s(input: [Type1CreateInput!]!): CreateType1sMutationResponse! - createType2Interface1s(input: [Type2Interface1CreateInput!]!): CreateType2Interface1sMutationResponse! - createType2Interface2s(input: [Type2Interface2CreateInput!]!): CreateType2Interface2sMutationResponse! - deleteType1Interface1s(delete: Type1Interface1DeleteInput, where: Type1Interface1Where): DeleteInfo! - deleteType1Interface2s(where: Type1Interface2Where): DeleteInfo! - deleteType1s(delete: Type1DeleteInput, where: Type1Where): DeleteInfo! - deleteType2Interface1s(delete: Type2Interface1DeleteInput, where: Type2Interface1Where): DeleteInfo! - deleteType2Interface2s(where: Type2Interface2Where): DeleteInfo! - updateType1Interface1s(connect: Type1Interface1ConnectInput, create: Type1Interface1RelationInput, delete: Type1Interface1DeleteInput, disconnect: Type1Interface1DisconnectInput, update: Type1Interface1UpdateInput, where: Type1Interface1Where): UpdateType1Interface1sMutationResponse! - updateType1Interface2s(update: Type1Interface2UpdateInput, where: Type1Interface2Where): UpdateType1Interface2sMutationResponse! - updateType1s(connect: Type1ConnectInput, create: Type1RelationInput, delete: Type1DeleteInput, disconnect: Type1DisconnectInput, update: Type1UpdateInput, where: Type1Where): UpdateType1sMutationResponse! - updateType2Interface1s(connect: Type2Interface1ConnectInput, create: Type2Interface1RelationInput, delete: Type2Interface1DeleteInput, disconnect: Type2Interface1DisconnectInput, update: Type2Interface1UpdateInput, where: Type2Interface1Where): UpdateType2Interface1sMutationResponse! - updateType2Interface2s(update: Type2Interface2UpdateInput, where: Type2Interface2Where): UpdateType2Interface2sMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - type1Interface1s(options: Type1Interface1Options, where: Type1Interface1Where): [Type1Interface1!]! - type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! - type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort], where: Type1Interface1Where): Type1Interface1sConnection! - type1Interface2s(options: Type1Interface2Options, where: Type1Interface2Where): [Type1Interface2!]! - type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! - type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort], where: Type1Interface2Where): Type1Interface2sConnection! - type1s(options: Type1Options, where: Type1Where): [Type1!]! - type1sAggregate(where: Type1Where): Type1AggregateSelection! - type1sConnection(after: String, first: Int, sort: [Type1Sort], where: Type1Where): Type1sConnection! - type2Interface1s(options: Type2Interface1Options, where: Type2Interface1Where): [Type2Interface1!]! - type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! - type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort], where: Type2Interface1Where): Type2Interface1sConnection! - type2Interface2s(options: Type2Interface2Options, where: Type2Interface2Where): [Type2Interface2!]! - type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! - type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort], where: Type2Interface2Where): Type2Interface2sConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"\\"\\"\\" - type Type1 { - \\"\\"\\"\\"\\"\\" - field1: String! - \\"\\"\\"\\"\\"\\" - interface1(directed: Boolean = true, options: Interface1Options, where: Interface1Where): [Interface1!]! - interface1Connection(after: String, directed: Boolean = true, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! - } - - type Type1AggregateSelection { - count: Int! - field1: StringAggregateSelectionNonNullable! - } - - input Type1ConnectInput { - interface1: [Type1Interface1ConnectFieldInput!] - } - - input Type1CreateInput { - field1: String! - interface1: Type1Interface1FieldInput - } - - input Type1DeleteInput { - interface1: [Type1Interface1DeleteFieldInput!] - } - - input Type1DisconnectInput { - interface1: [Type1Interface1DisconnectFieldInput!] - } - - type Type1Edge { - cursor: String! - node: Type1! - } - - \\"\\"\\"\\"\\"\\" - type Type1Interface1 implements Interface1 { - \\"\\"\\"\\"\\"\\" - field1: String! - \\"\\"\\"\\"\\"\\" - interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! - interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! - } - - type Type1Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelectionNonNullable! - } - - input Type1Interface1ConnectFieldInput { - connect: Interface1ConnectInput - where: Interface1ConnectWhere - } - - input Type1Interface1ConnectInput { - interface2: [Type1Interface1Interface2ConnectFieldInput!] - } - - type Type1Interface1Connection { - edges: [Type1Interface1Relationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input Type1Interface1ConnectionSort { - node: Interface1Sort - } - - input Type1Interface1ConnectionWhere { - AND: [Type1Interface1ConnectionWhere!] - NOT: Type1Interface1ConnectionWhere - OR: [Type1Interface1ConnectionWhere!] - node: Interface1Where - node_NOT: Interface1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input Type1Interface1CreateFieldInput { - node: Interface1CreateInput! - } - - input Type1Interface1CreateInput { - field1: String! - interface2: Interface1Interface2FieldInput - } - - input Type1Interface1DeleteFieldInput { - delete: Interface1DeleteInput - where: Type1Interface1ConnectionWhere - } - - input Type1Interface1DeleteInput { - interface2: [Type1Interface1Interface2DeleteFieldInput!] - } - - input Type1Interface1DisconnectFieldInput { - disconnect: Interface1DisconnectInput - where: Type1Interface1ConnectionWhere - } - - input Type1Interface1DisconnectInput { - interface2: [Type1Interface1Interface2DisconnectFieldInput!] - } - - type Type1Interface1Edge { - cursor: String! - node: Type1Interface1! - } - - input Type1Interface1FieldInput { - connect: [Type1Interface1ConnectFieldInput!] - create: [Type1Interface1CreateFieldInput!] - } - - input Type1Interface1Interface2ConnectFieldInput { - where: Interface2ConnectWhere - } - - input Type1Interface1Interface2CreateFieldInput { - node: Interface2CreateInput! - } - - input Type1Interface1Interface2DeleteFieldInput { - where: Interface1Interface2ConnectionWhere - } - - input Type1Interface1Interface2DisconnectFieldInput { - where: Interface1Interface2ConnectionWhere - } - - input Type1Interface1Interface2UpdateConnectionInput { - node: Interface2UpdateInput - } - - input Type1Interface1Interface2UpdateFieldInput { - connect: [Type1Interface1Interface2ConnectFieldInput!] - create: [Type1Interface1Interface2CreateFieldInput!] - delete: [Type1Interface1Interface2DeleteFieldInput!] - disconnect: [Type1Interface1Interface2DisconnectFieldInput!] - update: Type1Interface1Interface2UpdateConnectionInput - where: Interface1Interface2ConnectionWhere - } - - input Type1Interface1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type1Interface1Sort objects to sort Type1Interface1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type1Interface1Sort!] - } - - input Type1Interface1RelationInput { - interface2: [Type1Interface1Interface2CreateFieldInput!] - } - - type Type1Interface1Relationship { - cursor: String! - node: Interface1! - } - - \\"\\"\\" - Fields to sort Type1Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface1Sort object. - \\"\\"\\" - input Type1Interface1Sort { - field1: SortDirection - } - - input Type1Interface1UpdateConnectionInput { - node: Interface1UpdateInput - } - - input Type1Interface1UpdateFieldInput { - connect: [Type1Interface1ConnectFieldInput!] - create: [Type1Interface1CreateFieldInput!] - delete: [Type1Interface1DeleteFieldInput!] - disconnect: [Type1Interface1DisconnectFieldInput!] - update: Type1Interface1UpdateConnectionInput - where: Type1Interface1ConnectionWhere - } - - input Type1Interface1UpdateInput { - field1: String - interface2: [Type1Interface1Interface2UpdateFieldInput!] - } - - input Type1Interface1Where { - AND: [Type1Interface1Where!] - NOT: Type1Interface1Where - OR: [Type1Interface1Where!] - field1: String - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_IN: [String!] - field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_STARTS_WITH: String - interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") - \\"\\"\\" - Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere - interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") - \\"\\"\\" - Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere - } - - type Type1Interface1sConnection { - edges: [Type1Interface1Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Type1Interface2 implements Interface2 { - \\"\\"\\"\\"\\"\\" - field2: String! - } - - type Type1Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelectionNonNullable! - } - - input Type1Interface2CreateInput { - field2: String! - } - - type Type1Interface2Edge { - cursor: String! - node: Type1Interface2! - } - - input Type1Interface2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type1Interface2Sort objects to sort Type1Interface2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type1Interface2Sort!] - } - - \\"\\"\\" - Fields to sort Type1Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface2Sort object. - \\"\\"\\" - input Type1Interface2Sort { - field2: SortDirection - } - - input Type1Interface2UpdateInput { - field2: String - } - - input Type1Interface2Where { - AND: [Type1Interface2Where!] - NOT: Type1Interface2Where - OR: [Type1Interface2Where!] - field2: String - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_IN: [String!] - field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_STARTS_WITH: String - } - - type Type1Interface2sConnection { - edges: [Type1Interface2Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input Type1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type1Sort objects to sort Type1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type1Sort!] - } - - input Type1RelationInput { - interface1: [Type1Interface1CreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Type1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Sort object. - \\"\\"\\" - input Type1Sort { - field1: SortDirection - } - - input Type1UpdateInput { - field1: String - interface1: [Type1Interface1UpdateFieldInput!] - } - - input Type1Where { - AND: [Type1Where!] - NOT: Type1Where - OR: [Type1Where!] - field1: String - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_IN: [String!] - field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_STARTS_WITH: String - interface1Connection: Type1Interface1ConnectionWhere @deprecated(reason: \\"Use \`interface1Connection_SOME\` instead.\\") - \\"\\"\\" - Return Type1s where all of the related Type1Interface1Connections match this filter - \\"\\"\\" - interface1Connection_ALL: Type1Interface1ConnectionWhere - \\"\\"\\" - Return Type1s where none of the related Type1Interface1Connections match this filter - \\"\\"\\" - interface1Connection_NONE: Type1Interface1ConnectionWhere - interface1Connection_NOT: Type1Interface1ConnectionWhere @deprecated(reason: \\"Use \`interface1Connection_NONE\` instead.\\") - \\"\\"\\" - Return Type1s where one of the related Type1Interface1Connections match this filter - \\"\\"\\" - interface1Connection_SINGLE: Type1Interface1ConnectionWhere - \\"\\"\\" - Return Type1s where some of the related Type1Interface1Connections match this filter - \\"\\"\\" - interface1Connection_SOME: Type1Interface1ConnectionWhere - } - - type Type1sConnection { - edges: [Type1Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Type2Interface1 implements Interface1 { - \\"\\"\\"\\"\\"\\" - field1: String! - \\"\\"\\"\\"\\"\\" - interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! - interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! - } - - type Type2Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelectionNonNullable! - } - - input Type2Interface1ConnectInput { - interface2: [Type2Interface1Interface2ConnectFieldInput!] - } - - input Type2Interface1CreateInput { - field1: String! - interface2: Interface1Interface2FieldInput - } - - input Type2Interface1DeleteInput { - interface2: [Type2Interface1Interface2DeleteFieldInput!] - } - - input Type2Interface1DisconnectInput { - interface2: [Type2Interface1Interface2DisconnectFieldInput!] - } - - type Type2Interface1Edge { - cursor: String! - node: Type2Interface1! - } - - input Type2Interface1Interface2ConnectFieldInput { - where: Interface2ConnectWhere - } - - input Type2Interface1Interface2CreateFieldInput { - node: Interface2CreateInput! - } - - input Type2Interface1Interface2DeleteFieldInput { - where: Interface1Interface2ConnectionWhere - } - - input Type2Interface1Interface2DisconnectFieldInput { - where: Interface1Interface2ConnectionWhere - } - - input Type2Interface1Interface2UpdateConnectionInput { - node: Interface2UpdateInput - } - - input Type2Interface1Interface2UpdateFieldInput { - connect: [Type2Interface1Interface2ConnectFieldInput!] - create: [Type2Interface1Interface2CreateFieldInput!] - delete: [Type2Interface1Interface2DeleteFieldInput!] - disconnect: [Type2Interface1Interface2DisconnectFieldInput!] - update: Type2Interface1Interface2UpdateConnectionInput - where: Interface1Interface2ConnectionWhere - } - - input Type2Interface1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type2Interface1Sort objects to sort Type2Interface1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type2Interface1Sort!] - } - - input Type2Interface1RelationInput { - interface2: [Type2Interface1Interface2CreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Type2Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type2Interface1Sort object. - \\"\\"\\" - input Type2Interface1Sort { - field1: SortDirection - } - - input Type2Interface1UpdateInput { - field1: String - interface2: [Type2Interface1Interface2UpdateFieldInput!] - } - - input Type2Interface1Where { - AND: [Type2Interface1Where!] - NOT: Type2Interface1Where - OR: [Type2Interface1Where!] - field1: String - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_IN: [String!] - field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_STARTS_WITH: String - interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") - \\"\\"\\" - Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere - interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") - \\"\\"\\" - Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere - } - - type Type2Interface1sConnection { - edges: [Type2Interface1Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Type2Interface2 implements Interface2 { - \\"\\"\\"\\"\\"\\" - field2: String! - } - - type Type2Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelectionNonNullable! - } - - input Type2Interface2CreateInput { - field2: String! - } - - type Type2Interface2Edge { - cursor: String! - node: Type2Interface2! - } - - input Type2Interface2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type2Interface2Sort objects to sort Type2Interface2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type2Interface2Sort!] - } - - \\"\\"\\" - Fields to sort Type2Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type2Interface2Sort object. - \\"\\"\\" - input Type2Interface2Sort { - field2: SortDirection - } - - input Type2Interface2UpdateInput { - field2: String - } - - input Type2Interface2Where { - AND: [Type2Interface2Where!] - NOT: Type2Interface2Where - OR: [Type2Interface2Where!] - field2: String - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_IN: [String!] - field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_STARTS_WITH: String - } - - type Type2Interface2sConnection { - edges: [Type2Interface2Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateType1Interface1sMutationResponse { - info: UpdateInfo! - type1Interface1s: [Type1Interface1!]! - } - - type UpdateType1Interface2sMutationResponse { - info: UpdateInfo! - type1Interface2s: [Type1Interface2!]! - } - - type UpdateType1sMutationResponse { - info: UpdateInfo! - type1s: [Type1!]! - } - - type UpdateType2Interface1sMutationResponse { - info: UpdateInfo! - type2Interface1s: [Type2Interface1!]! - } - - type UpdateType2Interface2sMutationResponse { - info: UpdateInfo! - type2Interface2s: [Type2Interface2!]! - }" - `); - - // expect(() => { - // // eslint-disable-next-line @typescript-eslint/no-unused-vars - // const neoSchema = new Neo4jGraphQL({ typeDefs }); - // }).toThrowError("Nested interface relationship fields are not supported: Interface1.interface2"); - }); - - test("Interface Relationships - nested relationships", async () => { - const typeDefs = gql` - interface Content { - id: ID - content: String - creator: User! @relationship(type: "HAS_CONTENT", direction: IN) - } - - type Comment implements Content { - id: ID - content: String - creator: User! - post: Post! @relationship(type: "HAS_COMMENT", direction: IN) - } - - type Post implements Content { - id: ID - content: String - creator: User! - comments: [Comment!]! @relationship(type: "HAS_COMMENT", direction: OUT) - } - - type User { - id: ID - name: String - content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Comment implements Content { - \\"\\"\\"\\"\\"\\" - content: String - \\"\\"\\"\\"\\"\\" - creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): CommentUserCreatorAggregationSelection - creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - post(directed: Boolean = true, options: PostOptions, where: PostWhere): Post! - postAggregate(directed: Boolean = true, where: PostWhere): CommentPostPostAggregationSelection - postConnection(after: String, directed: Boolean = true, first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! - } - - type CommentAggregateSelection { - content: StringAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input CommentConnectInput { - creator: ContentCreatorConnectFieldInput - post: CommentPostConnectFieldInput - } - - input CommentConnectWhere { - node: CommentWhere! - } - - input CommentCreateInput { - content: String - creator: ContentCreatorFieldInput - id: ID - post: CommentPostFieldInput - } - - input CommentCreatorAggregateInput { - AND: [CommentCreatorAggregateInput!] - NOT: CommentCreatorAggregateInput - OR: [CommentCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: CommentCreatorNodeAggregationWhereInput - } - - input CommentCreatorNodeAggregationWhereInput { - AND: [CommentCreatorNodeAggregationWhereInput!] - NOT: CommentCreatorNodeAggregationWhereInput - OR: [CommentCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input CommentDeleteInput { - creator: ContentCreatorDeleteFieldInput - post: CommentPostDeleteFieldInput - } - - input CommentDisconnectInput { - creator: ContentCreatorDisconnectFieldInput - post: CommentPostDisconnectFieldInput - } - - type CommentEdge { - cursor: String! - node: Comment! - } - - input CommentOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more CommentSort objects to sort Comments by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [CommentSort!] - } - - input CommentPostAggregateInput { - AND: [CommentPostAggregateInput!] - NOT: CommentPostAggregateInput - OR: [CommentPostAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: CommentPostNodeAggregationWhereInput - } - - input CommentPostConnectFieldInput { - connect: PostConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere - } - - type CommentPostConnection { - edges: [CommentPostRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input CommentPostConnectionSort { - node: PostSort - } - - input CommentPostConnectionWhere { - AND: [CommentPostConnectionWhere!] - NOT: CommentPostConnectionWhere - OR: [CommentPostConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input CommentPostCreateFieldInput { - node: PostCreateInput! - } - - input CommentPostDeleteFieldInput { - delete: PostDeleteInput - where: CommentPostConnectionWhere - } - - input CommentPostDisconnectFieldInput { - disconnect: PostDisconnectInput - where: CommentPostConnectionWhere - } - - input CommentPostFieldInput { - connect: CommentPostConnectFieldInput - create: CommentPostCreateFieldInput - } - - input CommentPostNodeAggregationWhereInput { - AND: [CommentPostNodeAggregationWhereInput!] - NOT: CommentPostNodeAggregationWhereInput - OR: [CommentPostNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type CommentPostPostAggregationSelection { - count: Int! - node: CommentPostPostNodeAggregateSelection - } - - type CommentPostPostNodeAggregateSelection { - content: StringAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - type CommentPostRelationship { - cursor: String! - node: Post! - } - - input CommentPostUpdateConnectionInput { - node: PostUpdateInput - } - - input CommentPostUpdateFieldInput { - connect: CommentPostConnectFieldInput - create: CommentPostCreateFieldInput - delete: CommentPostDeleteFieldInput - disconnect: CommentPostDisconnectFieldInput - update: CommentPostUpdateConnectionInput - where: CommentPostConnectionWhere - } - - input CommentRelationInput { - creator: ContentCreatorCreateFieldInput - post: CommentPostCreateFieldInput - } - - \\"\\"\\" - Fields to sort Comments by. The order in which sorts are applied is not guaranteed when specifying many fields in one CommentSort object. - \\"\\"\\" - input CommentSort { - content: SortDirection - id: SortDirection - } - - input CommentUpdateInput { - content: String - creator: ContentCreatorUpdateFieldInput - id: ID - post: CommentPostUpdateFieldInput - } - - type CommentUserCreatorAggregationSelection { - count: Int! - node: CommentUserCreatorNodeAggregateSelection - } - - type CommentUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! - } - - input CommentWhere { - AND: [CommentWhere!] - NOT: CommentWhere - OR: [CommentWhere!] - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - creator: UserWhere - creatorAggregate: CommentCreatorAggregateInput - creatorConnection: ContentCreatorConnectionWhere - creatorConnection_NOT: ContentCreatorConnectionWhere - creator_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - post: PostWhere - postAggregate: CommentPostAggregateInput - postConnection: CommentPostConnectionWhere - postConnection_NOT: CommentPostConnectionWhere - post_NOT: PostWhere - } - - type CommentsConnection { - edges: [CommentEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - interface Content { - \\"\\"\\"\\"\\"\\" - content: String - \\"\\"\\"\\"\\"\\" - creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input ContentConnectInput { - _on: ContentImplementationsConnectInput - creator: ContentCreatorConnectFieldInput - } - - input ContentConnectWhere { - node: ContentWhere! - } - - input ContentCreateInput { - Comment: CommentCreateInput - Post: PostCreateInput - } - - input ContentCreatorAggregateInput { - AND: [ContentCreatorAggregateInput!] - NOT: ContentCreatorAggregateInput - OR: [ContentCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ContentCreatorNodeAggregationWhereInput - } - - input ContentCreatorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type ContentCreatorConnection { - edges: [ContentCreatorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ContentCreatorConnectionSort { - node: UserSort - } - - input ContentCreatorConnectionWhere { - AND: [ContentCreatorConnectionWhere!] - NOT: ContentCreatorConnectionWhere - OR: [ContentCreatorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ContentCreatorCreateFieldInput { - node: UserCreateInput! - } - - input ContentCreatorDeleteFieldInput { - delete: UserDeleteInput - where: ContentCreatorConnectionWhere - } - - input ContentCreatorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: ContentCreatorConnectionWhere - } - - input ContentCreatorFieldInput { - connect: ContentCreatorConnectFieldInput - create: ContentCreatorCreateFieldInput - } - - input ContentCreatorNodeAggregationWhereInput { - AND: [ContentCreatorNodeAggregationWhereInput!] - NOT: ContentCreatorNodeAggregationWhereInput - OR: [ContentCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ContentCreatorRelationship { - cursor: String! - node: User! - } - - input ContentCreatorUpdateConnectionInput { - node: UserUpdateInput - } - - input ContentCreatorUpdateFieldInput { - connect: ContentCreatorConnectFieldInput - create: ContentCreatorCreateFieldInput - delete: ContentCreatorDeleteFieldInput - disconnect: ContentCreatorDisconnectFieldInput - update: ContentCreatorUpdateConnectionInput - where: ContentCreatorConnectionWhere - } - - input ContentDeleteInput { - _on: ContentImplementationsDeleteInput - creator: ContentCreatorDeleteFieldInput - } - - input ContentDisconnectInput { - _on: ContentImplementationsDisconnectInput - creator: ContentCreatorDisconnectFieldInput - } - - input ContentImplementationsConnectInput { - Comment: [CommentConnectInput!] - Post: [PostConnectInput!] - } - - input ContentImplementationsDeleteInput { - Comment: [CommentDeleteInput!] - Post: [PostDeleteInput!] - } - - input ContentImplementationsDisconnectInput { - Comment: [CommentDisconnectInput!] - Post: [PostDisconnectInput!] - } - - input ContentImplementationsUpdateInput { - Comment: CommentUpdateInput - Post: PostUpdateInput - } - - input ContentImplementationsWhere { - Comment: CommentWhere - Post: PostWhere - } - - input ContentOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more ContentSort objects to sort Contents by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [ContentSort] - } - - \\"\\"\\" - Fields to sort Contents by. The order in which sorts are applied is not guaranteed when specifying many fields in one ContentSort object. - \\"\\"\\" - input ContentSort { - content: SortDirection - id: SortDirection - } - - input ContentUpdateInput { - _on: ContentImplementationsUpdateInput - content: String - creator: ContentCreatorUpdateFieldInput - id: ID - } - - input ContentWhere { - _on: ContentImplementationsWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - creator: UserWhere - creatorAggregate: ContentCreatorAggregateInput - creatorConnection: ContentCreatorConnectionWhere - creatorConnection_NOT: ContentCreatorConnectionWhere - creator_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type CreateCommentsMutationResponse { - comments: [Comment!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type Mutation { - createComments(input: [CommentCreateInput!]!): CreateCommentsMutationResponse! - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteComments(delete: CommentDeleteInput, where: CommentWhere): DeleteInfo! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateComments(connect: CommentConnectInput, create: CommentRelationInput, delete: CommentDeleteInput, disconnect: CommentDisconnectInput, update: CommentUpdateInput, where: CommentWhere): UpdateCommentsMutationResponse! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"\\"\\"\\" - type Post implements Content { - \\"\\"\\"\\"\\"\\" - comments(directed: Boolean = true, options: CommentOptions, where: CommentWhere): [Comment!]! - commentsAggregate(directed: Boolean = true, where: CommentWhere): PostCommentCommentsAggregationSelection - commentsConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! - \\"\\"\\"\\"\\"\\" - content: String - \\"\\"\\"\\"\\"\\" - creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection - creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type PostAggregateSelection { - content: StringAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - type PostCommentCommentsAggregationSelection { - count: Int! - node: PostCommentCommentsNodeAggregateSelection - } - - type PostCommentCommentsNodeAggregateSelection { - content: StringAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input PostCommentsAggregateInput { - AND: [PostCommentsAggregateInput!] - NOT: PostCommentsAggregateInput - OR: [PostCommentsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostCommentsNodeAggregationWhereInput - } - - input PostCommentsConnectFieldInput { - connect: [CommentConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: CommentConnectWhere - } - - type PostCommentsConnection { - edges: [PostCommentsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PostCommentsConnectionSort { - node: CommentSort - } - - input PostCommentsConnectionWhere { - AND: [PostCommentsConnectionWhere!] - NOT: PostCommentsConnectionWhere - OR: [PostCommentsConnectionWhere!] - node: CommentWhere - node_NOT: CommentWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PostCommentsCreateFieldInput { - node: CommentCreateInput! - } - - input PostCommentsDeleteFieldInput { - delete: CommentDeleteInput - where: PostCommentsConnectionWhere - } - - input PostCommentsDisconnectFieldInput { - disconnect: CommentDisconnectInput - where: PostCommentsConnectionWhere - } - - input PostCommentsFieldInput { - connect: [PostCommentsConnectFieldInput!] - create: [PostCommentsCreateFieldInput!] - } - - input PostCommentsNodeAggregationWhereInput { - AND: [PostCommentsNodeAggregationWhereInput!] - NOT: PostCommentsNodeAggregationWhereInput - OR: [PostCommentsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type PostCommentsRelationship { - cursor: String! - node: Comment! - } - - input PostCommentsUpdateConnectionInput { - node: CommentUpdateInput - } - - input PostCommentsUpdateFieldInput { - connect: [PostCommentsConnectFieldInput!] - create: [PostCommentsCreateFieldInput!] - delete: [PostCommentsDeleteFieldInput!] - disconnect: [PostCommentsDisconnectFieldInput!] - update: PostCommentsUpdateConnectionInput - where: PostCommentsConnectionWhere - } - - input PostConnectInput { - comments: [PostCommentsConnectFieldInput!] - creator: ContentCreatorConnectFieldInput - } - - input PostConnectWhere { - node: PostWhere! - } - - input PostCreateInput { - comments: PostCommentsFieldInput - content: String - creator: ContentCreatorFieldInput - id: ID - } - - input PostCreatorAggregateInput { - AND: [PostCreatorAggregateInput!] - NOT: PostCreatorAggregateInput - OR: [PostCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostCreatorNodeAggregationWhereInput - } - - input PostCreatorNodeAggregationWhereInput { - AND: [PostCreatorNodeAggregationWhereInput!] - NOT: PostCreatorNodeAggregationWhereInput - OR: [PostCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input PostDeleteInput { - comments: [PostCommentsDeleteFieldInput!] - creator: ContentCreatorDeleteFieldInput - } - - input PostDisconnectInput { - comments: [PostCommentsDisconnectFieldInput!] - creator: ContentCreatorDisconnectFieldInput - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] - } - - input PostRelationInput { - comments: [PostCommentsCreateFieldInput!] - creator: ContentCreatorCreateFieldInput - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - content: SortDirection - id: SortDirection - } - - input PostUpdateInput { - comments: [PostCommentsUpdateFieldInput!] - content: String - creator: ContentCreatorUpdateFieldInput - id: ID - } - - type PostUserCreatorAggregationSelection { - count: Int! - node: PostUserCreatorNodeAggregateSelection - } - - type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - comments: CommentWhere @deprecated(reason: \\"Use \`comments_SOME\` instead.\\") - commentsAggregate: PostCommentsAggregateInput - commentsConnection: PostCommentsConnectionWhere @deprecated(reason: \\"Use \`commentsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Posts where all of the related PostCommentsConnections match this filter - \\"\\"\\" - commentsConnection_ALL: PostCommentsConnectionWhere - \\"\\"\\" - Return Posts where none of the related PostCommentsConnections match this filter - \\"\\"\\" - commentsConnection_NONE: PostCommentsConnectionWhere - commentsConnection_NOT: PostCommentsConnectionWhere @deprecated(reason: \\"Use \`commentsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Posts where one of the related PostCommentsConnections match this filter - \\"\\"\\" - commentsConnection_SINGLE: PostCommentsConnectionWhere - \\"\\"\\" - Return Posts where some of the related PostCommentsConnections match this filter - \\"\\"\\" - commentsConnection_SOME: PostCommentsConnectionWhere - \\"\\"\\"Return Posts where all of the related Comments match this filter\\"\\"\\" - comments_ALL: CommentWhere - \\"\\"\\"Return Posts where none of the related Comments match this filter\\"\\"\\" - comments_NONE: CommentWhere - comments_NOT: CommentWhere @deprecated(reason: \\"Use \`comments_NONE\` instead.\\") - \\"\\"\\"Return Posts where one of the related Comments match this filter\\"\\"\\" - comments_SINGLE: CommentWhere - \\"\\"\\"Return Posts where some of the related Comments match this filter\\"\\"\\" - comments_SOME: CommentWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - creator: UserWhere - creatorAggregate: PostCreatorAggregateInput - creatorConnection: ContentCreatorConnectionWhere - creatorConnection_NOT: ContentCreatorConnectionWhere - creator_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - comments(options: CommentOptions, where: CommentWhere): [Comment!]! - commentsAggregate(where: CommentWhere): CommentAggregateSelection! - commentsConnection(after: String, first: Int, sort: [CommentSort], where: CommentWhere): CommentsConnection! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateCommentsMutationResponse { - comments: [Comment!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - content(directed: Boolean = true, options: ContentOptions, where: ContentWhere): [Content!]! - contentConnection(after: String, directed: Boolean = true, first: Int, sort: [UserContentConnectionSort!], where: UserContentConnectionWhere): UserContentConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - name: String - } - - type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! - } - - input UserConnectInput { - content: [UserContentConnectFieldInput!] - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserContentConnectFieldInput { - connect: ContentConnectInput - where: ContentConnectWhere - } - - type UserContentConnection { - edges: [UserContentRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserContentConnectionSort { - node: ContentSort - } - - input UserContentConnectionWhere { - AND: [UserContentConnectionWhere!] - NOT: UserContentConnectionWhere - OR: [UserContentConnectionWhere!] - node: ContentWhere - node_NOT: ContentWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input UserContentCreateFieldInput { - node: ContentCreateInput! - } - - input UserContentDeleteFieldInput { - delete: ContentDeleteInput - where: UserContentConnectionWhere - } - - input UserContentDisconnectFieldInput { - disconnect: ContentDisconnectInput - where: UserContentConnectionWhere - } - - input UserContentFieldInput { - connect: [UserContentConnectFieldInput!] - create: [UserContentCreateFieldInput!] - } - - type UserContentRelationship { - cursor: String! - node: Content! - } - - input UserContentUpdateConnectionInput { - node: ContentUpdateInput - } - - input UserContentUpdateFieldInput { - connect: [UserContentConnectFieldInput!] - create: [UserContentCreateFieldInput!] - delete: [UserContentDeleteFieldInput!] - disconnect: [UserContentDisconnectFieldInput!] - update: UserContentUpdateConnectionInput - where: UserContentConnectionWhere - } - - input UserCreateInput { - content: UserContentFieldInput - id: ID - name: String - } - - input UserDeleteInput { - content: [UserContentDeleteFieldInput!] - } - - input UserDisconnectInput { - content: [UserContentDisconnectFieldInput!] - } - - type UserEdge { - cursor: String! - node: User! - } - - 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!] - } - - input UserRelationInput { - content: [UserContentCreateFieldInput!] - } - - \\"\\"\\" - 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 { - id: SortDirection - name: SortDirection - } - - input UserUpdateInput { - content: [UserContentUpdateFieldInput!] - id: ID - name: String - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - contentConnection: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_ALL: UserContentConnectionWhere - \\"\\"\\" - Return Users where none of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_NONE: UserContentConnectionWhere - contentConnection_NOT: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_SINGLE: UserContentConnectionWhere - \\"\\"\\" - Return Users where some of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_SOME: UserContentConnectionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +type Comment implements Content { + content: String + creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + creatorAggregate(directed: Boolean = true, where: UserWhere): CommentUserCreatorAggregationSelection + creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + id: ID + post(directed: Boolean = true, options: PostOptions, where: PostWhere): Post! + postAggregate(directed: Boolean = true, where: PostWhere): CommentPostPostAggregationSelection + postConnection(after: String, directed: Boolean = true, first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! +} + +type CommentAggregateSelection { + content: StringAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input CommentConnectInput { + creator: ContentCreatorConnectFieldInput + post: CommentPostConnectFieldInput +} + +input CommentConnectWhere { + node: CommentWhere! +} + +input CommentCreateInput { + content: String + creator: ContentCreatorFieldInput + id: ID + post: CommentPostFieldInput +} + +input CommentCreatorAggregateInput { + AND: [CommentCreatorAggregateInput!] + NOT: CommentCreatorAggregateInput + OR: [CommentCreatorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: CommentCreatorNodeAggregationWhereInput +} + +input CommentCreatorNodeAggregationWhereInput { + AND: [CommentCreatorNodeAggregationWhereInput!] + NOT: CommentCreatorNodeAggregationWhereInput + OR: [CommentCreatorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input CommentDeleteInput { + creator: ContentCreatorDeleteFieldInput + post: CommentPostDeleteFieldInput +} + +input CommentDisconnectInput { + creator: ContentCreatorDisconnectFieldInput + post: CommentPostDisconnectFieldInput +} + +type CommentEdge { + cursor: String! + node: Comment! +} + +input CommentOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more CommentSort objects to sort Comments by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [CommentSort!] +} + +input CommentPostAggregateInput { + AND: [CommentPostAggregateInput!] + NOT: CommentPostAggregateInput + OR: [CommentPostAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: CommentPostNodeAggregationWhereInput +} + +input CommentPostConnectFieldInput { + connect: PostConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere +} + +type CommentPostConnection { + edges: [CommentPostRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input CommentPostConnectionSort { + node: PostSort +} + +input CommentPostConnectionWhere { + AND: [CommentPostConnectionWhere!] + NOT: CommentPostConnectionWhere + OR: [CommentPostConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input CommentPostCreateFieldInput { + node: PostCreateInput! +} + +input CommentPostDeleteFieldInput { + delete: PostDeleteInput + where: CommentPostConnectionWhere +} + +input CommentPostDisconnectFieldInput { + disconnect: PostDisconnectInput + where: CommentPostConnectionWhere +} + +input CommentPostFieldInput { + connect: CommentPostConnectFieldInput + create: CommentPostCreateFieldInput +} + +input CommentPostNodeAggregationWhereInput { + AND: [CommentPostNodeAggregationWhereInput!] + NOT: CommentPostNodeAggregationWhereInput + OR: [CommentPostNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type CommentPostPostAggregationSelection { + count: Int! + node: CommentPostPostNodeAggregateSelection +} + +type CommentPostPostNodeAggregateSelection { + content: StringAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +type CommentPostRelationship { + cursor: String! + node: Post! +} + +input CommentPostUpdateConnectionInput { + node: PostUpdateInput +} + +input CommentPostUpdateFieldInput { + connect: CommentPostConnectFieldInput + create: CommentPostCreateFieldInput + delete: CommentPostDeleteFieldInput + disconnect: CommentPostDisconnectFieldInput + update: CommentPostUpdateConnectionInput + where: CommentPostConnectionWhere +} + +input CommentRelationInput { + creator: ContentCreatorCreateFieldInput + post: CommentPostCreateFieldInput +} + +\\"\\"\\" +Fields to sort Comments by. The order in which sorts are applied is not guaranteed when specifying many fields in one CommentSort object. +\\"\\"\\" +input CommentSort { + content: SortDirection + id: SortDirection +} + +input CommentUpdateInput { + content: String + creator: ContentCreatorUpdateFieldInput + id: ID + post: CommentPostUpdateFieldInput +} + +type CommentUserCreatorAggregationSelection { + count: Int! + node: CommentUserCreatorNodeAggregateSelection +} + +type CommentUserCreatorNodeAggregateSelection { + id: IDAggregateSelectionNullable! + name: StringAggregateSelectionNullable! +} + +input CommentWhere { + AND: [CommentWhere!] + NOT: CommentWhere + OR: [CommentWhere!] + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + creator: UserWhere + creatorAggregate: CommentCreatorAggregateInput + creatorConnection: ContentCreatorConnectionWhere + creatorConnection_NOT: ContentCreatorConnectionWhere + creator_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + post: PostWhere + postAggregate: CommentPostAggregateInput + postConnection: CommentPostConnectionWhere + postConnection_NOT: CommentPostConnectionWhere + post_NOT: PostWhere +} + +type CommentsConnection { + edges: [CommentEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +interface Content { + content: String + creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + id: ID +} + +input ContentConnectInput { + _on: ContentImplementationsConnectInput + creator: ContentCreatorConnectFieldInput +} + +input ContentConnectWhere { + node: ContentWhere! +} + +input ContentCreateInput { + Comment: CommentCreateInput + Post: PostCreateInput +} + +input ContentCreatorAggregateInput { + AND: [ContentCreatorAggregateInput!] + NOT: ContentCreatorAggregateInput + OR: [ContentCreatorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ContentCreatorNodeAggregationWhereInput +} + +input ContentCreatorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type ContentCreatorConnection { + edges: [ContentCreatorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ContentCreatorConnectionSort { + node: UserSort +} + +input ContentCreatorConnectionWhere { + AND: [ContentCreatorConnectionWhere!] + NOT: ContentCreatorConnectionWhere + OR: [ContentCreatorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ContentCreatorCreateFieldInput { + node: UserCreateInput! +} + +input ContentCreatorDeleteFieldInput { + delete: UserDeleteInput + where: ContentCreatorConnectionWhere +} + +input ContentCreatorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: ContentCreatorConnectionWhere +} + +input ContentCreatorFieldInput { + connect: ContentCreatorConnectFieldInput + create: ContentCreatorCreateFieldInput +} + +input ContentCreatorNodeAggregationWhereInput { + AND: [ContentCreatorNodeAggregationWhereInput!] + NOT: ContentCreatorNodeAggregationWhereInput + OR: [ContentCreatorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ContentCreatorRelationship { + cursor: String! + node: User! +} + +input ContentCreatorUpdateConnectionInput { + node: UserUpdateInput +} + +input ContentCreatorUpdateFieldInput { + connect: ContentCreatorConnectFieldInput + create: ContentCreatorCreateFieldInput + delete: ContentCreatorDeleteFieldInput + disconnect: ContentCreatorDisconnectFieldInput + update: ContentCreatorUpdateConnectionInput + where: ContentCreatorConnectionWhere +} + +input ContentDeleteInput { + _on: ContentImplementationsDeleteInput + creator: ContentCreatorDeleteFieldInput +} + +input ContentDisconnectInput { + _on: ContentImplementationsDisconnectInput + creator: ContentCreatorDisconnectFieldInput +} + +input ContentImplementationsConnectInput { + Comment: [CommentConnectInput!] + Post: [PostConnectInput!] +} + +input ContentImplementationsDeleteInput { + Comment: [CommentDeleteInput!] + Post: [PostDeleteInput!] +} + +input ContentImplementationsDisconnectInput { + Comment: [CommentDisconnectInput!] + Post: [PostDisconnectInput!] +} + +input ContentImplementationsUpdateInput { + Comment: CommentUpdateInput + Post: PostUpdateInput +} + +input ContentImplementationsWhere { + Comment: CommentWhere + Post: PostWhere +} + +input ContentOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ContentSort objects to sort Contents by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ContentSort] +} + +\\"\\"\\" +Fields to sort Contents by. The order in which sorts are applied is not guaranteed when specifying many fields in one ContentSort object. +\\"\\"\\" +input ContentSort { + content: SortDirection + id: SortDirection +} + +input ContentUpdateInput { + _on: ContentImplementationsUpdateInput + content: String + creator: ContentCreatorUpdateFieldInput + id: ID +} + +input ContentWhere { + _on: ContentImplementationsWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + creator: UserWhere + creatorAggregate: ContentCreatorAggregateInput + creatorConnection: ContentCreatorConnectionWhere + creatorConnection_NOT: ContentCreatorConnectionWhere + creator_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type CreateCommentsMutationResponse { + comments: [Comment!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Mutation { + createComments(input: [CommentCreateInput!]!): CreateCommentsMutationResponse! + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteComments(delete: CommentDeleteInput, where: CommentWhere): DeleteInfo! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateComments(connect: CommentConnectInput, create: CommentRelationInput, delete: CommentDeleteInput, disconnect: CommentDisconnectInput, update: CommentUpdateInput, where: CommentWhere): UpdateCommentsMutationResponse! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Post implements Content { + comments(directed: Boolean = true, options: CommentOptions, where: CommentWhere): [Comment!]! + commentsAggregate(directed: Boolean = true, where: CommentWhere): PostCommentCommentsAggregationSelection + commentsConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! + content: String + creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection + creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + id: ID +} + +type PostAggregateSelection { + content: StringAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +type PostCommentCommentsAggregationSelection { + count: Int! + node: PostCommentCommentsNodeAggregateSelection +} + +type PostCommentCommentsNodeAggregateSelection { + content: StringAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input PostCommentsAggregateInput { + AND: [PostCommentsAggregateInput!] + NOT: PostCommentsAggregateInput + OR: [PostCommentsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostCommentsNodeAggregationWhereInput +} + +input PostCommentsConnectFieldInput { + connect: [CommentConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: CommentConnectWhere +} + +type PostCommentsConnection { + edges: [PostCommentsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PostCommentsConnectionSort { + node: CommentSort +} + +input PostCommentsConnectionWhere { + AND: [PostCommentsConnectionWhere!] + NOT: PostCommentsConnectionWhere + OR: [PostCommentsConnectionWhere!] + node: CommentWhere + node_NOT: CommentWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PostCommentsCreateFieldInput { + node: CommentCreateInput! +} + +input PostCommentsDeleteFieldInput { + delete: CommentDeleteInput + where: PostCommentsConnectionWhere +} + +input PostCommentsDisconnectFieldInput { + disconnect: CommentDisconnectInput + where: PostCommentsConnectionWhere +} + +input PostCommentsFieldInput { + connect: [PostCommentsConnectFieldInput!] + create: [PostCommentsCreateFieldInput!] +} + +input PostCommentsNodeAggregationWhereInput { + AND: [PostCommentsNodeAggregationWhereInput!] + NOT: PostCommentsNodeAggregationWhereInput + OR: [PostCommentsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type PostCommentsRelationship { + cursor: String! + node: Comment! +} + +input PostCommentsUpdateConnectionInput { + node: CommentUpdateInput +} + +input PostCommentsUpdateFieldInput { + connect: [PostCommentsConnectFieldInput!] + create: [PostCommentsCreateFieldInput!] + delete: [PostCommentsDeleteFieldInput!] + disconnect: [PostCommentsDisconnectFieldInput!] + update: PostCommentsUpdateConnectionInput + where: PostCommentsConnectionWhere +} + +input PostConnectInput { + comments: [PostCommentsConnectFieldInput!] + creator: ContentCreatorConnectFieldInput +} + +input PostConnectWhere { + node: PostWhere! +} + +input PostCreateInput { + comments: PostCommentsFieldInput + content: String + creator: ContentCreatorFieldInput + id: ID +} + +input PostCreatorAggregateInput { + AND: [PostCreatorAggregateInput!] + NOT: PostCreatorAggregateInput + OR: [PostCreatorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostCreatorNodeAggregationWhereInput +} + +input PostCreatorNodeAggregationWhereInput { + AND: [PostCreatorNodeAggregationWhereInput!] + NOT: PostCreatorNodeAggregationWhereInput + OR: [PostCreatorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input PostDeleteInput { + comments: [PostCommentsDeleteFieldInput!] + creator: ContentCreatorDeleteFieldInput +} + +input PostDisconnectInput { + comments: [PostCommentsDisconnectFieldInput!] + creator: ContentCreatorDisconnectFieldInput +} + +type PostEdge { + cursor: String! + node: Post! +} + +input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] +} + +input PostRelationInput { + comments: [PostCommentsCreateFieldInput!] + creator: ContentCreatorCreateFieldInput +} + +\\"\\"\\" +Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. +\\"\\"\\" +input PostSort { + content: SortDirection + id: SortDirection +} + +input PostUpdateInput { + comments: [PostCommentsUpdateFieldInput!] + content: String + creator: ContentCreatorUpdateFieldInput + id: ID +} + +type PostUserCreatorAggregationSelection { + count: Int! + node: PostUserCreatorNodeAggregateSelection +} + +type PostUserCreatorNodeAggregateSelection { + id: IDAggregateSelectionNullable! + name: StringAggregateSelectionNullable! +} + +input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + comments: CommentWhere @deprecated(reason: \\"Use \`comments_SOME\` instead.\\") + commentsAggregate: PostCommentsAggregateInput + commentsConnection: PostCommentsConnectionWhere @deprecated(reason: \\"Use \`commentsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Posts where all of the related PostCommentsConnections match this filter + \\"\\"\\" + commentsConnection_ALL: PostCommentsConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostCommentsConnections match this filter + \\"\\"\\" + commentsConnection_NONE: PostCommentsConnectionWhere + commentsConnection_NOT: PostCommentsConnectionWhere @deprecated(reason: \\"Use \`commentsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Posts where one of the related PostCommentsConnections match this filter + \\"\\"\\" + commentsConnection_SINGLE: PostCommentsConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostCommentsConnections match this filter + \\"\\"\\" + commentsConnection_SOME: PostCommentsConnectionWhere + \\"\\"\\"Return Posts where all of the related Comments match this filter\\"\\"\\" + comments_ALL: CommentWhere + \\"\\"\\"Return Posts where none of the related Comments match this filter\\"\\"\\" + comments_NONE: CommentWhere + comments_NOT: CommentWhere @deprecated(reason: \\"Use \`comments_NONE\` instead.\\") + \\"\\"\\"Return Posts where one of the related Comments match this filter\\"\\"\\" + comments_SINGLE: CommentWhere + \\"\\"\\"Return Posts where some of the related Comments match this filter\\"\\"\\" + comments_SOME: CommentWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + creator: UserWhere + creatorAggregate: PostCreatorAggregateInput + creatorConnection: ContentCreatorConnectionWhere + creatorConnection_NOT: ContentCreatorConnectionWhere + creator_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Query { + comments(options: CommentOptions, where: CommentWhere): [Comment!]! + commentsAggregate(where: CommentWhere): CommentAggregateSelection! + commentsConnection(after: String, first: Int, sort: [CommentSort], where: CommentWhere): CommentsConnection! + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateCommentsMutationResponse { + comments: [Comment!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + content(directed: Boolean = true, options: ContentOptions, where: ContentWhere): [Content!]! + contentConnection(after: String, directed: Boolean = true, first: Int, sort: [UserContentConnectionSort!], where: UserContentConnectionWhere): UserContentConnection! + id: ID + name: String +} + +type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + name: StringAggregateSelectionNullable! +} + +input UserConnectInput { + content: [UserContentConnectFieldInput!] +} + +input UserConnectWhere { + node: UserWhere! +} + +input UserContentConnectFieldInput { + connect: ContentConnectInput + where: ContentConnectWhere +} + +type UserContentConnection { + edges: [UserContentRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserContentConnectionSort { + node: ContentSort +} + +input UserContentConnectionWhere { + AND: [UserContentConnectionWhere!] + NOT: UserContentConnectionWhere + OR: [UserContentConnectionWhere!] + node: ContentWhere + node_NOT: ContentWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input UserContentCreateFieldInput { + node: ContentCreateInput! +} + +input UserContentDeleteFieldInput { + delete: ContentDeleteInput + where: UserContentConnectionWhere +} + +input UserContentDisconnectFieldInput { + disconnect: ContentDisconnectInput + where: UserContentConnectionWhere +} + +input UserContentFieldInput { + connect: [UserContentConnectFieldInput!] + create: [UserContentCreateFieldInput!] +} + +type UserContentRelationship { + cursor: String! + node: Content! +} + +input UserContentUpdateConnectionInput { + node: ContentUpdateInput +} + +input UserContentUpdateFieldInput { + connect: [UserContentConnectFieldInput!] + create: [UserContentCreateFieldInput!] + delete: [UserContentDeleteFieldInput!] + disconnect: [UserContentDisconnectFieldInput!] + update: UserContentUpdateConnectionInput + where: UserContentConnectionWhere +} + +input UserCreateInput { + content: UserContentFieldInput + id: ID + name: String +} + +input UserDeleteInput { + content: [UserContentDeleteFieldInput!] +} + +input UserDisconnectInput { + content: [UserContentDisconnectFieldInput!] +} + +type UserEdge { + cursor: String! + node: User! +} + +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!] +} + +input UserRelationInput { + content: [UserContentCreateFieldInput!] +} + +\\"\\"\\" +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 { + id: SortDirection + name: SortDirection +} + +input UserUpdateInput { + content: [UserContentUpdateFieldInput!] + id: ID + name: String +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + contentConnection: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_ALL: UserContentConnectionWhere + \\"\\"\\" + Return Users where none of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_NONE: UserContentConnectionWhere + contentConnection_NOT: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_SINGLE: UserContentConnectionWhere + \\"\\"\\" + Return Users where some of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_SOME: UserContentConnectionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index afcb6c0b77..02132cabec 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -56,302 +56,292 @@ describe("Interfaces", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie implements MovieNode { - \\"\\"\\"\\"\\"\\" - customQuery: [Movie] - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! - \\"\\"\\"\\"\\"\\" - nodes: [MovieNode] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - movies: [MovieNodeMoviesConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - id: ID - movies: MovieNodeMoviesFieldInput - } - - input MovieDeleteInput { - movies: [MovieNodeMoviesDeleteFieldInput!] - } - - input MovieDisconnectInput { - movies: [MovieNodeMoviesDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieMovieMoviesAggregationSelection { - count: Int! - node: MovieMovieMoviesNodeAggregateSelection - } - - type MovieMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNullable! - } - - input MovieMoviesAggregateInput { - AND: [MovieMoviesAggregateInput!] - NOT: MovieMoviesAggregateInput - OR: [MovieMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieMoviesNodeAggregationWhereInput - } - - input MovieMoviesNodeAggregationWhereInput { - AND: [MovieMoviesNodeAggregationWhereInput!] - NOT: MovieMoviesNodeAggregationWhereInput - OR: [MovieMoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - \\"\\"\\"\\"\\"\\" - interface MovieNode { - \\"\\"\\"\\"\\"\\" - customQuery: [Movie] - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - movies: [Movie!]! - \\"\\"\\"\\"\\"\\" - moviesConnection: MovieNodeMoviesConnection! - } - - input MovieNodeMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type MovieNodeMoviesConnection { - edges: [MovieNodeMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieNodeMoviesConnectionSort { - node: MovieSort - } - - input MovieNodeMoviesConnectionWhere { - AND: [MovieNodeMoviesConnectionWhere!] - NOT: MovieNodeMoviesConnectionWhere - OR: [MovieNodeMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieNodeMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input MovieNodeMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: MovieNodeMoviesConnectionWhere - } - - input MovieNodeMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieNodeMoviesConnectionWhere - } - - input MovieNodeMoviesFieldInput { - connect: [MovieNodeMoviesConnectFieldInput!] - create: [MovieNodeMoviesCreateFieldInput!] - } - - type MovieNodeMoviesRelationship { - cursor: String! - node: Movie! - } - - input MovieNodeMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input MovieNodeMoviesUpdateFieldInput { - connect: [MovieNodeMoviesConnectFieldInput!] - create: [MovieNodeMoviesCreateFieldInput!] - delete: [MovieNodeMoviesDeleteFieldInput!] - disconnect: [MovieNodeMoviesDisconnectFieldInput!] - update: MovieNodeMoviesUpdateConnectionInput - where: MovieNodeMoviesConnectionWhere - } - - 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!] - } - - input MovieRelationInput { - movies: [MovieNodeMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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 { - id: ID - movies: [MovieNodeMoviesUpdateFieldInput!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: MovieMoviesAggregateInput - moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: MovieNodeMoviesConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: MovieNodeMoviesConnectionWhere - moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: MovieNodeMoviesConnectionWhere - \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie implements MovieNode { + customQuery: [Movie] + id: ID + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! + nodes: [MovieNode] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + movies: [MovieNodeMoviesConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + id: ID + movies: MovieNodeMoviesFieldInput +} + +input MovieDeleteInput { + movies: [MovieNodeMoviesDeleteFieldInput!] +} + +input MovieDisconnectInput { + movies: [MovieNodeMoviesDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieMovieMoviesAggregationSelection { + count: Int! + node: MovieMovieMoviesNodeAggregateSelection +} + +type MovieMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNullable! +} + +input MovieMoviesAggregateInput { + AND: [MovieMoviesAggregateInput!] + NOT: MovieMoviesAggregateInput + OR: [MovieMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieMoviesNodeAggregationWhereInput +} + +input MovieMoviesNodeAggregationWhereInput { + AND: [MovieMoviesNodeAggregationWhereInput!] + NOT: MovieMoviesNodeAggregationWhereInput + OR: [MovieMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +interface MovieNode { + customQuery: [Movie] + id: ID + movies: [Movie!]! + moviesConnection: MovieNodeMoviesConnection! +} + +input MovieNodeMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type MovieNodeMoviesConnection { + edges: [MovieNodeMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieNodeMoviesConnectionSort { + node: MovieSort +} + +input MovieNodeMoviesConnectionWhere { + AND: [MovieNodeMoviesConnectionWhere!] + NOT: MovieNodeMoviesConnectionWhere + OR: [MovieNodeMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieNodeMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input MovieNodeMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: MovieNodeMoviesConnectionWhere +} + +input MovieNodeMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieNodeMoviesConnectionWhere +} + +input MovieNodeMoviesFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] +} + +type MovieNodeMoviesRelationship { + cursor: String! + node: Movie! +} + +input MovieNodeMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input MovieNodeMoviesUpdateFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] + delete: [MovieNodeMoviesDeleteFieldInput!] + disconnect: [MovieNodeMoviesDisconnectFieldInput!] + update: MovieNodeMoviesUpdateConnectionInput + where: MovieNodeMoviesConnectionWhere +} + +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!] +} + +input MovieRelationInput { + movies: [MovieNodeMoviesCreateFieldInput!] +} + +\\"\\"\\" +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 { + id: ID + movies: [MovieNodeMoviesUpdateFieldInput!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: MovieNodeMoviesConnectionWhere + \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Interface with directive", async () => { const typeDefs = gql` @@ -388,303 +378,293 @@ describe("Interfaces", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - directive @something(something: String) on INTERFACE - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie implements MovieNode { - \\"\\"\\"\\"\\"\\" - customQuery: [Movie] - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! - \\"\\"\\"\\"\\"\\" - nodes: [MovieNode] - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - movies: [MovieNodeMoviesConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - id: ID - movies: MovieNodeMoviesFieldInput - } - - input MovieDeleteInput { - movies: [MovieNodeMoviesDeleteFieldInput!] - } - - input MovieDisconnectInput { - movies: [MovieNodeMoviesDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieMovieMoviesAggregationSelection { - count: Int! - node: MovieMovieMoviesNodeAggregateSelection - } - - type MovieMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNullable! - } - - input MovieMoviesAggregateInput { - AND: [MovieMoviesAggregateInput!] - NOT: MovieMoviesAggregateInput - OR: [MovieMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieMoviesNodeAggregationWhereInput - } - - input MovieMoviesNodeAggregationWhereInput { - AND: [MovieMoviesNodeAggregationWhereInput!] - NOT: MovieMoviesNodeAggregationWhereInput - OR: [MovieMoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - \\"\\"\\"\\"\\"\\" - interface MovieNode @something(something: \\"test\\") { - \\"\\"\\"\\"\\"\\" - customQuery: [Movie] - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - movies: [Movie!]! - \\"\\"\\"\\"\\"\\" - moviesConnection: MovieNodeMoviesConnection! - } - - input MovieNodeMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type MovieNodeMoviesConnection { - edges: [MovieNodeMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieNodeMoviesConnectionSort { - node: MovieSort - } - - input MovieNodeMoviesConnectionWhere { - AND: [MovieNodeMoviesConnectionWhere!] - NOT: MovieNodeMoviesConnectionWhere - OR: [MovieNodeMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieNodeMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input MovieNodeMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: MovieNodeMoviesConnectionWhere - } - - input MovieNodeMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieNodeMoviesConnectionWhere - } - - input MovieNodeMoviesFieldInput { - connect: [MovieNodeMoviesConnectFieldInput!] - create: [MovieNodeMoviesCreateFieldInput!] - } - - type MovieNodeMoviesRelationship { - cursor: String! - node: Movie! - } - - input MovieNodeMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input MovieNodeMoviesUpdateFieldInput { - connect: [MovieNodeMoviesConnectFieldInput!] - create: [MovieNodeMoviesCreateFieldInput!] - delete: [MovieNodeMoviesDeleteFieldInput!] - disconnect: [MovieNodeMoviesDisconnectFieldInput!] - update: MovieNodeMoviesUpdateConnectionInput - where: MovieNodeMoviesConnectionWhere - } - - 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!] - } - - input MovieRelationInput { - movies: [MovieNodeMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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 { - id: ID - movies: [MovieNodeMoviesUpdateFieldInput!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: MovieMoviesAggregateInput - moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: MovieNodeMoviesConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: MovieNodeMoviesConnectionWhere - moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: MovieNodeMoviesConnectionWhere - \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +directive @something(something: String) on INTERFACE + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie implements MovieNode { + customQuery: [Movie] + id: ID + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! + nodes: [MovieNode] +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + movies: [MovieNodeMoviesConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + id: ID + movies: MovieNodeMoviesFieldInput +} + +input MovieDeleteInput { + movies: [MovieNodeMoviesDeleteFieldInput!] +} + +input MovieDisconnectInput { + movies: [MovieNodeMoviesDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieMovieMoviesAggregationSelection { + count: Int! + node: MovieMovieMoviesNodeAggregateSelection +} + +type MovieMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNullable! +} + +input MovieMoviesAggregateInput { + AND: [MovieMoviesAggregateInput!] + NOT: MovieMoviesAggregateInput + OR: [MovieMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieMoviesNodeAggregationWhereInput +} + +input MovieMoviesNodeAggregationWhereInput { + AND: [MovieMoviesNodeAggregationWhereInput!] + NOT: MovieMoviesNodeAggregationWhereInput + OR: [MovieMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +interface MovieNode @something(something: \\"test\\") { + customQuery: [Movie] + id: ID + movies: [Movie!]! + moviesConnection: MovieNodeMoviesConnection! +} + +input MovieNodeMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type MovieNodeMoviesConnection { + edges: [MovieNodeMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieNodeMoviesConnectionSort { + node: MovieSort +} + +input MovieNodeMoviesConnectionWhere { + AND: [MovieNodeMoviesConnectionWhere!] + NOT: MovieNodeMoviesConnectionWhere + OR: [MovieNodeMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieNodeMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input MovieNodeMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: MovieNodeMoviesConnectionWhere +} + +input MovieNodeMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieNodeMoviesConnectionWhere +} + +input MovieNodeMoviesFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] +} + +type MovieNodeMoviesRelationship { + cursor: String! + node: Movie! +} + +input MovieNodeMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input MovieNodeMoviesUpdateFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] + delete: [MovieNodeMoviesDeleteFieldInput!] + disconnect: [MovieNodeMoviesDisconnectFieldInput!] + update: MovieNodeMoviesUpdateConnectionInput + where: MovieNodeMoviesConnectionWhere +} + +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!] +} + +input MovieRelationInput { + movies: [MovieNodeMoviesCreateFieldInput!] +} + +\\"\\"\\" +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 { + id: ID + movies: [MovieNodeMoviesUpdateFieldInput!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: MovieNodeMoviesConnectionWhere + \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/1038.test.ts b/packages/graphql/tests/schema/issues/1038.test.ts index e452d57eb4..b2bf10a6d5 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -39,248 +39,242 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type AWSAccount { - \\"\\"\\"\\"\\"\\" - accountName: String - \\"\\"\\"\\"\\"\\" - code: String - } - - type AWSAccountAggregateSelection { - accountName: StringAggregateSelectionNullable! - code: StringAggregateSelectionNullable! - count: Int! - } - - input AWSAccountCreateInput { - accountName: String - code: String - } - - type AWSAccountEdge { - cursor: String! - node: AWSAccount! - } - - input AWSAccountOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AWSAccountSort objects to sort AwsAccounts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AWSAccountSort!] - } - - \\"\\"\\" - Fields to sort AwsAccounts by. The order in which sorts are applied is not guaranteed when specifying many fields in one AWSAccountSort object. - \\"\\"\\" - input AWSAccountSort { - accountName: SortDirection - code: SortDirection - } - - input AWSAccountUpdateInput { - accountName: String - code: String - } - - input AWSAccountWhere { - AND: [AWSAccountWhere!] - NOT: AWSAccountWhere - OR: [AWSAccountWhere!] - accountName: String - accountName_CONTAINS: String - accountName_ENDS_WITH: String - accountName_IN: [String] - accountName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_STARTS_WITH: String - code: String - code_CONTAINS: String - code_ENDS_WITH: String - code_IN: [String] - code_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_STARTS_WITH: String - } - - type AwsAccountsConnection { - edges: [AWSAccountEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateAwsAccountsMutationResponse { - awsAccounts: [AWSAccount!]! - info: CreateInfo! - } - - type CreateDnsZonesMutationResponse { - dnsZones: [DNSZone!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - \\"\\"\\"\\"\\"\\" - type DNSZone { - \\"\\"\\"\\"\\"\\" - awsId: String - \\"\\"\\"\\"\\"\\" - zoneType: String - } - - type DNSZoneAggregateSelection { - awsId: StringAggregateSelectionNullable! - count: Int! - zoneType: StringAggregateSelectionNullable! - } - - input DNSZoneCreateInput { - awsId: String - zoneType: String - } - - type DNSZoneEdge { - cursor: String! - node: DNSZone! - } - - input DNSZoneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more DNSZoneSort objects to sort DnsZones by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [DNSZoneSort!] - } - - \\"\\"\\" - Fields to sort DnsZones by. The order in which sorts are applied is not guaranteed when specifying many fields in one DNSZoneSort object. - \\"\\"\\" - input DNSZoneSort { - awsId: SortDirection - zoneType: SortDirection - } - - input DNSZoneUpdateInput { - awsId: String - zoneType: String - } - - input DNSZoneWhere { - AND: [DNSZoneWhere!] - NOT: DNSZoneWhere - OR: [DNSZoneWhere!] - awsId: String - awsId_CONTAINS: String - awsId_ENDS_WITH: String - awsId_IN: [String] - awsId_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_STARTS_WITH: String - zoneType: String - zoneType_CONTAINS: String - zoneType_ENDS_WITH: String - zoneType_IN: [String] - zoneType_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_STARTS_WITH: String - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type DnsZonesConnection { - edges: [DNSZoneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createAwsAccounts(input: [AWSAccountCreateInput!]!): CreateAwsAccountsMutationResponse! - createDnsZones(input: [DNSZoneCreateInput!]!): CreateDnsZonesMutationResponse! - deleteAwsAccounts(where: AWSAccountWhere): DeleteInfo! - deleteDnsZones(where: DNSZoneWhere): DeleteInfo! - updateAwsAccounts(update: AWSAccountUpdateInput, where: AWSAccountWhere): UpdateAwsAccountsMutationResponse! - updateDnsZones(update: DNSZoneUpdateInput, where: DNSZoneWhere): UpdateDnsZonesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - awsAccounts(options: AWSAccountOptions, where: AWSAccountWhere): [AWSAccount!]! - awsAccountsAggregate(where: AWSAccountWhere): AWSAccountAggregateSelection! - awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort], where: AWSAccountWhere): AwsAccountsConnection! - dnsZones(options: DNSZoneOptions, where: DNSZoneWhere): [DNSZone!]! - dnsZonesAggregate(where: DNSZoneWhere): DNSZoneAggregateSelection! - dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort], where: DNSZoneWhere): DnsZonesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateAwsAccountsMutationResponse { - awsAccounts: [AWSAccount!]! - info: UpdateInfo! - } - - type UpdateDnsZonesMutationResponse { - dnsZones: [DNSZone!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type AWSAccount { + accountName: String + code: String +} + +type AWSAccountAggregateSelection { + accountName: StringAggregateSelectionNullable! + code: StringAggregateSelectionNullable! + count: Int! +} + +input AWSAccountCreateInput { + accountName: String + code: String +} + +type AWSAccountEdge { + cursor: String! + node: AWSAccount! +} + +input AWSAccountOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AWSAccountSort objects to sort AwsAccounts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AWSAccountSort!] +} + +\\"\\"\\" +Fields to sort AwsAccounts by. The order in which sorts are applied is not guaranteed when specifying many fields in one AWSAccountSort object. +\\"\\"\\" +input AWSAccountSort { + accountName: SortDirection + code: SortDirection +} + +input AWSAccountUpdateInput { + accountName: String + code: String +} + +input AWSAccountWhere { + AND: [AWSAccountWhere!] + NOT: AWSAccountWhere + OR: [AWSAccountWhere!] + accountName: String + accountName_CONTAINS: String + accountName_ENDS_WITH: String + accountName_IN: [String] + accountName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_STARTS_WITH: String + code: String + code_CONTAINS: String + code_ENDS_WITH: String + code_IN: [String] + code_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_STARTS_WITH: String +} + +type AwsAccountsConnection { + edges: [AWSAccountEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateAwsAccountsMutationResponse { + awsAccounts: [AWSAccount!]! + info: CreateInfo! +} + +type CreateDnsZonesMutationResponse { + dnsZones: [DNSZone!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type DNSZone { + awsId: String + zoneType: String +} + +type DNSZoneAggregateSelection { + awsId: StringAggregateSelectionNullable! + count: Int! + zoneType: StringAggregateSelectionNullable! +} + +input DNSZoneCreateInput { + awsId: String + zoneType: String +} + +type DNSZoneEdge { + cursor: String! + node: DNSZone! +} + +input DNSZoneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more DNSZoneSort objects to sort DnsZones by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [DNSZoneSort!] +} + +\\"\\"\\" +Fields to sort DnsZones by. The order in which sorts are applied is not guaranteed when specifying many fields in one DNSZoneSort object. +\\"\\"\\" +input DNSZoneSort { + awsId: SortDirection + zoneType: SortDirection +} + +input DNSZoneUpdateInput { + awsId: String + zoneType: String +} + +input DNSZoneWhere { + AND: [DNSZoneWhere!] + NOT: DNSZoneWhere + OR: [DNSZoneWhere!] + awsId: String + awsId_CONTAINS: String + awsId_ENDS_WITH: String + awsId_IN: [String] + awsId_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_STARTS_WITH: String + zoneType: String + zoneType_CONTAINS: String + zoneType_ENDS_WITH: String + zoneType_IN: [String] + zoneType_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_STARTS_WITH: String +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type DnsZonesConnection { + edges: [DNSZoneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createAwsAccounts(input: [AWSAccountCreateInput!]!): CreateAwsAccountsMutationResponse! + createDnsZones(input: [DNSZoneCreateInput!]!): CreateDnsZonesMutationResponse! + deleteAwsAccounts(where: AWSAccountWhere): DeleteInfo! + deleteDnsZones(where: DNSZoneWhere): DeleteInfo! + updateAwsAccounts(update: AWSAccountUpdateInput, where: AWSAccountWhere): UpdateAwsAccountsMutationResponse! + updateDnsZones(update: DNSZoneUpdateInput, where: DNSZoneWhere): UpdateDnsZonesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + awsAccounts(options: AWSAccountOptions, where: AWSAccountWhere): [AWSAccount!]! + awsAccountsAggregate(where: AWSAccountWhere): AWSAccountAggregateSelection! + awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort], where: AWSAccountWhere): AwsAccountsConnection! + dnsZones(options: DNSZoneOptions, where: DNSZoneWhere): [DNSZone!]! + dnsZonesAggregate(where: DNSZoneWhere): DNSZoneAggregateSelection! + dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort], where: DNSZoneWhere): DnsZonesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateAwsAccountsMutationResponse { + awsAccounts: [AWSAccount!]! + info: UpdateInfo! +} + +type UpdateDnsZonesMutationResponse { + dnsZones: [DNSZone!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index 5db4abaac4..2c34b5f442 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -42,48 +42,43 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - dob: DateTime! - \\"\\"\\"\\"\\"\\" - homeAddress: Point! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - dob: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectOrCreateWhere { - node: ActorUniqueWhere! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - dob: DateTime! - homeAddress: PointInput! - name: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } +"schema { + query: Query + mutation: Mutation +} + +type Actor { + dob: DateTime! + homeAddress: Point! + id: ID! + name: String! +} + +type ActorAggregateSelection { + count: Int! + dob: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectOrCreateWhere { + node: ActorUniqueWhere! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + dob: DateTime! + homeAddress: PointInput! + name: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} input ActorOnCreateInput { dob: DateTime! @@ -91,484 +86,480 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { name: String! } - 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 { - dob: SortDirection - homeAddress: SortDirection - id: SortDirection - name: SortDirection - } - - input ActorUniqueWhere { - id: ID - } - - input ActorUpdateInput { - dob: DateTime - homeAddress: PointInput - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - dob: DateTime - dob_GT: DateTime - dob_GTE: DateTime - dob_IN: [DateTime!] - dob_LT: DateTime - dob_LTE: DateTime - dob_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - dob_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - homeAddress: PointInput - homeAddress_DISTANCE: PointDistance - homeAddress_GT: PointDistance - homeAddress_GTE: PointDistance - homeAddress_IN: [PointInput!] - homeAddress_LT: PointDistance - homeAddress_LTE: PointDistance - homeAddress_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - homeAddress_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - dob: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - input MovieActorsConnectOrCreateFieldInput { - onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! - where: ActorConnectOrCreateWhere! - } - - input MovieActorsConnectOrCreateFieldInputOnCreate { - node: ActorOnCreateInput! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - dob_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_MAX_EQUAL: DateTime - dob_MAX_GT: DateTime - dob_MAX_GTE: DateTime - dob_MAX_LT: DateTime - dob_MAX_LTE: DateTime - dob_MIN_EQUAL: DateTime - dob_MIN_GT: DateTime - dob_MIN_GTE: DateTime - dob_MIN_LT: DateTime - dob_MIN_LTE: DateTime - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectOrCreateInput { - actors: [MovieActorsConnectOrCreateFieldInput!] - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 - title: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"Point type\\"\\"\\" - type Point { - crs: String! - height: Float - latitude: Float! - longitude: Float! - srid: Int! - } - - \\"\\"\\"\\"\\"\\" - input PointDistance { - \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" - distance: Float! - point: PointInput! - } - - \\"\\"\\"\\"\\"\\" - input PointInput { - height: Float - latitude: Float! - longitude: Float! - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +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 { + dob: SortDirection + homeAddress: SortDirection + id: SortDirection + name: SortDirection +} + +input ActorUniqueWhere { + id: ID +} + +input ActorUpdateInput { + dob: DateTime + homeAddress: PointInput + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + dob: DateTime + dob_GT: DateTime + dob_GTE: DateTime + dob_IN: [DateTime!] + dob_LT: DateTime + dob_LTE: DateTime + dob_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + dob_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + homeAddress: PointInput + homeAddress_DISTANCE: PointDistance + homeAddress_GT: PointDistance + homeAddress_GTE: PointDistance + homeAddress_IN: [PointInput!] + homeAddress_LT: PointDistance + homeAddress_LTE: PointDistance + homeAddress_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + homeAddress_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + dob: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +input MovieActorsConnectOrCreateFieldInput { + onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! + where: ActorConnectOrCreateWhere! +} + +input MovieActorsConnectOrCreateFieldInputOnCreate { + node: ActorOnCreateInput! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + dob_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_MAX_EQUAL: DateTime + dob_MAX_GT: DateTime + dob_MAX_GTE: DateTime + dob_MAX_LT: DateTime + dob_MAX_LTE: DateTime + dob_MIN_EQUAL: DateTime + dob_MIN_GT: DateTime + dob_MIN_GTE: DateTime + dob_MIN_LT: DateTime + dob_MIN_LTE: DateTime + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectOrCreateInput { + actors: [MovieActorsConnectOrCreateFieldInput!] +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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 + title: SortDirection +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +\\"\\"\\"Point type\\"\\"\\" +type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! +} + +\\"\\"\\"\\"\\"\\" +input PointDistance { + \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" + distance: Float! + point: PointInput! +} + +\\"\\"\\"\\"\\"\\" +input PointInput { + height: Float + latitude: Float! + longitude: Float! +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index 1cc297b2d3..ae58d3b861 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -43,568 +43,560 @@ describe("162", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateTigerJawLevel2Part1sMutationResponse { - info: CreateInfo! - tigerJawLevel2Part1s: [TigerJawLevel2Part1!]! - } - - type CreateTigerJawLevel2sMutationResponse { - info: CreateInfo! - tigerJawLevel2s: [TigerJawLevel2!]! - } - - type CreateTigersMutationResponse { - info: CreateInfo! - tigers: [Tiger!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - type Mutation { - createTigerJawLevel2Part1s(input: [TigerJawLevel2Part1CreateInput!]!): CreateTigerJawLevel2Part1sMutationResponse! - createTigerJawLevel2s(input: [TigerJawLevel2CreateInput!]!): CreateTigerJawLevel2sMutationResponse! - createTigers(input: [TigerCreateInput!]!): CreateTigersMutationResponse! - deleteTigerJawLevel2Part1s(delete: TigerJawLevel2Part1DeleteInput, where: TigerJawLevel2Part1Where): DeleteInfo! - deleteTigerJawLevel2s(delete: TigerJawLevel2DeleteInput, where: TigerJawLevel2Where): DeleteInfo! - deleteTigers(where: TigerWhere): DeleteInfo! - updateTigerJawLevel2Part1s(connect: TigerJawLevel2Part1ConnectInput, create: TigerJawLevel2Part1RelationInput, delete: TigerJawLevel2Part1DeleteInput, disconnect: TigerJawLevel2Part1DisconnectInput, update: TigerJawLevel2Part1UpdateInput, where: TigerJawLevel2Part1Where): UpdateTigerJawLevel2Part1sMutationResponse! - updateTigerJawLevel2s(connect: TigerJawLevel2ConnectInput, create: TigerJawLevel2RelationInput, delete: TigerJawLevel2DeleteInput, disconnect: TigerJawLevel2DisconnectInput, update: TigerJawLevel2UpdateInput, where: TigerJawLevel2Where): UpdateTigerJawLevel2sMutationResponse! - updateTigers(update: TigerUpdateInput, where: TigerWhere): UpdateTigersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - tigerJawLevel2Part1s(options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! - tigerJawLevel2Part1sAggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2Part1AggregateSelection! - tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! - tigerJawLevel2s(options: TigerJawLevel2Options, where: TigerJawLevel2Where): [TigerJawLevel2!]! - tigerJawLevel2sAggregate(where: TigerJawLevel2Where): TigerJawLevel2AggregateSelection! - tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort], where: TigerJawLevel2Where): TigerJawLevel2sConnection! - tigers(options: TigerOptions, where: TigerWhere): [Tiger!]! - tigersAggregate(where: TigerWhere): TigerAggregateSelection! - tigersConnection(after: String, first: Int, sort: [TigerSort], where: TigerWhere): TigersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"\\"\\"\\" - type Tiger { - \\"\\"\\"\\"\\"\\" - x: Int - } - - type TigerAggregateSelection { - count: Int! - x: IntAggregateSelectionNullable! - } - - input TigerConnectWhere { - node: TigerWhere! - } - - input TigerCreateInput { - x: Int - } - - type TigerEdge { - cursor: String! - node: Tiger! - } - - \\"\\"\\"\\"\\"\\" - type TigerJawLevel2 { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! - part1Aggregate(directed: Boolean = true, where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection - part1Connection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! - } - - type TigerJawLevel2AggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input TigerJawLevel2ConnectInput { - part1: TigerJawLevel2Part1ConnectFieldInput - } - - input TigerJawLevel2CreateInput { - id: ID - part1: TigerJawLevel2Part1FieldInput - } - - input TigerJawLevel2DeleteInput { - part1: TigerJawLevel2Part1DeleteFieldInput - } - - input TigerJawLevel2DisconnectInput { - part1: TigerJawLevel2Part1DisconnectFieldInput - } - - type TigerJawLevel2Edge { - cursor: String! - node: TigerJawLevel2! - } - - input TigerJawLevel2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TigerJawLevel2Sort objects to sort TigerJawLevel2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TigerJawLevel2Sort!] - } - - \\"\\"\\"\\"\\"\\" - type TigerJawLevel2Part1 { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! - tigerAggregate(directed: Boolean = true, where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection - tigerConnection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! - } - - input TigerJawLevel2Part1AggregateInput { - AND: [TigerJawLevel2Part1AggregateInput!] - NOT: TigerJawLevel2Part1AggregateInput - OR: [TigerJawLevel2Part1AggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: TigerJawLevel2Part1NodeAggregationWhereInput - } - - type TigerJawLevel2Part1AggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input TigerJawLevel2Part1ConnectFieldInput { - connect: TigerJawLevel2Part1ConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: TigerJawLevel2Part1ConnectWhere - } - - input TigerJawLevel2Part1ConnectInput { - tiger: TigerJawLevel2Part1TigerConnectFieldInput - } - - input TigerJawLevel2Part1ConnectWhere { - node: TigerJawLevel2Part1Where! - } - - type TigerJawLevel2Part1Connection { - edges: [TigerJawLevel2Part1Relationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input TigerJawLevel2Part1ConnectionSort { - node: TigerJawLevel2Part1Sort - } - - input TigerJawLevel2Part1ConnectionWhere { - AND: [TigerJawLevel2Part1ConnectionWhere!] - NOT: TigerJawLevel2Part1ConnectionWhere - OR: [TigerJawLevel2Part1ConnectionWhere!] - node: TigerJawLevel2Part1Where - node_NOT: TigerJawLevel2Part1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input TigerJawLevel2Part1CreateFieldInput { - node: TigerJawLevel2Part1CreateInput! - } - - input TigerJawLevel2Part1CreateInput { - id: ID - tiger: TigerJawLevel2Part1TigerFieldInput - } - - input TigerJawLevel2Part1DeleteFieldInput { - delete: TigerJawLevel2Part1DeleteInput - where: TigerJawLevel2Part1ConnectionWhere - } - - input TigerJawLevel2Part1DeleteInput { - tiger: TigerJawLevel2Part1TigerDeleteFieldInput - } - - input TigerJawLevel2Part1DisconnectFieldInput { - disconnect: TigerJawLevel2Part1DisconnectInput - where: TigerJawLevel2Part1ConnectionWhere - } - - input TigerJawLevel2Part1DisconnectInput { - tiger: TigerJawLevel2Part1TigerDisconnectFieldInput - } - - type TigerJawLevel2Part1Edge { - cursor: String! - node: TigerJawLevel2Part1! - } - - input TigerJawLevel2Part1FieldInput { - connect: TigerJawLevel2Part1ConnectFieldInput - create: TigerJawLevel2Part1CreateFieldInput - } - - input TigerJawLevel2Part1NodeAggregationWhereInput { - AND: [TigerJawLevel2Part1NodeAggregationWhereInput!] - NOT: TigerJawLevel2Part1NodeAggregationWhereInput - OR: [TigerJawLevel2Part1NodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - input TigerJawLevel2Part1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TigerJawLevel2Part1Sort objects to sort TigerJawLevel2Part1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TigerJawLevel2Part1Sort!] - } - - input TigerJawLevel2Part1RelationInput { - tiger: TigerJawLevel2Part1TigerCreateFieldInput - } - - type TigerJawLevel2Part1Relationship { - cursor: String! - node: TigerJawLevel2Part1! - } - - \\"\\"\\" - Fields to sort TigerJawLevel2Part1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Part1Sort object. - \\"\\"\\" - input TigerJawLevel2Part1Sort { - id: SortDirection - } - - input TigerJawLevel2Part1TigerAggregateInput { - AND: [TigerJawLevel2Part1TigerAggregateInput!] - NOT: TigerJawLevel2Part1TigerAggregateInput - OR: [TigerJawLevel2Part1TigerAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: TigerJawLevel2Part1TigerNodeAggregationWhereInput - } - - input TigerJawLevel2Part1TigerConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: TigerConnectWhere - } - - type TigerJawLevel2Part1TigerConnection { - edges: [TigerJawLevel2Part1TigerRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input TigerJawLevel2Part1TigerConnectionSort { - node: TigerSort - } - - input TigerJawLevel2Part1TigerConnectionWhere { - AND: [TigerJawLevel2Part1TigerConnectionWhere!] - NOT: TigerJawLevel2Part1TigerConnectionWhere - OR: [TigerJawLevel2Part1TigerConnectionWhere!] - node: TigerWhere - node_NOT: TigerWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input TigerJawLevel2Part1TigerCreateFieldInput { - node: TigerCreateInput! - } - - input TigerJawLevel2Part1TigerDeleteFieldInput { - where: TigerJawLevel2Part1TigerConnectionWhere - } - - input TigerJawLevel2Part1TigerDisconnectFieldInput { - where: TigerJawLevel2Part1TigerConnectionWhere - } - - input TigerJawLevel2Part1TigerFieldInput { - connect: TigerJawLevel2Part1TigerConnectFieldInput - create: TigerJawLevel2Part1TigerCreateFieldInput - } - - input TigerJawLevel2Part1TigerNodeAggregationWhereInput { - AND: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] - NOT: TigerJawLevel2Part1TigerNodeAggregationWhereInput - OR: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] - x_AVERAGE_EQUAL: Float - x_AVERAGE_GT: Float - x_AVERAGE_GTE: Float - x_AVERAGE_LT: Float - x_AVERAGE_LTE: Float - x_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_MAX_EQUAL: Int - x_MAX_GT: Int - x_MAX_GTE: Int - x_MAX_LT: Int - x_MAX_LTE: Int - x_MIN_EQUAL: Int - x_MIN_GT: Int - x_MIN_GTE: Int - x_MIN_LT: Int - x_MIN_LTE: Int - x_SUM_EQUAL: Int - x_SUM_GT: Int - x_SUM_GTE: Int - x_SUM_LT: Int - x_SUM_LTE: Int - } - - type TigerJawLevel2Part1TigerRelationship { - cursor: String! - node: Tiger! - } - - type TigerJawLevel2Part1TigerTigerAggregationSelection { - count: Int! - node: TigerJawLevel2Part1TigerTigerNodeAggregateSelection - } - - type TigerJawLevel2Part1TigerTigerNodeAggregateSelection { - x: IntAggregateSelectionNullable! - } - - input TigerJawLevel2Part1TigerUpdateConnectionInput { - node: TigerUpdateInput - } - - input TigerJawLevel2Part1TigerUpdateFieldInput { - connect: TigerJawLevel2Part1TigerConnectFieldInput - create: TigerJawLevel2Part1TigerCreateFieldInput - delete: TigerJawLevel2Part1TigerDeleteFieldInput - disconnect: TigerJawLevel2Part1TigerDisconnectFieldInput - update: TigerJawLevel2Part1TigerUpdateConnectionInput - where: TigerJawLevel2Part1TigerConnectionWhere - } - - input TigerJawLevel2Part1UpdateConnectionInput { - node: TigerJawLevel2Part1UpdateInput - } - - input TigerJawLevel2Part1UpdateFieldInput { - connect: TigerJawLevel2Part1ConnectFieldInput - create: TigerJawLevel2Part1CreateFieldInput - delete: TigerJawLevel2Part1DeleteFieldInput - disconnect: TigerJawLevel2Part1DisconnectFieldInput - update: TigerJawLevel2Part1UpdateConnectionInput - where: TigerJawLevel2Part1ConnectionWhere - } - - input TigerJawLevel2Part1UpdateInput { - id: ID - tiger: TigerJawLevel2Part1TigerUpdateFieldInput - } - - input TigerJawLevel2Part1Where { - AND: [TigerJawLevel2Part1Where!] - NOT: TigerJawLevel2Part1Where - OR: [TigerJawLevel2Part1Where!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - tiger: TigerWhere - tigerAggregate: TigerJawLevel2Part1TigerAggregateInput - tigerConnection: TigerJawLevel2Part1TigerConnectionWhere - tigerConnection_NOT: TigerJawLevel2Part1TigerConnectionWhere - tiger_NOT: TigerWhere - } - - type TigerJawLevel2Part1sConnection { - edges: [TigerJawLevel2Part1Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input TigerJawLevel2RelationInput { - part1: TigerJawLevel2Part1CreateFieldInput - } - - \\"\\"\\" - Fields to sort TigerJawLevel2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Sort object. - \\"\\"\\" - input TigerJawLevel2Sort { - id: SortDirection - } - - type TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection { - count: Int! - node: TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection - } - - type TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection { - id: IDAggregateSelectionNullable! - } - - input TigerJawLevel2UpdateInput { - id: ID - part1: TigerJawLevel2Part1UpdateFieldInput - } - - input TigerJawLevel2Where { - AND: [TigerJawLevel2Where!] - NOT: TigerJawLevel2Where - OR: [TigerJawLevel2Where!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - part1: TigerJawLevel2Part1Where - part1Aggregate: TigerJawLevel2Part1AggregateInput - part1Connection: TigerJawLevel2Part1ConnectionWhere - part1Connection_NOT: TigerJawLevel2Part1ConnectionWhere - part1_NOT: TigerJawLevel2Part1Where - } - - type TigerJawLevel2sConnection { - edges: [TigerJawLevel2Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input TigerOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TigerSort objects to sort Tigers by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TigerSort!] - } - - \\"\\"\\" - Fields to sort Tigers by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerSort object. - \\"\\"\\" - input TigerSort { - x: SortDirection - } - - input TigerUpdateInput { - x: Int - x_DECREMENT: Int - x_INCREMENT: Int - } - - input TigerWhere { - AND: [TigerWhere!] - NOT: TigerWhere - OR: [TigerWhere!] - x: Int - x_GT: Int - x_GTE: Int - x_IN: [Int] - x_LT: Int - x_LTE: Int - x_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - x_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type TigersConnection { - edges: [TigerEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateTigerJawLevel2Part1sMutationResponse { - info: UpdateInfo! - tigerJawLevel2Part1s: [TigerJawLevel2Part1!]! - } - - type UpdateTigerJawLevel2sMutationResponse { - info: UpdateInfo! - tigerJawLevel2s: [TigerJawLevel2!]! - } - - type UpdateTigersMutationResponse { - info: UpdateInfo! - tigers: [Tiger!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateTigerJawLevel2Part1sMutationResponse { + info: CreateInfo! + tigerJawLevel2Part1s: [TigerJawLevel2Part1!]! +} + +type CreateTigerJawLevel2sMutationResponse { + info: CreateInfo! + tigerJawLevel2s: [TigerJawLevel2!]! +} + +type CreateTigersMutationResponse { + info: CreateInfo! + tigers: [Tiger!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Mutation { + createTigerJawLevel2Part1s(input: [TigerJawLevel2Part1CreateInput!]!): CreateTigerJawLevel2Part1sMutationResponse! + createTigerJawLevel2s(input: [TigerJawLevel2CreateInput!]!): CreateTigerJawLevel2sMutationResponse! + createTigers(input: [TigerCreateInput!]!): CreateTigersMutationResponse! + deleteTigerJawLevel2Part1s(delete: TigerJawLevel2Part1DeleteInput, where: TigerJawLevel2Part1Where): DeleteInfo! + deleteTigerJawLevel2s(delete: TigerJawLevel2DeleteInput, where: TigerJawLevel2Where): DeleteInfo! + deleteTigers(where: TigerWhere): DeleteInfo! + updateTigerJawLevel2Part1s(connect: TigerJawLevel2Part1ConnectInput, create: TigerJawLevel2Part1RelationInput, delete: TigerJawLevel2Part1DeleteInput, disconnect: TigerJawLevel2Part1DisconnectInput, update: TigerJawLevel2Part1UpdateInput, where: TigerJawLevel2Part1Where): UpdateTigerJawLevel2Part1sMutationResponse! + updateTigerJawLevel2s(connect: TigerJawLevel2ConnectInput, create: TigerJawLevel2RelationInput, delete: TigerJawLevel2DeleteInput, disconnect: TigerJawLevel2DisconnectInput, update: TigerJawLevel2UpdateInput, where: TigerJawLevel2Where): UpdateTigerJawLevel2sMutationResponse! + updateTigers(update: TigerUpdateInput, where: TigerWhere): UpdateTigersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + tigerJawLevel2Part1s(options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! + tigerJawLevel2Part1sAggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2Part1AggregateSelection! + tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! + tigerJawLevel2s(options: TigerJawLevel2Options, where: TigerJawLevel2Where): [TigerJawLevel2!]! + tigerJawLevel2sAggregate(where: TigerJawLevel2Where): TigerJawLevel2AggregateSelection! + tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort], where: TigerJawLevel2Where): TigerJawLevel2sConnection! + tigers(options: TigerOptions, where: TigerWhere): [Tiger!]! + tigersAggregate(where: TigerWhere): TigerAggregateSelection! + tigersConnection(after: String, first: Int, sort: [TigerSort], where: TigerWhere): TigersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type Tiger { + x: Int +} + +type TigerAggregateSelection { + count: Int! + x: IntAggregateSelectionNullable! +} + +input TigerConnectWhere { + node: TigerWhere! +} + +input TigerCreateInput { + x: Int +} + +type TigerEdge { + cursor: String! + node: Tiger! +} + +type TigerJawLevel2 { + id: ID + part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! + part1Aggregate(directed: Boolean = true, where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection + part1Connection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! +} + +type TigerJawLevel2AggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input TigerJawLevel2ConnectInput { + part1: TigerJawLevel2Part1ConnectFieldInput +} + +input TigerJawLevel2CreateInput { + id: ID + part1: TigerJawLevel2Part1FieldInput +} + +input TigerJawLevel2DeleteInput { + part1: TigerJawLevel2Part1DeleteFieldInput +} + +input TigerJawLevel2DisconnectInput { + part1: TigerJawLevel2Part1DisconnectFieldInput +} + +type TigerJawLevel2Edge { + cursor: String! + node: TigerJawLevel2! +} + +input TigerJawLevel2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TigerJawLevel2Sort objects to sort TigerJawLevel2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TigerJawLevel2Sort!] +} + +type TigerJawLevel2Part1 { + id: ID + tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! + tigerAggregate(directed: Boolean = true, where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection + tigerConnection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! +} + +input TigerJawLevel2Part1AggregateInput { + AND: [TigerJawLevel2Part1AggregateInput!] + NOT: TigerJawLevel2Part1AggregateInput + OR: [TigerJawLevel2Part1AggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: TigerJawLevel2Part1NodeAggregationWhereInput +} + +type TigerJawLevel2Part1AggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input TigerJawLevel2Part1ConnectFieldInput { + connect: TigerJawLevel2Part1ConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: TigerJawLevel2Part1ConnectWhere +} + +input TigerJawLevel2Part1ConnectInput { + tiger: TigerJawLevel2Part1TigerConnectFieldInput +} + +input TigerJawLevel2Part1ConnectWhere { + node: TigerJawLevel2Part1Where! +} + +type TigerJawLevel2Part1Connection { + edges: [TigerJawLevel2Part1Relationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input TigerJawLevel2Part1ConnectionSort { + node: TigerJawLevel2Part1Sort +} + +input TigerJawLevel2Part1ConnectionWhere { + AND: [TigerJawLevel2Part1ConnectionWhere!] + NOT: TigerJawLevel2Part1ConnectionWhere + OR: [TigerJawLevel2Part1ConnectionWhere!] + node: TigerJawLevel2Part1Where + node_NOT: TigerJawLevel2Part1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input TigerJawLevel2Part1CreateFieldInput { + node: TigerJawLevel2Part1CreateInput! +} + +input TigerJawLevel2Part1CreateInput { + id: ID + tiger: TigerJawLevel2Part1TigerFieldInput +} + +input TigerJawLevel2Part1DeleteFieldInput { + delete: TigerJawLevel2Part1DeleteInput + where: TigerJawLevel2Part1ConnectionWhere +} + +input TigerJawLevel2Part1DeleteInput { + tiger: TigerJawLevel2Part1TigerDeleteFieldInput +} + +input TigerJawLevel2Part1DisconnectFieldInput { + disconnect: TigerJawLevel2Part1DisconnectInput + where: TigerJawLevel2Part1ConnectionWhere +} + +input TigerJawLevel2Part1DisconnectInput { + tiger: TigerJawLevel2Part1TigerDisconnectFieldInput +} + +type TigerJawLevel2Part1Edge { + cursor: String! + node: TigerJawLevel2Part1! +} + +input TigerJawLevel2Part1FieldInput { + connect: TigerJawLevel2Part1ConnectFieldInput + create: TigerJawLevel2Part1CreateFieldInput +} + +input TigerJawLevel2Part1NodeAggregationWhereInput { + AND: [TigerJawLevel2Part1NodeAggregationWhereInput!] + NOT: TigerJawLevel2Part1NodeAggregationWhereInput + OR: [TigerJawLevel2Part1NodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +input TigerJawLevel2Part1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TigerJawLevel2Part1Sort objects to sort TigerJawLevel2Part1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TigerJawLevel2Part1Sort!] +} + +input TigerJawLevel2Part1RelationInput { + tiger: TigerJawLevel2Part1TigerCreateFieldInput +} + +type TigerJawLevel2Part1Relationship { + cursor: String! + node: TigerJawLevel2Part1! +} + +\\"\\"\\" +Fields to sort TigerJawLevel2Part1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Part1Sort object. +\\"\\"\\" +input TigerJawLevel2Part1Sort { + id: SortDirection +} + +input TigerJawLevel2Part1TigerAggregateInput { + AND: [TigerJawLevel2Part1TigerAggregateInput!] + NOT: TigerJawLevel2Part1TigerAggregateInput + OR: [TigerJawLevel2Part1TigerAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: TigerJawLevel2Part1TigerNodeAggregationWhereInput +} + +input TigerJawLevel2Part1TigerConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: TigerConnectWhere +} + +type TigerJawLevel2Part1TigerConnection { + edges: [TigerJawLevel2Part1TigerRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input TigerJawLevel2Part1TigerConnectionSort { + node: TigerSort +} + +input TigerJawLevel2Part1TigerConnectionWhere { + AND: [TigerJawLevel2Part1TigerConnectionWhere!] + NOT: TigerJawLevel2Part1TigerConnectionWhere + OR: [TigerJawLevel2Part1TigerConnectionWhere!] + node: TigerWhere + node_NOT: TigerWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input TigerJawLevel2Part1TigerCreateFieldInput { + node: TigerCreateInput! +} + +input TigerJawLevel2Part1TigerDeleteFieldInput { + where: TigerJawLevel2Part1TigerConnectionWhere +} + +input TigerJawLevel2Part1TigerDisconnectFieldInput { + where: TigerJawLevel2Part1TigerConnectionWhere +} + +input TigerJawLevel2Part1TigerFieldInput { + connect: TigerJawLevel2Part1TigerConnectFieldInput + create: TigerJawLevel2Part1TigerCreateFieldInput +} + +input TigerJawLevel2Part1TigerNodeAggregationWhereInput { + AND: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] + NOT: TigerJawLevel2Part1TigerNodeAggregationWhereInput + OR: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] + x_AVERAGE_EQUAL: Float + x_AVERAGE_GT: Float + x_AVERAGE_GTE: Float + x_AVERAGE_LT: Float + x_AVERAGE_LTE: Float + x_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_MAX_EQUAL: Int + x_MAX_GT: Int + x_MAX_GTE: Int + x_MAX_LT: Int + x_MAX_LTE: Int + x_MIN_EQUAL: Int + x_MIN_GT: Int + x_MIN_GTE: Int + x_MIN_LT: Int + x_MIN_LTE: Int + x_SUM_EQUAL: Int + x_SUM_GT: Int + x_SUM_GTE: Int + x_SUM_LT: Int + x_SUM_LTE: Int +} + +type TigerJawLevel2Part1TigerRelationship { + cursor: String! + node: Tiger! +} + +type TigerJawLevel2Part1TigerTigerAggregationSelection { + count: Int! + node: TigerJawLevel2Part1TigerTigerNodeAggregateSelection +} + +type TigerJawLevel2Part1TigerTigerNodeAggregateSelection { + x: IntAggregateSelectionNullable! +} + +input TigerJawLevel2Part1TigerUpdateConnectionInput { + node: TigerUpdateInput +} + +input TigerJawLevel2Part1TigerUpdateFieldInput { + connect: TigerJawLevel2Part1TigerConnectFieldInput + create: TigerJawLevel2Part1TigerCreateFieldInput + delete: TigerJawLevel2Part1TigerDeleteFieldInput + disconnect: TigerJawLevel2Part1TigerDisconnectFieldInput + update: TigerJawLevel2Part1TigerUpdateConnectionInput + where: TigerJawLevel2Part1TigerConnectionWhere +} + +input TigerJawLevel2Part1UpdateConnectionInput { + node: TigerJawLevel2Part1UpdateInput +} + +input TigerJawLevel2Part1UpdateFieldInput { + connect: TigerJawLevel2Part1ConnectFieldInput + create: TigerJawLevel2Part1CreateFieldInput + delete: TigerJawLevel2Part1DeleteFieldInput + disconnect: TigerJawLevel2Part1DisconnectFieldInput + update: TigerJawLevel2Part1UpdateConnectionInput + where: TigerJawLevel2Part1ConnectionWhere +} + +input TigerJawLevel2Part1UpdateInput { + id: ID + tiger: TigerJawLevel2Part1TigerUpdateFieldInput +} + +input TigerJawLevel2Part1Where { + AND: [TigerJawLevel2Part1Where!] + NOT: TigerJawLevel2Part1Where + OR: [TigerJawLevel2Part1Where!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + tiger: TigerWhere + tigerAggregate: TigerJawLevel2Part1TigerAggregateInput + tigerConnection: TigerJawLevel2Part1TigerConnectionWhere + tigerConnection_NOT: TigerJawLevel2Part1TigerConnectionWhere + tiger_NOT: TigerWhere +} + +type TigerJawLevel2Part1sConnection { + edges: [TigerJawLevel2Part1Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input TigerJawLevel2RelationInput { + part1: TigerJawLevel2Part1CreateFieldInput +} + +\\"\\"\\" +Fields to sort TigerJawLevel2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Sort object. +\\"\\"\\" +input TigerJawLevel2Sort { + id: SortDirection +} + +type TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection { + count: Int! + node: TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection +} + +type TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection { + id: IDAggregateSelectionNullable! +} + +input TigerJawLevel2UpdateInput { + id: ID + part1: TigerJawLevel2Part1UpdateFieldInput +} + +input TigerJawLevel2Where { + AND: [TigerJawLevel2Where!] + NOT: TigerJawLevel2Where + OR: [TigerJawLevel2Where!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + part1: TigerJawLevel2Part1Where + part1Aggregate: TigerJawLevel2Part1AggregateInput + part1Connection: TigerJawLevel2Part1ConnectionWhere + part1Connection_NOT: TigerJawLevel2Part1ConnectionWhere + part1_NOT: TigerJawLevel2Part1Where +} + +type TigerJawLevel2sConnection { + edges: [TigerJawLevel2Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input TigerOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TigerSort objects to sort Tigers by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TigerSort!] +} + +\\"\\"\\" +Fields to sort Tigers by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerSort object. +\\"\\"\\" +input TigerSort { + x: SortDirection +} + +input TigerUpdateInput { + x: Int + x_DECREMENT: Int + x_INCREMENT: Int +} + +input TigerWhere { + AND: [TigerWhere!] + NOT: TigerWhere + OR: [TigerWhere!] + x: Int + x_GT: Int + x_GTE: Int + x_IN: [Int] + x_LT: Int + x_LTE: Int + x_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + x_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type TigersConnection { + edges: [TigerEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateTigerJawLevel2Part1sMutationResponse { + info: UpdateInfo! + tigerJawLevel2Part1s: [TigerJawLevel2Part1!]! +} + +type UpdateTigerJawLevel2sMutationResponse { + info: UpdateInfo! + tigerJawLevel2s: [TigerJawLevel2!]! +} + +type UpdateTigersMutationResponse { + info: UpdateInfo! + tigers: [Tiger!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index 72c515be4e..ceb9c8d4c6 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -36,183 +36,178 @@ describe("200", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CategoriesConnection { - edges: [CategoryEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Category { - \\"\\"\\"\\"\\"\\" - categoryId: ID! - \\"\\"\\"\\"\\"\\" - description: String! - \\"\\"\\"\\"\\"\\" - exampleImageLocations: [String!] - \\"\\"\\"\\"\\"\\" - name: String! - } - - type CategoryAggregateSelection { - categoryId: IDAggregateSelectionNonNullable! - count: Int! - description: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input CategoryCreateInput { - description: String! = \\"\\" - exampleImageLocations: [String!] - name: String! - } - - type CategoryEdge { - cursor: String! - node: Category! - } - - input CategoryOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more CategorySort objects to sort Categories by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [CategorySort!] - } - - \\"\\"\\" - Fields to sort Categories by. The order in which sorts are applied is not guaranteed when specifying many fields in one CategorySort object. - \\"\\"\\" - input CategorySort { - categoryId: SortDirection - description: SortDirection - name: SortDirection - } - - input CategoryUpdateInput { - description: String - exampleImageLocations: [String!] - exampleImageLocations_POP: Int - exampleImageLocations_PUSH: [String!] - name: String - } - - input CategoryWhere { - AND: [CategoryWhere!] - NOT: CategoryWhere - OR: [CategoryWhere!] - categoryId: ID - categoryId_CONTAINS: ID - categoryId_ENDS_WITH: ID - categoryId_IN: [ID!] - categoryId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_STARTS_WITH: ID - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String!] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - exampleImageLocations: [String!] - exampleImageLocations_INCLUDES: String - exampleImageLocations_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - exampleImageLocations_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type CreateCategoriesMutationResponse { - categories: [Category!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type Mutation { - createCategories(input: [CategoryCreateInput!]!): CreateCategoriesMutationResponse! - deleteCategories(where: CategoryWhere): DeleteInfo! - updateCategories(update: CategoryUpdateInput, where: CategoryWhere): UpdateCategoriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - categories(options: CategoryOptions, where: CategoryWhere): [Category!]! - categoriesAggregate(where: CategoryWhere): CategoryAggregateSelection! - categoriesConnection(after: String, first: Int, sort: [CategorySort], where: CategoryWhere): CategoriesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateCategoriesMutationResponse { - categories: [Category!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CategoriesConnection { + edges: [CategoryEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Category { + categoryId: ID! + description: String! + exampleImageLocations: [String!] + name: String! +} + +type CategoryAggregateSelection { + categoryId: IDAggregateSelectionNonNullable! + count: Int! + description: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input CategoryCreateInput { + description: String! = \\"\\" + exampleImageLocations: [String!] + name: String! +} + +type CategoryEdge { + cursor: String! + node: Category! +} + +input CategoryOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more CategorySort objects to sort Categories by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [CategorySort!] +} + +\\"\\"\\" +Fields to sort Categories by. The order in which sorts are applied is not guaranteed when specifying many fields in one CategorySort object. +\\"\\"\\" +input CategorySort { + categoryId: SortDirection + description: SortDirection + name: SortDirection +} + +input CategoryUpdateInput { + description: String + exampleImageLocations: [String!] + exampleImageLocations_POP: Int + exampleImageLocations_PUSH: [String!] + name: String +} + +input CategoryWhere { + AND: [CategoryWhere!] + NOT: CategoryWhere + OR: [CategoryWhere!] + categoryId: ID + categoryId_CONTAINS: ID + categoryId_ENDS_WITH: ID + categoryId_IN: [ID!] + categoryId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_STARTS_WITH: ID + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String!] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + exampleImageLocations: [String!] + exampleImageLocations_INCLUDES: String + exampleImageLocations_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + exampleImageLocations_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type CreateCategoriesMutationResponse { + categories: [Category!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Mutation { + createCategories(input: [CategoryCreateInput!]!): CreateCategoriesMutationResponse! + deleteCategories(where: CategoryWhere): DeleteInfo! + updateCategories(update: CategoryUpdateInput, where: CategoryWhere): UpdateCategoriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + categories(options: CategoryOptions, where: CategoryWhere): [Category!]! + categoriesAggregate(where: CategoryWhere): CategoryAggregateSelection! + categoriesConnection(after: String, first: Int, sort: [CategorySort], where: CategoryWhere): CategoriesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateCategoriesMutationResponse { + categories: [Category!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index a2f0f45606..9519ea3bf5 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -43,678 +43,670 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String - } - - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input GenreConnectInput { - movies: [GenreMoviesConnectFieldInput!] - } - - input GenreConnectWhere { - node: GenreWhere! - } - - input GenreCreateInput { - movies: GenreMoviesFieldInput - name: String - } - - input GenreDeleteInput { - movies: [GenreMoviesDeleteFieldInput!] - } - - input GenreDisconnectInput { - movies: [GenreMoviesDisconnectFieldInput!] - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection - } - - type GenreMovieMoviesNodeAggregateSelection { - imdbRating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - year: IntAggregateSelectionNullable! - } - - input GenreMoviesAggregateInput { - AND: [GenreMoviesAggregateInput!] - NOT: GenreMoviesAggregateInput - OR: [GenreMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: GenreMoviesNodeAggregationWhereInput - } - - input GenreMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input GenreMoviesConnectionSort { - node: MovieSort - } - - input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input GenreMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input GenreMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: GenreMoviesConnectionWhere - } - - input GenreMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: GenreMoviesConnectionWhere - } - - input GenreMoviesFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - } - - input GenreMoviesNodeAggregationWhereInput { - AND: [GenreMoviesNodeAggregationWhereInput!] - NOT: GenreMoviesNodeAggregationWhereInput - OR: [GenreMoviesNodeAggregationWhereInput!] - imdbRating_AVERAGE_EQUAL: Float - imdbRating_AVERAGE_GT: Float - imdbRating_AVERAGE_GTE: Float - imdbRating_AVERAGE_LT: Float - imdbRating_AVERAGE_LTE: Float - imdbRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_MAX_EQUAL: Float - imdbRating_MAX_GT: Float - imdbRating_MAX_GTE: Float - imdbRating_MAX_LT: Float - imdbRating_MAX_LTE: Float - imdbRating_MIN_EQUAL: Float - imdbRating_MIN_GT: Float - imdbRating_MIN_GTE: Float - imdbRating_MIN_LT: Float - imdbRating_MIN_LTE: Float - imdbRating_SUM_EQUAL: Float - imdbRating_SUM_GT: Float - imdbRating_SUM_GTE: Float - imdbRating_SUM_LT: Float - imdbRating_SUM_LTE: Float - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - year_AVERAGE_EQUAL: Float - year_AVERAGE_GT: Float - year_AVERAGE_GTE: Float - year_AVERAGE_LT: Float - year_AVERAGE_LTE: Float - year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_MAX_EQUAL: Int - year_MAX_GT: Int - year_MAX_GTE: Int - year_MAX_LT: Int - year_MAX_LTE: Int - year_MIN_EQUAL: Int - year_MIN_GT: Int - year_MIN_GTE: Int - year_MIN_LT: Int - year_MIN_LTE: Int - year_SUM_EQUAL: Int - year_SUM_GT: Int - year_SUM_GTE: Int - year_SUM_LT: Int - year_SUM_LTE: Int - } - - type GenreMoviesRelationship { - cursor: String! - node: Movie! - } - - input GenreMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input GenreMoviesUpdateFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - delete: [GenreMoviesDeleteFieldInput!] - disconnect: [GenreMoviesDisconnectFieldInput!] - update: GenreMoviesUpdateConnectionInput - where: GenreMoviesConnectionWhere - } - - 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!] - } - - input GenreRelationInput { - movies: [GenreMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: SortDirection - } - - input GenreUpdateInput { - movies: [GenreMoviesUpdateFieldInput!] - name: String - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: GenreMoviesAggregateInput - moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere - moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere - \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") - genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") - genresConnection(after: String, directed: Boolean = true, 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 - } - - type MovieAggregateSelection { - count: Int! - imdbRating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - year: IntAggregateSelectionNullable! - } - - input MovieConnectInput { - genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - genres: MovieGenresFieldInput @deprecated(reason: \\"Do not use genre\\") - imdbRating: Float - title: String @deprecated(reason: \\"Do not use title\\") - year: Int - } - - input MovieDeleteInput { - genres: [MovieGenresDeleteFieldInput!] @deprecated(reason: \\"Do not use genre\\") - } - - input MovieDisconnectInput { - genres: [MovieGenresDisconnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieGenreGenresAggregationSelection { - count: Int! - node: MovieGenreGenresNodeAggregateSelection - } - - type MovieGenreGenresNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieGenresAggregateInput { - AND: [MovieGenresAggregateInput!] - NOT: MovieGenresAggregateInput - OR: [MovieGenresAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenresNodeAggregationWhereInput - } - - input MovieGenresConnectFieldInput { - connect: [GenreConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere - } - - type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieGenresConnectionSort { - node: GenreSort - } - - input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieGenresCreateFieldInput { - node: GenreCreateInput! - } - - input MovieGenresDeleteFieldInput { - delete: GenreDeleteInput - where: MovieGenresConnectionWhere - } - - input MovieGenresDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: MovieGenresConnectionWhere - } - - input MovieGenresFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - } - - input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieGenresRelationship { - cursor: String! - node: Genre! - } - - input MovieGenresUpdateConnectionInput { - node: GenreUpdateInput - } - - input MovieGenresUpdateFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - delete: [MovieGenresDeleteFieldInput!] - disconnect: [MovieGenresDisconnectFieldInput!] - update: MovieGenresUpdateConnectionInput - where: MovieGenresConnectionWhere - } - - 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!] - } - - input MovieRelationInput { - genres: [MovieGenresCreateFieldInput!] @deprecated(reason: \\"Do not use genre\\") - } - - \\"\\"\\" - 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 { - imdbRating: SortDirection - title: SortDirection @deprecated(reason: \\"Do not use title\\") - year: SortDirection - } - - input MovieUpdateInput { - genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use genre\\") - imdbRating: Float - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SUBTRACT: Float - title: String @deprecated(reason: \\"Do not use title\\") - year: Int - year_DECREMENT: Int - year_INCREMENT: Int - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") - genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use genre\\") - genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\" - Return Movies where none of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") - genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\" - Return Movies where some of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere @deprecated(reason: \\"Do not use genre\\") - genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere @deprecated(reason: \\"Do not use genre\\") - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String @deprecated(reason: \\"Do not use title\\") - title_CONTAINS: String @deprecated(reason: \\"Do not use title\\") - title_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") - title_IN: [String] @deprecated(reason: \\"Do not use title\\") - title_NOT: String @deprecated(reason: \\"Do not use title\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Do not use title\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") - title_NOT_IN: [String] @deprecated(reason: \\"Do not use title\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") - title_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") - year: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int - year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type Genre { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + name: String +} + +type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input GenreConnectInput { + movies: [GenreMoviesConnectFieldInput!] +} + +input GenreConnectWhere { + node: GenreWhere! +} + +input GenreCreateInput { + movies: GenreMoviesFieldInput + name: String +} + +input GenreDeleteInput { + movies: [GenreMoviesDeleteFieldInput!] +} + +input GenreDisconnectInput { + movies: [GenreMoviesDisconnectFieldInput!] +} + +type GenreEdge { + cursor: String! + node: Genre! +} + +type GenreMovieMoviesAggregationSelection { + count: Int! + node: GenreMovieMoviesNodeAggregateSelection +} + +type GenreMovieMoviesNodeAggregateSelection { + imdbRating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! +} + +input GenreMoviesAggregateInput { + AND: [GenreMoviesAggregateInput!] + NOT: GenreMoviesAggregateInput + OR: [GenreMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: GenreMoviesNodeAggregationWhereInput +} + +input GenreMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type GenreMoviesConnection { + edges: [GenreMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input GenreMoviesConnectionSort { + node: MovieSort +} + +input GenreMoviesConnectionWhere { + AND: [GenreMoviesConnectionWhere!] + NOT: GenreMoviesConnectionWhere + OR: [GenreMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input GenreMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input GenreMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: GenreMoviesConnectionWhere +} + +input GenreMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: GenreMoviesConnectionWhere +} + +input GenreMoviesFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] +} + +input GenreMoviesNodeAggregationWhereInput { + AND: [GenreMoviesNodeAggregationWhereInput!] + NOT: GenreMoviesNodeAggregationWhereInput + OR: [GenreMoviesNodeAggregationWhereInput!] + imdbRating_AVERAGE_EQUAL: Float + imdbRating_AVERAGE_GT: Float + imdbRating_AVERAGE_GTE: Float + imdbRating_AVERAGE_LT: Float + imdbRating_AVERAGE_LTE: Float + imdbRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_MAX_EQUAL: Float + imdbRating_MAX_GT: Float + imdbRating_MAX_GTE: Float + imdbRating_MAX_LT: Float + imdbRating_MAX_LTE: Float + imdbRating_MIN_EQUAL: Float + imdbRating_MIN_GT: Float + imdbRating_MIN_GTE: Float + imdbRating_MIN_LT: Float + imdbRating_MIN_LTE: Float + imdbRating_SUM_EQUAL: Float + imdbRating_SUM_GT: Float + imdbRating_SUM_GTE: Float + imdbRating_SUM_LT: Float + imdbRating_SUM_LTE: Float + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + year_AVERAGE_EQUAL: Float + year_AVERAGE_GT: Float + year_AVERAGE_GTE: Float + year_AVERAGE_LT: Float + year_AVERAGE_LTE: Float + year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_MAX_EQUAL: Int + year_MAX_GT: Int + year_MAX_GTE: Int + year_MAX_LT: Int + year_MAX_LTE: Int + year_MIN_EQUAL: Int + year_MIN_GT: Int + year_MIN_GTE: Int + year_MIN_LT: Int + year_MIN_LTE: Int + year_SUM_EQUAL: Int + year_SUM_GT: Int + year_SUM_GTE: Int + year_SUM_LT: Int + year_SUM_LTE: Int +} + +type GenreMoviesRelationship { + cursor: String! + node: Movie! +} + +input GenreMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input GenreMoviesUpdateFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + delete: [GenreMoviesDeleteFieldInput!] + disconnect: [GenreMoviesDisconnectFieldInput!] + update: GenreMoviesUpdateConnectionInput + where: GenreMoviesConnectionWhere +} + +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!] +} + +input GenreRelationInput { + movies: [GenreMoviesCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: SortDirection +} + +input GenreUpdateInput { + movies: [GenreMoviesUpdateFieldInput!] + name: String +} + +input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: GenreMoviesConnectionWhere + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") + genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") + genresConnection(after: String, directed: Boolean = true, 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 +} + +type MovieAggregateSelection { + count: Int! + imdbRating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! +} + +input MovieConnectInput { + genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + genres: MovieGenresFieldInput @deprecated(reason: \\"Do not use genre\\") + imdbRating: Float + title: String @deprecated(reason: \\"Do not use title\\") + year: Int +} + +input MovieDeleteInput { + genres: [MovieGenresDeleteFieldInput!] @deprecated(reason: \\"Do not use genre\\") +} + +input MovieDisconnectInput { + genres: [MovieGenresDisconnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieGenreGenresAggregationSelection { + count: Int! + node: MovieGenreGenresNodeAggregateSelection +} + +type MovieGenreGenresNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieGenresAggregateInput { + AND: [MovieGenresAggregateInput!] + NOT: MovieGenresAggregateInput + OR: [MovieGenresAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenresNodeAggregationWhereInput +} + +input MovieGenresConnectFieldInput { + connect: [GenreConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere +} + +type MovieGenresConnection { + edges: [MovieGenresRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieGenresConnectionSort { + node: GenreSort +} + +input MovieGenresConnectionWhere { + AND: [MovieGenresConnectionWhere!] + NOT: MovieGenresConnectionWhere + OR: [MovieGenresConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieGenresCreateFieldInput { + node: GenreCreateInput! +} + +input MovieGenresDeleteFieldInput { + delete: GenreDeleteInput + where: MovieGenresConnectionWhere +} + +input MovieGenresDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: MovieGenresConnectionWhere +} + +input MovieGenresFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] +} + +input MovieGenresNodeAggregationWhereInput { + AND: [MovieGenresNodeAggregationWhereInput!] + NOT: MovieGenresNodeAggregationWhereInput + OR: [MovieGenresNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieGenresRelationship { + cursor: String! + node: Genre! +} + +input MovieGenresUpdateConnectionInput { + node: GenreUpdateInput +} + +input MovieGenresUpdateFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + delete: [MovieGenresDeleteFieldInput!] + disconnect: [MovieGenresDisconnectFieldInput!] + update: MovieGenresUpdateConnectionInput + where: MovieGenresConnectionWhere +} + +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!] +} + +input MovieRelationInput { + genres: [MovieGenresCreateFieldInput!] @deprecated(reason: \\"Do not use genre\\") +} + +\\"\\"\\" +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 { + imdbRating: SortDirection + title: SortDirection @deprecated(reason: \\"Do not use title\\") + year: SortDirection +} + +input MovieUpdateInput { + genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use genre\\") + imdbRating: Float + imdbRating_ADD: Float + imdbRating_DIVIDE: Float + imdbRating_MULTIPLY: Float + imdbRating_SUBTRACT: Float + title: String @deprecated(reason: \\"Do not use title\\") + year: Int + year_DECREMENT: Int + year_INCREMENT: Int +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") + genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use genre\\") + genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + genres_ALL: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + genres_NONE: GenreWhere @deprecated(reason: \\"Do not use genre\\") + genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + genres_SOME: GenreWhere @deprecated(reason: \\"Do not use genre\\") + imdbRating: Float + imdbRating_GT: Float + imdbRating_GTE: Float + imdbRating_IN: [Float] + imdbRating_LT: Float + imdbRating_LTE: Float + imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String @deprecated(reason: \\"Do not use title\\") + title_CONTAINS: String @deprecated(reason: \\"Do not use title\\") + title_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") + title_IN: [String] @deprecated(reason: \\"Do not use title\\") + title_NOT: String @deprecated(reason: \\"Do not use title\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Do not use title\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") + title_NOT_IN: [String] @deprecated(reason: \\"Do not use title\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") + title_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") + year: Int + year_GT: Int + year_GTE: Int + year_IN: [Int] + year_LT: Int + year_LTE: Int + year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 1a9d1767c4..1bf4f851b3 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -79,507 +79,495 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateResourcesMutationResponse { - info: CreateInfo! - resources: [Resource!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type Mutation { - createResources(input: [ResourceCreateInput!]!): CreateResourcesMutationResponse! - deleteResources(delete: ResourceDeleteInput, where: ResourceWhere): DeleteInfo! - updateResources(connect: ResourceConnectInput, connectOrCreate: ResourceConnectOrCreateInput, create: ResourceRelationInput, delete: ResourceDeleteInput, disconnect: ResourceDisconnectInput, update: ResourceUpdateInput, where: ResourceWhere): UpdateResourcesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - enum Property { - PropertyA - PropertyB - PropertyC - } - - type Query { - resources(options: ResourceOptions, where: ResourceWhere): [Resource!]! - resourcesAggregate(where: ResourceWhere): ResourceAggregateSelection! - resourcesConnection(after: String, first: Int, sort: [ResourceSort], where: ResourceWhere): ResourcesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Resource implements ResourceEntity { - \\"\\"\\" - Resources encapsulating the given resource (e.g., a github org contains a repo) - \\"\\"\\" - containedBy(directed: Boolean = true, options: ResourceOptions, where: ResourceWhere): [Resource!]! - containedByAggregate(directed: Boolean = true, where: ResourceWhere): ResourceResourceContainedByAggregationSelection - containedByConnection(after: String, directed: Boolean = true, first: Int, sort: [ResourceContainedByConnectionSort!], where: ResourceContainedByConnectionWhere): ResourceContainedByConnection! - \\"\\"\\"\\"\\"\\" - createdAt: DateTime! - \\"\\"\\"\\"\\"\\" - externalIds: [ID!] - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - properties: [Property!] - \\"\\"\\"Globally tracked tags for this resource\\"\\"\\" - tags: [Tag!] - \\"\\"\\"\\"\\"\\" - type: ResourceType! - \\"\\"\\"\\"\\"\\" - updatedAt: DateTime! - } - - type ResourceAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - updatedAt: DateTimeAggregateSelectionNonNullable! - } - - input ResourceConnectInput { - containedBy: [ResourceContainedByConnectFieldInput!] - } - - input ResourceConnectOrCreateInput { - containedBy: [ResourceContainedByConnectOrCreateFieldInput!] - } - - input ResourceConnectOrCreateWhere { - node: ResourceUniqueWhere! - } - - input ResourceConnectWhere { - node: ResourceWhere! - } - - input ResourceContainedByAggregateInput { - AND: [ResourceContainedByAggregateInput!] - NOT: ResourceContainedByAggregateInput - OR: [ResourceContainedByAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ResourceContainedByNodeAggregationWhereInput - } - - input ResourceContainedByConnectFieldInput { - connect: [ResourceConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ResourceConnectWhere - } - - input ResourceContainedByConnectOrCreateFieldInput { - onCreate: ResourceContainedByConnectOrCreateFieldInputOnCreate! - where: ResourceConnectOrCreateWhere! - } - - input ResourceContainedByConnectOrCreateFieldInputOnCreate { - node: ResourceOnCreateInput! - } - - type ResourceContainedByConnection { - edges: [ResourceContainedByRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ResourceContainedByConnectionSort { - node: ResourceSort - } - - input ResourceContainedByConnectionWhere { - AND: [ResourceContainedByConnectionWhere!] - NOT: ResourceContainedByConnectionWhere - OR: [ResourceContainedByConnectionWhere!] - node: ResourceWhere - node_NOT: ResourceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ResourceContainedByCreateFieldInput { - node: ResourceCreateInput! - } - - input ResourceContainedByDeleteFieldInput { - delete: ResourceDeleteInput - where: ResourceContainedByConnectionWhere - } - - input ResourceContainedByDisconnectFieldInput { - disconnect: ResourceDisconnectInput - where: ResourceContainedByConnectionWhere - } - - input ResourceContainedByFieldInput { - connect: [ResourceContainedByConnectFieldInput!] - connectOrCreate: [ResourceContainedByConnectOrCreateFieldInput!] - create: [ResourceContainedByCreateFieldInput!] - } - - input ResourceContainedByNodeAggregationWhereInput { - AND: [ResourceContainedByNodeAggregationWhereInput!] - NOT: ResourceContainedByNodeAggregationWhereInput - OR: [ResourceContainedByNodeAggregationWhereInput!] - createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_MAX_EQUAL: DateTime - createdAt_MAX_GT: DateTime - createdAt_MAX_GTE: DateTime - createdAt_MAX_LT: DateTime - createdAt_MAX_LTE: DateTime - createdAt_MIN_EQUAL: DateTime - createdAt_MIN_GT: DateTime - createdAt_MIN_GTE: DateTime - createdAt_MIN_LT: DateTime - createdAt_MIN_LTE: DateTime - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - updatedAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_MAX_EQUAL: DateTime - updatedAt_MAX_GT: DateTime - updatedAt_MAX_GTE: DateTime - updatedAt_MAX_LT: DateTime - updatedAt_MAX_LTE: DateTime - updatedAt_MIN_EQUAL: DateTime - updatedAt_MIN_GT: DateTime - updatedAt_MIN_GTE: DateTime - updatedAt_MIN_LT: DateTime - updatedAt_MIN_LTE: DateTime - } - - type ResourceContainedByRelationship { - cursor: String! - node: Resource! - } - - input ResourceContainedByUpdateConnectionInput { - node: ResourceUpdateInput - } - - input ResourceContainedByUpdateFieldInput { - connect: [ResourceContainedByConnectFieldInput!] - connectOrCreate: [ResourceContainedByConnectOrCreateFieldInput!] - create: [ResourceContainedByCreateFieldInput!] - delete: [ResourceContainedByDeleteFieldInput!] - disconnect: [ResourceContainedByDisconnectFieldInput!] - update: ResourceContainedByUpdateConnectionInput - where: ResourceContainedByConnectionWhere - } - - input ResourceCreateInput { - containedBy: ResourceContainedByFieldInput - externalIds: [ID!] - id: ID! - name: String - properties: [Property!] - tags: [Tag!] - type: ResourceType! - } - - input ResourceDeleteInput { - containedBy: [ResourceContainedByDeleteFieldInput!] - } - - input ResourceDisconnectInput { - containedBy: [ResourceContainedByDisconnectFieldInput!] - } - - type ResourceEdge { - cursor: String! - node: Resource! - } - - \\"\\"\\"\\"\\"\\" - interface ResourceEntity { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - properties: [Property!] - \\"\\"\\"Globally tracked tags for this resource (enum)\\"\\"\\" - tags: [Tag!] - \\"\\"\\"Allowed resource types (enums)\\"\\"\\" - type: ResourceType! - } - - input ResourceOnCreateInput { - externalIds: [ID!] - id: ID! - name: String - properties: [Property!] - tags: [Tag!] - type: ResourceType! - } - - input ResourceOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more ResourceSort objects to sort Resources by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [ResourceSort!] - } - - input ResourceRelationInput { - containedBy: [ResourceContainedByCreateFieldInput!] - } - - type ResourceResourceContainedByAggregationSelection { - count: Int! - node: ResourceResourceContainedByNodeAggregateSelection - } - - type ResourceResourceContainedByNodeAggregateSelection { - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - updatedAt: DateTimeAggregateSelectionNonNullable! - } - - \\"\\"\\" - Fields to sort Resources by. The order in which sorts are applied is not guaranteed when specifying many fields in one ResourceSort object. - \\"\\"\\" - input ResourceSort { - createdAt: SortDirection - id: SortDirection - name: SortDirection - type: SortDirection - updatedAt: SortDirection - } - - enum ResourceType { - ResourceA - ResourceB - ResourceC - } - - input ResourceUniqueWhere { - id: ID - } - - input ResourceUpdateInput { - containedBy: [ResourceContainedByUpdateFieldInput!] - externalIds: [ID!] - externalIds_POP: Int - externalIds_PUSH: [ID!] - id: ID - name: String - properties: [Property!] - tags: [Tag!] - type: ResourceType - } - - input ResourceWhere { - AND: [ResourceWhere!] - NOT: ResourceWhere - OR: [ResourceWhere!] - containedBy: ResourceWhere @deprecated(reason: \\"Use \`containedBy_SOME\` instead.\\") - containedByAggregate: ResourceContainedByAggregateInput - containedByConnection: ResourceContainedByConnectionWhere @deprecated(reason: \\"Use \`containedByConnection_SOME\` instead.\\") - \\"\\"\\" - Return Resources where all of the related ResourceContainedByConnections match this filter - \\"\\"\\" - containedByConnection_ALL: ResourceContainedByConnectionWhere - \\"\\"\\" - Return Resources where none of the related ResourceContainedByConnections match this filter - \\"\\"\\" - containedByConnection_NONE: ResourceContainedByConnectionWhere - containedByConnection_NOT: ResourceContainedByConnectionWhere @deprecated(reason: \\"Use \`containedByConnection_NONE\` instead.\\") - \\"\\"\\" - Return Resources where one of the related ResourceContainedByConnections match this filter - \\"\\"\\" - containedByConnection_SINGLE: ResourceContainedByConnectionWhere - \\"\\"\\" - Return Resources where some of the related ResourceContainedByConnections match this filter - \\"\\"\\" - containedByConnection_SOME: ResourceContainedByConnectionWhere - \\"\\"\\"Return Resources where all of the related Resources match this filter\\"\\"\\" - containedBy_ALL: ResourceWhere - \\"\\"\\"Return Resources where none of the related Resources match this filter\\"\\"\\" - containedBy_NONE: ResourceWhere - containedBy_NOT: ResourceWhere @deprecated(reason: \\"Use \`containedBy_NONE\` instead.\\") - \\"\\"\\"Return Resources where one of the related Resources match this filter\\"\\"\\" - containedBy_SINGLE: ResourceWhere - \\"\\"\\"Return Resources where some of the related Resources match this filter\\"\\"\\" - containedBy_SOME: ResourceWhere - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - externalIds: [ID!] - externalIds_INCLUDES: ID - externalIds_NOT: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - externalIds_NOT_INCLUDES: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - properties: [Property!] - properties_INCLUDES: Property - properties_NOT: [Property!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - properties_NOT_INCLUDES: Property @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - tags: [Tag!] - tags_INCLUDES: Tag - tags_NOT: [Tag!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - tags_NOT_INCLUDES: Tag @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - type: ResourceType - type_IN: [ResourceType!] - type_NOT: ResourceType @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - type_NOT_IN: [ResourceType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - updatedAt: DateTime - updatedAt_GT: DateTime - updatedAt_GTE: DateTime - updatedAt_IN: [DateTime!] - updatedAt_LT: DateTime - updatedAt_LTE: DateTime - updatedAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - updatedAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type ResourcesConnection { - edges: [ResourceEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - enum Tag { - TagA - TagB - TagC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateResourcesMutationResponse { - info: UpdateInfo! - resources: [Resource!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateResourcesMutationResponse { + info: CreateInfo! + resources: [Resource!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Mutation { + createResources(input: [ResourceCreateInput!]!): CreateResourcesMutationResponse! + deleteResources(delete: ResourceDeleteInput, where: ResourceWhere): DeleteInfo! + updateResources(connect: ResourceConnectInput, connectOrCreate: ResourceConnectOrCreateInput, create: ResourceRelationInput, delete: ResourceDeleteInput, disconnect: ResourceDisconnectInput, update: ResourceUpdateInput, where: ResourceWhere): UpdateResourcesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +enum Property { + PropertyA + PropertyB + PropertyC +} + +type Query { + resources(options: ResourceOptions, where: ResourceWhere): [Resource!]! + resourcesAggregate(where: ResourceWhere): ResourceAggregateSelection! + resourcesConnection(after: String, first: Int, sort: [ResourceSort], where: ResourceWhere): ResourcesConnection! +} + +type Resource implements ResourceEntity { + \\"\\"\\" + Resources encapsulating the given resource (e.g., a github org contains a repo) + \\"\\"\\" + containedBy(directed: Boolean = true, options: ResourceOptions, where: ResourceWhere): [Resource!]! + containedByAggregate(directed: Boolean = true, where: ResourceWhere): ResourceResourceContainedByAggregationSelection + containedByConnection(after: String, directed: Boolean = true, first: Int, sort: [ResourceContainedByConnectionSort!], where: ResourceContainedByConnectionWhere): ResourceContainedByConnection! + createdAt: DateTime! + externalIds: [ID!] + id: ID! + name: String + properties: [Property!] + \\"\\"\\"Globally tracked tags for this resource\\"\\"\\" + tags: [Tag!] + type: ResourceType! + updatedAt: DateTime! +} + +type ResourceAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + updatedAt: DateTimeAggregateSelectionNonNullable! +} + +input ResourceConnectInput { + containedBy: [ResourceContainedByConnectFieldInput!] +} + +input ResourceConnectOrCreateInput { + containedBy: [ResourceContainedByConnectOrCreateFieldInput!] +} + +input ResourceConnectOrCreateWhere { + node: ResourceUniqueWhere! +} + +input ResourceConnectWhere { + node: ResourceWhere! +} + +input ResourceContainedByAggregateInput { + AND: [ResourceContainedByAggregateInput!] + NOT: ResourceContainedByAggregateInput + OR: [ResourceContainedByAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ResourceContainedByNodeAggregationWhereInput +} + +input ResourceContainedByConnectFieldInput { + connect: [ResourceConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ResourceConnectWhere +} + +input ResourceContainedByConnectOrCreateFieldInput { + onCreate: ResourceContainedByConnectOrCreateFieldInputOnCreate! + where: ResourceConnectOrCreateWhere! +} + +input ResourceContainedByConnectOrCreateFieldInputOnCreate { + node: ResourceOnCreateInput! +} + +type ResourceContainedByConnection { + edges: [ResourceContainedByRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ResourceContainedByConnectionSort { + node: ResourceSort +} + +input ResourceContainedByConnectionWhere { + AND: [ResourceContainedByConnectionWhere!] + NOT: ResourceContainedByConnectionWhere + OR: [ResourceContainedByConnectionWhere!] + node: ResourceWhere + node_NOT: ResourceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ResourceContainedByCreateFieldInput { + node: ResourceCreateInput! +} + +input ResourceContainedByDeleteFieldInput { + delete: ResourceDeleteInput + where: ResourceContainedByConnectionWhere +} + +input ResourceContainedByDisconnectFieldInput { + disconnect: ResourceDisconnectInput + where: ResourceContainedByConnectionWhere +} + +input ResourceContainedByFieldInput { + connect: [ResourceContainedByConnectFieldInput!] + connectOrCreate: [ResourceContainedByConnectOrCreateFieldInput!] + create: [ResourceContainedByCreateFieldInput!] +} + +input ResourceContainedByNodeAggregationWhereInput { + AND: [ResourceContainedByNodeAggregationWhereInput!] + NOT: ResourceContainedByNodeAggregationWhereInput + OR: [ResourceContainedByNodeAggregationWhereInput!] + createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_MAX_EQUAL: DateTime + createdAt_MAX_GT: DateTime + createdAt_MAX_GTE: DateTime + createdAt_MAX_LT: DateTime + createdAt_MAX_LTE: DateTime + createdAt_MIN_EQUAL: DateTime + createdAt_MIN_GT: DateTime + createdAt_MIN_GTE: DateTime + createdAt_MIN_LT: DateTime + createdAt_MIN_LTE: DateTime + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + updatedAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_MAX_EQUAL: DateTime + updatedAt_MAX_GT: DateTime + updatedAt_MAX_GTE: DateTime + updatedAt_MAX_LT: DateTime + updatedAt_MAX_LTE: DateTime + updatedAt_MIN_EQUAL: DateTime + updatedAt_MIN_GT: DateTime + updatedAt_MIN_GTE: DateTime + updatedAt_MIN_LT: DateTime + updatedAt_MIN_LTE: DateTime +} + +type ResourceContainedByRelationship { + cursor: String! + node: Resource! +} + +input ResourceContainedByUpdateConnectionInput { + node: ResourceUpdateInput +} + +input ResourceContainedByUpdateFieldInput { + connect: [ResourceContainedByConnectFieldInput!] + connectOrCreate: [ResourceContainedByConnectOrCreateFieldInput!] + create: [ResourceContainedByCreateFieldInput!] + delete: [ResourceContainedByDeleteFieldInput!] + disconnect: [ResourceContainedByDisconnectFieldInput!] + update: ResourceContainedByUpdateConnectionInput + where: ResourceContainedByConnectionWhere +} + +input ResourceCreateInput { + containedBy: ResourceContainedByFieldInput + externalIds: [ID!] + id: ID! + name: String + properties: [Property!] + tags: [Tag!] + type: ResourceType! +} + +input ResourceDeleteInput { + containedBy: [ResourceContainedByDeleteFieldInput!] +} + +input ResourceDisconnectInput { + containedBy: [ResourceContainedByDisconnectFieldInput!] +} + +type ResourceEdge { + cursor: String! + node: Resource! +} + +interface ResourceEntity { + id: ID! + name: String + properties: [Property!] + \\"\\"\\"Globally tracked tags for this resource (enum)\\"\\"\\" + tags: [Tag!] + \\"\\"\\"Allowed resource types (enums)\\"\\"\\" + type: ResourceType! +} + +input ResourceOnCreateInput { + externalIds: [ID!] + id: ID! + name: String + properties: [Property!] + tags: [Tag!] + type: ResourceType! +} + +input ResourceOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ResourceSort objects to sort Resources by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ResourceSort!] +} + +input ResourceRelationInput { + containedBy: [ResourceContainedByCreateFieldInput!] +} + +type ResourceResourceContainedByAggregationSelection { + count: Int! + node: ResourceResourceContainedByNodeAggregateSelection +} + +type ResourceResourceContainedByNodeAggregateSelection { + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + updatedAt: DateTimeAggregateSelectionNonNullable! +} + +\\"\\"\\" +Fields to sort Resources by. The order in which sorts are applied is not guaranteed when specifying many fields in one ResourceSort object. +\\"\\"\\" +input ResourceSort { + createdAt: SortDirection + id: SortDirection + name: SortDirection + type: SortDirection + updatedAt: SortDirection +} + +enum ResourceType { + ResourceA + ResourceB + ResourceC +} + +input ResourceUniqueWhere { + id: ID +} + +input ResourceUpdateInput { + containedBy: [ResourceContainedByUpdateFieldInput!] + externalIds: [ID!] + externalIds_POP: Int + externalIds_PUSH: [ID!] + id: ID + name: String + properties: [Property!] + tags: [Tag!] + type: ResourceType +} + +input ResourceWhere { + AND: [ResourceWhere!] + NOT: ResourceWhere + OR: [ResourceWhere!] + containedBy: ResourceWhere @deprecated(reason: \\"Use \`containedBy_SOME\` instead.\\") + containedByAggregate: ResourceContainedByAggregateInput + containedByConnection: ResourceContainedByConnectionWhere @deprecated(reason: \\"Use \`containedByConnection_SOME\` instead.\\") + \\"\\"\\" + Return Resources where all of the related ResourceContainedByConnections match this filter + \\"\\"\\" + containedByConnection_ALL: ResourceContainedByConnectionWhere + \\"\\"\\" + Return Resources where none of the related ResourceContainedByConnections match this filter + \\"\\"\\" + containedByConnection_NONE: ResourceContainedByConnectionWhere + containedByConnection_NOT: ResourceContainedByConnectionWhere @deprecated(reason: \\"Use \`containedByConnection_NONE\` instead.\\") + \\"\\"\\" + Return Resources where one of the related ResourceContainedByConnections match this filter + \\"\\"\\" + containedByConnection_SINGLE: ResourceContainedByConnectionWhere + \\"\\"\\" + Return Resources where some of the related ResourceContainedByConnections match this filter + \\"\\"\\" + containedByConnection_SOME: ResourceContainedByConnectionWhere + \\"\\"\\"Return Resources where all of the related Resources match this filter\\"\\"\\" + containedBy_ALL: ResourceWhere + \\"\\"\\"Return Resources where none of the related Resources match this filter\\"\\"\\" + containedBy_NONE: ResourceWhere + containedBy_NOT: ResourceWhere @deprecated(reason: \\"Use \`containedBy_NONE\` instead.\\") + \\"\\"\\"Return Resources where one of the related Resources match this filter\\"\\"\\" + containedBy_SINGLE: ResourceWhere + \\"\\"\\"Return Resources where some of the related Resources match this filter\\"\\"\\" + containedBy_SOME: ResourceWhere + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime!] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + externalIds: [ID!] + externalIds_INCLUDES: ID + externalIds_NOT: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + externalIds_NOT_INCLUDES: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + properties: [Property!] + properties_INCLUDES: Property + properties_NOT: [Property!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + properties_NOT_INCLUDES: Property @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + tags: [Tag!] + tags_INCLUDES: Tag + tags_NOT: [Tag!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + tags_NOT_INCLUDES: Tag @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + type: ResourceType + type_IN: [ResourceType!] + type_NOT: ResourceType @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + type_NOT_IN: [ResourceType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + updatedAt: DateTime + updatedAt_GT: DateTime + updatedAt_GTE: DateTime + updatedAt_IN: [DateTime!] + updatedAt_LT: DateTime + updatedAt_LTE: DateTime + updatedAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + updatedAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type ResourcesConnection { + edges: [ResourceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +enum Tag { + TagA + TagB + TagC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateResourcesMutationResponse { + info: UpdateInfo! + resources: [Resource!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index 7057692849..ee105b3981 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -40,577 +40,570 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"\\"\\"\\" - type Post { - \\"\\"\\"\\"\\"\\" - author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! - \\"\\"\\"\\"\\"\\" - content: String! - } - - type PostAggregateSelection { - content: StringAggregateSelectionNonNullable! - count: Int! - } - - input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput - } - - input PostAuthorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type PostAuthorConnection { - edges: [PostAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PostAuthorConnectionSort { - node: UserSort - } - - input PostAuthorConnectionWhere { - AND: [PostAuthorConnectionWhere!] - NOT: PostAuthorConnectionWhere - OR: [PostAuthorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PostAuthorCreateFieldInput { - node: UserCreateInput! - } - - input PostAuthorDeleteFieldInput { - delete: UserDeleteInput - where: PostAuthorConnectionWhere - } - - input PostAuthorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: PostAuthorConnectionWhere - } - - input PostAuthorFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - } - - input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type PostAuthorRelationship { - cursor: String! - node: User! - } - - input PostAuthorUpdateConnectionInput { - node: UserUpdateInput - } - - input PostAuthorUpdateFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - delete: PostAuthorDeleteFieldInput - disconnect: PostAuthorDisconnectFieldInput - update: PostAuthorUpdateConnectionInput - where: PostAuthorConnectionWhere - } - - input PostConnectInput { - author: PostAuthorConnectFieldInput - } - - input PostConnectWhere { - node: PostWhere! - } - - input PostCreateInput { - author: PostAuthorFieldInput - content: String! - } - - input PostDeleteInput { - author: PostAuthorDeleteFieldInput - } - - input PostDisconnectInput { - author: PostAuthorDisconnectFieldInput - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] - } - - input PostRelationInput { - author: PostAuthorCreateFieldInput - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - content: SortDirection - } - - input PostUpdateInput { - author: PostAuthorUpdateFieldInput - content: String - } - - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - - type PostUserAuthorNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - author: UserWhere - authorAggregate: PostAuthorAggregateInput - authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String!] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - } - - type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! - } - - type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input UserConnectInput { - posts: [UserPostsConnectFieldInput!] - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - id: ID! - name: String! - posts: UserPostsFieldInput - } - - input UserDeleteInput { - posts: [UserPostsDeleteFieldInput!] - } - - input UserDisconnectInput { - posts: [UserPostsDisconnectFieldInput!] - } - - type UserEdge { - cursor: String! - node: User! - } - - 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!] - } - - type UserPostPostsAggregationSelection { - count: Int! - node: UserPostPostsNodeAggregateSelection - } - - type UserPostPostsNodeAggregateSelection { - content: StringAggregateSelectionNonNullable! - } - - input UserPostsAggregateInput { - AND: [UserPostsAggregateInput!] - NOT: UserPostsAggregateInput - OR: [UserPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserPostsNodeAggregationWhereInput - } - - input UserPostsConnectFieldInput { - connect: [PostConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere - } - - type UserPostsConnection { - edges: [UserPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserPostsConnectionSort { - node: PostSort - } - - input UserPostsConnectionWhere { - AND: [UserPostsConnectionWhere!] - NOT: UserPostsConnectionWhere - OR: [UserPostsConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input UserPostsCreateFieldInput { - node: PostCreateInput! - } - - input UserPostsDeleteFieldInput { - delete: PostDeleteInput - where: UserPostsConnectionWhere - } - - input UserPostsDisconnectFieldInput { - disconnect: PostDisconnectInput - where: UserPostsConnectionWhere - } - - input UserPostsFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - } - - input UserPostsNodeAggregationWhereInput { - AND: [UserPostsNodeAggregationWhereInput!] - NOT: UserPostsNodeAggregationWhereInput - OR: [UserPostsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type UserPostsRelationship { - cursor: String! - node: Post! - } - - input UserPostsUpdateConnectionInput { - node: PostUpdateInput - } - - input UserPostsUpdateFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - delete: [UserPostsDeleteFieldInput!] - disconnect: [UserPostsDisconnectFieldInput!] - update: UserPostsUpdateConnectionInput - where: UserPostsConnectionWhere - } - - input UserRelationInput { - posts: [UserPostsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - id: SortDirection - name: SortDirection - } - - input UserUpdateInput { - id: ID - name: String - posts: [UserPostsUpdateFieldInput!] - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: UserPostsAggregateInput - postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere - postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere - \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere - \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere - posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere - \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Post { + author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + content: String! +} + +type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! +} + +input PostAuthorAggregateInput { + AND: [PostAuthorAggregateInput!] + NOT: PostAuthorAggregateInput + OR: [PostAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostAuthorNodeAggregationWhereInput +} + +input PostAuthorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PostAuthorConnectionSort { + node: UserSort +} + +input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PostAuthorCreateFieldInput { + node: UserCreateInput! +} + +input PostAuthorDeleteFieldInput { + delete: UserDeleteInput + where: PostAuthorConnectionWhere +} + +input PostAuthorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostAuthorConnectionWhere +} + +input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput +} + +input PostAuthorNodeAggregationWhereInput { + AND: [PostAuthorNodeAggregationWhereInput!] + NOT: PostAuthorNodeAggregationWhereInput + OR: [PostAuthorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type PostAuthorRelationship { + cursor: String! + node: User! +} + +input PostAuthorUpdateConnectionInput { + node: UserUpdateInput +} + +input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere +} + +input PostConnectInput { + author: PostAuthorConnectFieldInput +} + +input PostConnectWhere { + node: PostWhere! +} + +input PostCreateInput { + author: PostAuthorFieldInput + content: String! +} + +input PostDeleteInput { + author: PostAuthorDeleteFieldInput +} + +input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput +} + +type PostEdge { + cursor: String! + node: Post! +} + +input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] +} + +input PostRelationInput { + author: PostAuthorCreateFieldInput +} + +\\"\\"\\" +Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. +\\"\\"\\" +input PostSort { + content: SortDirection +} + +input PostUpdateInput { + author: PostAuthorUpdateFieldInput + content: String +} + +type PostUserAuthorAggregationSelection { + count: Int! + node: PostUserAuthorNodeAggregateSelection +} + +type PostUserAuthorNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String +} + +type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + id: ID! + name: String! + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! +} + +type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input UserConnectInput { + posts: [UserPostsConnectFieldInput!] +} + +input UserConnectWhere { + node: UserWhere! +} + +input UserCreateInput { + id: ID! + name: String! + posts: UserPostsFieldInput +} + +input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] +} + +input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] +} + +type UserEdge { + cursor: String! + node: User! +} + +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!] +} + +type UserPostPostsAggregationSelection { + count: Int! + node: UserPostPostsNodeAggregateSelection +} + +type UserPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNonNullable! +} + +input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput +} + +input UserPostsConnectFieldInput { + connect: [PostConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere +} + +type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserPostsConnectionSort { + node: PostSort +} + +input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input UserPostsCreateFieldInput { + node: PostCreateInput! +} + +input UserPostsDeleteFieldInput { + delete: PostDeleteInput + where: UserPostsConnectionWhere +} + +input UserPostsDisconnectFieldInput { + disconnect: PostDisconnectInput + where: UserPostsConnectionWhere +} + +input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] +} + +input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type UserPostsRelationship { + cursor: String! + node: Post! +} + +input UserPostsUpdateConnectionInput { + node: PostUpdateInput +} + +input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere +} + +input UserRelationInput { + posts: [UserPostsCreateFieldInput!] +} + +\\"\\"\\" +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 { + id: SortDirection + name: SortDirection +} + +input UserUpdateInput { + id: ID + name: String + posts: [UserPostsUpdateFieldInput!] +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index 7da8a78081..c3e0759c47 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -47,872 +47,862 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Book { - \\"\\"\\"\\"\\"\\" - isbn: String! - \\"\\"\\"\\"\\"\\" - originalTitle: String! - \\"\\"\\"\\"\\"\\" - translatedTitle(directed: Boolean = true, options: QueryOptions, where: BookTitleWhere): BookTitle - translatedTitleConnection(after: String, directed: Boolean = true, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! - } - - type BookAggregateSelection { - count: Int! - isbn: StringAggregateSelectionNonNullable! - originalTitle: StringAggregateSelectionNonNullable! - } - - input BookConnectInput { - translatedTitle: BookTranslatedTitleConnectInput - } - - input BookConnectWhere { - node: BookWhere! - } - - input BookCreateInput { - isbn: String! - originalTitle: String! - translatedTitle: BookTranslatedTitleCreateInput - } - - input BookDeleteInput { - translatedTitle: BookTranslatedTitleDeleteInput - } - - input BookDisconnectInput { - translatedTitle: BookTranslatedTitleDisconnectInput - } - - type BookEdge { - cursor: String! - node: Book! - } - - input BookOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BookSort!] - } - - input BookRelationInput { - translatedTitle: BookTranslatedTitleCreateFieldInput - } - - \\"\\"\\" - Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. - \\"\\"\\" - input BookSort { - isbn: SortDirection - originalTitle: SortDirection - } - - union BookTitle = BookTitle_EN | BookTitle_SV - - type BookTitleEnsConnection { - edges: [BookTitle_ENEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type BookTitleSvsConnection { - edges: [BookTitle_SVEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input BookTitleWhere { - BookTitle_EN: BookTitle_ENWhere - BookTitle_SV: BookTitle_SVWhere - } - - \\"\\"\\"\\"\\"\\" - type BookTitle_EN { - \\"\\"\\"\\"\\"\\" - book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! - bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_ENBookBookAggregationSelection - bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! - \\"\\"\\"\\"\\"\\" - value: String! - } - - type BookTitle_ENAggregateSelection { - count: Int! - value: StringAggregateSelectionNonNullable! - } - - input BookTitle_ENBookAggregateInput { - AND: [BookTitle_ENBookAggregateInput!] - NOT: BookTitle_ENBookAggregateInput - OR: [BookTitle_ENBookAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: BookTitle_ENBookNodeAggregationWhereInput - } - - type BookTitle_ENBookBookAggregationSelection { - count: Int! - node: BookTitle_ENBookBookNodeAggregateSelection - } - - type BookTitle_ENBookBookNodeAggregateSelection { - isbn: StringAggregateSelectionNonNullable! - originalTitle: StringAggregateSelectionNonNullable! - } - - input BookTitle_ENBookConnectFieldInput { - connect: BookConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: BookConnectWhere - } - - type BookTitle_ENBookConnection { - edges: [BookTitle_ENBookRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input BookTitle_ENBookConnectionSort { - node: BookSort - } - - input BookTitle_ENBookConnectionWhere { - AND: [BookTitle_ENBookConnectionWhere!] - NOT: BookTitle_ENBookConnectionWhere - OR: [BookTitle_ENBookConnectionWhere!] - node: BookWhere - node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input BookTitle_ENBookCreateFieldInput { - node: BookCreateInput! - } - - input BookTitle_ENBookDeleteFieldInput { - delete: BookDeleteInput - where: BookTitle_ENBookConnectionWhere - } - - input BookTitle_ENBookDisconnectFieldInput { - disconnect: BookDisconnectInput - where: BookTitle_ENBookConnectionWhere - } - - input BookTitle_ENBookFieldInput { - connect: BookTitle_ENBookConnectFieldInput - create: BookTitle_ENBookCreateFieldInput - } - - input BookTitle_ENBookNodeAggregationWhereInput { - AND: [BookTitle_ENBookNodeAggregationWhereInput!] - NOT: BookTitle_ENBookNodeAggregationWhereInput - OR: [BookTitle_ENBookNodeAggregationWhereInput!] - isbn_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_LENGTH_EQUAL: Float - isbn_AVERAGE_LENGTH_GT: Float - isbn_AVERAGE_LENGTH_GTE: Float - isbn_AVERAGE_LENGTH_LT: Float - isbn_AVERAGE_LENGTH_LTE: Float - isbn_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_LENGTH_EQUAL: Int - isbn_LONGEST_LENGTH_GT: Int - isbn_LONGEST_LENGTH_GTE: Int - isbn_LONGEST_LENGTH_LT: Int - isbn_LONGEST_LENGTH_LTE: Int - isbn_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_LENGTH_EQUAL: Int - isbn_SHORTEST_LENGTH_GT: Int - isbn_SHORTEST_LENGTH_GTE: Int - isbn_SHORTEST_LENGTH_LT: Int - isbn_SHORTEST_LENGTH_LTE: Int - isbn_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_LENGTH_EQUAL: Float - originalTitle_AVERAGE_LENGTH_GT: Float - originalTitle_AVERAGE_LENGTH_GTE: Float - originalTitle_AVERAGE_LENGTH_LT: Float - originalTitle_AVERAGE_LENGTH_LTE: Float - originalTitle_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_LENGTH_EQUAL: Int - originalTitle_LONGEST_LENGTH_GT: Int - originalTitle_LONGEST_LENGTH_GTE: Int - originalTitle_LONGEST_LENGTH_LT: Int - originalTitle_LONGEST_LENGTH_LTE: Int - originalTitle_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_LENGTH_EQUAL: Int - originalTitle_SHORTEST_LENGTH_GT: Int - originalTitle_SHORTEST_LENGTH_GTE: Int - originalTitle_SHORTEST_LENGTH_LT: Int - originalTitle_SHORTEST_LENGTH_LTE: Int - originalTitle_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type BookTitle_ENBookRelationship { - cursor: String! - node: Book! - } - - input BookTitle_ENBookUpdateConnectionInput { - node: BookUpdateInput - } - - input BookTitle_ENBookUpdateFieldInput { - connect: BookTitle_ENBookConnectFieldInput - create: BookTitle_ENBookCreateFieldInput - delete: BookTitle_ENBookDeleteFieldInput - disconnect: BookTitle_ENBookDisconnectFieldInput - update: BookTitle_ENBookUpdateConnectionInput - where: BookTitle_ENBookConnectionWhere - } - - input BookTitle_ENConnectInput { - book: BookTitle_ENBookConnectFieldInput - } - - input BookTitle_ENConnectWhere { - node: BookTitle_ENWhere! - } - - input BookTitle_ENCreateInput { - book: BookTitle_ENBookFieldInput - value: String! - } - - input BookTitle_ENDeleteInput { - book: BookTitle_ENBookDeleteFieldInput - } - - input BookTitle_ENDisconnectInput { - book: BookTitle_ENBookDisconnectFieldInput - } - - type BookTitle_ENEdge { - cursor: String! - node: BookTitle_EN! - } - - input BookTitle_ENOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BookTitle_ENSort objects to sort BookTitleEns by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BookTitle_ENSort!] - } - - input BookTitle_ENRelationInput { - book: BookTitle_ENBookCreateFieldInput - } - - \\"\\"\\" - Fields to sort BookTitleEns by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_ENSort object. - \\"\\"\\" - input BookTitle_ENSort { - value: SortDirection - } - - input BookTitle_ENUpdateInput { - book: BookTitle_ENBookUpdateFieldInput - value: String - } - - input BookTitle_ENWhere { - AND: [BookTitle_ENWhere!] - NOT: BookTitle_ENWhere - OR: [BookTitle_ENWhere!] - book: BookWhere - bookAggregate: BookTitle_ENBookAggregateInput - bookConnection: BookTitle_ENBookConnectionWhere - bookConnection_NOT: BookTitle_ENBookConnectionWhere - book_NOT: BookWhere - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String!] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - } - - \\"\\"\\"\\"\\"\\" - type BookTitle_SV { - \\"\\"\\"\\"\\"\\" - book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! - bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_SVBookBookAggregationSelection - bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! - \\"\\"\\"\\"\\"\\" - value: String! - } - - type BookTitle_SVAggregateSelection { - count: Int! - value: StringAggregateSelectionNonNullable! - } - - input BookTitle_SVBookAggregateInput { - AND: [BookTitle_SVBookAggregateInput!] - NOT: BookTitle_SVBookAggregateInput - OR: [BookTitle_SVBookAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: BookTitle_SVBookNodeAggregationWhereInput - } - - type BookTitle_SVBookBookAggregationSelection { - count: Int! - node: BookTitle_SVBookBookNodeAggregateSelection - } - - type BookTitle_SVBookBookNodeAggregateSelection { - isbn: StringAggregateSelectionNonNullable! - originalTitle: StringAggregateSelectionNonNullable! - } - - input BookTitle_SVBookConnectFieldInput { - connect: BookConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: BookConnectWhere - } - - type BookTitle_SVBookConnection { - edges: [BookTitle_SVBookRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input BookTitle_SVBookConnectionSort { - node: BookSort - } - - input BookTitle_SVBookConnectionWhere { - AND: [BookTitle_SVBookConnectionWhere!] - NOT: BookTitle_SVBookConnectionWhere - OR: [BookTitle_SVBookConnectionWhere!] - node: BookWhere - node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input BookTitle_SVBookCreateFieldInput { - node: BookCreateInput! - } - - input BookTitle_SVBookDeleteFieldInput { - delete: BookDeleteInput - where: BookTitle_SVBookConnectionWhere - } - - input BookTitle_SVBookDisconnectFieldInput { - disconnect: BookDisconnectInput - where: BookTitle_SVBookConnectionWhere - } - - input BookTitle_SVBookFieldInput { - connect: BookTitle_SVBookConnectFieldInput - create: BookTitle_SVBookCreateFieldInput - } - - input BookTitle_SVBookNodeAggregationWhereInput { - AND: [BookTitle_SVBookNodeAggregationWhereInput!] - NOT: BookTitle_SVBookNodeAggregationWhereInput - OR: [BookTitle_SVBookNodeAggregationWhereInput!] - isbn_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_LENGTH_EQUAL: Float - isbn_AVERAGE_LENGTH_GT: Float - isbn_AVERAGE_LENGTH_GTE: Float - isbn_AVERAGE_LENGTH_LT: Float - isbn_AVERAGE_LENGTH_LTE: Float - isbn_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_LENGTH_EQUAL: Int - isbn_LONGEST_LENGTH_GT: Int - isbn_LONGEST_LENGTH_GTE: Int - isbn_LONGEST_LENGTH_LT: Int - isbn_LONGEST_LENGTH_LTE: Int - isbn_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_LENGTH_EQUAL: Int - isbn_SHORTEST_LENGTH_GT: Int - isbn_SHORTEST_LENGTH_GTE: Int - isbn_SHORTEST_LENGTH_LT: Int - isbn_SHORTEST_LENGTH_LTE: Int - isbn_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_LENGTH_EQUAL: Float - originalTitle_AVERAGE_LENGTH_GT: Float - originalTitle_AVERAGE_LENGTH_GTE: Float - originalTitle_AVERAGE_LENGTH_LT: Float - originalTitle_AVERAGE_LENGTH_LTE: Float - originalTitle_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_LENGTH_EQUAL: Int - originalTitle_LONGEST_LENGTH_GT: Int - originalTitle_LONGEST_LENGTH_GTE: Int - originalTitle_LONGEST_LENGTH_LT: Int - originalTitle_LONGEST_LENGTH_LTE: Int - originalTitle_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_LENGTH_EQUAL: Int - originalTitle_SHORTEST_LENGTH_GT: Int - originalTitle_SHORTEST_LENGTH_GTE: Int - originalTitle_SHORTEST_LENGTH_LT: Int - originalTitle_SHORTEST_LENGTH_LTE: Int - originalTitle_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type BookTitle_SVBookRelationship { - cursor: String! - node: Book! - } - - input BookTitle_SVBookUpdateConnectionInput { - node: BookUpdateInput - } - - input BookTitle_SVBookUpdateFieldInput { - connect: BookTitle_SVBookConnectFieldInput - create: BookTitle_SVBookCreateFieldInput - delete: BookTitle_SVBookDeleteFieldInput - disconnect: BookTitle_SVBookDisconnectFieldInput - update: BookTitle_SVBookUpdateConnectionInput - where: BookTitle_SVBookConnectionWhere - } - - input BookTitle_SVConnectInput { - book: BookTitle_SVBookConnectFieldInput - } - - input BookTitle_SVConnectWhere { - node: BookTitle_SVWhere! - } - - input BookTitle_SVCreateInput { - book: BookTitle_SVBookFieldInput - value: String! - } - - input BookTitle_SVDeleteInput { - book: BookTitle_SVBookDeleteFieldInput - } - - input BookTitle_SVDisconnectInput { - book: BookTitle_SVBookDisconnectFieldInput - } - - type BookTitle_SVEdge { - cursor: String! - node: BookTitle_SV! - } - - input BookTitle_SVOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BookTitle_SVSort objects to sort BookTitleSvs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BookTitle_SVSort!] - } - - input BookTitle_SVRelationInput { - book: BookTitle_SVBookCreateFieldInput - } - - \\"\\"\\" - Fields to sort BookTitleSvs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_SVSort object. - \\"\\"\\" - input BookTitle_SVSort { - value: SortDirection - } - - input BookTitle_SVUpdateInput { - book: BookTitle_SVBookUpdateFieldInput - value: String - } - - input BookTitle_SVWhere { - AND: [BookTitle_SVWhere!] - NOT: BookTitle_SVWhere - OR: [BookTitle_SVWhere!] - book: BookWhere - bookAggregate: BookTitle_SVBookAggregateInput - bookConnection: BookTitle_SVBookConnectionWhere - bookConnection_NOT: BookTitle_SVBookConnectionWhere - book_NOT: BookWhere - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String!] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String - } - - input BookTranslatedTitleBookTitle_ENConnectFieldInput { - connect: BookTitle_ENConnectInput - where: BookTitle_ENConnectWhere - } - - input BookTranslatedTitleBookTitle_ENConnectionWhere { - AND: [BookTranslatedTitleBookTitle_ENConnectionWhere!] - NOT: BookTranslatedTitleBookTitle_ENConnectionWhere - OR: [BookTranslatedTitleBookTitle_ENConnectionWhere!] - node: BookTitle_ENWhere - node_NOT: BookTitle_ENWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input BookTranslatedTitleBookTitle_ENCreateFieldInput { - node: BookTitle_ENCreateInput! - } - - input BookTranslatedTitleBookTitle_ENDeleteFieldInput { - delete: BookTitle_ENDeleteInput - where: BookTranslatedTitleBookTitle_ENConnectionWhere - } - - input BookTranslatedTitleBookTitle_ENDisconnectFieldInput { - disconnect: BookTitle_ENDisconnectInput - where: BookTranslatedTitleBookTitle_ENConnectionWhere - } - - input BookTranslatedTitleBookTitle_ENFieldInput { - connect: BookTranslatedTitleBookTitle_ENConnectFieldInput - create: BookTranslatedTitleBookTitle_ENCreateFieldInput - } - - input BookTranslatedTitleBookTitle_ENUpdateConnectionInput { - node: BookTitle_ENUpdateInput - } - - input BookTranslatedTitleBookTitle_ENUpdateFieldInput { - connect: BookTranslatedTitleBookTitle_ENConnectFieldInput - create: BookTranslatedTitleBookTitle_ENCreateFieldInput - delete: BookTranslatedTitleBookTitle_ENDeleteFieldInput - disconnect: BookTranslatedTitleBookTitle_ENDisconnectFieldInput - update: BookTranslatedTitleBookTitle_ENUpdateConnectionInput - where: BookTranslatedTitleBookTitle_ENConnectionWhere - } - - input BookTranslatedTitleBookTitle_SVConnectFieldInput { - connect: BookTitle_SVConnectInput - where: BookTitle_SVConnectWhere - } - - input BookTranslatedTitleBookTitle_SVConnectionWhere { - AND: [BookTranslatedTitleBookTitle_SVConnectionWhere!] - NOT: BookTranslatedTitleBookTitle_SVConnectionWhere - OR: [BookTranslatedTitleBookTitle_SVConnectionWhere!] - node: BookTitle_SVWhere - node_NOT: BookTitle_SVWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input BookTranslatedTitleBookTitle_SVCreateFieldInput { - node: BookTitle_SVCreateInput! - } - - input BookTranslatedTitleBookTitle_SVDeleteFieldInput { - delete: BookTitle_SVDeleteInput - where: BookTranslatedTitleBookTitle_SVConnectionWhere - } - - input BookTranslatedTitleBookTitle_SVDisconnectFieldInput { - disconnect: BookTitle_SVDisconnectInput - where: BookTranslatedTitleBookTitle_SVConnectionWhere - } - - input BookTranslatedTitleBookTitle_SVFieldInput { - connect: BookTranslatedTitleBookTitle_SVConnectFieldInput - create: BookTranslatedTitleBookTitle_SVCreateFieldInput - } - - input BookTranslatedTitleBookTitle_SVUpdateConnectionInput { - node: BookTitle_SVUpdateInput - } - - input BookTranslatedTitleBookTitle_SVUpdateFieldInput { - connect: BookTranslatedTitleBookTitle_SVConnectFieldInput - create: BookTranslatedTitleBookTitle_SVCreateFieldInput - delete: BookTranslatedTitleBookTitle_SVDeleteFieldInput - disconnect: BookTranslatedTitleBookTitle_SVDisconnectFieldInput - update: BookTranslatedTitleBookTitle_SVUpdateConnectionInput - where: BookTranslatedTitleBookTitle_SVConnectionWhere - } - - input BookTranslatedTitleConnectInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENConnectFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVConnectFieldInput - } - - type BookTranslatedTitleConnection { - edges: [BookTranslatedTitleRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input BookTranslatedTitleConnectionWhere { - BookTitle_EN: BookTranslatedTitleBookTitle_ENConnectionWhere - BookTitle_SV: BookTranslatedTitleBookTitle_SVConnectionWhere - } - - input BookTranslatedTitleCreateFieldInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENCreateFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVCreateFieldInput - } - - input BookTranslatedTitleCreateInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVFieldInput - } - - input BookTranslatedTitleDeleteInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENDeleteFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVDeleteFieldInput - } - - input BookTranslatedTitleDisconnectInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENDisconnectFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVDisconnectFieldInput - } - - type BookTranslatedTitleRelationship { - cursor: String! - node: BookTitle! - } - - input BookTranslatedTitleUpdateInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENUpdateFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVUpdateFieldInput - } - - input BookUpdateInput { - isbn: String - originalTitle: String - translatedTitle: BookTranslatedTitleUpdateInput - } - - input BookWhere { - AND: [BookWhere!] - NOT: BookWhere - OR: [BookWhere!] - isbn: String - isbn_CONTAINS: String - isbn_ENDS_WITH: String - isbn_IN: [String!] - isbn_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_STARTS_WITH: String - originalTitle: String - originalTitle_CONTAINS: String - originalTitle_ENDS_WITH: String - originalTitle_IN: [String!] - originalTitle_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_STARTS_WITH: String - translatedTitleConnection: BookTranslatedTitleConnectionWhere - translatedTitleConnection_NOT: BookTranslatedTitleConnectionWhere - } - - type BooksConnection { - edges: [BookEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateBookTitleEnsMutationResponse { - bookTitleEns: [BookTitle_EN!]! - info: CreateInfo! - } - - type CreateBookTitleSvsMutationResponse { - bookTitleSvs: [BookTitle_SV!]! - info: CreateInfo! - } - - type CreateBooksMutationResponse { - books: [Book!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createBookTitleEns(input: [BookTitle_ENCreateInput!]!): CreateBookTitleEnsMutationResponse! - createBookTitleSvs(input: [BookTitle_SVCreateInput!]!): CreateBookTitleSvsMutationResponse! - createBooks(input: [BookCreateInput!]!): CreateBooksMutationResponse! - deleteBookTitleEns(delete: BookTitle_ENDeleteInput, where: BookTitle_ENWhere): DeleteInfo! - deleteBookTitleSvs(delete: BookTitle_SVDeleteInput, where: BookTitle_SVWhere): DeleteInfo! - deleteBooks(delete: BookDeleteInput, where: BookWhere): DeleteInfo! - updateBookTitleEns(connect: BookTitle_ENConnectInput, create: BookTitle_ENRelationInput, delete: BookTitle_ENDeleteInput, disconnect: BookTitle_ENDisconnectInput, update: BookTitle_ENUpdateInput, where: BookTitle_ENWhere): UpdateBookTitleEnsMutationResponse! - updateBookTitleSvs(connect: BookTitle_SVConnectInput, create: BookTitle_SVRelationInput, delete: BookTitle_SVDeleteInput, disconnect: BookTitle_SVDisconnectInput, update: BookTitle_SVUpdateInput, where: BookTitle_SVWhere): UpdateBookTitleSvsMutationResponse! - updateBooks(connect: BookConnectInput, create: BookRelationInput, delete: BookDeleteInput, disconnect: BookDisconnectInput, update: BookUpdateInput, where: BookWhere): UpdateBooksMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - bookTitleEns(options: BookTitle_ENOptions, where: BookTitle_ENWhere): [BookTitle_EN!]! - bookTitleEnsAggregate(where: BookTitle_ENWhere): BookTitle_ENAggregateSelection! - bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort], where: BookTitle_ENWhere): BookTitleEnsConnection! - bookTitleSvs(options: BookTitle_SVOptions, where: BookTitle_SVWhere): [BookTitle_SV!]! - bookTitleSvsAggregate(where: BookTitle_SVWhere): BookTitle_SVAggregateSelection! - bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort], where: BookTitle_SVWhere): BookTitleSvsConnection! - books(options: BookOptions, where: BookWhere): [Book!]! - booksAggregate(where: BookWhere): BookAggregateSelection! - booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateBookTitleEnsMutationResponse { - bookTitleEns: [BookTitle_EN!]! - info: UpdateInfo! - } - - type UpdateBookTitleSvsMutationResponse { - bookTitleSvs: [BookTitle_SV!]! - info: UpdateInfo! - } - - type UpdateBooksMutationResponse { - books: [Book!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Book { + isbn: String! + originalTitle: String! + translatedTitle(directed: Boolean = true, options: QueryOptions, where: BookTitleWhere): BookTitle + translatedTitleConnection(after: String, directed: Boolean = true, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! +} + +type BookAggregateSelection { + count: Int! + isbn: StringAggregateSelectionNonNullable! + originalTitle: StringAggregateSelectionNonNullable! +} + +input BookConnectInput { + translatedTitle: BookTranslatedTitleConnectInput +} + +input BookConnectWhere { + node: BookWhere! +} + +input BookCreateInput { + isbn: String! + originalTitle: String! + translatedTitle: BookTranslatedTitleCreateInput +} + +input BookDeleteInput { + translatedTitle: BookTranslatedTitleDeleteInput +} + +input BookDisconnectInput { + translatedTitle: BookTranslatedTitleDisconnectInput +} + +type BookEdge { + cursor: String! + node: Book! +} + +input BookOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BookSort!] +} + +input BookRelationInput { + translatedTitle: BookTranslatedTitleCreateFieldInput +} + +\\"\\"\\" +Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. +\\"\\"\\" +input BookSort { + isbn: SortDirection + originalTitle: SortDirection +} + +union BookTitle = BookTitle_EN | BookTitle_SV + +type BookTitleEnsConnection { + edges: [BookTitle_ENEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type BookTitleSvsConnection { + edges: [BookTitle_SVEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input BookTitleWhere { + BookTitle_EN: BookTitle_ENWhere + BookTitle_SV: BookTitle_SVWhere +} + +type BookTitle_EN { + book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! + bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_ENBookBookAggregationSelection + bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! + value: String! +} + +type BookTitle_ENAggregateSelection { + count: Int! + value: StringAggregateSelectionNonNullable! +} + +input BookTitle_ENBookAggregateInput { + AND: [BookTitle_ENBookAggregateInput!] + NOT: BookTitle_ENBookAggregateInput + OR: [BookTitle_ENBookAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: BookTitle_ENBookNodeAggregationWhereInput +} + +type BookTitle_ENBookBookAggregationSelection { + count: Int! + node: BookTitle_ENBookBookNodeAggregateSelection +} + +type BookTitle_ENBookBookNodeAggregateSelection { + isbn: StringAggregateSelectionNonNullable! + originalTitle: StringAggregateSelectionNonNullable! +} + +input BookTitle_ENBookConnectFieldInput { + connect: BookConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: BookConnectWhere +} + +type BookTitle_ENBookConnection { + edges: [BookTitle_ENBookRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input BookTitle_ENBookConnectionSort { + node: BookSort +} + +input BookTitle_ENBookConnectionWhere { + AND: [BookTitle_ENBookConnectionWhere!] + NOT: BookTitle_ENBookConnectionWhere + OR: [BookTitle_ENBookConnectionWhere!] + node: BookWhere + node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input BookTitle_ENBookCreateFieldInput { + node: BookCreateInput! +} + +input BookTitle_ENBookDeleteFieldInput { + delete: BookDeleteInput + where: BookTitle_ENBookConnectionWhere +} + +input BookTitle_ENBookDisconnectFieldInput { + disconnect: BookDisconnectInput + where: BookTitle_ENBookConnectionWhere +} + +input BookTitle_ENBookFieldInput { + connect: BookTitle_ENBookConnectFieldInput + create: BookTitle_ENBookCreateFieldInput +} + +input BookTitle_ENBookNodeAggregationWhereInput { + AND: [BookTitle_ENBookNodeAggregationWhereInput!] + NOT: BookTitle_ENBookNodeAggregationWhereInput + OR: [BookTitle_ENBookNodeAggregationWhereInput!] + isbn_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_LENGTH_EQUAL: Float + isbn_AVERAGE_LENGTH_GT: Float + isbn_AVERAGE_LENGTH_GTE: Float + isbn_AVERAGE_LENGTH_LT: Float + isbn_AVERAGE_LENGTH_LTE: Float + isbn_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_LENGTH_EQUAL: Int + isbn_LONGEST_LENGTH_GT: Int + isbn_LONGEST_LENGTH_GTE: Int + isbn_LONGEST_LENGTH_LT: Int + isbn_LONGEST_LENGTH_LTE: Int + isbn_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_LENGTH_EQUAL: Int + isbn_SHORTEST_LENGTH_GT: Int + isbn_SHORTEST_LENGTH_GTE: Int + isbn_SHORTEST_LENGTH_LT: Int + isbn_SHORTEST_LENGTH_LTE: Int + isbn_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_LENGTH_EQUAL: Float + originalTitle_AVERAGE_LENGTH_GT: Float + originalTitle_AVERAGE_LENGTH_GTE: Float + originalTitle_AVERAGE_LENGTH_LT: Float + originalTitle_AVERAGE_LENGTH_LTE: Float + originalTitle_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_LENGTH_EQUAL: Int + originalTitle_LONGEST_LENGTH_GT: Int + originalTitle_LONGEST_LENGTH_GTE: Int + originalTitle_LONGEST_LENGTH_LT: Int + originalTitle_LONGEST_LENGTH_LTE: Int + originalTitle_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_LENGTH_EQUAL: Int + originalTitle_SHORTEST_LENGTH_GT: Int + originalTitle_SHORTEST_LENGTH_GTE: Int + originalTitle_SHORTEST_LENGTH_LT: Int + originalTitle_SHORTEST_LENGTH_LTE: Int + originalTitle_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type BookTitle_ENBookRelationship { + cursor: String! + node: Book! +} + +input BookTitle_ENBookUpdateConnectionInput { + node: BookUpdateInput +} + +input BookTitle_ENBookUpdateFieldInput { + connect: BookTitle_ENBookConnectFieldInput + create: BookTitle_ENBookCreateFieldInput + delete: BookTitle_ENBookDeleteFieldInput + disconnect: BookTitle_ENBookDisconnectFieldInput + update: BookTitle_ENBookUpdateConnectionInput + where: BookTitle_ENBookConnectionWhere +} + +input BookTitle_ENConnectInput { + book: BookTitle_ENBookConnectFieldInput +} + +input BookTitle_ENConnectWhere { + node: BookTitle_ENWhere! +} + +input BookTitle_ENCreateInput { + book: BookTitle_ENBookFieldInput + value: String! +} + +input BookTitle_ENDeleteInput { + book: BookTitle_ENBookDeleteFieldInput +} + +input BookTitle_ENDisconnectInput { + book: BookTitle_ENBookDisconnectFieldInput +} + +type BookTitle_ENEdge { + cursor: String! + node: BookTitle_EN! +} + +input BookTitle_ENOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BookTitle_ENSort objects to sort BookTitleEns by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BookTitle_ENSort!] +} + +input BookTitle_ENRelationInput { + book: BookTitle_ENBookCreateFieldInput +} + +\\"\\"\\" +Fields to sort BookTitleEns by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_ENSort object. +\\"\\"\\" +input BookTitle_ENSort { + value: SortDirection +} + +input BookTitle_ENUpdateInput { + book: BookTitle_ENBookUpdateFieldInput + value: String +} + +input BookTitle_ENWhere { + AND: [BookTitle_ENWhere!] + NOT: BookTitle_ENWhere + OR: [BookTitle_ENWhere!] + book: BookWhere + bookAggregate: BookTitle_ENBookAggregateInput + bookConnection: BookTitle_ENBookConnectionWhere + bookConnection_NOT: BookTitle_ENBookConnectionWhere + book_NOT: BookWhere + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String!] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +} + +type BookTitle_SV { + book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! + bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_SVBookBookAggregationSelection + bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! + value: String! +} + +type BookTitle_SVAggregateSelection { + count: Int! + value: StringAggregateSelectionNonNullable! +} + +input BookTitle_SVBookAggregateInput { + AND: [BookTitle_SVBookAggregateInput!] + NOT: BookTitle_SVBookAggregateInput + OR: [BookTitle_SVBookAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: BookTitle_SVBookNodeAggregationWhereInput +} + +type BookTitle_SVBookBookAggregationSelection { + count: Int! + node: BookTitle_SVBookBookNodeAggregateSelection +} + +type BookTitle_SVBookBookNodeAggregateSelection { + isbn: StringAggregateSelectionNonNullable! + originalTitle: StringAggregateSelectionNonNullable! +} + +input BookTitle_SVBookConnectFieldInput { + connect: BookConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: BookConnectWhere +} + +type BookTitle_SVBookConnection { + edges: [BookTitle_SVBookRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input BookTitle_SVBookConnectionSort { + node: BookSort +} + +input BookTitle_SVBookConnectionWhere { + AND: [BookTitle_SVBookConnectionWhere!] + NOT: BookTitle_SVBookConnectionWhere + OR: [BookTitle_SVBookConnectionWhere!] + node: BookWhere + node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input BookTitle_SVBookCreateFieldInput { + node: BookCreateInput! +} + +input BookTitle_SVBookDeleteFieldInput { + delete: BookDeleteInput + where: BookTitle_SVBookConnectionWhere +} + +input BookTitle_SVBookDisconnectFieldInput { + disconnect: BookDisconnectInput + where: BookTitle_SVBookConnectionWhere +} + +input BookTitle_SVBookFieldInput { + connect: BookTitle_SVBookConnectFieldInput + create: BookTitle_SVBookCreateFieldInput +} + +input BookTitle_SVBookNodeAggregationWhereInput { + AND: [BookTitle_SVBookNodeAggregationWhereInput!] + NOT: BookTitle_SVBookNodeAggregationWhereInput + OR: [BookTitle_SVBookNodeAggregationWhereInput!] + isbn_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_LENGTH_EQUAL: Float + isbn_AVERAGE_LENGTH_GT: Float + isbn_AVERAGE_LENGTH_GTE: Float + isbn_AVERAGE_LENGTH_LT: Float + isbn_AVERAGE_LENGTH_LTE: Float + isbn_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_LENGTH_EQUAL: Int + isbn_LONGEST_LENGTH_GT: Int + isbn_LONGEST_LENGTH_GTE: Int + isbn_LONGEST_LENGTH_LT: Int + isbn_LONGEST_LENGTH_LTE: Int + isbn_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_LENGTH_EQUAL: Int + isbn_SHORTEST_LENGTH_GT: Int + isbn_SHORTEST_LENGTH_GTE: Int + isbn_SHORTEST_LENGTH_LT: Int + isbn_SHORTEST_LENGTH_LTE: Int + isbn_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_LENGTH_EQUAL: Float + originalTitle_AVERAGE_LENGTH_GT: Float + originalTitle_AVERAGE_LENGTH_GTE: Float + originalTitle_AVERAGE_LENGTH_LT: Float + originalTitle_AVERAGE_LENGTH_LTE: Float + originalTitle_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_LENGTH_EQUAL: Int + originalTitle_LONGEST_LENGTH_GT: Int + originalTitle_LONGEST_LENGTH_GTE: Int + originalTitle_LONGEST_LENGTH_LT: Int + originalTitle_LONGEST_LENGTH_LTE: Int + originalTitle_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_LENGTH_EQUAL: Int + originalTitle_SHORTEST_LENGTH_GT: Int + originalTitle_SHORTEST_LENGTH_GTE: Int + originalTitle_SHORTEST_LENGTH_LT: Int + originalTitle_SHORTEST_LENGTH_LTE: Int + originalTitle_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type BookTitle_SVBookRelationship { + cursor: String! + node: Book! +} + +input BookTitle_SVBookUpdateConnectionInput { + node: BookUpdateInput +} + +input BookTitle_SVBookUpdateFieldInput { + connect: BookTitle_SVBookConnectFieldInput + create: BookTitle_SVBookCreateFieldInput + delete: BookTitle_SVBookDeleteFieldInput + disconnect: BookTitle_SVBookDisconnectFieldInput + update: BookTitle_SVBookUpdateConnectionInput + where: BookTitle_SVBookConnectionWhere +} + +input BookTitle_SVConnectInput { + book: BookTitle_SVBookConnectFieldInput +} + +input BookTitle_SVConnectWhere { + node: BookTitle_SVWhere! +} + +input BookTitle_SVCreateInput { + book: BookTitle_SVBookFieldInput + value: String! +} + +input BookTitle_SVDeleteInput { + book: BookTitle_SVBookDeleteFieldInput +} + +input BookTitle_SVDisconnectInput { + book: BookTitle_SVBookDisconnectFieldInput +} + +type BookTitle_SVEdge { + cursor: String! + node: BookTitle_SV! +} + +input BookTitle_SVOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BookTitle_SVSort objects to sort BookTitleSvs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BookTitle_SVSort!] +} + +input BookTitle_SVRelationInput { + book: BookTitle_SVBookCreateFieldInput +} + +\\"\\"\\" +Fields to sort BookTitleSvs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_SVSort object. +\\"\\"\\" +input BookTitle_SVSort { + value: SortDirection +} + +input BookTitle_SVUpdateInput { + book: BookTitle_SVBookUpdateFieldInput + value: String +} + +input BookTitle_SVWhere { + AND: [BookTitle_SVWhere!] + NOT: BookTitle_SVWhere + OR: [BookTitle_SVWhere!] + book: BookWhere + bookAggregate: BookTitle_SVBookAggregateInput + bookConnection: BookTitle_SVBookConnectionWhere + bookConnection_NOT: BookTitle_SVBookConnectionWhere + book_NOT: BookWhere + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String!] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String +} + +input BookTranslatedTitleBookTitle_ENConnectFieldInput { + connect: BookTitle_ENConnectInput + where: BookTitle_ENConnectWhere +} + +input BookTranslatedTitleBookTitle_ENConnectionWhere { + AND: [BookTranslatedTitleBookTitle_ENConnectionWhere!] + NOT: BookTranslatedTitleBookTitle_ENConnectionWhere + OR: [BookTranslatedTitleBookTitle_ENConnectionWhere!] + node: BookTitle_ENWhere + node_NOT: BookTitle_ENWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input BookTranslatedTitleBookTitle_ENCreateFieldInput { + node: BookTitle_ENCreateInput! +} + +input BookTranslatedTitleBookTitle_ENDeleteFieldInput { + delete: BookTitle_ENDeleteInput + where: BookTranslatedTitleBookTitle_ENConnectionWhere +} + +input BookTranslatedTitleBookTitle_ENDisconnectFieldInput { + disconnect: BookTitle_ENDisconnectInput + where: BookTranslatedTitleBookTitle_ENConnectionWhere +} + +input BookTranslatedTitleBookTitle_ENFieldInput { + connect: BookTranslatedTitleBookTitle_ENConnectFieldInput + create: BookTranslatedTitleBookTitle_ENCreateFieldInput +} + +input BookTranslatedTitleBookTitle_ENUpdateConnectionInput { + node: BookTitle_ENUpdateInput +} + +input BookTranslatedTitleBookTitle_ENUpdateFieldInput { + connect: BookTranslatedTitleBookTitle_ENConnectFieldInput + create: BookTranslatedTitleBookTitle_ENCreateFieldInput + delete: BookTranslatedTitleBookTitle_ENDeleteFieldInput + disconnect: BookTranslatedTitleBookTitle_ENDisconnectFieldInput + update: BookTranslatedTitleBookTitle_ENUpdateConnectionInput + where: BookTranslatedTitleBookTitle_ENConnectionWhere +} + +input BookTranslatedTitleBookTitle_SVConnectFieldInput { + connect: BookTitle_SVConnectInput + where: BookTitle_SVConnectWhere +} + +input BookTranslatedTitleBookTitle_SVConnectionWhere { + AND: [BookTranslatedTitleBookTitle_SVConnectionWhere!] + NOT: BookTranslatedTitleBookTitle_SVConnectionWhere + OR: [BookTranslatedTitleBookTitle_SVConnectionWhere!] + node: BookTitle_SVWhere + node_NOT: BookTitle_SVWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input BookTranslatedTitleBookTitle_SVCreateFieldInput { + node: BookTitle_SVCreateInput! +} + +input BookTranslatedTitleBookTitle_SVDeleteFieldInput { + delete: BookTitle_SVDeleteInput + where: BookTranslatedTitleBookTitle_SVConnectionWhere +} + +input BookTranslatedTitleBookTitle_SVDisconnectFieldInput { + disconnect: BookTitle_SVDisconnectInput + where: BookTranslatedTitleBookTitle_SVConnectionWhere +} + +input BookTranslatedTitleBookTitle_SVFieldInput { + connect: BookTranslatedTitleBookTitle_SVConnectFieldInput + create: BookTranslatedTitleBookTitle_SVCreateFieldInput +} + +input BookTranslatedTitleBookTitle_SVUpdateConnectionInput { + node: BookTitle_SVUpdateInput +} + +input BookTranslatedTitleBookTitle_SVUpdateFieldInput { + connect: BookTranslatedTitleBookTitle_SVConnectFieldInput + create: BookTranslatedTitleBookTitle_SVCreateFieldInput + delete: BookTranslatedTitleBookTitle_SVDeleteFieldInput + disconnect: BookTranslatedTitleBookTitle_SVDisconnectFieldInput + update: BookTranslatedTitleBookTitle_SVUpdateConnectionInput + where: BookTranslatedTitleBookTitle_SVConnectionWhere +} + +input BookTranslatedTitleConnectInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENConnectFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVConnectFieldInput +} + +type BookTranslatedTitleConnection { + edges: [BookTranslatedTitleRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input BookTranslatedTitleConnectionWhere { + BookTitle_EN: BookTranslatedTitleBookTitle_ENConnectionWhere + BookTitle_SV: BookTranslatedTitleBookTitle_SVConnectionWhere +} + +input BookTranslatedTitleCreateFieldInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENCreateFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVCreateFieldInput +} + +input BookTranslatedTitleCreateInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVFieldInput +} + +input BookTranslatedTitleDeleteInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENDeleteFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVDeleteFieldInput +} + +input BookTranslatedTitleDisconnectInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENDisconnectFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVDisconnectFieldInput +} + +type BookTranslatedTitleRelationship { + cursor: String! + node: BookTitle! +} + +input BookTranslatedTitleUpdateInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENUpdateFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVUpdateFieldInput +} + +input BookUpdateInput { + isbn: String + originalTitle: String + translatedTitle: BookTranslatedTitleUpdateInput +} + +input BookWhere { + AND: [BookWhere!] + NOT: BookWhere + OR: [BookWhere!] + isbn: String + isbn_CONTAINS: String + isbn_ENDS_WITH: String + isbn_IN: [String!] + isbn_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_STARTS_WITH: String + originalTitle: String + originalTitle_CONTAINS: String + originalTitle_ENDS_WITH: String + originalTitle_IN: [String!] + originalTitle_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_STARTS_WITH: String + translatedTitleConnection: BookTranslatedTitleConnectionWhere + translatedTitleConnection_NOT: BookTranslatedTitleConnectionWhere +} + +type BooksConnection { + edges: [BookEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateBookTitleEnsMutationResponse { + bookTitleEns: [BookTitle_EN!]! + info: CreateInfo! +} + +type CreateBookTitleSvsMutationResponse { + bookTitleSvs: [BookTitle_SV!]! + info: CreateInfo! +} + +type CreateBooksMutationResponse { + books: [Book!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createBookTitleEns(input: [BookTitle_ENCreateInput!]!): CreateBookTitleEnsMutationResponse! + createBookTitleSvs(input: [BookTitle_SVCreateInput!]!): CreateBookTitleSvsMutationResponse! + createBooks(input: [BookCreateInput!]!): CreateBooksMutationResponse! + deleteBookTitleEns(delete: BookTitle_ENDeleteInput, where: BookTitle_ENWhere): DeleteInfo! + deleteBookTitleSvs(delete: BookTitle_SVDeleteInput, where: BookTitle_SVWhere): DeleteInfo! + deleteBooks(delete: BookDeleteInput, where: BookWhere): DeleteInfo! + updateBookTitleEns(connect: BookTitle_ENConnectInput, create: BookTitle_ENRelationInput, delete: BookTitle_ENDeleteInput, disconnect: BookTitle_ENDisconnectInput, update: BookTitle_ENUpdateInput, where: BookTitle_ENWhere): UpdateBookTitleEnsMutationResponse! + updateBookTitleSvs(connect: BookTitle_SVConnectInput, create: BookTitle_SVRelationInput, delete: BookTitle_SVDeleteInput, disconnect: BookTitle_SVDisconnectInput, update: BookTitle_SVUpdateInput, where: BookTitle_SVWhere): UpdateBookTitleSvsMutationResponse! + updateBooks(connect: BookConnectInput, create: BookRelationInput, delete: BookDeleteInput, disconnect: BookDisconnectInput, update: BookUpdateInput, where: BookWhere): UpdateBooksMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + bookTitleEns(options: BookTitle_ENOptions, where: BookTitle_ENWhere): [BookTitle_EN!]! + bookTitleEnsAggregate(where: BookTitle_ENWhere): BookTitle_ENAggregateSelection! + bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort], where: BookTitle_ENWhere): BookTitleEnsConnection! + bookTitleSvs(options: BookTitle_SVOptions, where: BookTitle_SVWhere): [BookTitle_SV!]! + bookTitleSvsAggregate(where: BookTitle_SVWhere): BookTitle_SVAggregateSelection! + bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort], where: BookTitle_SVWhere): BookTitleSvsConnection! + books(options: BookOptions, where: BookWhere): [Book!]! + booksAggregate(where: BookWhere): BookAggregateSelection! + booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateBookTitleEnsMutationResponse { + bookTitleEns: [BookTitle_EN!]! + info: UpdateInfo! +} + +type UpdateBookTitleSvsMutationResponse { + bookTitleSvs: [BookTitle_SV!]! + info: UpdateInfo! +} + +type UpdateBooksMutationResponse { + books: [Book!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 7da90cb885..38ccdc4392 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -45,380 +45,372 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - interface FOLLOWS { - \\"\\"\\"\\"\\"\\" - since: DateTime! - } - - input FOLLOWSSort { - since: SortDirection - } - - input FOLLOWSWhere { - AND: [FOLLOWSWhere!] - NOT: FOLLOWSWhere - OR: [FOLLOWSWhere!] - since: DateTime - since_GT: DateTime - since_GTE: DateTime - since_IN: [DateTime!] - since_LT: DateTime - since_LTE: DateTime - since_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - since_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Profile { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - userName: String! - } - - input ProfileConnectInput { - _on: ProfileImplementationsConnectInput - } - - input ProfileConnectWhere { - node: ProfileWhere! - } - - input ProfileCreateInput { - User: UserCreateInput - } - - input ProfileDeleteInput { - _on: ProfileImplementationsDeleteInput - } - - input ProfileDisconnectInput { - _on: ProfileImplementationsDisconnectInput - } - - input ProfileImplementationsConnectInput { - User: [UserConnectInput!] - } - - input ProfileImplementationsDeleteInput { - User: [UserDeleteInput!] - } - - input ProfileImplementationsDisconnectInput { - User: [UserDisconnectInput!] - } - - input ProfileImplementationsUpdateInput { - User: UserUpdateInput - } - - input ProfileImplementationsWhere { - User: UserWhere - } - - input ProfileOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more ProfileSort objects to sort Profiles by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [ProfileSort] - } - - \\"\\"\\" - Fields to sort Profiles by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProfileSort object. - \\"\\"\\" - input ProfileSort { - id: SortDirection - userName: SortDirection - } - - input ProfileUpdateInput { - _on: ProfileImplementationsUpdateInput - userName: String - } - - input ProfileWhere { - _on: ProfileImplementationsWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - userName: String - userName_CONTAINS: String - userName_ENDS_WITH: String - userName_IN: [String!] - userName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_STARTS_WITH: String - } - - type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User implements Profile { - \\"\\"\\"\\"\\"\\" - following(directed: Boolean = true, options: ProfileOptions, where: ProfileWhere): [Profile!]! - followingConnection(after: String, directed: Boolean = true, first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - userName: String! - } - - type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - userName: StringAggregateSelectionNonNullable! - } - - input UserConnectInput { - following: [UserFollowingConnectFieldInput!] - } - - input UserCreateInput { - following: UserFollowingFieldInput - userName: String! - } - - input UserDeleteInput { - following: [UserFollowingDeleteFieldInput!] - } - - input UserDisconnectInput { - following: [UserFollowingDisconnectFieldInput!] - } - - type UserEdge { - cursor: String! - node: User! - } - - input UserFollowingConnectFieldInput { - connect: ProfileConnectInput - where: ProfileConnectWhere - } - - type UserFollowingConnection { - edges: [UserFollowingRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserFollowingConnectionSort { - edge: FOLLOWSSort - node: ProfileSort - } - - input UserFollowingConnectionWhere { - AND: [UserFollowingConnectionWhere!] - NOT: UserFollowingConnectionWhere - OR: [UserFollowingConnectionWhere!] - edge: FOLLOWSWhere - edge_NOT: FOLLOWSWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProfileWhere - node_NOT: ProfileWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input UserFollowingCreateFieldInput { - node: ProfileCreateInput! - } - - input UserFollowingDeleteFieldInput { - delete: ProfileDeleteInput - where: UserFollowingConnectionWhere - } - - input UserFollowingDisconnectFieldInput { - disconnect: ProfileDisconnectInput - where: UserFollowingConnectionWhere - } - - input UserFollowingFieldInput { - connect: [UserFollowingConnectFieldInput!] - create: [UserFollowingCreateFieldInput!] - } - - type UserFollowingRelationship implements FOLLOWS { - cursor: String! - node: Profile! - \\"\\"\\"\\"\\"\\" - since: DateTime! - } - - input UserFollowingUpdateConnectionInput { - node: ProfileUpdateInput - } - - input UserFollowingUpdateFieldInput { - connect: [UserFollowingConnectFieldInput!] - create: [UserFollowingCreateFieldInput!] - delete: [UserFollowingDeleteFieldInput!] - disconnect: [UserFollowingDisconnectFieldInput!] - update: UserFollowingUpdateConnectionInput - where: UserFollowingConnectionWhere - } - - 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!] - } - - input UserRelationInput { - following: [UserFollowingCreateFieldInput!] - } - - \\"\\"\\" - 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 { - id: SortDirection - userName: SortDirection - } - - input UserUpdateInput { - following: [UserFollowingUpdateFieldInput!] - userName: String - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - followingConnection: UserFollowingConnectionWhere @deprecated(reason: \\"Use \`followingConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserFollowingConnections match this filter - \\"\\"\\" - followingConnection_ALL: UserFollowingConnectionWhere - \\"\\"\\" - Return Users where none of the related UserFollowingConnections match this filter - \\"\\"\\" - followingConnection_NONE: UserFollowingConnectionWhere - followingConnection_NOT: UserFollowingConnectionWhere @deprecated(reason: \\"Use \`followingConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserFollowingConnections match this filter - \\"\\"\\" - followingConnection_SINGLE: UserFollowingConnectionWhere - \\"\\"\\" - Return Users where some of the related UserFollowingConnections match this filter - \\"\\"\\" - followingConnection_SOME: UserFollowingConnectionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - userName: String - userName_CONTAINS: String - userName_ENDS_WITH: String - userName_IN: [String!] - userName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +interface FOLLOWS { + since: DateTime! +} + +input FOLLOWSSort { + since: SortDirection +} + +input FOLLOWSWhere { + AND: [FOLLOWSWhere!] + NOT: FOLLOWSWhere + OR: [FOLLOWSWhere!] + since: DateTime + since_GT: DateTime + since_GTE: DateTime + since_IN: [DateTime!] + since_LT: DateTime + since_LTE: DateTime + since_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + since_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +interface Profile { + id: ID! + userName: String! +} + +input ProfileConnectInput { + _on: ProfileImplementationsConnectInput +} + +input ProfileConnectWhere { + node: ProfileWhere! +} + +input ProfileCreateInput { + User: UserCreateInput +} + +input ProfileDeleteInput { + _on: ProfileImplementationsDeleteInput +} + +input ProfileDisconnectInput { + _on: ProfileImplementationsDisconnectInput +} + +input ProfileImplementationsConnectInput { + User: [UserConnectInput!] +} + +input ProfileImplementationsDeleteInput { + User: [UserDeleteInput!] +} + +input ProfileImplementationsDisconnectInput { + User: [UserDisconnectInput!] +} + +input ProfileImplementationsUpdateInput { + User: UserUpdateInput +} + +input ProfileImplementationsWhere { + User: UserWhere +} + +input ProfileOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ProfileSort objects to sort Profiles by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ProfileSort] +} + +\\"\\"\\" +Fields to sort Profiles by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProfileSort object. +\\"\\"\\" +input ProfileSort { + id: SortDirection + userName: SortDirection +} + +input ProfileUpdateInput { + _on: ProfileImplementationsUpdateInput + userName: String +} + +input ProfileWhere { + _on: ProfileImplementationsWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + userName: String + userName_CONTAINS: String + userName_ENDS_WITH: String + userName_IN: [String!] + userName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_STARTS_WITH: String +} + +type Query { + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User implements Profile { + following(directed: Boolean = true, options: ProfileOptions, where: ProfileWhere): [Profile!]! + followingConnection(after: String, directed: Boolean = true, first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! + id: ID! + userName: String! +} + +type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + userName: StringAggregateSelectionNonNullable! +} + +input UserConnectInput { + following: [UserFollowingConnectFieldInput!] +} + +input UserCreateInput { + following: UserFollowingFieldInput + userName: String! +} + +input UserDeleteInput { + following: [UserFollowingDeleteFieldInput!] +} + +input UserDisconnectInput { + following: [UserFollowingDisconnectFieldInput!] +} + +type UserEdge { + cursor: String! + node: User! +} + +input UserFollowingConnectFieldInput { + connect: ProfileConnectInput + where: ProfileConnectWhere +} + +type UserFollowingConnection { + edges: [UserFollowingRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserFollowingConnectionSort { + edge: FOLLOWSSort + node: ProfileSort +} + +input UserFollowingConnectionWhere { + AND: [UserFollowingConnectionWhere!] + NOT: UserFollowingConnectionWhere + OR: [UserFollowingConnectionWhere!] + edge: FOLLOWSWhere + edge_NOT: FOLLOWSWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProfileWhere + node_NOT: ProfileWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input UserFollowingCreateFieldInput { + node: ProfileCreateInput! +} + +input UserFollowingDeleteFieldInput { + delete: ProfileDeleteInput + where: UserFollowingConnectionWhere +} + +input UserFollowingDisconnectFieldInput { + disconnect: ProfileDisconnectInput + where: UserFollowingConnectionWhere +} + +input UserFollowingFieldInput { + connect: [UserFollowingConnectFieldInput!] + create: [UserFollowingCreateFieldInput!] +} + +type UserFollowingRelationship implements FOLLOWS { + cursor: String! + node: Profile! + since: DateTime! +} + +input UserFollowingUpdateConnectionInput { + node: ProfileUpdateInput +} + +input UserFollowingUpdateFieldInput { + connect: [UserFollowingConnectFieldInput!] + create: [UserFollowingCreateFieldInput!] + delete: [UserFollowingDeleteFieldInput!] + disconnect: [UserFollowingDisconnectFieldInput!] + update: UserFollowingUpdateConnectionInput + where: UserFollowingConnectionWhere +} + +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!] +} + +input UserRelationInput { + following: [UserFollowingCreateFieldInput!] +} + +\\"\\"\\" +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 { + id: SortDirection + userName: SortDirection +} + +input UserUpdateInput { + following: [UserFollowingUpdateFieldInput!] + userName: String +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + followingConnection: UserFollowingConnectionWhere @deprecated(reason: \\"Use \`followingConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserFollowingConnections match this filter + \\"\\"\\" + followingConnection_ALL: UserFollowingConnectionWhere + \\"\\"\\" + Return Users where none of the related UserFollowingConnections match this filter + \\"\\"\\" + followingConnection_NONE: UserFollowingConnectionWhere + followingConnection_NOT: UserFollowingConnectionWhere @deprecated(reason: \\"Use \`followingConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserFollowingConnections match this filter + \\"\\"\\" + followingConnection_SINGLE: UserFollowingConnectionWhere + \\"\\"\\" + Return Users where some of the related UserFollowingConnections match this filter + \\"\\"\\" + followingConnection_SOME: UserFollowingConnectionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + userName: String + userName_CONTAINS: String + userName_ENDS_WITH: String + userName_IN: [String!] + userName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 19bcf8bcc5..97eb86ecb5 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -39,361 +39,355 @@ describe("Relationship nested operations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - } - - \\"\\"\\" - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - } - - input PersonCreateInput { - name: String - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - id: SortDirection - name: SortDirection - } - - input PersonUpdateInput { - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! +} + +\\"\\"\\" +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + id: ID! + name: String +} + +type PersonAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! +} + +input PersonCreateInput { + name: String +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + id: SortDirection + name: SortDirection +} + +input PersonUpdateInput { + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); }); test("Single relationship to union with unique fields with no nested operation specified", async () => { @@ -417,365 +411,358 @@ describe("Relationship nested operations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! - } - - type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere - } - - input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Person! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - } - - 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 { - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - union Person = PersonOne | PersonTwo - - \\"\\"\\"\\"\\"\\" - type PersonOne { - \\"\\"\\"\\"\\"\\" - name: String - } - - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input PersonOneCreateInput { - name: String - } - - type PersonOneEdge { - cursor: String! - node: PersonOne! - } - - input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] - } - - \\"\\"\\" - Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. - \\"\\"\\" - input PersonOneSort { - name: SortDirection - } - - input PersonOneUpdateInput { - name: String - } - - input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type PersonTwo { - \\"\\"\\"\\"\\"\\" - nameTwo: String - } - - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! - } - - input PersonTwoCreateInput { - nameTwo: String - } - - type PersonTwoEdge { - cursor: String! - node: PersonTwo! - } - - input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] - } - - \\"\\"\\" - Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. - \\"\\"\\" - input PersonTwoSort { - nameTwo: SortDirection - } - - input PersonTwoUpdateInput { - nameTwo: String - } - - input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String - } - - type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! - } - - type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! +} + +type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere +} + +input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Person! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID +} + +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 { + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +union Person = PersonOne | PersonTwo + +type PersonOne { + name: String +} + +type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input PersonOneCreateInput { + name: String +} + +type PersonOneEdge { + cursor: String! + node: PersonOne! +} + +input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] +} + +\\"\\"\\" +Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. +\\"\\"\\" +input PersonOneSort { + name: SortDirection +} + +input PersonOneUpdateInput { + name: String +} + +input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type PersonTwo { + nameTwo: String +} + +type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! +} + +input PersonTwoCreateInput { + nameTwo: String +} + +type PersonTwoEdge { + cursor: String! + node: PersonTwo! +} + +input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] +} + +\\"\\"\\" +Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. +\\"\\"\\" +input PersonTwoSort { + nameTwo: SortDirection +} + +input PersonTwoUpdateInput { + nameTwo: String +} + +input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String +} + +type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! +} + +type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index dc891841e3..3e269e51d5 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -68,2423 +68,1220 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! - productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! - } - - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input GenreConnectInput { - product: [GenreProductConnectFieldInput!] - } - - input GenreConnectOrCreateWhere { - node: GenreUniqueWhere! - } - - input GenreConnectWhere { - node: GenreWhere! - } - - type GenreConnectedRelationships { - product: GenreProductConnectedRelationship - } - - input GenreCreateInput { - name: String! - product: GenreProductFieldInput - } - - type GenreCreatedEvent { - createdGenre: GenreEventPayload! - event: EventType! - timestamp: Float! - } - - input GenreDeleteInput { - product: [GenreProductDeleteFieldInput!] - } - - type GenreDeletedEvent { - deletedGenre: GenreEventPayload! - event: EventType! - timestamp: Float! - } - - input GenreDisconnectInput { - product: [GenreProductDisconnectFieldInput!] - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - type GenreEventPayload { - name: String! - } - - input GenreOnCreateInput { - name: String! - } - - 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!] - } - - input GenreProductConnectFieldInput { - connect: IProductConnectInput - where: IProductConnectWhere - } - - type GenreProductConnectedRelationship { - node: IProductEventPayload! - } - - type GenreProductConnection { - edges: [GenreProductRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input GenreProductConnectionSort { - node: IProductSort - } - - input GenreProductConnectionWhere { - AND: [GenreProductConnectionWhere!] - NOT: GenreProductConnectionWhere - OR: [GenreProductConnectionWhere!] - node: IProductWhere - node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input GenreProductCreateFieldInput { - node: IProductCreateInput! - } - - input GenreProductDeleteFieldInput { - delete: IProductDeleteInput - where: GenreProductConnectionWhere - } - - input GenreProductDisconnectFieldInput { - disconnect: IProductDisconnectInput - where: GenreProductConnectionWhere - } - - input GenreProductFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - } - - type GenreProductRelationship { - cursor: String! - node: IProduct! - } - - input GenreProductRelationshipSubscriptionWhere { - node: IProductSubscriptionWhere - } - - input GenreProductUpdateConnectionInput { - node: IProductUpdateInput - } - - input GenreProductUpdateFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - delete: [GenreProductDeleteFieldInput!] - disconnect: [GenreProductDisconnectFieldInput!] - update: GenreProductUpdateConnectionInput - where: GenreProductConnectionWhere - } - - input GenreRelationInput { - product: [GenreProductCreateFieldInput!] - } - - type GenreRelationshipCreatedEvent { - createdRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input GenreRelationshipCreatedSubscriptionWhere { - AND: [GenreRelationshipCreatedSubscriptionWhere!] - NOT: GenreRelationshipCreatedSubscriptionWhere - OR: [GenreRelationshipCreatedSubscriptionWhere!] - createdRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere - } - - type GenreRelationshipDeletedEvent { - deletedRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input GenreRelationshipDeletedSubscriptionWhere { - AND: [GenreRelationshipDeletedSubscriptionWhere!] - NOT: GenreRelationshipDeletedSubscriptionWhere - OR: [GenreRelationshipDeletedSubscriptionWhere!] - deletedRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere - } - - input GenreRelationshipsSubscriptionWhere { - product: GenreProductRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - name: SortDirection - } - - input GenreSubscriptionWhere { - AND: [GenreSubscriptionWhere!] - NOT: GenreSubscriptionWhere - OR: [GenreSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input GenreUniqueWhere { - name: String - } - - input GenreUpdateInput { - name: String - product: [GenreProductUpdateFieldInput!] - } - - type GenreUpdatedEvent { - event: EventType! - previousState: GenreEventPayload! - timestamp: Float! - updatedGenre: GenreEventPayload! - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_ALL: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_NONE: GenreProductConnectionWhere - productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SINGLE: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SOME: GenreProductConnectionWhere - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - interface INode { - \\"\\"\\"\\"\\"\\" - id: String! - } - - interface IProduct { - \\"\\"\\"\\"\\"\\" - genre: Genre! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input IProductConnectInput { - _on: IProductImplementationsConnectInput - } - - input IProductConnectWhere { - node: IProductWhere! - } - - input IProductCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input IProductDeleteInput { - _on: IProductImplementationsDeleteInput - } - - input IProductDisconnectInput { - _on: IProductImplementationsDisconnectInput - } - - interface IProductEventPayload { - id: String! - name: String! - } - - input IProductImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] - } - - input IProductImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] - } - - input IProductImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] - } - - input IProductImplementationsSubscriptionWhere { - Movie: MovieSubscriptionWhere - Series: SeriesSubscriptionWhere - } - - input IProductImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input IProductImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - input IProductOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [IProductSort] - } - - \\"\\"\\" - Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. - \\"\\"\\" - input IProductSort { - id: SortDirection - name: SortDirection - } - - input IProductSubscriptionWhere { - AND: [IProductSubscriptionWhere!] - NOT: IProductSubscriptionWhere - OR: [IProductSubscriptionWhere!] - _on: IProductImplementationsSubscriptionWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input IProductUpdateInput { - _on: IProductImplementationsUpdateInput - id: String - name: String - } - - input IProductWhere { - _on: IProductImplementationsWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"\\"\\"\\" - type Movie implements INode & IProduct { - \\"\\"\\"\\"\\"\\" - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type MovieAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - genre: MovieGenreConnectFieldInput - } - - input MovieConnectOrCreateInput { - genre: MovieGenreConnectOrCreateFieldInput - } - - type MovieConnectedRelationships { - genre: MovieGenreConnectedRelationship - } - - input MovieCreateInput { - genre: MovieGenreFieldInput - id: String! - name: String! - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - genre: MovieGenreDeleteFieldInput - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - genre: MovieGenreDisconnectFieldInput - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload implements IProductEventPayload { - id: String! - name: String! - } - - input MovieGenreAggregateInput { - AND: [MovieGenreAggregateInput!] - NOT: MovieGenreAggregateInput - OR: [MovieGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenreNodeAggregationWhereInput - } - - input MovieGenreConnectFieldInput { - connect: GenreConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere - } - - input MovieGenreConnectOrCreateFieldInput { - onCreate: MovieGenreConnectOrCreateFieldInputOnCreate! - where: GenreConnectOrCreateWhere! - } - - input MovieGenreConnectOrCreateFieldInputOnCreate { - node: GenreOnCreateInput! - } - - type MovieGenreConnectedRelationship { - node: GenreEventPayload! - } - - type MovieGenreConnection { - edges: [MovieGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieGenreConnectionSort { - node: GenreSort - } - - input MovieGenreConnectionWhere { - AND: [MovieGenreConnectionWhere!] - NOT: MovieGenreConnectionWhere - OR: [MovieGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieGenreCreateFieldInput { - node: GenreCreateInput! - } - - input MovieGenreDeleteFieldInput { - delete: GenreDeleteInput - where: MovieGenreConnectionWhere - } - - input MovieGenreDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: MovieGenreConnectionWhere - } - - input MovieGenreFieldInput { - connect: MovieGenreConnectFieldInput - connectOrCreate: MovieGenreConnectOrCreateFieldInput - create: MovieGenreCreateFieldInput - } - - type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection - } - - type MovieGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieGenreNodeAggregationWhereInput { - AND: [MovieGenreNodeAggregationWhereInput!] - NOT: MovieGenreNodeAggregationWhereInput - OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieGenreRelationship { - cursor: String! - node: Genre! - } - - input MovieGenreRelationshipSubscriptionWhere { - node: GenreSubscriptionWhere - } - - input MovieGenreUpdateConnectionInput { - node: GenreUpdateInput - } - - input MovieGenreUpdateFieldInput { - connect: MovieGenreConnectFieldInput - connectOrCreate: MovieGenreConnectOrCreateFieldInput - create: MovieGenreCreateFieldInput - delete: MovieGenreDeleteFieldInput - disconnect: MovieGenreDisconnectFieldInput - update: MovieGenreUpdateConnectionInput - where: MovieGenreConnectionWhere - } - - 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!] - } - - input MovieRelationInput { - genre: MovieGenreCreateFieldInput - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - genre: MovieGenreRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 - name: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input MovieUpdateInput { - genre: MovieGenreUpdateFieldInput - id: String - name: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genre: GenreWhere - genreAggregate: MovieGenreAggregateInput - genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, connectOrCreate: SeriesConnectOrCreateInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements INode & IProduct { - \\"\\"\\"\\"\\"\\" - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input SeriesConnectInput { - genre: SeriesGenreConnectFieldInput - } - - input SeriesConnectOrCreateInput { - genre: SeriesGenreConnectOrCreateFieldInput - } - - type SeriesConnectedRelationships { - genre: SeriesGenreConnectedRelationship - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - genre: SeriesGenreFieldInput - id: String! - name: String! - } - - type SeriesCreatedEvent { - createdSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! - } - - input SeriesDeleteInput { - genre: SeriesGenreDeleteFieldInput - } - - type SeriesDeletedEvent { - deletedSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! - } - - input SeriesDisconnectInput { - genre: SeriesGenreDisconnectFieldInput - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - type SeriesEventPayload implements IProductEventPayload { - id: String! - name: String! - } - - input SeriesGenreAggregateInput { - AND: [SeriesGenreAggregateInput!] - NOT: SeriesGenreAggregateInput - OR: [SeriesGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesGenreNodeAggregationWhereInput - } - - input SeriesGenreConnectFieldInput { - connect: GenreConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere - } - - input SeriesGenreConnectOrCreateFieldInput { - onCreate: SeriesGenreConnectOrCreateFieldInputOnCreate! - where: GenreConnectOrCreateWhere! - } - - input SeriesGenreConnectOrCreateFieldInputOnCreate { - node: GenreOnCreateInput! - } - - type SeriesGenreConnectedRelationship { - node: GenreEventPayload! - } - - type SeriesGenreConnection { - edges: [SeriesGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesGenreConnectionSort { - node: GenreSort - } - - input SeriesGenreConnectionWhere { - AND: [SeriesGenreConnectionWhere!] - NOT: SeriesGenreConnectionWhere - OR: [SeriesGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input SeriesGenreCreateFieldInput { - node: GenreCreateInput! - } - - input SeriesGenreDeleteFieldInput { - delete: GenreDeleteInput - where: SeriesGenreConnectionWhere - } - - input SeriesGenreDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: SeriesGenreConnectionWhere - } - - input SeriesGenreFieldInput { - connect: SeriesGenreConnectFieldInput - connectOrCreate: SeriesGenreConnectOrCreateFieldInput - create: SeriesGenreCreateFieldInput - } - - type SeriesGenreGenreAggregationSelection { - count: Int! - node: SeriesGenreGenreNodeAggregateSelection - } - - type SeriesGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input SeriesGenreNodeAggregationWhereInput { - AND: [SeriesGenreNodeAggregationWhereInput!] - NOT: SeriesGenreNodeAggregationWhereInput - OR: [SeriesGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type SeriesGenreRelationship { - cursor: String! - node: Genre! - } - - input SeriesGenreRelationshipSubscriptionWhere { - node: GenreSubscriptionWhere - } - - input SeriesGenreUpdateConnectionInput { - node: GenreUpdateInput - } - - input SeriesGenreUpdateFieldInput { - connect: SeriesGenreConnectFieldInput - connectOrCreate: SeriesGenreConnectOrCreateFieldInput - create: SeriesGenreCreateFieldInput - delete: SeriesGenreDeleteFieldInput - disconnect: SeriesGenreDisconnectFieldInput - update: SeriesGenreUpdateConnectionInput - where: SeriesGenreConnectionWhere - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - input SeriesRelationInput { - genre: SeriesGenreCreateFieldInput - } - - type SeriesRelationshipCreatedEvent { - createdRelationship: SeriesConnectedRelationships! - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! - } - - input SeriesRelationshipCreatedSubscriptionWhere { - AND: [SeriesRelationshipCreatedSubscriptionWhere!] - NOT: SeriesRelationshipCreatedSubscriptionWhere - OR: [SeriesRelationshipCreatedSubscriptionWhere!] - createdRelationship: SeriesRelationshipsSubscriptionWhere - series: SeriesSubscriptionWhere - } - - type SeriesRelationshipDeletedEvent { - deletedRelationship: SeriesConnectedRelationships! - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! - } - - input SeriesRelationshipDeletedSubscriptionWhere { - AND: [SeriesRelationshipDeletedSubscriptionWhere!] - NOT: SeriesRelationshipDeletedSubscriptionWhere - OR: [SeriesRelationshipDeletedSubscriptionWhere!] - deletedRelationship: SeriesRelationshipsSubscriptionWhere - series: SeriesSubscriptionWhere - } - - input SeriesRelationshipsSubscriptionWhere { - genre: SeriesGenreRelationshipSubscriptionWhere - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - id: SortDirection - name: SortDirection - } - - input SeriesSubscriptionWhere { - AND: [SeriesSubscriptionWhere!] - NOT: SeriesSubscriptionWhere - OR: [SeriesSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input SeriesUpdateInput { - genre: SeriesGenreUpdateFieldInput - id: String - name: String - } - - type SeriesUpdatedEvent { - event: EventType! - previousState: SeriesEventPayload! - timestamp: Float! - updatedSeries: SeriesEventPayload! - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - genre: GenreWhere - genreAggregate: SeriesGenreAggregateInput - genreConnection: SeriesGenreConnectionWhere - genreConnection_NOT: SeriesGenreConnectionWhere - genre_NOT: GenreWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type Subscription { - genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! - genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! - genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! - genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! - genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! - seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! - seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! - seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! - seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Simple type definitions implementing just one interface", async () => { - const typeDefs = gql` - interface IProduct { - id: String! - - name: String! - genre: Genre! - } - - type Movie implements IProduct { - id: String! - - name: String! - genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT) - } - - type Series implements IProduct { - id: String! - - name: String! - genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT) - } - - type Genre { - name: String! @unique - product: [IProduct!]! @relationship(type: "HAS_GENRE", direction: IN) - } - `; - - const subscriptionsEngine = new TestSubscriptionsEngine(); - const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionsEngine } }); - - const schema = await neoSchema.getSchema(); - const errors = validateSchema(schema); - expect(errors).toHaveLength(0); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! - productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! - } - - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input GenreConnectInput { - product: [GenreProductConnectFieldInput!] - } - - input GenreConnectOrCreateWhere { - node: GenreUniqueWhere! - } - - input GenreConnectWhere { - node: GenreWhere! - } - - type GenreConnectedRelationships { - product: GenreProductConnectedRelationship - } - - input GenreCreateInput { - name: String! - product: GenreProductFieldInput - } - - type GenreCreatedEvent { - createdGenre: GenreEventPayload! - event: EventType! - timestamp: Float! - } - - input GenreDeleteInput { - product: [GenreProductDeleteFieldInput!] - } - - type GenreDeletedEvent { - deletedGenre: GenreEventPayload! - event: EventType! - timestamp: Float! - } - - input GenreDisconnectInput { - product: [GenreProductDisconnectFieldInput!] - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - type GenreEventPayload { - name: String! - } - - input GenreOnCreateInput { - name: String! - } - - 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!] - } - - input GenreProductConnectFieldInput { - connect: IProductConnectInput - where: IProductConnectWhere - } - - type GenreProductConnectedRelationship { - node: IProductEventPayload! - } - - type GenreProductConnection { - edges: [GenreProductRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input GenreProductConnectionSort { - node: IProductSort - } - - input GenreProductConnectionWhere { - AND: [GenreProductConnectionWhere!] - NOT: GenreProductConnectionWhere - OR: [GenreProductConnectionWhere!] - node: IProductWhere - node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input GenreProductCreateFieldInput { - node: IProductCreateInput! - } - - input GenreProductDeleteFieldInput { - delete: IProductDeleteInput - where: GenreProductConnectionWhere - } - - input GenreProductDisconnectFieldInput { - disconnect: IProductDisconnectInput - where: GenreProductConnectionWhere - } - - input GenreProductFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - } - - type GenreProductRelationship { - cursor: String! - node: IProduct! - } - - input GenreProductRelationshipSubscriptionWhere { - node: IProductSubscriptionWhere - } - - input GenreProductUpdateConnectionInput { - node: IProductUpdateInput - } - - input GenreProductUpdateFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - delete: [GenreProductDeleteFieldInput!] - disconnect: [GenreProductDisconnectFieldInput!] - update: GenreProductUpdateConnectionInput - where: GenreProductConnectionWhere - } - - input GenreRelationInput { - product: [GenreProductCreateFieldInput!] - } - - type GenreRelationshipCreatedEvent { - createdRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input GenreRelationshipCreatedSubscriptionWhere { - AND: [GenreRelationshipCreatedSubscriptionWhere!] - NOT: GenreRelationshipCreatedSubscriptionWhere - OR: [GenreRelationshipCreatedSubscriptionWhere!] - createdRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere - } - - type GenreRelationshipDeletedEvent { - deletedRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input GenreRelationshipDeletedSubscriptionWhere { - AND: [GenreRelationshipDeletedSubscriptionWhere!] - NOT: GenreRelationshipDeletedSubscriptionWhere - OR: [GenreRelationshipDeletedSubscriptionWhere!] - deletedRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere - } - - input GenreRelationshipsSubscriptionWhere { - product: GenreProductRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - name: SortDirection - } - - input GenreSubscriptionWhere { - AND: [GenreSubscriptionWhere!] - NOT: GenreSubscriptionWhere - OR: [GenreSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input GenreUniqueWhere { - name: String - } - - input GenreUpdateInput { - name: String - product: [GenreProductUpdateFieldInput!] - } - - type GenreUpdatedEvent { - event: EventType! - previousState: GenreEventPayload! - timestamp: Float! - updatedGenre: GenreEventPayload! - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_ALL: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_NONE: GenreProductConnectionWhere - productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SINGLE: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SOME: GenreProductConnectionWhere - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - interface IProduct { - \\"\\"\\"\\"\\"\\" - genre: Genre! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input IProductConnectInput { - _on: IProductImplementationsConnectInput - } - - input IProductConnectWhere { - node: IProductWhere! - } - - input IProductCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input IProductDeleteInput { - _on: IProductImplementationsDeleteInput - } - - input IProductDisconnectInput { - _on: IProductImplementationsDisconnectInput - } - - interface IProductEventPayload { - id: String! - name: String! - } - - input IProductGenreConnectFieldInput { - connect: GenreConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere - } - - input IProductGenreConnectOrCreateFieldInput { - onCreate: IProductGenreConnectOrCreateFieldInputOnCreate! - where: GenreConnectOrCreateWhere! - } - - input IProductGenreConnectOrCreateFieldInputOnCreate { - node: GenreOnCreateInput! - } - - type IProductGenreConnection { - edges: [IProductGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input IProductGenreConnectionSort { - node: GenreSort - } - - input IProductGenreConnectionWhere { - AND: [IProductGenreConnectionWhere!] - NOT: IProductGenreConnectionWhere - OR: [IProductGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input IProductGenreCreateFieldInput { - node: GenreCreateInput! - } - - input IProductGenreDeleteFieldInput { - delete: GenreDeleteInput - where: IProductGenreConnectionWhere - } - - input IProductGenreDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: IProductGenreConnectionWhere - } - - input IProductGenreFieldInput { - connect: IProductGenreConnectFieldInput - connectOrCreate: IProductGenreConnectOrCreateFieldInput - create: IProductGenreCreateFieldInput - } - - type IProductGenreRelationship { - cursor: String! - node: Genre! - } - - input IProductGenreUpdateConnectionInput { - node: GenreUpdateInput - } - - input IProductGenreUpdateFieldInput { - connect: IProductGenreConnectFieldInput - connectOrCreate: IProductGenreConnectOrCreateFieldInput - create: IProductGenreCreateFieldInput - delete: IProductGenreDeleteFieldInput - disconnect: IProductGenreDisconnectFieldInput - update: IProductGenreUpdateConnectionInput - where: IProductGenreConnectionWhere - } - - input IProductImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] - } - - input IProductImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] - } - - input IProductImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] - } - - input IProductImplementationsSubscriptionWhere { - Movie: MovieSubscriptionWhere - Series: SeriesSubscriptionWhere - } - - input IProductImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input IProductImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - input IProductOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [IProductSort] - } - - \\"\\"\\" - Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. - \\"\\"\\" - input IProductSort { - id: SortDirection - name: SortDirection - } - - input IProductSubscriptionWhere { - AND: [IProductSubscriptionWhere!] - NOT: IProductSubscriptionWhere - OR: [IProductSubscriptionWhere!] - _on: IProductImplementationsSubscriptionWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input IProductUpdateInput { - _on: IProductImplementationsUpdateInput - id: String - name: String - } - - input IProductWhere { - _on: IProductImplementationsWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"\\"\\"\\" - type Movie implements IProduct { - \\"\\"\\"\\"\\"\\" - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type MovieAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - genre: IProductGenreConnectFieldInput - } - - input MovieConnectOrCreateInput { - genre: IProductGenreConnectOrCreateFieldInput - } - - type MovieConnectedRelationships { - genre: MovieGenreConnectedRelationship - } - - input MovieCreateInput { - genre: IProductGenreFieldInput - id: String! - name: String! - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - genre: IProductGenreDeleteFieldInput - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - genre: IProductGenreDisconnectFieldInput - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload implements IProductEventPayload { - id: String! - name: String! - } - - input MovieGenreAggregateInput { - AND: [MovieGenreAggregateInput!] - NOT: MovieGenreAggregateInput - OR: [MovieGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenreNodeAggregationWhereInput - } - - type MovieGenreConnectedRelationship { - node: GenreEventPayload! - } - - type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection - } - - type MovieGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieGenreNodeAggregationWhereInput { - AND: [MovieGenreNodeAggregationWhereInput!] - NOT: MovieGenreNodeAggregationWhereInput - OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input MovieGenreRelationshipSubscriptionWhere { - node: GenreSubscriptionWhere - } - - 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!] - } - - input MovieRelationInput { - genre: IProductGenreCreateFieldInput - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - genre: MovieGenreRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 - name: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input MovieUpdateInput { - genre: IProductGenreUpdateFieldInput - id: String - name: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genre: GenreWhere - genreAggregate: MovieGenreAggregateInput - genreConnection: IProductGenreConnectionWhere - genreConnection_NOT: IProductGenreConnectionWhere - genre_NOT: GenreWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, connectOrCreate: SeriesConnectOrCreateInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements IProduct { - \\"\\"\\"\\"\\"\\" - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input SeriesConnectInput { - genre: IProductGenreConnectFieldInput - } - - input SeriesConnectOrCreateInput { - genre: IProductGenreConnectOrCreateFieldInput - } - - type SeriesConnectedRelationships { - genre: SeriesGenreConnectedRelationship - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - genre: IProductGenreFieldInput - id: String! - name: String! - } - - type SeriesCreatedEvent { - createdSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! - } - - input SeriesDeleteInput { - genre: IProductGenreDeleteFieldInput - } - - type SeriesDeletedEvent { - deletedSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! - } - - input SeriesDisconnectInput { - genre: IProductGenreDisconnectFieldInput - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - type SeriesEventPayload implements IProductEventPayload { - id: String! - name: String! - } - - input SeriesGenreAggregateInput { - AND: [SeriesGenreAggregateInput!] - NOT: SeriesGenreAggregateInput - OR: [SeriesGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesGenreNodeAggregationWhereInput - } - - type SeriesGenreConnectedRelationship { - node: GenreEventPayload! - } - - type SeriesGenreGenreAggregationSelection { - count: Int! - node: SeriesGenreGenreNodeAggregateSelection - } - - type SeriesGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input SeriesGenreNodeAggregationWhereInput { - AND: [SeriesGenreNodeAggregationWhereInput!] - NOT: SeriesGenreNodeAggregationWhereInput - OR: [SeriesGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input SeriesGenreRelationshipSubscriptionWhere { - node: GenreSubscriptionWhere - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - input SeriesRelationInput { - genre: IProductGenreCreateFieldInput - } - - type SeriesRelationshipCreatedEvent { - createdRelationship: SeriesConnectedRelationships! - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! - } - - input SeriesRelationshipCreatedSubscriptionWhere { - AND: [SeriesRelationshipCreatedSubscriptionWhere!] - NOT: SeriesRelationshipCreatedSubscriptionWhere - OR: [SeriesRelationshipCreatedSubscriptionWhere!] - createdRelationship: SeriesRelationshipsSubscriptionWhere - series: SeriesSubscriptionWhere - } - - type SeriesRelationshipDeletedEvent { - deletedRelationship: SeriesConnectedRelationships! - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! - } - - input SeriesRelationshipDeletedSubscriptionWhere { - AND: [SeriesRelationshipDeletedSubscriptionWhere!] - NOT: SeriesRelationshipDeletedSubscriptionWhere - OR: [SeriesRelationshipDeletedSubscriptionWhere!] - deletedRelationship: SeriesRelationshipsSubscriptionWhere - series: SeriesSubscriptionWhere - } - - input SeriesRelationshipsSubscriptionWhere { - genre: SeriesGenreRelationshipSubscriptionWhere - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - id: SortDirection - name: SortDirection - } - - input SeriesSubscriptionWhere { - AND: [SeriesSubscriptionWhere!] - NOT: SeriesSubscriptionWhere - OR: [SeriesSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input SeriesUpdateInput { - genre: IProductGenreUpdateFieldInput - id: String - name: String - } - - type SeriesUpdatedEvent { - event: EventType! - previousState: SeriesEventPayload! - timestamp: Float! - updatedSeries: SeriesEventPayload! - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - genre: GenreWhere - genreAggregate: SeriesGenreAggregateInput - genreConnection: IProductGenreConnectionWhere - genreConnection_NOT: IProductGenreConnectionWhere - genre_NOT: GenreWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type Subscription { - genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! - genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! - genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! - genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! - genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! - seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! - seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! - seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! - seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Genre { + name: String! + product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! + productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! +} + +type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input GenreConnectInput { + product: [GenreProductConnectFieldInput!] +} + +input GenreConnectOrCreateWhere { + node: GenreUniqueWhere! +} + +input GenreConnectWhere { + node: GenreWhere! +} + +type GenreConnectedRelationships { + product: GenreProductConnectedRelationship +} + +input GenreCreateInput { + name: String! + product: GenreProductFieldInput +} + +type GenreCreatedEvent { + createdGenre: GenreEventPayload! + event: EventType! + timestamp: Float! +} + +input GenreDeleteInput { + product: [GenreProductDeleteFieldInput!] +} + +type GenreDeletedEvent { + deletedGenre: GenreEventPayload! + event: EventType! + timestamp: Float! +} + +input GenreDisconnectInput { + product: [GenreProductDisconnectFieldInput!] +} + +type GenreEdge { + cursor: String! + node: Genre! +} + +type GenreEventPayload { + name: String! +} + +input GenreOnCreateInput { + name: String! +} + +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!] +} + +input GenreProductConnectFieldInput { + connect: IProductConnectInput + where: IProductConnectWhere +} + +type GenreProductConnectedRelationship { + node: IProductEventPayload! +} + +type GenreProductConnection { + edges: [GenreProductRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input GenreProductConnectionSort { + node: IProductSort +} + +input GenreProductConnectionWhere { + AND: [GenreProductConnectionWhere!] + NOT: GenreProductConnectionWhere + OR: [GenreProductConnectionWhere!] + node: IProductWhere + node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input GenreProductCreateFieldInput { + node: IProductCreateInput! +} + +input GenreProductDeleteFieldInput { + delete: IProductDeleteInput + where: GenreProductConnectionWhere +} + +input GenreProductDisconnectFieldInput { + disconnect: IProductDisconnectInput + where: GenreProductConnectionWhere +} + +input GenreProductFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] +} + +type GenreProductRelationship { + cursor: String! + node: IProduct! +} + +input GenreProductRelationshipSubscriptionWhere { + node: IProductSubscriptionWhere +} + +input GenreProductUpdateConnectionInput { + node: IProductUpdateInput +} + +input GenreProductUpdateFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + delete: [GenreProductDeleteFieldInput!] + disconnect: [GenreProductDisconnectFieldInput!] + update: GenreProductUpdateConnectionInput + where: GenreProductConnectionWhere +} + +input GenreRelationInput { + product: [GenreProductCreateFieldInput!] +} + +type GenreRelationshipCreatedEvent { + createdRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input GenreRelationshipCreatedSubscriptionWhere { + AND: [GenreRelationshipCreatedSubscriptionWhere!] + NOT: GenreRelationshipCreatedSubscriptionWhere + OR: [GenreRelationshipCreatedSubscriptionWhere!] + createdRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere +} + +type GenreRelationshipDeletedEvent { + deletedRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input GenreRelationshipDeletedSubscriptionWhere { + AND: [GenreRelationshipDeletedSubscriptionWhere!] + NOT: GenreRelationshipDeletedSubscriptionWhere + OR: [GenreRelationshipDeletedSubscriptionWhere!] + deletedRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere +} + +input GenreRelationshipsSubscriptionWhere { + product: GenreProductRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + name: SortDirection +} + +input GenreSubscriptionWhere { + AND: [GenreSubscriptionWhere!] + NOT: GenreSubscriptionWhere + OR: [GenreSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input GenreUniqueWhere { + name: String +} + +input GenreUpdateInput { + name: String + product: [GenreProductUpdateFieldInput!] +} + +type GenreUpdatedEvent { + event: EventType! + previousState: GenreEventPayload! + timestamp: Float! + updatedGenre: GenreEventPayload! +} + +input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_ALL: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_NONE: GenreProductConnectionWhere + productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SINGLE: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SOME: GenreProductConnectionWhere +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +interface INode { + id: String! +} + +interface IProduct { + genre: Genre! + id: String! + name: String! +} + +input IProductConnectInput { + _on: IProductImplementationsConnectInput +} + +input IProductConnectWhere { + node: IProductWhere! +} + +input IProductCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input IProductDeleteInput { + _on: IProductImplementationsDeleteInput +} + +input IProductDisconnectInput { + _on: IProductImplementationsDisconnectInput +} + +interface IProductEventPayload { + id: String! + name: String! +} + +input IProductImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] +} + +input IProductImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] +} + +input IProductImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] +} + +input IProductImplementationsSubscriptionWhere { + Movie: MovieSubscriptionWhere + Series: SeriesSubscriptionWhere +} + +input IProductImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input IProductImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +input IProductOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [IProductSort] +} + +\\"\\"\\" +Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. +\\"\\"\\" +input IProductSort { + id: SortDirection + name: SortDirection +} + +input IProductSubscriptionWhere { + AND: [IProductSubscriptionWhere!] + NOT: IProductSubscriptionWhere + OR: [IProductSubscriptionWhere!] + _on: IProductImplementationsSubscriptionWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input IProductUpdateInput { + _on: IProductImplementationsUpdateInput + id: String + name: String +} + +input IProductWhere { + _on: IProductImplementationsWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Movie implements INode & IProduct { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + id: String! + name: String! +} + +type MovieAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + genre: MovieGenreConnectFieldInput +} + +input MovieConnectOrCreateInput { + genre: MovieGenreConnectOrCreateFieldInput +} + +type MovieConnectedRelationships { + genre: MovieGenreConnectedRelationship +} + +input MovieCreateInput { + genre: MovieGenreFieldInput + id: String! + name: String! +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + genre: MovieGenreDeleteFieldInput +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + genre: MovieGenreDisconnectFieldInput +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload implements IProductEventPayload { + id: String! + name: String! +} + +input MovieGenreAggregateInput { + AND: [MovieGenreAggregateInput!] + NOT: MovieGenreAggregateInput + OR: [MovieGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenreNodeAggregationWhereInput +} + +input MovieGenreConnectFieldInput { + connect: GenreConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere +} + +input MovieGenreConnectOrCreateFieldInput { + onCreate: MovieGenreConnectOrCreateFieldInputOnCreate! + where: GenreConnectOrCreateWhere! +} + +input MovieGenreConnectOrCreateFieldInputOnCreate { + node: GenreOnCreateInput! +} + +type MovieGenreConnectedRelationship { + node: GenreEventPayload! +} + +type MovieGenreConnection { + edges: [MovieGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieGenreConnectionSort { + node: GenreSort +} + +input MovieGenreConnectionWhere { + AND: [MovieGenreConnectionWhere!] + NOT: MovieGenreConnectionWhere + OR: [MovieGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieGenreCreateFieldInput { + node: GenreCreateInput! +} + +input MovieGenreDeleteFieldInput { + delete: GenreDeleteInput + where: MovieGenreConnectionWhere +} + +input MovieGenreDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: MovieGenreConnectionWhere +} + +input MovieGenreFieldInput { + connect: MovieGenreConnectFieldInput + connectOrCreate: MovieGenreConnectOrCreateFieldInput + create: MovieGenreCreateFieldInput +} + +type MovieGenreGenreAggregationSelection { + count: Int! + node: MovieGenreGenreNodeAggregateSelection +} + +type MovieGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieGenreNodeAggregationWhereInput { + AND: [MovieGenreNodeAggregationWhereInput!] + NOT: MovieGenreNodeAggregationWhereInput + OR: [MovieGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieGenreRelationship { + cursor: String! + node: Genre! +} + +input MovieGenreRelationshipSubscriptionWhere { + node: GenreSubscriptionWhere +} + +input MovieGenreUpdateConnectionInput { + node: GenreUpdateInput +} + +input MovieGenreUpdateFieldInput { + connect: MovieGenreConnectFieldInput + connectOrCreate: MovieGenreConnectOrCreateFieldInput + create: MovieGenreCreateFieldInput + delete: MovieGenreDeleteFieldInput + disconnect: MovieGenreDisconnectFieldInput + update: MovieGenreUpdateConnectionInput + where: MovieGenreConnectionWhere +} + +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!] +} + +input MovieRelationInput { + genre: MovieGenreCreateFieldInput +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + genre: MovieGenreRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 + name: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input MovieUpdateInput { + genre: MovieGenreUpdateFieldInput + id: String + name: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genre: GenreWhere + genreAggregate: MovieGenreAggregateInput + genreConnection: MovieGenreConnectionWhere + genreConnection_NOT: MovieGenreConnectionWhere + genre_NOT: GenreWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, connectOrCreate: SeriesConnectOrCreateInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements INode & IProduct { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! + id: String! + name: String! +} + +type SeriesAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input SeriesConnectInput { + genre: SeriesGenreConnectFieldInput +} + +input SeriesConnectOrCreateInput { + genre: SeriesGenreConnectOrCreateFieldInput +} + +type SeriesConnectedRelationships { + genre: SeriesGenreConnectedRelationship +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + genre: SeriesGenreFieldInput + id: String! + name: String! +} + +type SeriesCreatedEvent { + createdSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! +} + +input SeriesDeleteInput { + genre: SeriesGenreDeleteFieldInput +} + +type SeriesDeletedEvent { + deletedSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! +} + +input SeriesDisconnectInput { + genre: SeriesGenreDisconnectFieldInput +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +type SeriesEventPayload implements IProductEventPayload { + id: String! + name: String! +} + +input SeriesGenreAggregateInput { + AND: [SeriesGenreAggregateInput!] + NOT: SeriesGenreAggregateInput + OR: [SeriesGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesGenreNodeAggregationWhereInput +} + +input SeriesGenreConnectFieldInput { + connect: GenreConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere +} + +input SeriesGenreConnectOrCreateFieldInput { + onCreate: SeriesGenreConnectOrCreateFieldInputOnCreate! + where: GenreConnectOrCreateWhere! +} + +input SeriesGenreConnectOrCreateFieldInputOnCreate { + node: GenreOnCreateInput! +} + +type SeriesGenreConnectedRelationship { + node: GenreEventPayload! +} + +type SeriesGenreConnection { + edges: [SeriesGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesGenreConnectionSort { + node: GenreSort +} + +input SeriesGenreConnectionWhere { + AND: [SeriesGenreConnectionWhere!] + NOT: SeriesGenreConnectionWhere + OR: [SeriesGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input SeriesGenreCreateFieldInput { + node: GenreCreateInput! +} + +input SeriesGenreDeleteFieldInput { + delete: GenreDeleteInput + where: SeriesGenreConnectionWhere +} + +input SeriesGenreDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: SeriesGenreConnectionWhere +} + +input SeriesGenreFieldInput { + connect: SeriesGenreConnectFieldInput + connectOrCreate: SeriesGenreConnectOrCreateFieldInput + create: SeriesGenreCreateFieldInput +} + +type SeriesGenreGenreAggregationSelection { + count: Int! + node: SeriesGenreGenreNodeAggregateSelection +} + +type SeriesGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input SeriesGenreNodeAggregationWhereInput { + AND: [SeriesGenreNodeAggregationWhereInput!] + NOT: SeriesGenreNodeAggregationWhereInput + OR: [SeriesGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type SeriesGenreRelationship { + cursor: String! + node: Genre! +} + +input SeriesGenreRelationshipSubscriptionWhere { + node: GenreSubscriptionWhere +} + +input SeriesGenreUpdateConnectionInput { + node: GenreUpdateInput +} + +input SeriesGenreUpdateFieldInput { + connect: SeriesGenreConnectFieldInput + connectOrCreate: SeriesGenreConnectOrCreateFieldInput + create: SeriesGenreCreateFieldInput + delete: SeriesGenreDeleteFieldInput + disconnect: SeriesGenreDisconnectFieldInput + update: SeriesGenreUpdateConnectionInput + where: SeriesGenreConnectionWhere +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +input SeriesRelationInput { + genre: SeriesGenreCreateFieldInput +} + +type SeriesRelationshipCreatedEvent { + createdRelationship: SeriesConnectedRelationships! + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! +} + +input SeriesRelationshipCreatedSubscriptionWhere { + AND: [SeriesRelationshipCreatedSubscriptionWhere!] + NOT: SeriesRelationshipCreatedSubscriptionWhere + OR: [SeriesRelationshipCreatedSubscriptionWhere!] + createdRelationship: SeriesRelationshipsSubscriptionWhere + series: SeriesSubscriptionWhere +} + +type SeriesRelationshipDeletedEvent { + deletedRelationship: SeriesConnectedRelationships! + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! +} + +input SeriesRelationshipDeletedSubscriptionWhere { + AND: [SeriesRelationshipDeletedSubscriptionWhere!] + NOT: SeriesRelationshipDeletedSubscriptionWhere + OR: [SeriesRelationshipDeletedSubscriptionWhere!] + deletedRelationship: SeriesRelationshipsSubscriptionWhere + series: SeriesSubscriptionWhere +} + +input SeriesRelationshipsSubscriptionWhere { + genre: SeriesGenreRelationshipSubscriptionWhere +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + id: SortDirection + name: SortDirection +} + +input SeriesSubscriptionWhere { + AND: [SeriesSubscriptionWhere!] + NOT: SeriesSubscriptionWhere + OR: [SeriesSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input SeriesUpdateInput { + genre: SeriesGenreUpdateFieldInput + id: String + name: String +} + +type SeriesUpdatedEvent { + event: EventType! + previousState: SeriesEventPayload! + timestamp: Float! + updatedSeries: SeriesEventPayload! +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + genre: GenreWhere + genreAggregate: SeriesGenreAggregateInput + genreConnection: SeriesGenreConnectionWhere + genreConnection_NOT: SeriesGenreConnectionWhere + genre_NOT: GenreWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type Subscription { + genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! + genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! + genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! + genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! + genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! + seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! + seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! + seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! + seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); - test("Example 3", async () => { + test("Simple type definitions implementing just one interface", async () => { const typeDefs = gql` interface IProduct { id: String! @@ -2497,14 +1294,14 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { id: String! name: String! - genre: Genre! #@relationship(type: "HAS_GENRE", direction: OUT) + genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT) } type Series implements IProduct { id: String! name: String! - genre: Genre! #@relationship(type: "HAS_GENRE", direction: OUT) + genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT) } type Genre { @@ -2523,748 +1320,1907 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! - productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! - } - - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input GenreConnectInput { - product: [GenreProductConnectFieldInput!] - } - - type GenreConnectedRelationships { - product: GenreProductConnectedRelationship - } - - input GenreCreateInput { - name: String! - product: GenreProductFieldInput - } - - type GenreCreatedEvent { - createdGenre: GenreEventPayload! - event: EventType! - timestamp: Float! - } - - input GenreDeleteInput { - product: [GenreProductDeleteFieldInput!] - } - - type GenreDeletedEvent { - deletedGenre: GenreEventPayload! - event: EventType! - timestamp: Float! - } - - input GenreDisconnectInput { - product: [GenreProductDisconnectFieldInput!] - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - type GenreEventPayload { - name: String! - } - - 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!] - } - - input GenreProductConnectFieldInput { - where: IProductConnectWhere - } - - type GenreProductConnectedRelationship { - node: IProductEventPayload! - } - - type GenreProductConnection { - edges: [GenreProductRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input GenreProductConnectionSort { - node: IProductSort - } - - input GenreProductConnectionWhere { - AND: [GenreProductConnectionWhere!] - NOT: GenreProductConnectionWhere - OR: [GenreProductConnectionWhere!] - node: IProductWhere - node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input GenreProductCreateFieldInput { - node: IProductCreateInput! - } - - input GenreProductDeleteFieldInput { - where: GenreProductConnectionWhere - } - - input GenreProductDisconnectFieldInput { - where: GenreProductConnectionWhere - } - - input GenreProductFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - } - - type GenreProductRelationship { - cursor: String! - node: IProduct! - } - - input GenreProductRelationshipSubscriptionWhere { - node: IProductSubscriptionWhere - } - - input GenreProductUpdateConnectionInput { - node: IProductUpdateInput - } - - input GenreProductUpdateFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - delete: [GenreProductDeleteFieldInput!] - disconnect: [GenreProductDisconnectFieldInput!] - update: GenreProductUpdateConnectionInput - where: GenreProductConnectionWhere - } - - input GenreRelationInput { - product: [GenreProductCreateFieldInput!] - } - - type GenreRelationshipCreatedEvent { - createdRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input GenreRelationshipCreatedSubscriptionWhere { - AND: [GenreRelationshipCreatedSubscriptionWhere!] - NOT: GenreRelationshipCreatedSubscriptionWhere - OR: [GenreRelationshipCreatedSubscriptionWhere!] - createdRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere - } - - type GenreRelationshipDeletedEvent { - deletedRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input GenreRelationshipDeletedSubscriptionWhere { - AND: [GenreRelationshipDeletedSubscriptionWhere!] - NOT: GenreRelationshipDeletedSubscriptionWhere - OR: [GenreRelationshipDeletedSubscriptionWhere!] - deletedRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere - } - - input GenreRelationshipsSubscriptionWhere { - product: GenreProductRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - name: SortDirection - } - - input GenreSubscriptionWhere { - AND: [GenreSubscriptionWhere!] - NOT: GenreSubscriptionWhere - OR: [GenreSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input GenreUpdateInput { - name: String - product: [GenreProductUpdateFieldInput!] - } - - type GenreUpdatedEvent { - event: EventType! - previousState: GenreEventPayload! - timestamp: Float! - updatedGenre: GenreEventPayload! - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_ALL: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_NONE: GenreProductConnectionWhere - productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SINGLE: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SOME: GenreProductConnectionWhere - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Genre { + name: String! + product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! + productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! +} + +type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input GenreConnectInput { + product: [GenreProductConnectFieldInput!] +} + +input GenreConnectOrCreateWhere { + node: GenreUniqueWhere! +} + +input GenreConnectWhere { + node: GenreWhere! +} + +type GenreConnectedRelationships { + product: GenreProductConnectedRelationship +} + +input GenreCreateInput { + name: String! + product: GenreProductFieldInput +} + +type GenreCreatedEvent { + createdGenre: GenreEventPayload! + event: EventType! + timestamp: Float! +} + +input GenreDeleteInput { + product: [GenreProductDeleteFieldInput!] +} + +type GenreDeletedEvent { + deletedGenre: GenreEventPayload! + event: EventType! + timestamp: Float! +} + +input GenreDisconnectInput { + product: [GenreProductDisconnectFieldInput!] +} + +type GenreEdge { + cursor: String! + node: Genre! +} + +type GenreEventPayload { + name: String! +} + +input GenreOnCreateInput { + name: String! +} + +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!] +} + +input GenreProductConnectFieldInput { + connect: IProductConnectInput + where: IProductConnectWhere +} + +type GenreProductConnectedRelationship { + node: IProductEventPayload! +} + +type GenreProductConnection { + edges: [GenreProductRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input GenreProductConnectionSort { + node: IProductSort +} + +input GenreProductConnectionWhere { + AND: [GenreProductConnectionWhere!] + NOT: GenreProductConnectionWhere + OR: [GenreProductConnectionWhere!] + node: IProductWhere + node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input GenreProductCreateFieldInput { + node: IProductCreateInput! +} + +input GenreProductDeleteFieldInput { + delete: IProductDeleteInput + where: GenreProductConnectionWhere +} + +input GenreProductDisconnectFieldInput { + disconnect: IProductDisconnectInput + where: GenreProductConnectionWhere +} + +input GenreProductFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] +} + +type GenreProductRelationship { + cursor: String! + node: IProduct! +} + +input GenreProductRelationshipSubscriptionWhere { + node: IProductSubscriptionWhere +} + +input GenreProductUpdateConnectionInput { + node: IProductUpdateInput +} + +input GenreProductUpdateFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + delete: [GenreProductDeleteFieldInput!] + disconnect: [GenreProductDisconnectFieldInput!] + update: GenreProductUpdateConnectionInput + where: GenreProductConnectionWhere +} + +input GenreRelationInput { + product: [GenreProductCreateFieldInput!] +} + +type GenreRelationshipCreatedEvent { + createdRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input GenreRelationshipCreatedSubscriptionWhere { + AND: [GenreRelationshipCreatedSubscriptionWhere!] + NOT: GenreRelationshipCreatedSubscriptionWhere + OR: [GenreRelationshipCreatedSubscriptionWhere!] + createdRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere +} + +type GenreRelationshipDeletedEvent { + deletedRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input GenreRelationshipDeletedSubscriptionWhere { + AND: [GenreRelationshipDeletedSubscriptionWhere!] + NOT: GenreRelationshipDeletedSubscriptionWhere + OR: [GenreRelationshipDeletedSubscriptionWhere!] + deletedRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere +} + +input GenreRelationshipsSubscriptionWhere { + product: GenreProductRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + name: SortDirection +} + +input GenreSubscriptionWhere { + AND: [GenreSubscriptionWhere!] + NOT: GenreSubscriptionWhere + OR: [GenreSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input GenreUniqueWhere { + name: String +} + +input GenreUpdateInput { + name: String + product: [GenreProductUpdateFieldInput!] +} + +type GenreUpdatedEvent { + event: EventType! + previousState: GenreEventPayload! + timestamp: Float! + updatedGenre: GenreEventPayload! +} + +input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_ALL: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_NONE: GenreProductConnectionWhere + productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SINGLE: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SOME: GenreProductConnectionWhere +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +interface IProduct { + genre: Genre! + id: String! + name: String! +} + +input IProductConnectInput { + _on: IProductImplementationsConnectInput +} + +input IProductConnectWhere { + node: IProductWhere! +} + +input IProductCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input IProductDeleteInput { + _on: IProductImplementationsDeleteInput +} + +input IProductDisconnectInput { + _on: IProductImplementationsDisconnectInput +} + +interface IProductEventPayload { + id: String! + name: String! +} + +input IProductGenreConnectFieldInput { + connect: GenreConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere +} + +input IProductGenreConnectOrCreateFieldInput { + onCreate: IProductGenreConnectOrCreateFieldInputOnCreate! + where: GenreConnectOrCreateWhere! +} + +input IProductGenreConnectOrCreateFieldInputOnCreate { + node: GenreOnCreateInput! +} + +type IProductGenreConnection { + edges: [IProductGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IProductGenreConnectionSort { + node: GenreSort +} + +input IProductGenreConnectionWhere { + AND: [IProductGenreConnectionWhere!] + NOT: IProductGenreConnectionWhere + OR: [IProductGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input IProductGenreCreateFieldInput { + node: GenreCreateInput! +} + +input IProductGenreDeleteFieldInput { + delete: GenreDeleteInput + where: IProductGenreConnectionWhere +} + +input IProductGenreDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: IProductGenreConnectionWhere +} + +input IProductGenreFieldInput { + connect: IProductGenreConnectFieldInput + connectOrCreate: IProductGenreConnectOrCreateFieldInput + create: IProductGenreCreateFieldInput +} + +type IProductGenreRelationship { + cursor: String! + node: Genre! +} + +input IProductGenreUpdateConnectionInput { + node: GenreUpdateInput +} + +input IProductGenreUpdateFieldInput { + connect: IProductGenreConnectFieldInput + connectOrCreate: IProductGenreConnectOrCreateFieldInput + create: IProductGenreCreateFieldInput + delete: IProductGenreDeleteFieldInput + disconnect: IProductGenreDisconnectFieldInput + update: IProductGenreUpdateConnectionInput + where: IProductGenreConnectionWhere +} + +input IProductImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] +} + +input IProductImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] +} + +input IProductImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] +} + +input IProductImplementationsSubscriptionWhere { + Movie: MovieSubscriptionWhere + Series: SeriesSubscriptionWhere +} + +input IProductImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input IProductImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +input IProductOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [IProductSort] +} + +\\"\\"\\" +Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. +\\"\\"\\" +input IProductSort { + id: SortDirection + name: SortDirection +} + +input IProductSubscriptionWhere { + AND: [IProductSubscriptionWhere!] + NOT: IProductSubscriptionWhere + OR: [IProductSubscriptionWhere!] + _on: IProductImplementationsSubscriptionWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input IProductUpdateInput { + _on: IProductImplementationsUpdateInput + id: String + name: String +} + +input IProductWhere { + _on: IProductImplementationsWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Movie implements IProduct { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + id: String! + name: String! +} + +type MovieAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + genre: IProductGenreConnectFieldInput +} + +input MovieConnectOrCreateInput { + genre: IProductGenreConnectOrCreateFieldInput +} + +type MovieConnectedRelationships { + genre: MovieGenreConnectedRelationship +} + +input MovieCreateInput { + genre: IProductGenreFieldInput + id: String! + name: String! +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + genre: IProductGenreDeleteFieldInput +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + genre: IProductGenreDisconnectFieldInput +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload implements IProductEventPayload { + id: String! + name: String! +} + +input MovieGenreAggregateInput { + AND: [MovieGenreAggregateInput!] + NOT: MovieGenreAggregateInput + OR: [MovieGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenreNodeAggregationWhereInput +} + +type MovieGenreConnectedRelationship { + node: GenreEventPayload! +} + +type MovieGenreGenreAggregationSelection { + count: Int! + node: MovieGenreGenreNodeAggregateSelection +} + +type MovieGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieGenreNodeAggregationWhereInput { + AND: [MovieGenreNodeAggregationWhereInput!] + NOT: MovieGenreNodeAggregationWhereInput + OR: [MovieGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input MovieGenreRelationshipSubscriptionWhere { + node: GenreSubscriptionWhere +} + +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!] +} + +input MovieRelationInput { + genre: IProductGenreCreateFieldInput +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + genre: MovieGenreRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 + name: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input MovieUpdateInput { + genre: IProductGenreUpdateFieldInput + id: String + name: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genre: GenreWhere + genreAggregate: MovieGenreAggregateInput + genreConnection: IProductGenreConnectionWhere + genreConnection_NOT: IProductGenreConnectionWhere + genre_NOT: GenreWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, connectOrCreate: SeriesConnectOrCreateInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements IProduct { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + id: String! + name: String! +} + +type SeriesAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input SeriesConnectInput { + genre: IProductGenreConnectFieldInput +} + +input SeriesConnectOrCreateInput { + genre: IProductGenreConnectOrCreateFieldInput +} + +type SeriesConnectedRelationships { + genre: SeriesGenreConnectedRelationship +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + genre: IProductGenreFieldInput + id: String! + name: String! +} + +type SeriesCreatedEvent { + createdSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! +} + +input SeriesDeleteInput { + genre: IProductGenreDeleteFieldInput +} + +type SeriesDeletedEvent { + deletedSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! +} + +input SeriesDisconnectInput { + genre: IProductGenreDisconnectFieldInput +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +type SeriesEventPayload implements IProductEventPayload { + id: String! + name: String! +} + +input SeriesGenreAggregateInput { + AND: [SeriesGenreAggregateInput!] + NOT: SeriesGenreAggregateInput + OR: [SeriesGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesGenreNodeAggregationWhereInput +} + +type SeriesGenreConnectedRelationship { + node: GenreEventPayload! +} + +type SeriesGenreGenreAggregationSelection { + count: Int! + node: SeriesGenreGenreNodeAggregateSelection +} + +type SeriesGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input SeriesGenreNodeAggregationWhereInput { + AND: [SeriesGenreNodeAggregationWhereInput!] + NOT: SeriesGenreNodeAggregationWhereInput + OR: [SeriesGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input SeriesGenreRelationshipSubscriptionWhere { + node: GenreSubscriptionWhere +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +input SeriesRelationInput { + genre: IProductGenreCreateFieldInput +} + +type SeriesRelationshipCreatedEvent { + createdRelationship: SeriesConnectedRelationships! + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! +} + +input SeriesRelationshipCreatedSubscriptionWhere { + AND: [SeriesRelationshipCreatedSubscriptionWhere!] + NOT: SeriesRelationshipCreatedSubscriptionWhere + OR: [SeriesRelationshipCreatedSubscriptionWhere!] + createdRelationship: SeriesRelationshipsSubscriptionWhere + series: SeriesSubscriptionWhere +} + +type SeriesRelationshipDeletedEvent { + deletedRelationship: SeriesConnectedRelationships! + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! +} + +input SeriesRelationshipDeletedSubscriptionWhere { + AND: [SeriesRelationshipDeletedSubscriptionWhere!] + NOT: SeriesRelationshipDeletedSubscriptionWhere + OR: [SeriesRelationshipDeletedSubscriptionWhere!] + deletedRelationship: SeriesRelationshipsSubscriptionWhere + series: SeriesSubscriptionWhere +} + +input SeriesRelationshipsSubscriptionWhere { + genre: SeriesGenreRelationshipSubscriptionWhere +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + id: SortDirection + name: SortDirection +} + +input SeriesSubscriptionWhere { + AND: [SeriesSubscriptionWhere!] + NOT: SeriesSubscriptionWhere + OR: [SeriesSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input SeriesUpdateInput { + genre: IProductGenreUpdateFieldInput + id: String + name: String +} + +type SeriesUpdatedEvent { + event: EventType! + previousState: SeriesEventPayload! + timestamp: Float! + updatedSeries: SeriesEventPayload! +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + genre: GenreWhere + genreAggregate: SeriesGenreAggregateInput + genreConnection: IProductGenreConnectionWhere + genreConnection_NOT: IProductGenreConnectionWhere + genre_NOT: GenreWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type Subscription { + genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! + genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! + genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! + genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! + genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! + seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! + seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! + seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! + seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); + }); + test("Example 3", async () => { + const typeDefs = gql` interface IProduct { - \\"\\"\\"\\"\\"\\" - genre: Genre! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input IProductConnectWhere { - node: IProductWhere! - } - - input IProductCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - interface IProductEventPayload { - id: String! - name: String! - } - - input IProductImplementationsSubscriptionWhere { - Movie: MovieSubscriptionWhere - Series: SeriesSubscriptionWhere - } - - input IProductImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input IProductImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - input IProductOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [IProductSort] - } - - \\"\\"\\" - Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. - \\"\\"\\" - input IProductSort { - id: SortDirection - name: SortDirection - } - - input IProductSubscriptionWhere { - AND: [IProductSubscriptionWhere!] - NOT: IProductSubscriptionWhere - OR: [IProductSubscriptionWhere!] - _on: IProductImplementationsSubscriptionWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input IProductUpdateInput { - _on: IProductImplementationsUpdateInput - id: String - name: String - } + id: String! - input IProductWhere { - _on: IProductImplementationsWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String + name: String! + genre: Genre! } - \\"\\"\\"\\"\\"\\" type Movie implements IProduct { - \\"\\"\\"\\"\\"\\" - genre: Genre! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type MovieAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - input MovieCreateInput { - id: String! - name: String! - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload implements IProductEventPayload { - id: String! - name: String! - } - - 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 - name: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input MovieUpdateInput { - id: String - name: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } + id: String! - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + name: String! + genre: Genre! #@relationship(type: "HAS_GENRE", direction: OUT) } - \\"\\"\\"\\"\\"\\" type Series implements IProduct { - \\"\\"\\"\\"\\"\\" - genre: Genre! - \\"\\"\\"\\"\\"\\" - id: String! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type SeriesAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - id: String! - name: String! - } - - type SeriesCreatedEvent { - createdSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! - } - - type SeriesDeletedEvent { - deletedSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - type SeriesEventPayload implements IProductEventPayload { - id: String! - name: String! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - id: SortDirection - name: SortDirection - } - - input SeriesSubscriptionWhere { - AND: [SeriesSubscriptionWhere!] - NOT: SeriesSubscriptionWhere - OR: [SeriesSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input SeriesUpdateInput { - id: String - name: String - } - - type SeriesUpdatedEvent { - event: EventType! - previousState: SeriesEventPayload! - timestamp: Float! - updatedSeries: SeriesEventPayload! - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } + id: String! - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! + name: String! + genre: Genre! #@relationship(type: "HAS_GENRE", direction: OUT) } - type Subscription { - genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! - genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! - genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! - genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! - genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! - seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! - seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! + type Genre { + name: String! @unique + product: [IProduct!]! @relationship(type: "HAS_GENRE", direction: IN) } + `; - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } + const subscriptionsEngine = new TestSubscriptionsEngine(); + const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionsEngine } }); - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } + const schema = await neoSchema.getSchema(); + const errors = validateSchema(schema); + expect(errors).toHaveLength(0); - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Genre { + name: String! + product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! + productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! +} + +type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input GenreConnectInput { + product: [GenreProductConnectFieldInput!] +} + +type GenreConnectedRelationships { + product: GenreProductConnectedRelationship +} + +input GenreCreateInput { + name: String! + product: GenreProductFieldInput +} + +type GenreCreatedEvent { + createdGenre: GenreEventPayload! + event: EventType! + timestamp: Float! +} + +input GenreDeleteInput { + product: [GenreProductDeleteFieldInput!] +} + +type GenreDeletedEvent { + deletedGenre: GenreEventPayload! + event: EventType! + timestamp: Float! +} + +input GenreDisconnectInput { + product: [GenreProductDisconnectFieldInput!] +} + +type GenreEdge { + cursor: String! + node: Genre! +} + +type GenreEventPayload { + name: String! +} + +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!] +} + +input GenreProductConnectFieldInput { + where: IProductConnectWhere +} + +type GenreProductConnectedRelationship { + node: IProductEventPayload! +} + +type GenreProductConnection { + edges: [GenreProductRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input GenreProductConnectionSort { + node: IProductSort +} + +input GenreProductConnectionWhere { + AND: [GenreProductConnectionWhere!] + NOT: GenreProductConnectionWhere + OR: [GenreProductConnectionWhere!] + node: IProductWhere + node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input GenreProductCreateFieldInput { + node: IProductCreateInput! +} + +input GenreProductDeleteFieldInput { + where: GenreProductConnectionWhere +} + +input GenreProductDisconnectFieldInput { + where: GenreProductConnectionWhere +} + +input GenreProductFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] +} + +type GenreProductRelationship { + cursor: String! + node: IProduct! +} + +input GenreProductRelationshipSubscriptionWhere { + node: IProductSubscriptionWhere +} + +input GenreProductUpdateConnectionInput { + node: IProductUpdateInput +} + +input GenreProductUpdateFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + delete: [GenreProductDeleteFieldInput!] + disconnect: [GenreProductDisconnectFieldInput!] + update: GenreProductUpdateConnectionInput + where: GenreProductConnectionWhere +} + +input GenreRelationInput { + product: [GenreProductCreateFieldInput!] +} + +type GenreRelationshipCreatedEvent { + createdRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input GenreRelationshipCreatedSubscriptionWhere { + AND: [GenreRelationshipCreatedSubscriptionWhere!] + NOT: GenreRelationshipCreatedSubscriptionWhere + OR: [GenreRelationshipCreatedSubscriptionWhere!] + createdRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere +} + +type GenreRelationshipDeletedEvent { + deletedRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input GenreRelationshipDeletedSubscriptionWhere { + AND: [GenreRelationshipDeletedSubscriptionWhere!] + NOT: GenreRelationshipDeletedSubscriptionWhere + OR: [GenreRelationshipDeletedSubscriptionWhere!] + deletedRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere +} + +input GenreRelationshipsSubscriptionWhere { + product: GenreProductRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + name: SortDirection +} + +input GenreSubscriptionWhere { + AND: [GenreSubscriptionWhere!] + NOT: GenreSubscriptionWhere + OR: [GenreSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input GenreUpdateInput { + name: String + product: [GenreProductUpdateFieldInput!] +} + +type GenreUpdatedEvent { + event: EventType! + previousState: GenreEventPayload! + timestamp: Float! + updatedGenre: GenreEventPayload! +} + +input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_ALL: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_NONE: GenreProductConnectionWhere + productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SINGLE: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SOME: GenreProductConnectionWhere +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +interface IProduct { + genre: Genre! + id: String! + name: String! +} + +input IProductConnectWhere { + node: IProductWhere! +} + +input IProductCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +interface IProductEventPayload { + id: String! + name: String! +} + +input IProductImplementationsSubscriptionWhere { + Movie: MovieSubscriptionWhere + Series: SeriesSubscriptionWhere +} + +input IProductImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input IProductImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +input IProductOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [IProductSort] +} + +\\"\\"\\" +Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. +\\"\\"\\" +input IProductSort { + id: SortDirection + name: SortDirection +} + +input IProductSubscriptionWhere { + AND: [IProductSubscriptionWhere!] + NOT: IProductSubscriptionWhere + OR: [IProductSubscriptionWhere!] + _on: IProductImplementationsSubscriptionWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input IProductUpdateInput { + _on: IProductImplementationsUpdateInput + id: String + name: String +} + +input IProductWhere { + _on: IProductImplementationsWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Movie implements IProduct { + genre: Genre! + id: String! + name: String! +} + +type MovieAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +input MovieCreateInput { + id: String! + name: String! +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload implements IProductEventPayload { + id: String! + name: String! +} + +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 + name: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input MovieUpdateInput { + id: String + name: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements IProduct { + genre: Genre! + id: String! + name: String! +} + +type SeriesAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + id: String! + name: String! +} + +type SeriesCreatedEvent { + createdSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! +} + +type SeriesDeletedEvent { + deletedSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +type SeriesEventPayload implements IProductEventPayload { + id: String! + name: String! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + id: SortDirection + name: SortDirection +} + +input SeriesSubscriptionWhere { + AND: [SeriesSubscriptionWhere!] + NOT: SeriesSubscriptionWhere + OR: [SeriesSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input SeriesUpdateInput { + id: String + name: String +} + +type SeriesUpdatedEvent { + event: EventType! + previousState: SeriesEventPayload! + timestamp: Float! + updatedSeries: SeriesEventPayload! +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type Subscription { + genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! + genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! + genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! + genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! + genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! + seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! + seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index 8168fdee71..5024855ba3 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -44,257 +44,252 @@ describe("Extending the schema in when using getSubgraphSchema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query - mutation: Mutation - } - - directive @federation__extends on INTERFACE | OBJECT - - directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - - directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @federation__override(from: String!) on FIELD_DEFINITION - - directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - - directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - - directive @shareable on FIELD_DEFINITION | OBJECT - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - input ActorCreateInput { - password: String! - username: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - password: SortDirection - username: SortDirection - } - - input ActorUpdateInput { - password: String - username: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String - } - - input MovieCreateInput { - title: String - } - - 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 { - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - scalar _Any - - type _Service { - sdl: String - } - - scalar federation__FieldSet - - scalar link__Import - - enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY - }" - `); +"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query + mutation: Mutation +} + +directive @federation__extends on INTERFACE | OBJECT + +directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + +directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @federation__override(from: String!) on FIELD_DEFINITION + +directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + +directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + +directive @shareable on FIELD_DEFINITION | OBJECT + +type Actor { + password: String! + username: String! +} + +input ActorCreateInput { + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorUpdateInput { + password: String + username: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + title: String +} + +input MovieCreateInput { + title: String +} + +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 { + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +scalar _Any + +type _Service { + sdl: String +} + +scalar federation__FieldSet + +scalar link__Import + +enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY +}" +`); }); test("Should be able to extend the schema using @mutation", async () => { @@ -317,209 +312,204 @@ describe("Extending the schema in when using getSubgraphSchema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query - } - - directive @federation__extends on INTERFACE | OBJECT - - directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - - directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @federation__override(from: String!) on FIELD_DEFINITION - - directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - - directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - - directive @shareable on FIELD_DEFINITION | OBJECT - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - password: SortDirection - username: SortDirection - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - 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 MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable @shareable { - longest: String - shortest: String - } - - scalar _Any - - type _Service { - sdl: String - } - - scalar federation__FieldSet - - scalar link__Import - - enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY - }" - `); +"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query +} + +directive @federation__extends on INTERFACE | OBJECT + +directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + +directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @federation__override(from: String!) on FIELD_DEFINITION + +directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + +directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + +directive @shareable on FIELD_DEFINITION | OBJECT + +type Actor { + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + title: String +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +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 MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable @shareable { + longest: String + shortest: String +} + +scalar _Any + +type _Service { + sdl: String +} + +scalar federation__FieldSet + +scalar link__Import + +enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY +}" +`); }); test("Should be able to extend the schema using @subscription", async () => { @@ -543,358 +533,353 @@ describe("Extending the schema in when using getSubgraphSchema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query - mutation: Mutation - subscription: Subscription - } - - directive @federation__extends on INTERFACE | OBJECT - - directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - - directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @federation__override(from: String!) on FIELD_DEFINITION - - directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - - directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - - directive @shareable on FIELD_DEFINITION | OBJECT - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - password: String! - \\"\\"\\"\\"\\"\\" - username: String! - } - - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! - } - - input ActorCreateInput { - password: String! - username: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - password: String! - username: String! - } - - 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 { - password: SortDirection - username: SortDirection - } - - input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input ActorUpdateInput { - password: String - username: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieCreateInput { - title: String - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - title: String - } - - 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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - title: String - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable @shareable { - longest: String - shortest: String - } - - type Subscription { - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - scalar _Any - - type _Service { - sdl: String - } - - scalar federation__FieldSet - - scalar link__Import - - enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY - }" - `); +"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query + mutation: Mutation + subscription: Subscription +} + +directive @federation__extends on INTERFACE | OBJECT + +directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + +directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @federation__override(from: String!) on FIELD_DEFINITION + +directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + +directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + +directive @shareable on FIELD_DEFINITION | OBJECT + +type Actor { + password: String! + username: String! +} + +type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! +} + +input ActorCreateInput { + password: String! + username: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + password: String! + username: String! +} + +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 { + password: SortDirection + username: SortDirection +} + +input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input ActorUpdateInput { + password: String + username: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type Movie { + title: String +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieCreateInput { + title: String +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + title: String +} + +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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + title: String +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable @shareable { + longest: String + shortest: String +} + +type Subscription { + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +scalar _Any + +type _Service { + sdl: String +} + +scalar federation__FieldSet + +scalar link__Import + +enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index 0abc4396ce..debe77f63e 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -41,311 +41,306 @@ describe("Extending the schema in when using getSubgraphSchema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query - } - - directive @federation__extends on INTERFACE | OBJECT - - directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - - directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @federation__override(from: String!) on FIELD_DEFINITION - - directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - - directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - - directive @shareable on FIELD_DEFINITION | OBJECT - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie @key(fields: \\"title\\") @shareable { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - type MovieAggregateSelection @shareable { - count: Int! - title: StringAggregateSelectionNonNullable! - } - - type MovieEdge @shareable { - 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 MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection @shareable { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - _entities(representations: [_Any!]!): [_Entity]! - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! @shareable - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @shareable - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! @shareable - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! - } - - scalar _Any - - union _Entity = Movie - - type _Service { - sdl: String - } - - scalar federation__FieldSet - - scalar link__Import - - enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY - }" - `); +"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query +} + +directive @federation__extends on INTERFACE | OBJECT + +directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + +directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @federation__override(from: String!) on FIELD_DEFINITION + +directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + +directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + +directive @shareable on FIELD_DEFINITION | OBJECT + +type Actor { + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie @key(fields: \\"title\\") @shareable { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +type MovieAggregateSelection @shareable { + count: Int! + title: StringAggregateSelectionNonNullable! +} + +type MovieEdge @shareable { + 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 MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection @shareable { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + _entities(representations: [_Any!]!): [_Entity]! + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! @shareable + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @shareable + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! @shareable +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! +} + +scalar _Any + +union _Entity = Movie + +type _Service { + sdl: String +} + +scalar federation__FieldSet + +scalar link__Import + +enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY +}" +`); }); test("Should be able to use @query and multiple @key directives on the same type", async () => { @@ -367,418 +362,412 @@ describe("Extending the schema in when using getSubgraphSchema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query - mutation: Mutation - } - - directive @federation__extends on INTERFACE | OBJECT - - directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - - directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @federation__override(from: String!) on FIELD_DEFINITION - - directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - - directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - - directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - - directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - - directive @shareable on FIELD_DEFINITION | OBJECT - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - 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 { - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse @shareable { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID! - title: String! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - id: ID - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! @shareable - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! @shareable - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! @shareable - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - _entities(representations: [_Any!]!): [_Entity]! - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse @shareable { - info: UpdateInfo! - movies: [Movie!]! - } - - scalar _Any - - union _Entity = Movie - - type _Service { - sdl: String - } - - scalar federation__FieldSet - - scalar link__Import - - enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY - }" - `); +"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query + mutation: Mutation +} + +directive @federation__extends on INTERFACE | OBJECT + +directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + +directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @federation__override(from: String!) on FIELD_DEFINITION + +directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + +directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + +directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + +directive @shareable on FIELD_DEFINITION | OBJECT + +type Actor { + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + name: String! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +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 { + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse @shareable { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID! + title: String! +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID! + title: String! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + id: ID + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! @shareable + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! @shareable + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! @shareable +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + _entities(representations: [_Any!]!): [_Entity]! + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse @shareable { + info: UpdateInfo! + movies: [Movie!]! +} + +scalar _Any + +union _Entity = Movie + +type _Service { + sdl: String +} + +scalar federation__FieldSet + +scalar link__Import + +enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/3816.test.ts b/packages/graphql/tests/schema/issues/3816.test.ts index 3982caa119..8311f72245 100644 --- a/packages/graphql/tests/schema/issues/3816.test.ts +++ b/packages/graphql/tests/schema/issues/3816.test.ts @@ -40,529 +40,523 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input GenreConnectInput { - movies: [GenreMoviesConnectFieldInput!] - } - - input GenreConnectWhere { - node: GenreWhere! - } - - input GenreCreateInput { - movies: GenreMoviesFieldInput - name: String! - } - - input GenreDeleteInput { - movies: [GenreMoviesDeleteFieldInput!] - } - - input GenreDisconnectInput { - movies: [GenreMoviesDisconnectFieldInput!] - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection - } - - type GenreMovieMoviesNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input GenreMoviesAggregateInput { - AND: [GenreMoviesAggregateInput!] - NOT: GenreMoviesAggregateInput - OR: [GenreMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: GenreMoviesNodeAggregationWhereInput - } - - input GenreMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input GenreMoviesConnectionSort { - node: MovieSort - } - - input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input GenreMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input GenreMoviesDeleteFieldInput { - where: GenreMoviesConnectionWhere - } - - input GenreMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: GenreMoviesConnectionWhere - } - - input GenreMoviesFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - } - - input GenreMoviesNodeAggregationWhereInput { - AND: [GenreMoviesNodeAggregationWhereInput!] - NOT: GenreMoviesNodeAggregationWhereInput - OR: [GenreMoviesNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type GenreMoviesRelationship { - cursor: String! - node: Movie! - } - - input GenreMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input GenreMoviesUpdateFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - delete: [GenreMoviesDeleteFieldInput!] - disconnect: [GenreMoviesDisconnectFieldInput!] - update: GenreMoviesUpdateConnectionInput - where: GenreMoviesConnectionWhere - } - - 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!] - } - - input GenreRelationInput { - movies: [GenreMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: SortDirection - } - - input GenreUpdateInput { - movies: [GenreMoviesUpdateFieldInput!] - name: String - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: GenreMoviesAggregateInput - moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere - moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere - \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type MovieAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - genre: MovieGenreConnectFieldInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - genre: MovieGenreFieldInput - name: String! - } - - input MovieDisconnectInput { - genre: MovieGenreDisconnectFieldInput - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieGenreAggregateInput { - AND: [MovieGenreAggregateInput!] - NOT: MovieGenreAggregateInput - OR: [MovieGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenreNodeAggregationWhereInput - } - - input MovieGenreConnectFieldInput { - connect: GenreConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere - } - - type MovieGenreConnection { - edges: [MovieGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieGenreConnectionSort { - node: GenreSort - } - - input MovieGenreConnectionWhere { - AND: [MovieGenreConnectionWhere!] - NOT: MovieGenreConnectionWhere - OR: [MovieGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieGenreDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: MovieGenreConnectionWhere - } - - input MovieGenreFieldInput { - connect: MovieGenreConnectFieldInput - } - - type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection - } - - type MovieGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieGenreNodeAggregationWhereInput { - AND: [MovieGenreNodeAggregationWhereInput!] - NOT: MovieGenreNodeAggregationWhereInput - OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieGenreRelationship { - cursor: String! - node: Genre! - } - - input MovieGenreUpdateFieldInput { - connect: MovieGenreConnectFieldInput - disconnect: MovieGenreDisconnectFieldInput - where: MovieGenreConnectionWhere - } - - 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 { - name: SortDirection - } - - input MovieUpdateInput { - genre: MovieGenreUpdateFieldInput - name: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genre: GenreWhere - genreAggregate: MovieGenreAggregateInput - genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Genre { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + name: String! +} + +type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input GenreConnectInput { + movies: [GenreMoviesConnectFieldInput!] +} + +input GenreConnectWhere { + node: GenreWhere! +} + +input GenreCreateInput { + movies: GenreMoviesFieldInput + name: String! +} + +input GenreDeleteInput { + movies: [GenreMoviesDeleteFieldInput!] +} + +input GenreDisconnectInput { + movies: [GenreMoviesDisconnectFieldInput!] +} + +type GenreEdge { + cursor: String! + node: Genre! +} + +type GenreMovieMoviesAggregationSelection { + count: Int! + node: GenreMovieMoviesNodeAggregateSelection +} + +type GenreMovieMoviesNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input GenreMoviesAggregateInput { + AND: [GenreMoviesAggregateInput!] + NOT: GenreMoviesAggregateInput + OR: [GenreMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: GenreMoviesNodeAggregationWhereInput +} + +input GenreMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type GenreMoviesConnection { + edges: [GenreMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input GenreMoviesConnectionSort { + node: MovieSort +} + +input GenreMoviesConnectionWhere { + AND: [GenreMoviesConnectionWhere!] + NOT: GenreMoviesConnectionWhere + OR: [GenreMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input GenreMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input GenreMoviesDeleteFieldInput { + where: GenreMoviesConnectionWhere +} + +input GenreMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: GenreMoviesConnectionWhere +} + +input GenreMoviesFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] +} + +input GenreMoviesNodeAggregationWhereInput { + AND: [GenreMoviesNodeAggregationWhereInput!] + NOT: GenreMoviesNodeAggregationWhereInput + OR: [GenreMoviesNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type GenreMoviesRelationship { + cursor: String! + node: Movie! +} + +input GenreMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input GenreMoviesUpdateFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + delete: [GenreMoviesDeleteFieldInput!] + disconnect: [GenreMoviesDisconnectFieldInput!] + update: GenreMoviesUpdateConnectionInput + where: GenreMoviesConnectionWhere +} + +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!] +} + +input GenreRelationInput { + movies: [GenreMoviesCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: SortDirection +} + +input GenreUpdateInput { + movies: [GenreMoviesUpdateFieldInput!] + name: String +} + +input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: GenreMoviesConnectionWhere + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + name: String! +} + +type MovieAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + genre: MovieGenreConnectFieldInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + genre: MovieGenreFieldInput + name: String! +} + +input MovieDisconnectInput { + genre: MovieGenreDisconnectFieldInput +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +input MovieGenreAggregateInput { + AND: [MovieGenreAggregateInput!] + NOT: MovieGenreAggregateInput + OR: [MovieGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenreNodeAggregationWhereInput +} + +input MovieGenreConnectFieldInput { + connect: GenreConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere +} + +type MovieGenreConnection { + edges: [MovieGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieGenreConnectionSort { + node: GenreSort +} + +input MovieGenreConnectionWhere { + AND: [MovieGenreConnectionWhere!] + NOT: MovieGenreConnectionWhere + OR: [MovieGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieGenreDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: MovieGenreConnectionWhere +} + +input MovieGenreFieldInput { + connect: MovieGenreConnectFieldInput +} + +type MovieGenreGenreAggregationSelection { + count: Int! + node: MovieGenreGenreNodeAggregateSelection +} + +type MovieGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieGenreNodeAggregationWhereInput { + AND: [MovieGenreNodeAggregationWhereInput!] + NOT: MovieGenreNodeAggregationWhereInput + OR: [MovieGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieGenreRelationship { + cursor: String! + node: Genre! +} + +input MovieGenreUpdateFieldInput { + connect: MovieGenreConnectFieldInput + disconnect: MovieGenreDisconnectFieldInput + where: MovieGenreConnectionWhere +} + +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 { + name: SortDirection +} + +input MovieUpdateInput { + genre: MovieGenreUpdateFieldInput + name: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genre: GenreWhere + genreAggregate: MovieGenreAggregateInput + genreConnection: MovieGenreConnectionWhere + genreConnection_NOT: MovieGenreConnectionWhere + genre_NOT: GenreWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("No nested operations in one type", async () => { @@ -582,488 +576,482 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input GenreConnectInput { - movies: [GenreMoviesConnectFieldInput!] - } - - input GenreCreateInput { - movies: GenreMoviesFieldInput - name: String! - } - - input GenreDeleteInput { - movies: [GenreMoviesDeleteFieldInput!] - } - - input GenreDisconnectInput { - movies: [GenreMoviesDisconnectFieldInput!] - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection - } - - type GenreMovieMoviesNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input GenreMoviesAggregateInput { - AND: [GenreMoviesAggregateInput!] - NOT: GenreMoviesAggregateInput - OR: [GenreMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: GenreMoviesNodeAggregationWhereInput - } - - input GenreMoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input GenreMoviesConnectionSort { - node: MovieSort - } - - input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input GenreMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input GenreMoviesDeleteFieldInput { - where: GenreMoviesConnectionWhere - } - - input GenreMoviesDisconnectFieldInput { - where: GenreMoviesConnectionWhere - } - - input GenreMoviesFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - } - - input GenreMoviesNodeAggregationWhereInput { - AND: [GenreMoviesNodeAggregationWhereInput!] - NOT: GenreMoviesNodeAggregationWhereInput - OR: [GenreMoviesNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type GenreMoviesRelationship { - cursor: String! - node: Movie! - } - - input GenreMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input GenreMoviesUpdateFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - delete: [GenreMoviesDeleteFieldInput!] - disconnect: [GenreMoviesDisconnectFieldInput!] - update: GenreMoviesUpdateConnectionInput - where: GenreMoviesConnectionWhere - } - - 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!] - } - - input GenreRelationInput { - movies: [GenreMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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 { - name: SortDirection - } - - input GenreUpdateInput { - movies: [GenreMoviesUpdateFieldInput!] - name: String - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: GenreMoviesAggregateInput - moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere - moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere - \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type MovieAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - name: String! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieGenreAggregateInput { - AND: [MovieGenreAggregateInput!] - NOT: MovieGenreAggregateInput - OR: [MovieGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenreNodeAggregationWhereInput - } - - type MovieGenreConnection { - edges: [MovieGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieGenreConnectionSort { - node: GenreSort - } - - input MovieGenreConnectionWhere { - AND: [MovieGenreConnectionWhere!] - NOT: MovieGenreConnectionWhere - OR: [MovieGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection - } - - type MovieGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieGenreNodeAggregationWhereInput { - AND: [MovieGenreNodeAggregationWhereInput!] - NOT: MovieGenreNodeAggregationWhereInput - OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieGenreRelationship { - cursor: String! - node: Genre! - } - - 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 { - name: SortDirection - } - - input MovieUpdateInput { - name: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genre: GenreWhere - genreAggregate: MovieGenreAggregateInput - genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Genre { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + name: String! +} + +type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input GenreConnectInput { + movies: [GenreMoviesConnectFieldInput!] +} + +input GenreCreateInput { + movies: GenreMoviesFieldInput + name: String! +} + +input GenreDeleteInput { + movies: [GenreMoviesDeleteFieldInput!] +} + +input GenreDisconnectInput { + movies: [GenreMoviesDisconnectFieldInput!] +} + +type GenreEdge { + cursor: String! + node: Genre! +} + +type GenreMovieMoviesAggregationSelection { + count: Int! + node: GenreMovieMoviesNodeAggregateSelection +} + +type GenreMovieMoviesNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input GenreMoviesAggregateInput { + AND: [GenreMoviesAggregateInput!] + NOT: GenreMoviesAggregateInput + OR: [GenreMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: GenreMoviesNodeAggregationWhereInput +} + +input GenreMoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type GenreMoviesConnection { + edges: [GenreMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input GenreMoviesConnectionSort { + node: MovieSort +} + +input GenreMoviesConnectionWhere { + AND: [GenreMoviesConnectionWhere!] + NOT: GenreMoviesConnectionWhere + OR: [GenreMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input GenreMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input GenreMoviesDeleteFieldInput { + where: GenreMoviesConnectionWhere +} + +input GenreMoviesDisconnectFieldInput { + where: GenreMoviesConnectionWhere +} + +input GenreMoviesFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] +} + +input GenreMoviesNodeAggregationWhereInput { + AND: [GenreMoviesNodeAggregationWhereInput!] + NOT: GenreMoviesNodeAggregationWhereInput + OR: [GenreMoviesNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type GenreMoviesRelationship { + cursor: String! + node: Movie! +} + +input GenreMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input GenreMoviesUpdateFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + delete: [GenreMoviesDeleteFieldInput!] + disconnect: [GenreMoviesDisconnectFieldInput!] + update: GenreMoviesUpdateConnectionInput + where: GenreMoviesConnectionWhere +} + +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!] +} + +input GenreRelationInput { + movies: [GenreMoviesCreateFieldInput!] +} + +\\"\\"\\" +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 { + name: SortDirection +} + +input GenreUpdateInput { + movies: [GenreMoviesUpdateFieldInput!] + name: String +} + +input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: GenreMoviesConnectionWhere + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Movie { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + name: String! +} + +type MovieAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + name: String! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +input MovieGenreAggregateInput { + AND: [MovieGenreAggregateInput!] + NOT: MovieGenreAggregateInput + OR: [MovieGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenreNodeAggregationWhereInput +} + +type MovieGenreConnection { + edges: [MovieGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieGenreConnectionSort { + node: GenreSort +} + +input MovieGenreConnectionWhere { + AND: [MovieGenreConnectionWhere!] + NOT: MovieGenreConnectionWhere + OR: [MovieGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MovieGenreGenreAggregationSelection { + count: Int! + node: MovieGenreGenreNodeAggregateSelection +} + +type MovieGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieGenreNodeAggregationWhereInput { + AND: [MovieGenreNodeAggregationWhereInput!] + NOT: MovieGenreNodeAggregationWhereInput + OR: [MovieGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieGenreRelationship { + cursor: String! + node: Genre! +} + +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 { + name: SortDirection +} + +input MovieUpdateInput { + name: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genre: GenreWhere + genreAggregate: MovieGenreAggregateInput + genreConnection: MovieGenreConnectionWhere + genreConnection_NOT: MovieGenreConnectionWhere + genre_NOT: GenreWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/609.test.ts b/packages/graphql/tests/schema/issues/609.test.ts index 85fd314d0d..d8a098ff50 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -33,138 +33,136 @@ describe("609", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateDeprecatedsMutationResponse { - deprecateds: [Deprecated!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Deprecated { - \\"\\"\\"\\"\\"\\" - deprecatedField: String @deprecated - } - - type DeprecatedAggregateSelection { - count: Int! - deprecatedField: StringAggregateSelectionNullable! - } - - input DeprecatedCreateInput { - deprecatedField: String @deprecated - } - - type DeprecatedEdge { - cursor: String! - node: Deprecated! - } - - input DeprecatedOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more DeprecatedSort objects to sort Deprecateds by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [DeprecatedSort!] - } - - \\"\\"\\" - Fields to sort Deprecateds by. The order in which sorts are applied is not guaranteed when specifying many fields in one DeprecatedSort object. - \\"\\"\\" - input DeprecatedSort { - deprecatedField: SortDirection @deprecated - } - - input DeprecatedUpdateInput { - deprecatedField: String @deprecated - } - - input DeprecatedWhere { - AND: [DeprecatedWhere!] - NOT: DeprecatedWhere - OR: [DeprecatedWhere!] - deprecatedField: String @deprecated - deprecatedField_CONTAINS: String @deprecated - deprecatedField_ENDS_WITH: String @deprecated - deprecatedField_IN: [String] @deprecated - deprecatedField_NOT: String @deprecated - deprecatedField_NOT_CONTAINS: String @deprecated - deprecatedField_NOT_ENDS_WITH: String @deprecated - deprecatedField_NOT_IN: [String] @deprecated - deprecatedField_NOT_STARTS_WITH: String @deprecated - deprecatedField_STARTS_WITH: String @deprecated - } - - type DeprecatedsConnection { - edges: [DeprecatedEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createDeprecateds(input: [DeprecatedCreateInput!]!): CreateDeprecatedsMutationResponse! - deleteDeprecateds(where: DeprecatedWhere): DeleteInfo! - updateDeprecateds(update: DeprecatedUpdateInput, where: DeprecatedWhere): UpdateDeprecatedsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - deprecateds(options: DeprecatedOptions, where: DeprecatedWhere): [Deprecated!]! - deprecatedsAggregate(where: DeprecatedWhere): DeprecatedAggregateSelection! - deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort], where: DeprecatedWhere): DeprecatedsConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateDeprecatedsMutationResponse { - deprecateds: [Deprecated!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateDeprecatedsMutationResponse { + deprecateds: [Deprecated!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Deprecated { + deprecatedField: String @deprecated +} + +type DeprecatedAggregateSelection { + count: Int! + deprecatedField: StringAggregateSelectionNullable! +} + +input DeprecatedCreateInput { + deprecatedField: String @deprecated +} + +type DeprecatedEdge { + cursor: String! + node: Deprecated! +} + +input DeprecatedOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more DeprecatedSort objects to sort Deprecateds by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [DeprecatedSort!] +} + +\\"\\"\\" +Fields to sort Deprecateds by. The order in which sorts are applied is not guaranteed when specifying many fields in one DeprecatedSort object. +\\"\\"\\" +input DeprecatedSort { + deprecatedField: SortDirection @deprecated +} + +input DeprecatedUpdateInput { + deprecatedField: String @deprecated +} + +input DeprecatedWhere { + AND: [DeprecatedWhere!] + NOT: DeprecatedWhere + OR: [DeprecatedWhere!] + deprecatedField: String @deprecated + deprecatedField_CONTAINS: String @deprecated + deprecatedField_ENDS_WITH: String @deprecated + deprecatedField_IN: [String] @deprecated + deprecatedField_NOT: String @deprecated + deprecatedField_NOT_CONTAINS: String @deprecated + deprecatedField_NOT_ENDS_WITH: String @deprecated + deprecatedField_NOT_IN: [String] @deprecated + deprecatedField_NOT_STARTS_WITH: String @deprecated + deprecatedField_STARTS_WITH: String @deprecated +} + +type DeprecatedsConnection { + edges: [DeprecatedEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createDeprecateds(input: [DeprecatedCreateInput!]!): CreateDeprecatedsMutationResponse! + deleteDeprecateds(where: DeprecatedWhere): DeleteInfo! + updateDeprecateds(update: DeprecatedUpdateInput, where: DeprecatedWhere): UpdateDeprecatedsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + deprecateds(options: DeprecatedOptions, where: DeprecatedWhere): [Deprecated!]! + deprecatedsAggregate(where: DeprecatedWhere): DeprecatedAggregateSelection! + deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort], where: DeprecatedWhere): DeprecatedsConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateDeprecatedsMutationResponse { + deprecateds: [Deprecated!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index 387b659b31..78f8fc8ca9 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -44,711 +44,702 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - \\"\\"\\"\\"\\"\\" - type Actor2 { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): Actor2MovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type Actor2AggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input Actor2ConnectInput { - movies: [Actor2MoviesConnectFieldInput!] - } - - input Actor2ConnectOrCreateInput { - movies: [Actor2MoviesConnectOrCreateFieldInput!] - } - - input Actor2CreateInput { - movies: Actor2MoviesFieldInput - name: String! - } - - input Actor2DeleteInput { - movies: [Actor2MoviesDeleteFieldInput!] - } - - input Actor2DisconnectInput { - movies: [Actor2MoviesDisconnectFieldInput!] - } - - type Actor2Edge { - cursor: String! - node: Actor2! - } - - type Actor2MovieMoviesAggregationSelection { - count: Int! - node: Actor2MovieMoviesNodeAggregateSelection - } - - type Actor2MovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input Actor2MoviesAggregateInput { - AND: [Actor2MoviesAggregateInput!] - NOT: Actor2MoviesAggregateInput - OR: [Actor2MoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: Actor2MoviesNodeAggregationWhereInput - } - - input Actor2MoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - input Actor2MoviesConnectOrCreateFieldInput { - onCreate: Actor2MoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! - } - - input Actor2MoviesConnectOrCreateFieldInputOnCreate { - node: MovieOnCreateInput! - } - - type Actor2MoviesConnection { - edges: [Actor2MoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input Actor2MoviesConnectionSort { - node: MovieSort - } - - input Actor2MoviesConnectionWhere { - AND: [Actor2MoviesConnectionWhere!] - NOT: Actor2MoviesConnectionWhere - OR: [Actor2MoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input Actor2MoviesCreateFieldInput { - node: MovieCreateInput! - } - - input Actor2MoviesDeleteFieldInput { - where: Actor2MoviesConnectionWhere - } - - input Actor2MoviesDisconnectFieldInput { - where: Actor2MoviesConnectionWhere - } - - input Actor2MoviesFieldInput { - connect: [Actor2MoviesConnectFieldInput!] - connectOrCreate: [Actor2MoviesConnectOrCreateFieldInput!] - create: [Actor2MoviesCreateFieldInput!] - } - - input Actor2MoviesNodeAggregationWhereInput { - AND: [Actor2MoviesNodeAggregationWhereInput!] - NOT: Actor2MoviesNodeAggregationWhereInput - OR: [Actor2MoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type Actor2MoviesRelationship { - cursor: String! - node: Movie! - } - - input Actor2MoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input Actor2MoviesUpdateFieldInput { - connect: [Actor2MoviesConnectFieldInput!] - connectOrCreate: [Actor2MoviesConnectOrCreateFieldInput!] - create: [Actor2MoviesCreateFieldInput!] - delete: [Actor2MoviesDeleteFieldInput!] - disconnect: [Actor2MoviesDisconnectFieldInput!] - update: Actor2MoviesUpdateConnectionInput - where: Actor2MoviesConnectionWhere - } - - input Actor2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Actor2Sort objects to sort Actor2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Actor2Sort!] - } - - input Actor2RelationInput { - movies: [Actor2MoviesCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Actor2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Actor2Sort object. - \\"\\"\\" - input Actor2Sort { - name: SortDirection - } - - input Actor2UpdateInput { - movies: [Actor2MoviesUpdateFieldInput!] - name: String - } - - input Actor2Where { - AND: [Actor2Where!] - NOT: Actor2Where - OR: [Actor2Where!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: Actor2MoviesAggregateInput - moviesConnection: Actor2MoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actor2s where all of the related Actor2MoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: Actor2MoviesConnectionWhere - \\"\\"\\" - Return Actor2s where none of the related Actor2MoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: Actor2MoviesConnectionWhere - moviesConnection_NOT: Actor2MoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actor2s where one of the related Actor2MoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: Actor2MoviesConnectionWhere - \\"\\"\\" - Return Actor2s where some of the related Actor2MoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: Actor2MoviesConnectionWhere - \\"\\"\\"Return Actor2s where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Actor2s where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Actor2s where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Actor2s where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Actor2sConnection { - edges: [Actor2Edge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectOrCreateInput { - movies: [ActorMoviesConnectOrCreateFieldInput!] - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - name: String! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - input ActorMoviesConnectOrCreateFieldInput { - onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! - } - - input ActorMoviesConnectOrCreateFieldInputOnCreate { - node: MovieOnCreateInput! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - where: ActorMoviesConnectionWhere - } - - input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - 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!] - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - \\"\\"\\" - 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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActor2sMutationResponse { - actor2s: [Actor2!]! - info: CreateInfo! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - title: String! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieOnCreateInput { - title: String! - } - - 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 - title: SortDirection - } - - input MovieUniqueWhere { - id: ID - } - - input MovieUpdateInput { - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActor2s(input: [Actor2CreateInput!]!): CreateActor2sMutationResponse! - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActor2s(delete: Actor2DeleteInput, where: Actor2Where): DeleteInfo! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateActor2s(connect: Actor2ConnectInput, connectOrCreate: Actor2ConnectOrCreateInput, create: Actor2RelationInput, delete: Actor2DeleteInput, disconnect: Actor2DisconnectInput, update: Actor2UpdateInput, where: Actor2Where): UpdateActor2sMutationResponse! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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 { - actor2s(options: Actor2Options, where: Actor2Where): [Actor2!]! - actor2sAggregate(where: Actor2Where): Actor2AggregateSelection! - actor2sConnection(after: String, first: Int, sort: [Actor2Sort], where: Actor2Where): Actor2sConnection! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateActor2sMutationResponse { - actor2s: [Actor2!]! - info: UpdateInfo! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! +} + +type Actor2 { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): Actor2MovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! + name: String! +} + +type Actor2AggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input Actor2ConnectInput { + movies: [Actor2MoviesConnectFieldInput!] +} + +input Actor2ConnectOrCreateInput { + movies: [Actor2MoviesConnectOrCreateFieldInput!] +} + +input Actor2CreateInput { + movies: Actor2MoviesFieldInput + name: String! +} + +input Actor2DeleteInput { + movies: [Actor2MoviesDeleteFieldInput!] +} + +input Actor2DisconnectInput { + movies: [Actor2MoviesDisconnectFieldInput!] +} + +type Actor2Edge { + cursor: String! + node: Actor2! +} + +type Actor2MovieMoviesAggregationSelection { + count: Int! + node: Actor2MovieMoviesNodeAggregateSelection +} + +type Actor2MovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input Actor2MoviesAggregateInput { + AND: [Actor2MoviesAggregateInput!] + NOT: Actor2MoviesAggregateInput + OR: [Actor2MoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: Actor2MoviesNodeAggregationWhereInput +} + +input Actor2MoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +input Actor2MoviesConnectOrCreateFieldInput { + onCreate: Actor2MoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! +} + +input Actor2MoviesConnectOrCreateFieldInputOnCreate { + node: MovieOnCreateInput! +} + +type Actor2MoviesConnection { + edges: [Actor2MoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input Actor2MoviesConnectionSort { + node: MovieSort +} + +input Actor2MoviesConnectionWhere { + AND: [Actor2MoviesConnectionWhere!] + NOT: Actor2MoviesConnectionWhere + OR: [Actor2MoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input Actor2MoviesCreateFieldInput { + node: MovieCreateInput! +} + +input Actor2MoviesDeleteFieldInput { + where: Actor2MoviesConnectionWhere +} + +input Actor2MoviesDisconnectFieldInput { + where: Actor2MoviesConnectionWhere +} + +input Actor2MoviesFieldInput { + connect: [Actor2MoviesConnectFieldInput!] + connectOrCreate: [Actor2MoviesConnectOrCreateFieldInput!] + create: [Actor2MoviesCreateFieldInput!] +} + +input Actor2MoviesNodeAggregationWhereInput { + AND: [Actor2MoviesNodeAggregationWhereInput!] + NOT: Actor2MoviesNodeAggregationWhereInput + OR: [Actor2MoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type Actor2MoviesRelationship { + cursor: String! + node: Movie! +} + +input Actor2MoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input Actor2MoviesUpdateFieldInput { + connect: [Actor2MoviesConnectFieldInput!] + connectOrCreate: [Actor2MoviesConnectOrCreateFieldInput!] + create: [Actor2MoviesCreateFieldInput!] + delete: [Actor2MoviesDeleteFieldInput!] + disconnect: [Actor2MoviesDisconnectFieldInput!] + update: Actor2MoviesUpdateConnectionInput + where: Actor2MoviesConnectionWhere +} + +input Actor2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Actor2Sort objects to sort Actor2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Actor2Sort!] +} + +input Actor2RelationInput { + movies: [Actor2MoviesCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Actor2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Actor2Sort object. +\\"\\"\\" +input Actor2Sort { + name: SortDirection +} + +input Actor2UpdateInput { + movies: [Actor2MoviesUpdateFieldInput!] + name: String +} + +input Actor2Where { + AND: [Actor2Where!] + NOT: Actor2Where + OR: [Actor2Where!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: Actor2MoviesAggregateInput + moviesConnection: Actor2MoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actor2s where all of the related Actor2MoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: Actor2MoviesConnectionWhere + \\"\\"\\" + Return Actor2s where none of the related Actor2MoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: Actor2MoviesConnectionWhere + moviesConnection_NOT: Actor2MoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actor2s where one of the related Actor2MoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: Actor2MoviesConnectionWhere + \\"\\"\\" + Return Actor2s where some of the related Actor2MoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: Actor2MoviesConnectionWhere + \\"\\"\\"Return Actor2s where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Actor2s where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Actor2s where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Actor2s where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Actor2sConnection { + edges: [Actor2Edge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput + name: String! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! +} + +input ActorMoviesConnectOrCreateFieldInputOnCreate { + node: MovieOnCreateInput! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input ActorMoviesDeleteFieldInput { + where: ActorMoviesConnectionWhere +} + +input ActorMoviesDisconnectFieldInput { + where: ActorMoviesConnectionWhere +} + +input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] +} + +input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + 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!] +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +\\"\\"\\" +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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActor2sMutationResponse { + actor2s: [Actor2!]! + info: CreateInfo! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} + +type Movie { + id: ID! + title: String! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + title: String! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +input MovieOnCreateInput { + title: String! +} + +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 + title: SortDirection +} + +input MovieUniqueWhere { + id: ID +} + +input MovieUpdateInput { + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActor2s(input: [Actor2CreateInput!]!): CreateActor2sMutationResponse! + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActor2s(delete: Actor2DeleteInput, where: Actor2Where): DeleteInfo! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateActor2s(connect: Actor2ConnectInput, connectOrCreate: Actor2ConnectOrCreateInput, create: Actor2RelationInput, delete: Actor2DeleteInput, disconnect: Actor2DisconnectInput, update: Actor2UpdateInput, where: Actor2Where): UpdateActor2sMutationResponse! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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 { + actor2s(options: Actor2Options, where: Actor2Where): [Actor2!]! + actor2sAggregate(where: Actor2Where): Actor2AggregateSelection! + actor2sConnection(after: String, first: Int, sort: [Actor2Sort], where: Actor2Where): Actor2sConnection! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateActor2sMutationResponse { + actor2s: [Actor2!]! + info: UpdateInfo! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 6b626ddef0..7314b23d40 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -33,162 +33,159 @@ describe("Algebraic", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - viewers: Int! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: IntAggregateSelectionNonNullable! - } - - input MovieCreateInput { - id: ID - viewers: Int! - } - - 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 - viewers: SortDirection - } - - input MovieUpdateInput { - id: ID - viewers: Int - viewers_DECREMENT: Int - viewers_INCREMENT: Int - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie { + id: ID + viewers: Int! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: IntAggregateSelectionNonNullable! +} + +input MovieCreateInput { + id: ID + viewers: Int! +} + +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 + viewers: SortDirection +} + +input MovieUpdateInput { + id: ID + viewers: Int + viewers_DECREMENT: Int + viewers_INCREMENT: Int +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: Int + viewers_GT: Int + viewers_GTE: Int + viewers_IN: [Int!] + viewers_LT: Int + viewers_LTE: Int + viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("BigInt fields should be extended with Increment/Decrement operators", async () => { @@ -201,167 +198,164 @@ describe("Algebraic", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. - \\"\\"\\" - scalar BigInt - - type BigIntAggregateSelectionNonNullable { - average: BigInt! - max: BigInt! - min: BigInt! - sum: BigInt! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - viewers: BigInt! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: BigIntAggregateSelectionNonNullable! - } - - input MovieCreateInput { - id: ID - viewers: BigInt! - } - - 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 - viewers: SortDirection - } - - input MovieUpdateInput { - id: ID - viewers: BigInt - viewers_DECREMENT: BigInt - viewers_INCREMENT: BigInt - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: BigInt - viewers_GT: BigInt - viewers_GTE: BigInt - viewers_IN: [BigInt!] - viewers_LT: BigInt - viewers_LTE: BigInt - viewers_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [BigInt!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\" +A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. +\\"\\"\\" +scalar BigInt + +type BigIntAggregateSelectionNonNullable { + average: BigInt! + max: BigInt! + min: BigInt! + sum: BigInt! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID + viewers: BigInt! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: BigIntAggregateSelectionNonNullable! +} + +input MovieCreateInput { + id: ID + viewers: BigInt! +} + +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 + viewers: SortDirection +} + +input MovieUpdateInput { + id: ID + viewers: BigInt + viewers_DECREMENT: BigInt + viewers_INCREMENT: BigInt +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: BigInt + viewers_GT: BigInt + viewers_GTE: BigInt + viewers_IN: [BigInt!] + viewers_LT: BigInt + viewers_LTE: BigInt + viewers_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [BigInt!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Float fields should be extended with Add/Subtract/Multiply/Divide operators", async () => { @@ -375,164 +369,161 @@ describe("Algebraic", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - viewers: Float! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: FloatAggregateSelectionNonNullable! - } - - input MovieCreateInput { - id: ID - viewers: Float! - } - - 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 - viewers: SortDirection - } - - input MovieUpdateInput { - id: ID - viewers: Float - viewers_ADD: Float - viewers_DIVIDE: Float - viewers_MULTIPLY: Float - viewers_SUBTRACT: Float - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: Float - viewers_GT: Float - viewers_GTE: Float - viewers_IN: [Float!] - viewers_LT: Float - viewers_LTE: Float - viewers_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID + viewers: Float! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: FloatAggregateSelectionNonNullable! +} + +input MovieCreateInput { + id: ID + viewers: Float! +} + +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 + viewers: SortDirection +} + +input MovieUpdateInput { + id: ID + viewers: Float + viewers_ADD: Float + viewers_DIVIDE: Float + viewers_MULTIPLY: Float + viewers_SUBTRACT: Float +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: Float + viewers_GT: Float + viewers_GTE: Float + viewers_IN: [Float!] + viewers_LT: Float + viewers_LTE: Float + viewers_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("Operators should be presents in nested updates", async () => { @@ -551,1938 +542,1911 @@ describe("Algebraic", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateDirectorsMutationResponse { - directors: [Director!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Director { - \\"\\"\\"\\"\\"\\" - directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - directsAggregate(directed: Boolean = true, where: MovieWhere): DirectorMovieDirectsAggregationSelection - directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! - \\"\\"\\"\\"\\"\\" - lastName: String! - } - - type DirectorAggregateSelection { - count: Int! - lastName: StringAggregateSelectionNonNullable! - } - - input DirectorConnectInput { - directs: [DirectorDirectsConnectFieldInput!] - } - - input DirectorConnectWhere { - node: DirectorWhere! - } - - input DirectorCreateInput { - directs: DirectorDirectsFieldInput - lastName: String! - } - - input DirectorDeleteInput { - directs: [DirectorDirectsDeleteFieldInput!] - } - - input DirectorDirectsAggregateInput { - AND: [DirectorDirectsAggregateInput!] - NOT: DirectorDirectsAggregateInput - OR: [DirectorDirectsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: DirectorDirectsNodeAggregationWhereInput - } - - input DirectorDirectsConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type DirectorDirectsConnection { - edges: [DirectorDirectsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input DirectorDirectsConnectionSort { - node: MovieSort - } - - input DirectorDirectsConnectionWhere { - AND: [DirectorDirectsConnectionWhere!] - NOT: DirectorDirectsConnectionWhere - OR: [DirectorDirectsConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input DirectorDirectsCreateFieldInput { - node: MovieCreateInput! - } - - input DirectorDirectsDeleteFieldInput { - delete: MovieDeleteInput - where: DirectorDirectsConnectionWhere - } - - input DirectorDirectsDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: DirectorDirectsConnectionWhere - } - - input DirectorDirectsFieldInput { - connect: [DirectorDirectsConnectFieldInput!] - create: [DirectorDirectsCreateFieldInput!] - } - - input DirectorDirectsNodeAggregationWhereInput { - AND: [DirectorDirectsNodeAggregationWhereInput!] - NOT: DirectorDirectsNodeAggregationWhereInput - OR: [DirectorDirectsNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_AVERAGE_EQUAL: Float - viewers_AVERAGE_GT: Float - viewers_AVERAGE_GTE: Float - viewers_AVERAGE_LT: Float - viewers_AVERAGE_LTE: Float - viewers_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_MAX_EQUAL: Int - viewers_MAX_GT: Int - viewers_MAX_GTE: Int - viewers_MAX_LT: Int - viewers_MAX_LTE: Int - viewers_MIN_EQUAL: Int - viewers_MIN_GT: Int - viewers_MIN_GTE: Int - viewers_MIN_LT: Int - viewers_MIN_LTE: Int - viewers_SUM_EQUAL: Int - viewers_SUM_GT: Int - viewers_SUM_GTE: Int - viewers_SUM_LT: Int - viewers_SUM_LTE: Int - } - - type DirectorDirectsRelationship { - cursor: String! - node: Movie! - } - - input DirectorDirectsUpdateConnectionInput { - node: MovieUpdateInput - } - - input DirectorDirectsUpdateFieldInput { - connect: [DirectorDirectsConnectFieldInput!] - create: [DirectorDirectsCreateFieldInput!] - delete: [DirectorDirectsDeleteFieldInput!] - disconnect: [DirectorDirectsDisconnectFieldInput!] - update: DirectorDirectsUpdateConnectionInput - where: DirectorDirectsConnectionWhere - } - - input DirectorDisconnectInput { - directs: [DirectorDirectsDisconnectFieldInput!] - } - - type DirectorEdge { - cursor: String! - node: Director! - } - - type DirectorMovieDirectsAggregationSelection { - count: Int! - node: DirectorMovieDirectsNodeAggregateSelection - } - - type DirectorMovieDirectsNodeAggregateSelection { - id: IDAggregateSelectionNullable! - viewers: IntAggregateSelectionNonNullable! - } - - input DirectorOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more DirectorSort objects to sort Directors by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [DirectorSort!] - } - - input DirectorRelationInput { - directs: [DirectorDirectsCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object. - \\"\\"\\" - input DirectorSort { - lastName: SortDirection - } - - input DirectorUpdateInput { - directs: [DirectorDirectsUpdateFieldInput!] - lastName: String - } +"schema { + query: Query + mutation: Mutation +} + +type CreateDirectorsMutationResponse { + directors: [Director!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Director { + directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + directsAggregate(directed: Boolean = true, where: MovieWhere): DirectorMovieDirectsAggregationSelection + directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! + lastName: String! +} + +type DirectorAggregateSelection { + count: Int! + lastName: StringAggregateSelectionNonNullable! +} + +input DirectorConnectInput { + directs: [DirectorDirectsConnectFieldInput!] +} + +input DirectorConnectWhere { + node: DirectorWhere! +} + +input DirectorCreateInput { + directs: DirectorDirectsFieldInput + lastName: String! +} + +input DirectorDeleteInput { + directs: [DirectorDirectsDeleteFieldInput!] +} + +input DirectorDirectsAggregateInput { + AND: [DirectorDirectsAggregateInput!] + NOT: DirectorDirectsAggregateInput + OR: [DirectorDirectsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: DirectorDirectsNodeAggregationWhereInput +} + +input DirectorDirectsConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type DirectorDirectsConnection { + edges: [DirectorDirectsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input DirectorDirectsConnectionSort { + node: MovieSort +} + +input DirectorDirectsConnectionWhere { + AND: [DirectorDirectsConnectionWhere!] + NOT: DirectorDirectsConnectionWhere + OR: [DirectorDirectsConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input DirectorDirectsCreateFieldInput { + node: MovieCreateInput! +} + +input DirectorDirectsDeleteFieldInput { + delete: MovieDeleteInput + where: DirectorDirectsConnectionWhere +} + +input DirectorDirectsDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: DirectorDirectsConnectionWhere +} + +input DirectorDirectsFieldInput { + connect: [DirectorDirectsConnectFieldInput!] + create: [DirectorDirectsCreateFieldInput!] +} + +input DirectorDirectsNodeAggregationWhereInput { + AND: [DirectorDirectsNodeAggregationWhereInput!] + NOT: DirectorDirectsNodeAggregationWhereInput + OR: [DirectorDirectsNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_AVERAGE_EQUAL: Float + viewers_AVERAGE_GT: Float + viewers_AVERAGE_GTE: Float + viewers_AVERAGE_LT: Float + viewers_AVERAGE_LTE: Float + viewers_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_MAX_EQUAL: Int + viewers_MAX_GT: Int + viewers_MAX_GTE: Int + viewers_MAX_LT: Int + viewers_MAX_LTE: Int + viewers_MIN_EQUAL: Int + viewers_MIN_GT: Int + viewers_MIN_GTE: Int + viewers_MIN_LT: Int + viewers_MIN_LTE: Int + viewers_SUM_EQUAL: Int + viewers_SUM_GT: Int + viewers_SUM_GTE: Int + viewers_SUM_LT: Int + viewers_SUM_LTE: Int +} + +type DirectorDirectsRelationship { + cursor: String! + node: Movie! +} + +input DirectorDirectsUpdateConnectionInput { + node: MovieUpdateInput +} + +input DirectorDirectsUpdateFieldInput { + connect: [DirectorDirectsConnectFieldInput!] + create: [DirectorDirectsCreateFieldInput!] + delete: [DirectorDirectsDeleteFieldInput!] + disconnect: [DirectorDirectsDisconnectFieldInput!] + update: DirectorDirectsUpdateConnectionInput + where: DirectorDirectsConnectionWhere +} + +input DirectorDisconnectInput { + directs: [DirectorDirectsDisconnectFieldInput!] +} + +type DirectorEdge { + cursor: String! + node: Director! +} + +type DirectorMovieDirectsAggregationSelection { + count: Int! + node: DirectorMovieDirectsNodeAggregateSelection +} + +type DirectorMovieDirectsNodeAggregateSelection { + id: IDAggregateSelectionNullable! + viewers: IntAggregateSelectionNonNullable! +} + +input DirectorOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more DirectorSort objects to sort Directors by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [DirectorSort!] +} + +input DirectorRelationInput { + directs: [DirectorDirectsCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object. +\\"\\"\\" +input DirectorSort { + lastName: SortDirection +} + +input DirectorUpdateInput { + directs: [DirectorDirectsUpdateFieldInput!] + lastName: String +} + +input DirectorWhere { + AND: [DirectorWhere!] + NOT: DirectorWhere + OR: [DirectorWhere!] + directs: MovieWhere @deprecated(reason: \\"Use \`directs_SOME\` instead.\\") + directsAggregate: DirectorDirectsAggregateInput + directsConnection: DirectorDirectsConnectionWhere @deprecated(reason: \\"Use \`directsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Directors where all of the related DirectorDirectsConnections match this filter + \\"\\"\\" + directsConnection_ALL: DirectorDirectsConnectionWhere + \\"\\"\\" + Return Directors where none of the related DirectorDirectsConnections match this filter + \\"\\"\\" + directsConnection_NONE: DirectorDirectsConnectionWhere + directsConnection_NOT: DirectorDirectsConnectionWhere @deprecated(reason: \\"Use \`directsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Directors where one of the related DirectorDirectsConnections match this filter + \\"\\"\\" + directsConnection_SINGLE: DirectorDirectsConnectionWhere + \\"\\"\\" + Return Directors where some of the related DirectorDirectsConnections match this filter + \\"\\"\\" + directsConnection_SOME: DirectorDirectsConnectionWhere + \\"\\"\\"Return Directors where all of the related Movies match this filter\\"\\"\\" + directs_ALL: MovieWhere + \\"\\"\\"Return Directors where none of the related Movies match this filter\\"\\"\\" + directs_NONE: MovieWhere + directs_NOT: MovieWhere @deprecated(reason: \\"Use \`directs_NONE\` instead.\\") + \\"\\"\\"Return Directors where one of the related Movies match this filter\\"\\"\\" + directs_SINGLE: MovieWhere + \\"\\"\\"Return Directors where some of the related Movies match this filter\\"\\"\\" + directs_SOME: MovieWhere + lastName: String + lastName_CONTAINS: String + lastName_ENDS_WITH: String + lastName_IN: [String!] + lastName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_STARTS_WITH: String +} + +type DirectorsConnection { + edges: [DirectorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie { + directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director + directedByAggregate(directed: Boolean = true, where: DirectorWhere): MovieDirectorDirectedByAggregationSelection + directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! + id: ID + viewers: Int! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: IntAggregateSelectionNonNullable! +} + +input MovieConnectInput { + directedBy: MovieDirectedByConnectFieldInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + directedBy: MovieDirectedByFieldInput + id: ID + viewers: Int! +} + +input MovieDeleteInput { + directedBy: MovieDirectedByDeleteFieldInput +} + +input MovieDirectedByAggregateInput { + AND: [MovieDirectedByAggregateInput!] + NOT: MovieDirectedByAggregateInput + OR: [MovieDirectedByAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieDirectedByNodeAggregationWhereInput +} + +input MovieDirectedByConnectFieldInput { + connect: DirectorConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: DirectorConnectWhere +} + +type MovieDirectedByConnection { + edges: [MovieDirectedByRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieDirectedByConnectionSort { + node: DirectorSort +} + +input MovieDirectedByConnectionWhere { + AND: [MovieDirectedByConnectionWhere!] + NOT: MovieDirectedByConnectionWhere + OR: [MovieDirectedByConnectionWhere!] + node: DirectorWhere + node_NOT: DirectorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieDirectedByCreateFieldInput { + node: DirectorCreateInput! +} + +input MovieDirectedByDeleteFieldInput { + delete: DirectorDeleteInput + where: MovieDirectedByConnectionWhere +} + +input MovieDirectedByDisconnectFieldInput { + disconnect: DirectorDisconnectInput + where: MovieDirectedByConnectionWhere +} + +input MovieDirectedByFieldInput { + connect: MovieDirectedByConnectFieldInput + create: MovieDirectedByCreateFieldInput +} + +input MovieDirectedByNodeAggregationWhereInput { + AND: [MovieDirectedByNodeAggregationWhereInput!] + NOT: MovieDirectedByNodeAggregationWhereInput + OR: [MovieDirectedByNodeAggregationWhereInput!] + lastName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_AVERAGE_LENGTH_EQUAL: Float + lastName_AVERAGE_LENGTH_GT: Float + lastName_AVERAGE_LENGTH_GTE: Float + lastName_AVERAGE_LENGTH_LT: Float + lastName_AVERAGE_LENGTH_LTE: Float + lastName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LONGEST_LENGTH_EQUAL: Int + lastName_LONGEST_LENGTH_GT: Int + lastName_LONGEST_LENGTH_GTE: Int + lastName_LONGEST_LENGTH_LT: Int + lastName_LONGEST_LENGTH_LTE: Int + lastName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_SHORTEST_LENGTH_EQUAL: Int + lastName_SHORTEST_LENGTH_GT: Int + lastName_SHORTEST_LENGTH_GTE: Int + lastName_SHORTEST_LENGTH_LT: Int + lastName_SHORTEST_LENGTH_LTE: Int + lastName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieDirectedByRelationship { + cursor: String! + node: Director! +} + +input MovieDirectedByUpdateConnectionInput { + node: DirectorUpdateInput +} + +input MovieDirectedByUpdateFieldInput { + connect: MovieDirectedByConnectFieldInput + create: MovieDirectedByCreateFieldInput + delete: MovieDirectedByDeleteFieldInput + disconnect: MovieDirectedByDisconnectFieldInput + update: MovieDirectedByUpdateConnectionInput + where: MovieDirectedByConnectionWhere +} + +type MovieDirectorDirectedByAggregationSelection { + count: Int! + node: MovieDirectorDirectedByNodeAggregateSelection +} + +type MovieDirectorDirectedByNodeAggregateSelection { + lastName: StringAggregateSelectionNonNullable! +} + +input MovieDisconnectInput { + directedBy: MovieDirectedByDisconnectFieldInput +} + +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!] +} + +input MovieRelationInput { + directedBy: MovieDirectedByCreateFieldInput +} + +\\"\\"\\" +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 + viewers: SortDirection +} + +input MovieUpdateInput { + directedBy: MovieDirectedByUpdateFieldInput + id: ID + viewers: Int + viewers_DECREMENT: Int + viewers_INCREMENT: Int +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + directedBy: DirectorWhere + directedByAggregate: MovieDirectedByAggregateInput + directedByConnection: MovieDirectedByConnectionWhere + directedByConnection_NOT: MovieDirectedByConnectionWhere + directedBy_NOT: DirectorWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: Int + viewers_GT: Int + viewers_GTE: Int + viewers_IN: [Int!] + viewers_LT: Int + viewers_LTE: Int + viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createDirectors(input: [DirectorCreateInput!]!): CreateDirectorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteDirectors(delete: DirectorDeleteInput, where: DirectorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateDirectors(connect: DirectorConnectInput, create: DirectorRelationInput, delete: DirectorDeleteInput, disconnect: DirectorDisconnectInput, update: DirectorUpdateInput, where: DirectorWhere): UpdateDirectorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + directors(options: DirectorOptions, where: DirectorWhere): [Director!]! + directorsAggregate(where: DirectorWhere): DirectorAggregateSelection! + directorsConnection(after: String, first: Int, sort: [DirectorSort], where: DirectorWhere): DirectorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateDirectorsMutationResponse { + directors: [Director!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - input DirectorWhere { - AND: [DirectorWhere!] - NOT: DirectorWhere - OR: [DirectorWhere!] - directs: MovieWhere @deprecated(reason: \\"Use \`directs_SOME\` instead.\\") - directsAggregate: DirectorDirectsAggregateInput - directsConnection: DirectorDirectsConnectionWhere @deprecated(reason: \\"Use \`directsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Directors where all of the related DirectorDirectsConnections match this filter - \\"\\"\\" - directsConnection_ALL: DirectorDirectsConnectionWhere - \\"\\"\\" - Return Directors where none of the related DirectorDirectsConnections match this filter - \\"\\"\\" - directsConnection_NONE: DirectorDirectsConnectionWhere - directsConnection_NOT: DirectorDirectsConnectionWhere @deprecated(reason: \\"Use \`directsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Directors where one of the related DirectorDirectsConnections match this filter - \\"\\"\\" - directsConnection_SINGLE: DirectorDirectsConnectionWhere - \\"\\"\\" - Return Directors where some of the related DirectorDirectsConnections match this filter - \\"\\"\\" - directsConnection_SOME: DirectorDirectsConnectionWhere - \\"\\"\\"Return Directors where all of the related Movies match this filter\\"\\"\\" - directs_ALL: MovieWhere - \\"\\"\\"Return Directors where none of the related Movies match this filter\\"\\"\\" - directs_NONE: MovieWhere - directs_NOT: MovieWhere @deprecated(reason: \\"Use \`directs_NONE\` instead.\\") - \\"\\"\\"Return Directors where one of the related Movies match this filter\\"\\"\\" - directs_SINGLE: MovieWhere - \\"\\"\\"Return Directors where some of the related Movies match this filter\\"\\"\\" - directs_SOME: MovieWhere - lastName: String - lastName_CONTAINS: String - lastName_ENDS_WITH: String - lastName_IN: [String!] - lastName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_STARTS_WITH: String + test("Should be supported in interfaces", async () => { + const typeDefs = gql` + interface Production { + viewers: Int! } - type DirectorsConnection { - edges: [DirectorEdge!]! - pageInfo: PageInfo! - totalCount: Int! + type Movie implements Production { + id: ID + viewers: Int! + workers: [Person!]! @relationship(type: "WORKED_IN", direction: IN) } - type IDAggregateSelectionNullable { - longest: ID - shortest: ID + type Person { + name: String! + worksInProduction: [Production!]! @relationship(type: "WORKED_IN", direction: OUT) } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie implements Production { + id: ID + viewers: Int! + workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + workersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonWorkersAggregationSelection + workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: IntAggregateSelectionNonNullable! +} + +input MovieConnectInput { + workers: [MovieWorkersConnectFieldInput!] +} + +input MovieCreateInput { + id: ID + viewers: Int! + workers: MovieWorkersFieldInput +} + +input MovieDeleteInput { + workers: [MovieWorkersDeleteFieldInput!] +} + +input MovieDisconnectInput { + workers: [MovieWorkersDisconnectFieldInput!] +} + +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!] +} + +type MoviePersonWorkersAggregationSelection { + count: Int! + node: MoviePersonWorkersNodeAggregateSelection +} + +type MoviePersonWorkersNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieRelationInput { + workers: [MovieWorkersCreateFieldInput!] +} + +\\"\\"\\" +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 + viewers: SortDirection +} + +input MovieUpdateInput { + id: ID + viewers: Int + viewers_DECREMENT: Int + viewers_INCREMENT: Int + workers: [MovieWorkersUpdateFieldInput!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: Int + viewers_GT: Int + viewers_GTE: Int + viewers_IN: [Int!] + viewers_LT: Int + viewers_LTE: Int + viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + workers: PersonWhere @deprecated(reason: \\"Use \`workers_SOME\` instead.\\") + workersAggregate: MovieWorkersAggregateInput + workersConnection: MovieWorkersConnectionWhere @deprecated(reason: \\"Use \`workersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieWorkersConnections match this filter + \\"\\"\\" + workersConnection_ALL: MovieWorkersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieWorkersConnections match this filter + \\"\\"\\" + workersConnection_NONE: MovieWorkersConnectionWhere + workersConnection_NOT: MovieWorkersConnectionWhere @deprecated(reason: \\"Use \`workersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieWorkersConnections match this filter + \\"\\"\\" + workersConnection_SINGLE: MovieWorkersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieWorkersConnections match this filter + \\"\\"\\" + workersConnection_SOME: MovieWorkersConnectionWhere + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + workers_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + workers_NONE: PersonWhere + workers_NOT: PersonWhere @deprecated(reason: \\"Use \`workers_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + workers_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + workers_SOME: PersonWhere +} + +input MovieWorkersAggregateInput { + AND: [MovieWorkersAggregateInput!] + NOT: MovieWorkersAggregateInput + OR: [MovieWorkersAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieWorkersNodeAggregationWhereInput +} + +input MovieWorkersConnectFieldInput { + connect: [PersonConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PersonConnectWhere +} + +type MovieWorkersConnection { + edges: [MovieWorkersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieWorkersConnectionSort { + node: PersonSort +} + +input MovieWorkersConnectionWhere { + AND: [MovieWorkersConnectionWhere!] + NOT: MovieWorkersConnectionWhere + OR: [MovieWorkersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieWorkersCreateFieldInput { + node: PersonCreateInput! +} + +input MovieWorkersDeleteFieldInput { + delete: PersonDeleteInput + where: MovieWorkersConnectionWhere +} + +input MovieWorkersDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieWorkersConnectionWhere +} + +input MovieWorkersFieldInput { + connect: [MovieWorkersConnectFieldInput!] + create: [MovieWorkersCreateFieldInput!] +} + +input MovieWorkersNodeAggregationWhereInput { + AND: [MovieWorkersNodeAggregationWhereInput!] + NOT: MovieWorkersNodeAggregationWhereInput + OR: [MovieWorkersNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieWorkersRelationship { + cursor: String! + node: Person! +} + +input MovieWorkersUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieWorkersUpdateFieldInput { + connect: [MovieWorkersConnectFieldInput!] + create: [MovieWorkersCreateFieldInput!] + delete: [MovieWorkersDeleteFieldInput!] + disconnect: [MovieWorkersDisconnectFieldInput!] + update: MovieWorkersUpdateConnectionInput + where: MovieWorkersConnectionWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + name: String! + worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input PersonConnectInput { + worksInProduction: [PersonWorksInProductionConnectFieldInput!] +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + name: String! + worksInProduction: PersonWorksInProductionFieldInput +} + +input PersonDeleteInput { + worksInProduction: [PersonWorksInProductionDeleteFieldInput!] +} + +input PersonDisconnectInput { + worksInProduction: [PersonWorksInProductionDisconnectFieldInput!] +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +input PersonRelationInput { + worksInProduction: [PersonWorksInProductionCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + name: String + worksInProduction: [PersonWorksInProductionUpdateFieldInput!] +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + worksInProductionConnection: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Use \`worksInProductionConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + worksInProductionConnection_ALL: PersonWorksInProductionConnectionWhere + \\"\\"\\" + Return People where none of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + worksInProductionConnection_NONE: PersonWorksInProductionConnectionWhere + worksInProductionConnection_NOT: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Use \`worksInProductionConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + worksInProductionConnection_SINGLE: PersonWorksInProductionConnectionWhere + \\"\\"\\" + Return People where some of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + worksInProductionConnection_SOME: PersonWorksInProductionConnectionWhere +} + +input PersonWorksInProductionConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere +} + +type PersonWorksInProductionConnection { + edges: [PersonWorksInProductionRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonWorksInProductionConnectionSort { + node: ProductionSort +} + +input PersonWorksInProductionConnectionWhere { + AND: [PersonWorksInProductionConnectionWhere!] + NOT: PersonWorksInProductionConnectionWhere + OR: [PersonWorksInProductionConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PersonWorksInProductionCreateFieldInput { + node: ProductionCreateInput! +} + +input PersonWorksInProductionDeleteFieldInput { + delete: ProductionDeleteInput + where: PersonWorksInProductionConnectionWhere +} + +input PersonWorksInProductionDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: PersonWorksInProductionConnectionWhere +} + +input PersonWorksInProductionFieldInput { + connect: [PersonWorksInProductionConnectFieldInput!] + create: [PersonWorksInProductionCreateFieldInput!] +} + +type PersonWorksInProductionRelationship { + cursor: String! + node: Production! +} + +input PersonWorksInProductionUpdateConnectionInput { + node: ProductionUpdateInput +} + +input PersonWorksInProductionUpdateFieldInput { + connect: [PersonWorksInProductionConnectFieldInput!] + create: [PersonWorksInProductionCreateFieldInput!] + delete: [PersonWorksInProductionDeleteFieldInput!] + disconnect: [PersonWorksInProductionDisconnectFieldInput!] + update: PersonWorksInProductionUpdateConnectionInput + where: PersonWorksInProductionConnectionWhere +} + +interface Production { + viewers: Int! +} + +input ProductionConnectInput { + _on: ProductionImplementationsConnectInput +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput +} + +input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput +} + +input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput +} + +input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] +} + +input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] +} + +input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere +} + +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 { + viewers: SortDirection +} + +input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + viewers: Int + viewers_DECREMENT: Int + viewers_INCREMENT: Int +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + viewers: Int + viewers_GT: Int + viewers_GTE: Int + viewers_IN: [Int!] + viewers_LT: Int + viewers_LTE: Int + viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); + }); - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! + test("Should be supported in Relationship properties", async () => { + const typeDefs = gql` + type Person { + name: String! + actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - \\"\\"\\"\\"\\"\\" type Movie { - \\"\\"\\"\\"\\"\\" - directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director - directedByAggregate(directed: Boolean = true, where: DirectorWhere): MovieDirectorDirectedByAggregationSelection - directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - viewers: Int! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: IntAggregateSelectionNonNullable! - } - - input MovieConnectInput { - directedBy: MovieDirectedByConnectFieldInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - directedBy: MovieDirectedByFieldInput - id: ID - viewers: Int! - } - - input MovieDeleteInput { - directedBy: MovieDirectedByDeleteFieldInput - } - - input MovieDirectedByAggregateInput { - AND: [MovieDirectedByAggregateInput!] - NOT: MovieDirectedByAggregateInput - OR: [MovieDirectedByAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieDirectedByNodeAggregationWhereInput - } - - input MovieDirectedByConnectFieldInput { - connect: DirectorConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: DirectorConnectWhere - } - - type MovieDirectedByConnection { - edges: [MovieDirectedByRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieDirectedByConnectionSort { - node: DirectorSort - } - - input MovieDirectedByConnectionWhere { - AND: [MovieDirectedByConnectionWhere!] - NOT: MovieDirectedByConnectionWhere - OR: [MovieDirectedByConnectionWhere!] - node: DirectorWhere - node_NOT: DirectorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieDirectedByCreateFieldInput { - node: DirectorCreateInput! - } - - input MovieDirectedByDeleteFieldInput { - delete: DirectorDeleteInput - where: MovieDirectedByConnectionWhere - } - - input MovieDirectedByDisconnectFieldInput { - disconnect: DirectorDisconnectInput - where: MovieDirectedByConnectionWhere - } - - input MovieDirectedByFieldInput { - connect: MovieDirectedByConnectFieldInput - create: MovieDirectedByCreateFieldInput - } - - input MovieDirectedByNodeAggregationWhereInput { - AND: [MovieDirectedByNodeAggregationWhereInput!] - NOT: MovieDirectedByNodeAggregationWhereInput - OR: [MovieDirectedByNodeAggregationWhereInput!] - lastName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_LENGTH_EQUAL: Float - lastName_AVERAGE_LENGTH_GT: Float - lastName_AVERAGE_LENGTH_GTE: Float - lastName_AVERAGE_LENGTH_LT: Float - lastName_AVERAGE_LENGTH_LTE: Float - lastName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_LENGTH_EQUAL: Int - lastName_LONGEST_LENGTH_GT: Int - lastName_LONGEST_LENGTH_GTE: Int - lastName_LONGEST_LENGTH_LT: Int - lastName_LONGEST_LENGTH_LTE: Int - lastName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_LENGTH_EQUAL: Int - lastName_SHORTEST_LENGTH_GT: Int - lastName_SHORTEST_LENGTH_GTE: Int - lastName_SHORTEST_LENGTH_LT: Int - lastName_SHORTEST_LENGTH_LTE: Int - lastName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieDirectedByRelationship { - cursor: String! - node: Director! - } - - input MovieDirectedByUpdateConnectionInput { - node: DirectorUpdateInput - } - - input MovieDirectedByUpdateFieldInput { - connect: MovieDirectedByConnectFieldInput - create: MovieDirectedByCreateFieldInput - delete: MovieDirectedByDeleteFieldInput - disconnect: MovieDirectedByDisconnectFieldInput - update: MovieDirectedByUpdateConnectionInput - where: MovieDirectedByConnectionWhere - } - - type MovieDirectorDirectedByAggregationSelection { - count: Int! - node: MovieDirectorDirectedByNodeAggregateSelection + title: String! + actors: [Person!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } - type MovieDirectorDirectedByNodeAggregateSelection { - lastName: StringAggregateSelectionNonNullable! + interface ActedIn @relationshipProperties { + roles: [String!] + pay: Float } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input MovieDisconnectInput { - directedBy: MovieDirectedByDisconnectFieldInput - } - - 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!] - } - - input MovieRelationInput { - directedBy: MovieDirectedByCreateFieldInput - } - - \\"\\"\\" - 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 - viewers: SortDirection - } - - input MovieUpdateInput { - directedBy: MovieDirectedByUpdateFieldInput - id: ID - viewers: Int - viewers_DECREMENT: Int - viewers_INCREMENT: Int - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - directedBy: DirectorWhere - directedByAggregate: MovieDirectedByAggregateInput - directedByConnection: MovieDirectedByConnectionWhere - directedByConnection_NOT: MovieDirectedByConnectionWhere - directedBy_NOT: DirectorWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createDirectors(input: [DirectorCreateInput!]!): CreateDirectorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteDirectors(delete: DirectorDeleteInput, where: DirectorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateDirectors(connect: DirectorConnectInput, create: DirectorRelationInput, delete: DirectorDeleteInput, disconnect: DirectorDisconnectInput, update: DirectorUpdateInput, where: DirectorWhere): UpdateDirectorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - directors(options: DirectorOptions, where: DirectorWhere): [Director!]! - directorsAggregate(where: DirectorWhere): DirectorAggregateSelection! - directorsConnection(after: String, first: Int, sort: [DirectorSort], where: DirectorWhere): DirectorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateDirectorsMutationResponse { - directors: [Director!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("Should be supported in interfaces", async () => { - const typeDefs = gql` - interface Production { - viewers: Int! - } - - type Movie implements Production { - id: ID - viewers: Int! - workers: [Person!]! @relationship(type: "WORKED_IN", direction: IN) - } - - type Person { - name: String! - worksInProduction: [Production!]! @relationship(type: "WORKED_IN", direction: OUT) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - viewers: Int! - \\"\\"\\"\\"\\"\\" - workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - workersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonWorkersAggregationSelection - workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: IntAggregateSelectionNonNullable! - } - - input MovieConnectInput { - workers: [MovieWorkersConnectFieldInput!] - } - - input MovieCreateInput { - id: ID - viewers: Int! - workers: MovieWorkersFieldInput - } - - input MovieDeleteInput { - workers: [MovieWorkersDeleteFieldInput!] - } - - input MovieDisconnectInput { - workers: [MovieWorkersDisconnectFieldInput!] - } - - 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!] - } - - type MoviePersonWorkersAggregationSelection { - count: Int! - node: MoviePersonWorkersNodeAggregateSelection - } - - type MoviePersonWorkersNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieRelationInput { - workers: [MovieWorkersCreateFieldInput!] - } - - \\"\\"\\" - 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 - viewers: SortDirection - } - - input MovieUpdateInput { - id: ID - viewers: Int - viewers_DECREMENT: Int - viewers_INCREMENT: Int - workers: [MovieWorkersUpdateFieldInput!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - workers: PersonWhere @deprecated(reason: \\"Use \`workers_SOME\` instead.\\") - workersAggregate: MovieWorkersAggregateInput - workersConnection: MovieWorkersConnectionWhere @deprecated(reason: \\"Use \`workersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieWorkersConnections match this filter - \\"\\"\\" - workersConnection_ALL: MovieWorkersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieWorkersConnections match this filter - \\"\\"\\" - workersConnection_NONE: MovieWorkersConnectionWhere - workersConnection_NOT: MovieWorkersConnectionWhere @deprecated(reason: \\"Use \`workersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieWorkersConnections match this filter - \\"\\"\\" - workersConnection_SINGLE: MovieWorkersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieWorkersConnections match this filter - \\"\\"\\" - workersConnection_SOME: MovieWorkersConnectionWhere - \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - workers_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - workers_NONE: PersonWhere - workers_NOT: PersonWhere @deprecated(reason: \\"Use \`workers_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - workers_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - workers_SOME: PersonWhere - } - - input MovieWorkersAggregateInput { - AND: [MovieWorkersAggregateInput!] - NOT: MovieWorkersAggregateInput - OR: [MovieWorkersAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieWorkersNodeAggregationWhereInput - } - - input MovieWorkersConnectFieldInput { - connect: [PersonConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PersonConnectWhere - } - - type MovieWorkersConnection { - edges: [MovieWorkersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieWorkersConnectionSort { - node: PersonSort - } - - input MovieWorkersConnectionWhere { - AND: [MovieWorkersConnectionWhere!] - NOT: MovieWorkersConnectionWhere - OR: [MovieWorkersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieWorkersCreateFieldInput { - node: PersonCreateInput! - } - - input MovieWorkersDeleteFieldInput { - delete: PersonDeleteInput - where: MovieWorkersConnectionWhere - } - - input MovieWorkersDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieWorkersConnectionWhere - } - - input MovieWorkersFieldInput { - connect: [MovieWorkersConnectFieldInput!] - create: [MovieWorkersCreateFieldInput!] - } - - input MovieWorkersNodeAggregationWhereInput { - AND: [MovieWorkersNodeAggregationWhereInput!] - NOT: MovieWorkersNodeAggregationWhereInput - OR: [MovieWorkersNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieWorkersRelationship { - cursor: String! - node: Person! - } - - input MovieWorkersUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieWorkersUpdateFieldInput { - connect: [MovieWorkersConnectFieldInput!] - create: [MovieWorkersCreateFieldInput!] - delete: [MovieWorkersDeleteFieldInput!] - disconnect: [MovieWorkersDisconnectFieldInput!] - update: MovieWorkersUpdateConnectionInput - where: MovieWorkersConnectionWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input PersonConnectInput { - worksInProduction: [PersonWorksInProductionConnectFieldInput!] - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - name: String! - worksInProduction: PersonWorksInProductionFieldInput - } - - input PersonDeleteInput { - worksInProduction: [PersonWorksInProductionDeleteFieldInput!] - } - - input PersonDisconnectInput { - worksInProduction: [PersonWorksInProductionDisconnectFieldInput!] - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - input PersonRelationInput { - worksInProduction: [PersonWorksInProductionCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - name: String - worksInProduction: [PersonWorksInProductionUpdateFieldInput!] - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - worksInProductionConnection: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Use \`worksInProductionConnection_SOME\` instead.\\") - \\"\\"\\" - Return People where all of the related PersonWorksInProductionConnections match this filter - \\"\\"\\" - worksInProductionConnection_ALL: PersonWorksInProductionConnectionWhere - \\"\\"\\" - Return People where none of the related PersonWorksInProductionConnections match this filter - \\"\\"\\" - worksInProductionConnection_NONE: PersonWorksInProductionConnectionWhere - worksInProductionConnection_NOT: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Use \`worksInProductionConnection_NONE\` instead.\\") - \\"\\"\\" - Return People where one of the related PersonWorksInProductionConnections match this filter - \\"\\"\\" - worksInProductionConnection_SINGLE: PersonWorksInProductionConnectionWhere - \\"\\"\\" - Return People where some of the related PersonWorksInProductionConnections match this filter - \\"\\"\\" - worksInProductionConnection_SOME: PersonWorksInProductionConnectionWhere - } - - input PersonWorksInProductionConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere - } - - type PersonWorksInProductionConnection { - edges: [PersonWorksInProductionRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonWorksInProductionConnectionSort { - node: ProductionSort - } - - input PersonWorksInProductionConnectionWhere { - AND: [PersonWorksInProductionConnectionWhere!] - NOT: PersonWorksInProductionConnectionWhere - OR: [PersonWorksInProductionConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PersonWorksInProductionCreateFieldInput { - node: ProductionCreateInput! - } - - input PersonWorksInProductionDeleteFieldInput { - delete: ProductionDeleteInput - where: PersonWorksInProductionConnectionWhere - } - - input PersonWorksInProductionDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: PersonWorksInProductionConnectionWhere - } - - input PersonWorksInProductionFieldInput { - connect: [PersonWorksInProductionConnectFieldInput!] - create: [PersonWorksInProductionCreateFieldInput!] - } - - type PersonWorksInProductionRelationship { - cursor: String! - node: Production! - } - - input PersonWorksInProductionUpdateConnectionInput { - node: ProductionUpdateInput - } - - input PersonWorksInProductionUpdateFieldInput { - connect: [PersonWorksInProductionConnectFieldInput!] - create: [PersonWorksInProductionCreateFieldInput!] - delete: [PersonWorksInProductionDeleteFieldInput!] - disconnect: [PersonWorksInProductionDisconnectFieldInput!] - update: PersonWorksInProductionUpdateConnectionInput - where: PersonWorksInProductionConnectionWhere - } - - interface Production { - \\"\\"\\"\\"\\"\\" - viewers: Int! - } - - input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - } - - input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - } - - input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - } - - input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - } - - input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - } - - input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - } - - 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 { - viewers: SortDirection - } - - input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - viewers: Int - viewers_DECREMENT: Int - viewers_INCREMENT: Int - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); - }); - - test("Should be supported in Relationship properties", async () => { - const typeDefs = gql` - type Person { - name: String! - actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) - } - - type Movie { - title: String! - actors: [Person!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) - } - - interface ActedIn @relationshipProperties { - roles: [String!] - pay: Float - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - pay: Float - \\"\\"\\"\\"\\"\\" - roles: [String!] - } - - input ActedInCreateInput { - pay: Float - roles: [String!] - } - - input ActedInSort { - pay: SortDirection - roles: SortDirection - } - - input ActedInUpdateInput { - pay: Float - pay_ADD: Float - pay_DIVIDE: Float - pay_MULTIPLY: Float - pay_SUBTRACT: Float - roles: [String!] - roles_POP: Int - roles_PUSH: [String!] - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - pay: Float - pay_GT: Float - pay_GTE: Float - pay_IN: [Float] - pay_LT: Float - pay_LTE: Float - pay_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - pay_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - roles: [String!] - roles_INCLUDES: String - roles_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - roles_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [PersonConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PersonConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - edge: ActedInSort - node: PersonSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - edge: ActedInCreateInput - node: PersonCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - pay_AVERAGE_EQUAL: Float - pay_AVERAGE_GT: Float - pay_AVERAGE_GTE: Float - pay_AVERAGE_LT: Float - pay_AVERAGE_LTE: Float - pay_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_MAX_EQUAL: Float - pay_MAX_GT: Float - pay_MAX_GTE: Float - pay_MAX_LT: Float - pay_MAX_LTE: Float - pay_MIN_EQUAL: Float - pay_MIN_GT: Float - pay_MIN_GTE: Float - pay_MIN_LT: Float - pay_MIN_LTE: Float - pay_SUM_EQUAL: Float - pay_SUM_GT: Float - pay_SUM_GTE: Float - pay_SUM_LT: Float - pay_SUM_LTE: Float - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Person! - \\"\\"\\"\\"\\"\\" - pay: Float - \\"\\"\\"\\"\\"\\" - roles: [String!] - } - - input MovieActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: PersonUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! - } - - 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!] - } - - type MoviePersonActorsAggregationSelection { - count: Int! - edge: MoviePersonActorsEdgeAggregateSelection - node: MoviePersonActorsNodeAggregateSelection - } - - type MoviePersonActorsEdgeAggregateSelection { - pay: FloatAggregateSelectionNullable! - } - - type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInMoviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieActedInMoviesAggregationSelection - actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - input PersonActedInMoviesAggregateInput { - AND: [PersonActedInMoviesAggregateInput!] - NOT: PersonActedInMoviesAggregateInput - OR: [PersonActedInMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: PersonActedInMoviesEdgeAggregationWhereInput - node: PersonActedInMoviesNodeAggregationWhereInput - } - - input PersonActedInMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type PersonActedInMoviesConnection { - edges: [PersonActedInMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonActedInMoviesConnectionSort { - edge: ActedInSort - node: MovieSort - } - - input PersonActedInMoviesConnectionWhere { - AND: [PersonActedInMoviesConnectionWhere!] - NOT: PersonActedInMoviesConnectionWhere - OR: [PersonActedInMoviesConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PersonActedInMoviesCreateFieldInput { - edge: ActedInCreateInput - node: MovieCreateInput! - } - - input PersonActedInMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: PersonActedInMoviesConnectionWhere - } - - input PersonActedInMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: PersonActedInMoviesConnectionWhere - } - - input PersonActedInMoviesEdgeAggregationWhereInput { - AND: [PersonActedInMoviesEdgeAggregationWhereInput!] - NOT: PersonActedInMoviesEdgeAggregationWhereInput - OR: [PersonActedInMoviesEdgeAggregationWhereInput!] - pay_AVERAGE_EQUAL: Float - pay_AVERAGE_GT: Float - pay_AVERAGE_GTE: Float - pay_AVERAGE_LT: Float - pay_AVERAGE_LTE: Float - pay_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_MAX_EQUAL: Float - pay_MAX_GT: Float - pay_MAX_GTE: Float - pay_MAX_LT: Float - pay_MAX_LTE: Float - pay_MIN_EQUAL: Float - pay_MIN_GT: Float - pay_MIN_GTE: Float - pay_MIN_LT: Float - pay_MIN_LTE: Float - pay_SUM_EQUAL: Float - pay_SUM_GT: Float - pay_SUM_GTE: Float - pay_SUM_LT: Float - pay_SUM_LTE: Float - } - - input PersonActedInMoviesFieldInput { - connect: [PersonActedInMoviesConnectFieldInput!] - create: [PersonActedInMoviesCreateFieldInput!] - } - - input PersonActedInMoviesNodeAggregationWhereInput { - AND: [PersonActedInMoviesNodeAggregationWhereInput!] - NOT: PersonActedInMoviesNodeAggregationWhereInput - OR: [PersonActedInMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type PersonActedInMoviesRelationship implements ActedIn { - cursor: String! - node: Movie! - \\"\\"\\"\\"\\"\\" - pay: Float - \\"\\"\\"\\"\\"\\" - roles: [String!] - } - - input PersonActedInMoviesUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput - } - - input PersonActedInMoviesUpdateFieldInput { - connect: [PersonActedInMoviesConnectFieldInput!] - create: [PersonActedInMoviesCreateFieldInput!] - delete: [PersonActedInMoviesDeleteFieldInput!] - disconnect: [PersonActedInMoviesDisconnectFieldInput!] - update: PersonActedInMoviesUpdateConnectionInput - where: PersonActedInMoviesConnectionWhere - } - - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input PersonConnectInput { - actedInMovies: [PersonActedInMoviesConnectFieldInput!] - } - - input PersonConnectWhere { - node: PersonWhere! - } - - input PersonCreateInput { - actedInMovies: PersonActedInMoviesFieldInput - name: String! - } - - input PersonDeleteInput { - actedInMovies: [PersonActedInMoviesDeleteFieldInput!] - } - - input PersonDisconnectInput { - actedInMovies: [PersonActedInMoviesDisconnectFieldInput!] - } - - type PersonEdge { - cursor: String! - node: Person! - } - - type PersonMovieActedInMoviesAggregationSelection { - count: Int! - edge: PersonMovieActedInMoviesEdgeAggregateSelection - node: PersonMovieActedInMoviesNodeAggregateSelection - } - - type PersonMovieActedInMoviesEdgeAggregateSelection { - pay: FloatAggregateSelectionNullable! - } - - type PersonMovieActedInMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! - } - - input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] - } - - input PersonRelationInput { - actedInMovies: [PersonActedInMoviesCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. - \\"\\"\\" - input PersonSort { - name: SortDirection - } - - input PersonUpdateInput { - actedInMovies: [PersonActedInMoviesUpdateFieldInput!] - name: String - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - actedInMovies: MovieWhere @deprecated(reason: \\"Use \`actedInMovies_SOME\` instead.\\") - actedInMoviesAggregate: PersonActedInMoviesAggregateInput - actedInMoviesConnection: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Use \`actedInMoviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return People where all of the related PersonActedInMoviesConnections match this filter - \\"\\"\\" - actedInMoviesConnection_ALL: PersonActedInMoviesConnectionWhere - \\"\\"\\" - Return People where none of the related PersonActedInMoviesConnections match this filter - \\"\\"\\" - actedInMoviesConnection_NONE: PersonActedInMoviesConnectionWhere - actedInMoviesConnection_NOT: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Use \`actedInMoviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return People where one of the related PersonActedInMoviesConnections match this filter - \\"\\"\\" - actedInMoviesConnection_SINGLE: PersonActedInMoviesConnectionWhere - \\"\\"\\" - Return People where some of the related PersonActedInMoviesConnections match this filter - \\"\\"\\" - actedInMoviesConnection_SOME: PersonActedInMoviesConnectionWhere - \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - actedInMovies_ALL: MovieWhere - \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - actedInMovies_NONE: MovieWhere - actedInMovies_NOT: MovieWhere @deprecated(reason: \\"Use \`actedInMovies_NONE\` instead.\\") - \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - actedInMovies_SINGLE: MovieWhere - \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - actedInMovies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + pay: Float + roles: [String!] +} + +input ActedInCreateInput { + pay: Float + roles: [String!] +} + +input ActedInSort { + pay: SortDirection + roles: SortDirection +} + +input ActedInUpdateInput { + pay: Float + pay_ADD: Float + pay_DIVIDE: Float + pay_MULTIPLY: Float + pay_SUBTRACT: Float + roles: [String!] + roles_POP: Int + roles_PUSH: [String!] +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + pay: Float + pay_GT: Float + pay_GTE: Float + pay_IN: [Float] + pay_LT: Float + pay_LTE: Float + pay_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + pay_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + roles: [String!] + roles_INCLUDES: String + roles_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + roles_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [PersonConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PersonConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + edge: ActedInSort + node: PersonSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + edge: ActedInCreateInput + node: PersonCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + pay_AVERAGE_EQUAL: Float + pay_AVERAGE_GT: Float + pay_AVERAGE_GTE: Float + pay_AVERAGE_LT: Float + pay_AVERAGE_LTE: Float + pay_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_MAX_EQUAL: Float + pay_MAX_GT: Float + pay_MAX_GTE: Float + pay_MAX_LT: Float + pay_MAX_LTE: Float + pay_MIN_EQUAL: Float + pay_MIN_GT: Float + pay_MIN_GTE: Float + pay_MIN_LT: Float + pay_MIN_LTE: Float + pay_SUM_EQUAL: Float + pay_SUM_GT: Float + pay_SUM_GTE: Float + pay_SUM_LT: Float + pay_SUM_LTE: Float +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Person! + pay: Float + roles: [String!] +} + +input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: PersonUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! +} + +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!] +} + +type MoviePersonActorsAggregationSelection { + count: Int! + edge: MoviePersonActorsEdgeAggregateSelection + node: MoviePersonActorsNodeAggregateSelection +} + +type MoviePersonActorsEdgeAggregateSelection { + pay: FloatAggregateSelectionNullable! +} + +type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInMoviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieActedInMoviesAggregationSelection + actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! + name: String! +} + +input PersonActedInMoviesAggregateInput { + AND: [PersonActedInMoviesAggregateInput!] + NOT: PersonActedInMoviesAggregateInput + OR: [PersonActedInMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: PersonActedInMoviesEdgeAggregationWhereInput + node: PersonActedInMoviesNodeAggregationWhereInput +} + +input PersonActedInMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type PersonActedInMoviesConnection { + edges: [PersonActedInMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonActedInMoviesConnectionSort { + edge: ActedInSort + node: MovieSort +} + +input PersonActedInMoviesConnectionWhere { + AND: [PersonActedInMoviesConnectionWhere!] + NOT: PersonActedInMoviesConnectionWhere + OR: [PersonActedInMoviesConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PersonActedInMoviesCreateFieldInput { + edge: ActedInCreateInput + node: MovieCreateInput! +} + +input PersonActedInMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: PersonActedInMoviesConnectionWhere +} + +input PersonActedInMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: PersonActedInMoviesConnectionWhere +} + +input PersonActedInMoviesEdgeAggregationWhereInput { + AND: [PersonActedInMoviesEdgeAggregationWhereInput!] + NOT: PersonActedInMoviesEdgeAggregationWhereInput + OR: [PersonActedInMoviesEdgeAggregationWhereInput!] + pay_AVERAGE_EQUAL: Float + pay_AVERAGE_GT: Float + pay_AVERAGE_GTE: Float + pay_AVERAGE_LT: Float + pay_AVERAGE_LTE: Float + pay_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_MAX_EQUAL: Float + pay_MAX_GT: Float + pay_MAX_GTE: Float + pay_MAX_LT: Float + pay_MAX_LTE: Float + pay_MIN_EQUAL: Float + pay_MIN_GT: Float + pay_MIN_GTE: Float + pay_MIN_LT: Float + pay_MIN_LTE: Float + pay_SUM_EQUAL: Float + pay_SUM_GT: Float + pay_SUM_GTE: Float + pay_SUM_LT: Float + pay_SUM_LTE: Float +} + +input PersonActedInMoviesFieldInput { + connect: [PersonActedInMoviesConnectFieldInput!] + create: [PersonActedInMoviesCreateFieldInput!] +} + +input PersonActedInMoviesNodeAggregationWhereInput { + AND: [PersonActedInMoviesNodeAggregationWhereInput!] + NOT: PersonActedInMoviesNodeAggregationWhereInput + OR: [PersonActedInMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type PersonActedInMoviesRelationship implements ActedIn { + cursor: String! + node: Movie! + pay: Float + roles: [String!] +} + +input PersonActedInMoviesUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput +} + +input PersonActedInMoviesUpdateFieldInput { + connect: [PersonActedInMoviesConnectFieldInput!] + create: [PersonActedInMoviesCreateFieldInput!] + delete: [PersonActedInMoviesDeleteFieldInput!] + disconnect: [PersonActedInMoviesDisconnectFieldInput!] + update: PersonActedInMoviesUpdateConnectionInput + where: PersonActedInMoviesConnectionWhere +} + +type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input PersonConnectInput { + actedInMovies: [PersonActedInMoviesConnectFieldInput!] +} + +input PersonConnectWhere { + node: PersonWhere! +} + +input PersonCreateInput { + actedInMovies: PersonActedInMoviesFieldInput + name: String! +} + +input PersonDeleteInput { + actedInMovies: [PersonActedInMoviesDeleteFieldInput!] +} + +input PersonDisconnectInput { + actedInMovies: [PersonActedInMoviesDisconnectFieldInput!] +} + +type PersonEdge { + cursor: String! + node: Person! +} + +type PersonMovieActedInMoviesAggregationSelection { + count: Int! + edge: PersonMovieActedInMoviesEdgeAggregateSelection + node: PersonMovieActedInMoviesNodeAggregateSelection +} + +type PersonMovieActedInMoviesEdgeAggregateSelection { + pay: FloatAggregateSelectionNullable! +} + +type PersonMovieActedInMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! +} + +input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] +} + +input PersonRelationInput { + actedInMovies: [PersonActedInMoviesCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. +\\"\\"\\" +input PersonSort { + name: SortDirection +} + +input PersonUpdateInput { + actedInMovies: [PersonActedInMoviesUpdateFieldInput!] + name: String +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + actedInMovies: MovieWhere @deprecated(reason: \\"Use \`actedInMovies_SOME\` instead.\\") + actedInMoviesAggregate: PersonActedInMoviesAggregateInput + actedInMoviesConnection: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Use \`actedInMoviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + actedInMoviesConnection_ALL: PersonActedInMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + actedInMoviesConnection_NONE: PersonActedInMoviesConnectionWhere + actedInMoviesConnection_NOT: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Use \`actedInMoviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + actedInMoviesConnection_SINGLE: PersonActedInMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + actedInMoviesConnection_SOME: PersonActedInMoviesConnectionWhere + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + actedInMovies_ALL: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + actedInMovies_NONE: MovieWhere + actedInMovies_NOT: MovieWhere @deprecated(reason: \\"Use \`actedInMovies_NONE\` instead.\\") + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + actedInMovies_SINGLE: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + actedInMovies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index 99d08565da..1459985ee1 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -45,334 +45,320 @@ describe("Null", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } +"schema { + query: Query + mutation: Mutation +} - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime - type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! - } +type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! +} - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} - type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! - } +type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! +} - type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! - } +type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! +} - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actorCount: Int! - \\"\\"\\"\\"\\"\\" - actorCounts: [Int!]! - \\"\\"\\"\\"\\"\\" - averageRating: Float! - \\"\\"\\"\\"\\"\\" - averageRatings: [Float!]! - \\"\\"\\"\\"\\"\\" - createdAt: DateTime! - \\"\\"\\"\\"\\"\\" - createdAts: [DateTime!]! - \\"\\"\\"\\"\\"\\" - filmedAt: Point! - \\"\\"\\"\\"\\"\\" - filmedAts: [Point!]! - \\"\\"\\"\\"\\"\\" - id: ID! - \\"\\"\\"\\"\\"\\" - ids: [ID!]! - \\"\\"\\"\\"\\"\\" - isActives: [Boolean!]! - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - names: [String!]! - } +type Movie { + actorCount: Int! + actorCounts: [Int!]! + averageRating: Float! + averageRatings: [Float!]! + createdAt: DateTime! + createdAts: [DateTime!]! + filmedAt: Point! + filmedAts: [Point!]! + id: ID! + ids: [ID!]! + isActives: [Boolean!]! + name: String! + names: [String!]! +} - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNonNullable! - averageRating: FloatAggregateSelectionNonNullable! - count: Int! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNonNullable! + averageRating: FloatAggregateSelectionNonNullable! + count: Int! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! +} - input MovieCreateInput { - actorCount: Int! - actorCounts: [Int!]! - averageRating: Float! - averageRatings: [Float!]! - createdAt: DateTime! - createdAts: [DateTime!]! - filmedAt: PointInput! - filmedAts: [PointInput!]! - id: ID! - ids: [ID!]! - isActives: [Boolean!]! - name: String! - names: [String!]! - } +input MovieCreateInput { + actorCount: Int! + actorCounts: [Int!]! + averageRating: Float! + averageRatings: [Float!]! + createdAt: DateTime! + createdAts: [DateTime!]! + filmedAt: PointInput! + filmedAts: [PointInput!]! + id: ID! + ids: [ID!]! + isActives: [Boolean!]! + name: String! + names: [String!]! +} - type MovieEdge { - cursor: String! - node: Movie! - } +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!] - } +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 { - actorCount: SortDirection - averageRating: SortDirection - createdAt: SortDirection - filmedAt: SortDirection - id: SortDirection - name: SortDirection - } +\\"\\"\\" +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 { + actorCount: SortDirection + averageRating: SortDirection + createdAt: SortDirection + filmedAt: SortDirection + id: SortDirection + name: SortDirection +} - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCounts: [Int!] - actorCounts_POP: Int - actorCounts_PUSH: [Int!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - averageRatings: [Float!] - averageRatings_POP: Int - averageRatings_PUSH: [Float!] - createdAt: DateTime - createdAts: [DateTime!] - createdAts_POP: Int - createdAts_PUSH: [DateTime!] - filmedAt: PointInput - filmedAts: [PointInput!] - filmedAts_POP: Int - filmedAts_PUSH: [PointInput!] - id: ID - ids: [ID!] - ids_POP: Int - ids_PUSH: [ID!] - isActives: [Boolean!] - isActives_POP: Int - isActives_PUSH: [Boolean!] - name: String - names: [String!] - names_POP: Int - names_PUSH: [String!] - } +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actorCounts: [Int!] + actorCounts_POP: Int + actorCounts_PUSH: [Int!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + averageRatings: [Float!] + averageRatings_POP: Int + averageRatings_PUSH: [Float!] + createdAt: DateTime + createdAts: [DateTime!] + createdAts_POP: Int + createdAts_PUSH: [DateTime!] + filmedAt: PointInput + filmedAts: [PointInput!] + filmedAts_POP: Int + filmedAts_PUSH: [PointInput!] + id: ID + ids: [ID!] + ids_POP: Int + ids_PUSH: [ID!] + isActives: [Boolean!] + isActives_POP: Int + isActives_PUSH: [Boolean!] + name: String + names: [String!] + names_POP: Int + names_PUSH: [String!] +} - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int!] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCounts: [Int!] - actorCounts_INCLUDES: Int - actorCounts_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCounts_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRatings: [Float!] - averageRatings_INCLUDES: Float - averageRatings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRatings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAts: [DateTime!] - createdAts_INCLUDES: DateTime - createdAts_NOT: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAts_NOT_INCLUDES: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAt: PointInput - filmedAt_DISTANCE: PointDistance - filmedAt_GT: PointDistance - filmedAt_GTE: PointDistance - filmedAt_IN: [PointInput!] - filmedAt_LT: PointDistance - filmedAt_LTE: PointDistance - filmedAt_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAt_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAts: [PointInput!] - filmedAts_INCLUDES: PointInput - filmedAts_NOT: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAts_NOT_INCLUDES: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - ids: [ID!] - ids_INCLUDES: ID - ids_NOT: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - ids_NOT_INCLUDES: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isActives: [Boolean!] - isActives_NOT: [Boolean!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - names: [String!] - names_INCLUDES: String - names_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - names_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int!] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCounts: [Int!] + actorCounts_INCLUDES: Int + actorCounts_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCounts_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float!] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRatings: [Float!] + averageRatings_INCLUDES: Float + averageRatings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRatings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime!] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAts: [DateTime!] + createdAts_INCLUDES: DateTime + createdAts_NOT: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAts_NOT_INCLUDES: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAt: PointInput + filmedAt_DISTANCE: PointDistance + filmedAt_GT: PointDistance + filmedAt_GTE: PointDistance + filmedAt_IN: [PointInput!] + filmedAt_LT: PointDistance + filmedAt_LTE: PointDistance + filmedAt_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAt_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAts: [PointInput!] + filmedAts_INCLUDES: PointInput + filmedAts_NOT: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAts_NOT_INCLUDES: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + ids: [ID!] + ids_INCLUDES: ID + ids_NOT: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + ids_NOT_INCLUDES: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isActives: [Boolean!] + isActives_NOT: [Boolean!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + names: [String!] + names_INCLUDES: String + names_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + names_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} - \\"\\"\\"Point type\\"\\"\\" - type Point { - crs: String! - height: Float - latitude: Float! - longitude: Float! - srid: Int! - } +\\"\\"\\"Point type\\"\\"\\" +type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! +} - \\"\\"\\"\\"\\"\\" - input PointDistance { - \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" - distance: Float! - point: PointInput! - } +\\"\\"\\"\\"\\"\\" +input PointDistance { + \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" + distance: Float! + point: PointInput! +} - \\"\\"\\"\\"\\"\\" - input PointInput { - height: Float - latitude: Float! - longitude: Float! - } +\\"\\"\\"\\"\\"\\" +input PointInput { + height: Float + latitude: Float! + longitude: Float! +} - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index f476b8b994..5ea911c6d2 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -38,402 +38,397 @@ describe("Pluralize consistency", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateSuperFriendsMutationResponse { - info: CreateInfo! - superFriends: [super_friend!]! - } - - type CreateSuperUsersMutationResponse { - info: CreateInfo! - superUsers: [super_user!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createSuperFriends(input: [super_friendCreateInput!]!): CreateSuperFriendsMutationResponse! - createSuperUsers(input: [super_userCreateInput!]!): CreateSuperUsersMutationResponse! - deleteSuperFriends(where: super_friendWhere): DeleteInfo! - deleteSuperUsers(delete: super_userDeleteInput, where: super_userWhere): DeleteInfo! - updateSuperFriends(update: super_friendUpdateInput, where: super_friendWhere): UpdateSuperFriendsMutationResponse! - updateSuperUsers(connect: super_userConnectInput, create: super_userRelationInput, delete: super_userDeleteInput, disconnect: super_userDisconnectInput, update: super_userUpdateInput, where: super_userWhere): UpdateSuperUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - superFriends(options: super_friendOptions, where: super_friendWhere): [super_friend!]! - superFriendsAggregate(where: super_friendWhere): super_friendAggregateSelection! - superFriendsConnection(after: String, first: Int, sort: [super_friendSort], where: super_friendWhere): SuperFriendsConnection! - superUsers(options: super_userOptions, where: super_userWhere): [super_user!]! - superUsersAggregate(where: super_userWhere): super_userAggregateSelection! - superUsersConnection(after: String, first: Int, sort: [super_userSort], where: super_userWhere): SuperUsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type SuperFriendsConnection { - edges: [super_friendEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type SuperUsersConnection { - edges: [super_userEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateSuperFriendsMutationResponse { - info: UpdateInfo! - superFriends: [super_friend!]! - } - - type UpdateSuperUsersMutationResponse { - info: UpdateInfo! - superUsers: [super_user!]! - } - - \\"\\"\\"\\"\\"\\" - type super_friend { - \\"\\"\\"\\"\\"\\" - name: String! - } - - type super_friendAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input super_friendConnectWhere { - node: super_friendWhere! - } - - input super_friendCreateInput { - name: String! - } - - type super_friendEdge { - cursor: String! - node: super_friend! - } - - input super_friendOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more super_friendSort objects to sort SuperFriends by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [super_friendSort!] - } - - \\"\\"\\" - Fields to sort SuperFriends by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_friendSort object. - \\"\\"\\" - input super_friendSort { - name: SortDirection - } - - input super_friendUpdateInput { - name: String - } - - input super_friendWhere { - AND: [super_friendWhere!] - NOT: super_friendWhere - OR: [super_friendWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - \\"\\"\\"\\"\\"\\" - type super_user { - \\"\\"\\"\\"\\"\\" - my_friend(directed: Boolean = true, options: super_friendOptions, where: super_friendWhere): [super_friend!]! - my_friendAggregate(directed: Boolean = true, where: super_friendWhere): super_userSuper_friendMy_friendAggregationSelection - my_friendConnection(after: String, directed: Boolean = true, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type super_userAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input super_userConnectInput { - my_friend: [super_userMy_friendConnectFieldInput!] - } - - input super_userCreateInput { - my_friend: super_userMy_friendFieldInput - name: String! - } - - input super_userDeleteInput { - my_friend: [super_userMy_friendDeleteFieldInput!] - } - - input super_userDisconnectInput { - my_friend: [super_userMy_friendDisconnectFieldInput!] - } - - type super_userEdge { - cursor: String! - node: super_user! - } - - input super_userMy_friendAggregateInput { - AND: [super_userMy_friendAggregateInput!] - NOT: super_userMy_friendAggregateInput - OR: [super_userMy_friendAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: super_userMy_friendNodeAggregationWhereInput - } - - input super_userMy_friendConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: super_friendConnectWhere - } - - type super_userMy_friendConnection { - edges: [super_userMy_friendRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input super_userMy_friendConnectionSort { - node: super_friendSort - } - - input super_userMy_friendConnectionWhere { - AND: [super_userMy_friendConnectionWhere!] - NOT: super_userMy_friendConnectionWhere - OR: [super_userMy_friendConnectionWhere!] - node: super_friendWhere - node_NOT: super_friendWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input super_userMy_friendCreateFieldInput { - node: super_friendCreateInput! - } - - input super_userMy_friendDeleteFieldInput { - where: super_userMy_friendConnectionWhere - } - - input super_userMy_friendDisconnectFieldInput { - where: super_userMy_friendConnectionWhere - } - - input super_userMy_friendFieldInput { - connect: [super_userMy_friendConnectFieldInput!] - create: [super_userMy_friendCreateFieldInput!] - } - - input super_userMy_friendNodeAggregationWhereInput { - AND: [super_userMy_friendNodeAggregationWhereInput!] - NOT: super_userMy_friendNodeAggregationWhereInput - OR: [super_userMy_friendNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type super_userMy_friendRelationship { - cursor: String! - node: super_friend! - } - - input super_userMy_friendUpdateConnectionInput { - node: super_friendUpdateInput - } - - input super_userMy_friendUpdateFieldInput { - connect: [super_userMy_friendConnectFieldInput!] - create: [super_userMy_friendCreateFieldInput!] - delete: [super_userMy_friendDeleteFieldInput!] - disconnect: [super_userMy_friendDisconnectFieldInput!] - update: super_userMy_friendUpdateConnectionInput - where: super_userMy_friendConnectionWhere - } - - input super_userOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more super_userSort objects to sort SuperUsers by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [super_userSort!] - } - - input super_userRelationInput { - my_friend: [super_userMy_friendCreateFieldInput!] - } - - \\"\\"\\" - Fields to sort SuperUsers by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_userSort object. - \\"\\"\\" - input super_userSort { - name: SortDirection - } - - type super_userSuper_friendMy_friendAggregationSelection { - count: Int! - node: super_userSuper_friendMy_friendNodeAggregateSelection - } - - type super_userSuper_friendMy_friendNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input super_userUpdateInput { - my_friend: [super_userMy_friendUpdateFieldInput!] - name: String - } - - input super_userWhere { - AND: [super_userWhere!] - NOT: super_userWhere - OR: [super_userWhere!] - my_friend: super_friendWhere @deprecated(reason: \\"Use \`my_friend_SOME\` instead.\\") - my_friendAggregate: super_userMy_friendAggregateInput - my_friendConnection: super_userMy_friendConnectionWhere @deprecated(reason: \\"Use \`my_friendConnection_SOME\` instead.\\") - \\"\\"\\" - Return super_users where all of the related super_userMy_friendConnections match this filter - \\"\\"\\" - my_friendConnection_ALL: super_userMy_friendConnectionWhere - \\"\\"\\" - Return super_users where none of the related super_userMy_friendConnections match this filter - \\"\\"\\" - my_friendConnection_NONE: super_userMy_friendConnectionWhere - my_friendConnection_NOT: super_userMy_friendConnectionWhere @deprecated(reason: \\"Use \`my_friendConnection_NONE\` instead.\\") - \\"\\"\\" - Return super_users where one of the related super_userMy_friendConnections match this filter - \\"\\"\\" - my_friendConnection_SINGLE: super_userMy_friendConnectionWhere - \\"\\"\\" - Return super_users where some of the related super_userMy_friendConnections match this filter - \\"\\"\\" - my_friendConnection_SOME: super_userMy_friendConnectionWhere - \\"\\"\\" - Return super_users where all of the related super_friends match this filter - \\"\\"\\" - my_friend_ALL: super_friendWhere - \\"\\"\\" - Return super_users where none of the related super_friends match this filter - \\"\\"\\" - my_friend_NONE: super_friendWhere - my_friend_NOT: super_friendWhere @deprecated(reason: \\"Use \`my_friend_NONE\` instead.\\") - \\"\\"\\" - Return super_users where one of the related super_friends match this filter - \\"\\"\\" - my_friend_SINGLE: super_friendWhere - \\"\\"\\" - Return super_users where some of the related super_friends match this filter - \\"\\"\\" - my_friend_SOME: super_friendWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateSuperFriendsMutationResponse { + info: CreateInfo! + superFriends: [super_friend!]! +} + +type CreateSuperUsersMutationResponse { + info: CreateInfo! + superUsers: [super_user!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createSuperFriends(input: [super_friendCreateInput!]!): CreateSuperFriendsMutationResponse! + createSuperUsers(input: [super_userCreateInput!]!): CreateSuperUsersMutationResponse! + deleteSuperFriends(where: super_friendWhere): DeleteInfo! + deleteSuperUsers(delete: super_userDeleteInput, where: super_userWhere): DeleteInfo! + updateSuperFriends(update: super_friendUpdateInput, where: super_friendWhere): UpdateSuperFriendsMutationResponse! + updateSuperUsers(connect: super_userConnectInput, create: super_userRelationInput, delete: super_userDeleteInput, disconnect: super_userDisconnectInput, update: super_userUpdateInput, where: super_userWhere): UpdateSuperUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + superFriends(options: super_friendOptions, where: super_friendWhere): [super_friend!]! + superFriendsAggregate(where: super_friendWhere): super_friendAggregateSelection! + superFriendsConnection(after: String, first: Int, sort: [super_friendSort], where: super_friendWhere): SuperFriendsConnection! + superUsers(options: super_userOptions, where: super_userWhere): [super_user!]! + superUsersAggregate(where: super_userWhere): super_userAggregateSelection! + superUsersConnection(after: String, first: Int, sort: [super_userSort], where: super_userWhere): SuperUsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type SuperFriendsConnection { + edges: [super_friendEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type SuperUsersConnection { + edges: [super_userEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateSuperFriendsMutationResponse { + info: UpdateInfo! + superFriends: [super_friend!]! +} + +type UpdateSuperUsersMutationResponse { + info: UpdateInfo! + superUsers: [super_user!]! +} + +type super_friend { + name: String! +} + +type super_friendAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input super_friendConnectWhere { + node: super_friendWhere! +} + +input super_friendCreateInput { + name: String! +} + +type super_friendEdge { + cursor: String! + node: super_friend! +} + +input super_friendOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more super_friendSort objects to sort SuperFriends by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [super_friendSort!] +} + +\\"\\"\\" +Fields to sort SuperFriends by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_friendSort object. +\\"\\"\\" +input super_friendSort { + name: SortDirection +} + +input super_friendUpdateInput { + name: String +} + +input super_friendWhere { + AND: [super_friendWhere!] + NOT: super_friendWhere + OR: [super_friendWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type super_user { + my_friend(directed: Boolean = true, options: super_friendOptions, where: super_friendWhere): [super_friend!]! + my_friendAggregate(directed: Boolean = true, where: super_friendWhere): super_userSuper_friendMy_friendAggregationSelection + my_friendConnection(after: String, directed: Boolean = true, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! + name: String! +} + +type super_userAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input super_userConnectInput { + my_friend: [super_userMy_friendConnectFieldInput!] +} + +input super_userCreateInput { + my_friend: super_userMy_friendFieldInput + name: String! +} + +input super_userDeleteInput { + my_friend: [super_userMy_friendDeleteFieldInput!] +} + +input super_userDisconnectInput { + my_friend: [super_userMy_friendDisconnectFieldInput!] +} + +type super_userEdge { + cursor: String! + node: super_user! +} + +input super_userMy_friendAggregateInput { + AND: [super_userMy_friendAggregateInput!] + NOT: super_userMy_friendAggregateInput + OR: [super_userMy_friendAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: super_userMy_friendNodeAggregationWhereInput +} + +input super_userMy_friendConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: super_friendConnectWhere +} + +type super_userMy_friendConnection { + edges: [super_userMy_friendRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input super_userMy_friendConnectionSort { + node: super_friendSort +} + +input super_userMy_friendConnectionWhere { + AND: [super_userMy_friendConnectionWhere!] + NOT: super_userMy_friendConnectionWhere + OR: [super_userMy_friendConnectionWhere!] + node: super_friendWhere + node_NOT: super_friendWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input super_userMy_friendCreateFieldInput { + node: super_friendCreateInput! +} + +input super_userMy_friendDeleteFieldInput { + where: super_userMy_friendConnectionWhere +} + +input super_userMy_friendDisconnectFieldInput { + where: super_userMy_friendConnectionWhere +} + +input super_userMy_friendFieldInput { + connect: [super_userMy_friendConnectFieldInput!] + create: [super_userMy_friendCreateFieldInput!] +} + +input super_userMy_friendNodeAggregationWhereInput { + AND: [super_userMy_friendNodeAggregationWhereInput!] + NOT: super_userMy_friendNodeAggregationWhereInput + OR: [super_userMy_friendNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type super_userMy_friendRelationship { + cursor: String! + node: super_friend! +} + +input super_userMy_friendUpdateConnectionInput { + node: super_friendUpdateInput +} + +input super_userMy_friendUpdateFieldInput { + connect: [super_userMy_friendConnectFieldInput!] + create: [super_userMy_friendCreateFieldInput!] + delete: [super_userMy_friendDeleteFieldInput!] + disconnect: [super_userMy_friendDisconnectFieldInput!] + update: super_userMy_friendUpdateConnectionInput + where: super_userMy_friendConnectionWhere +} + +input super_userOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more super_userSort objects to sort SuperUsers by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [super_userSort!] +} + +input super_userRelationInput { + my_friend: [super_userMy_friendCreateFieldInput!] +} + +\\"\\"\\" +Fields to sort SuperUsers by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_userSort object. +\\"\\"\\" +input super_userSort { + name: SortDirection +} + +type super_userSuper_friendMy_friendAggregationSelection { + count: Int! + node: super_userSuper_friendMy_friendNodeAggregateSelection +} + +type super_userSuper_friendMy_friendNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input super_userUpdateInput { + my_friend: [super_userMy_friendUpdateFieldInput!] + name: String +} + +input super_userWhere { + AND: [super_userWhere!] + NOT: super_userWhere + OR: [super_userWhere!] + my_friend: super_friendWhere @deprecated(reason: \\"Use \`my_friend_SOME\` instead.\\") + my_friendAggregate: super_userMy_friendAggregateInput + my_friendConnection: super_userMy_friendConnectionWhere @deprecated(reason: \\"Use \`my_friendConnection_SOME\` instead.\\") + \\"\\"\\" + Return super_users where all of the related super_userMy_friendConnections match this filter + \\"\\"\\" + my_friendConnection_ALL: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where none of the related super_userMy_friendConnections match this filter + \\"\\"\\" + my_friendConnection_NONE: super_userMy_friendConnectionWhere + my_friendConnection_NOT: super_userMy_friendConnectionWhere @deprecated(reason: \\"Use \`my_friendConnection_NONE\` instead.\\") + \\"\\"\\" + Return super_users where one of the related super_userMy_friendConnections match this filter + \\"\\"\\" + my_friendConnection_SINGLE: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where some of the related super_userMy_friendConnections match this filter + \\"\\"\\" + my_friendConnection_SOME: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where all of the related super_friends match this filter + \\"\\"\\" + my_friend_ALL: super_friendWhere + \\"\\"\\" + Return super_users where none of the related super_friends match this filter + \\"\\"\\" + my_friend_NONE: super_friendWhere + my_friend_NOT: super_friendWhere @deprecated(reason: \\"Use \`my_friend_NONE\` instead.\\") + \\"\\"\\" + Return super_users where one of the related super_friends match this filter + \\"\\"\\" + my_friend_SINGLE: super_friendWhere + \\"\\"\\" + Return super_users where some of the related super_friends match this filter + \\"\\"\\" + my_friend_SOME: super_friendWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +}" +`); }); }); diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index cbbdaf1f94..e2db42fa81 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -35,320 +35,317 @@ describe("Query Direction", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - friends(directed: Boolean = false, options: UserOptions, where: UserWhere): [User!]! - friendsAggregate(directed: Boolean = false, where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, directed: Boolean = false, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - 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 - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput - } - - input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserFriendsConnectionSort { - node: UserSort - } - - input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - 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!] - } - - input UserRelationInput { - friends: [UserFriendsCreateFieldInput!] - } - - \\"\\"\\" - 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: StringAggregateSelectionNonNullable! - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") - friendsAggregate: UserFriendsAggregateInput - friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + friends(directed: Boolean = false, options: UserOptions, where: UserWhere): [User!]! + friendsAggregate(directed: Boolean = false, where: UserWhere): UserUserFriendsAggregationSelection + friendsConnection(after: String, directed: Boolean = false, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + name: String! +} + +type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +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 + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserFriendsNodeAggregationWhereInput +} + +input UserFriendsConnectFieldInput { + connect: [UserConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type UserFriendsConnection { + edges: [UserFriendsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserFriendsConnectionSort { + node: UserSort +} + +input UserFriendsConnectionWhere { + AND: [UserFriendsConnectionWhere!] + NOT: UserFriendsConnectionWhere + OR: [UserFriendsConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +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!] +} + +input UserRelationInput { + friends: [UserFriendsCreateFieldInput!] +} + +\\"\\"\\" +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: StringAggregateSelectionNonNullable! +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") + friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); test("DIRECTED_ONLY", async () => { @@ -362,320 +359,317 @@ describe("Query Direction", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - friends(options: UserOptions, where: UserWhere): [User!]! - friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - 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 - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput - } - - input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserFriendsConnectionSort { - node: UserSort - } - - input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - 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!] - } - - input UserRelationInput { - friends: [UserFriendsCreateFieldInput!] - } - - \\"\\"\\" - 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: StringAggregateSelectionNonNullable! - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") - friendsAggregate: UserFriendsAggregateInput - friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + friends(options: UserOptions, where: UserWhere): [User!]! + friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection + friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + name: String! +} + +type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +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 + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserFriendsNodeAggregationWhereInput +} + +input UserFriendsConnectFieldInput { + connect: [UserConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type UserFriendsConnection { + edges: [UserFriendsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserFriendsConnectionSort { + node: UserSort +} + +input UserFriendsConnectionWhere { + AND: [UserFriendsConnectionWhere!] + NOT: UserFriendsConnectionWhere + OR: [UserFriendsConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +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!] +} + +input UserRelationInput { + friends: [UserFriendsCreateFieldInput!] +} + +\\"\\"\\" +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: StringAggregateSelectionNonNullable! +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") + friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); test("UNDIRECTED_ONLY", async () => { @@ -689,319 +683,316 @@ describe("Query Direction", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - friends(options: UserOptions, where: UserWhere): [User!]! - friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - \\"\\"\\"\\"\\"\\" - name: String! - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - 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 - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput - } - - input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserFriendsConnectionSort { - node: UserSort - } - - input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - 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!] - } - - input UserRelationInput { - friends: [UserFriendsCreateFieldInput!] - } - - \\"\\"\\" - 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: StringAggregateSelectionNonNullable! - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") - friendsAggregate: UserFriendsAggregateInput - friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! +} + +type User { + friends(options: UserOptions, where: UserWhere): [User!]! + friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection + friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + name: String! +} + +type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +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 + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserFriendsNodeAggregationWhereInput +} + +input UserFriendsConnectFieldInput { + connect: [UserConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type UserFriendsConnection { + edges: [UserFriendsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input UserFriendsConnectionSort { + node: UserSort +} + +input UserFriendsConnectionWhere { + AND: [UserFriendsConnectionWhere!] + NOT: UserFriendsConnectionWhere + OR: [UserFriendsConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +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!] +} + +input UserRelationInput { + friends: [UserFriendsCreateFieldInput!] +} + +\\"\\"\\" +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: StringAggregateSelectionNonNullable! +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") + friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index b40546f33d..4cf72434e6 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -38,165 +38,160 @@ describe("Scalar", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - scalar CustomScalar - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - myCustomArrayScalar: [CustomScalar!] - \\"\\"\\"\\"\\"\\" - myCustomScalar: CustomScalar - \\"\\"\\"\\"\\"\\" - myRequiredCustomArrayScalar: [CustomScalar!]! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - myCustomArrayScalar: [CustomScalar!] - myCustomScalar: CustomScalar - myRequiredCustomArrayScalar: [CustomScalar!]! - } - - 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 - myCustomScalar: SortDirection - } - - input MovieUpdateInput { - id: ID - myCustomArrayScalar: [CustomScalar!] - myCustomScalar: CustomScalar - myRequiredCustomArrayScalar: [CustomScalar!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - myCustomArrayScalar: [CustomScalar!] - myCustomArrayScalar_INCLUDES: CustomScalar - myCustomArrayScalar_NOT: [CustomScalar!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myCustomArrayScalar_NOT_INCLUDES: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myCustomScalar: CustomScalar - myCustomScalar_IN: [CustomScalar] - myCustomScalar_NOT: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myCustomScalar_NOT_IN: [CustomScalar] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myRequiredCustomArrayScalar: [CustomScalar!] - myRequiredCustomArrayScalar_INCLUDES: CustomScalar - myRequiredCustomArrayScalar_NOT: [CustomScalar!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myRequiredCustomArrayScalar_NOT_INCLUDES: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +scalar CustomScalar + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID + myCustomArrayScalar: [CustomScalar!] + myCustomScalar: CustomScalar + myRequiredCustomArrayScalar: [CustomScalar!]! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID + myCustomArrayScalar: [CustomScalar!] + myCustomScalar: CustomScalar + myRequiredCustomArrayScalar: [CustomScalar!]! +} + +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 + myCustomScalar: SortDirection +} + +input MovieUpdateInput { + id: ID + myCustomArrayScalar: [CustomScalar!] + myCustomScalar: CustomScalar + myRequiredCustomArrayScalar: [CustomScalar!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + myCustomArrayScalar: [CustomScalar!] + myCustomArrayScalar_INCLUDES: CustomScalar + myCustomArrayScalar_NOT: [CustomScalar!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myCustomArrayScalar_NOT_INCLUDES: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myCustomScalar: CustomScalar + myCustomScalar_IN: [CustomScalar] + myCustomScalar_NOT: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myCustomScalar_NOT_IN: [CustomScalar] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myRequiredCustomArrayScalar: [CustomScalar!] + myRequiredCustomArrayScalar_INCLUDES: CustomScalar + myRequiredCustomArrayScalar_NOT: [CustomScalar!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myRequiredCustomArrayScalar_NOT_INCLUDES: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index cbf538a59a..eb38cb9682 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -36,193 +36,188 @@ describe("Simple", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actorCount: Int - \\"\\"\\"\\"\\"\\" - averageRating: Float - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - isActive: Boolean - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean - } - - 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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection - } - - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean +} + +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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection +} + +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index 070cfa3c72..1558b9b067 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -45,143 +45,141 @@ describe("String Comparators", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieCreateInput { - title: String - } - - 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 { - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_GT: String - title_GTE: String - title_IN: [String] - title_LT: String - title_LTE: String - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + title: String +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieCreateInput { + title: String +} + +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 { + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_GT: String + title_GTE: String + title_IN: [String] + title_LT: String + title_LTE: String + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("String comparators should not be present if not explicitly defined in the configuration", async () => { @@ -196,139 +194,137 @@ describe("String Comparators", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieCreateInput { - title: String - } - - 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 { - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + title: String +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieCreateInput { + title: String +} + +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 { + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("If String comparators are partially defined, then only the defined ones should be present", async () => { @@ -352,141 +348,139 @@ describe("String Comparators", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! - } - - input MovieCreateInput { - title: String - } - - 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 { - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_GT: String - title_IN: [String] - title_LT: String - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + title: String +} + +type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! +} + +input MovieCreateInput { + title: String +} + +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 { + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_GT: String + title_IN: [String] + title_LT: String + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("string comparator relationship and relationship properties", async () => { @@ -522,733 +516,724 @@ describe("String Comparators", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - screenTime: String - } - - input ActedInCreateInput { - screenTime: String - } - - input ActedInSort { - screenTime: SortDirection - } - - input ActedInUpdateInput { - screenTime: String - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: String - screenTime_CONTAINS: String - screenTime_ENDS_WITH: String - screenTime_GT: String - screenTime_GTE: String - screenTime_IN: [String] - screenTime_LT: String - screenTime_LTE: String - screenTime_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_STARTS_WITH: String - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - \\"\\"\\"\\"\\"\\" - name: String - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorActedInEdgeAggregationWhereInput - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: MovieSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput - node: MovieCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInEdgeAggregationWhereInput { - AND: [ActorActedInEdgeAggregationWhereInput!] - NOT: ActorActedInEdgeAggregationWhereInput - OR: [ActorActedInEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_LENGTH_EQUAL: Float - screenTime_AVERAGE_LENGTH_GT: Float - screenTime_AVERAGE_LENGTH_GTE: Float - screenTime_AVERAGE_LENGTH_LT: Float - screenTime_AVERAGE_LENGTH_LTE: Float - screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_LENGTH_EQUAL: Int - screenTime_LONGEST_LENGTH_GT: Int - screenTime_LONGEST_LENGTH_GTE: Int - screenTime_LONGEST_LENGTH_LT: Int - screenTime_LONGEST_LENGTH_LTE: Int - screenTime_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_LENGTH_EQUAL: Int - screenTime_SHORTEST_LENGTH_GT: Int - screenTime_SHORTEST_LENGTH_GTE: Int - screenTime_SHORTEST_LENGTH_LT: Int - screenTime_SHORTEST_LENGTH_LTE: Int - screenTime_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Movie! - \\"\\"\\"\\"\\"\\" - screenTime: String - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - edge: ActorMovieActedInEdgeAggregateSelection - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInEdgeAggregateSelection { - screenTime: StringAggregateSelectionNullable! - } - - type ActorMovieActedInNodeAggregateSelection { - title: StringAggregateSelectionNullable! - } - - 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!] - } - - input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_GT: String - name_GTE: String - name_IN: [String] - name_LT: String - name_LTE: String - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - title: String - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: StringAggregateSelectionNullable! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - edge: ActedInCreateInput - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_LENGTH_EQUAL: Float - screenTime_AVERAGE_LENGTH_GT: Float - screenTime_AVERAGE_LENGTH_GTE: Float - screenTime_AVERAGE_LENGTH_LT: Float - screenTime_AVERAGE_LENGTH_LTE: Float - screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_LENGTH_EQUAL: Int - screenTime_LONGEST_LENGTH_GT: Int - screenTime_LONGEST_LENGTH_GTE: Int - screenTime_LONGEST_LENGTH_LT: Int - screenTime_LONGEST_LENGTH_LTE: Int - screenTime_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_LENGTH_EQUAL: Int - screenTime_SHORTEST_LENGTH_GT: Int - screenTime_SHORTEST_LENGTH_GTE: Int - screenTime_SHORTEST_LENGTH_LT: Int - screenTime_SHORTEST_LENGTH_LTE: Int - screenTime_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - \\"\\"\\"\\"\\"\\" - screenTime: String - } - - 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: StringAggregateSelectionNullable! - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_GT: String - title_GTE: String - title_IN: [String] - title_LT: String - title_LTE: String - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +interface ActedIn { + screenTime: String +} + +input ActedInCreateInput { + screenTime: String +} + +input ActedInSort { + screenTime: SortDirection +} + +input ActedInUpdateInput { + screenTime: String +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: String + screenTime_CONTAINS: String + screenTime_ENDS_WITH: String + screenTime_GT: String + screenTime_GTE: String + screenTime_IN: [String] + screenTime_LT: String + screenTime_LTE: String + screenTime_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_STARTS_WITH: String +} + +type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String +} + +input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorActedInEdgeAggregationWhereInput + node: ActorActedInNodeAggregationWhereInput +} + +input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorActedInConnectionSort { + edge: ActedInSort + node: MovieSort +} + +input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorActedInCreateFieldInput { + edge: ActedInCreateInput + node: MovieCreateInput! +} + +input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere +} + +input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere +} + +input ActorActedInEdgeAggregationWhereInput { + AND: [ActorActedInEdgeAggregationWhereInput!] + NOT: ActorActedInEdgeAggregationWhereInput + OR: [ActorActedInEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_LENGTH_EQUAL: Float + screenTime_AVERAGE_LENGTH_GT: Float + screenTime_AVERAGE_LENGTH_GTE: Float + screenTime_AVERAGE_LENGTH_LT: Float + screenTime_AVERAGE_LENGTH_LTE: Float + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_LENGTH_EQUAL: Int + screenTime_LONGEST_LENGTH_GT: Int + screenTime_LONGEST_LENGTH_GTE: Int + screenTime_LONGEST_LENGTH_LT: Int + screenTime_LONGEST_LENGTH_LTE: Int + screenTime_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_LENGTH_EQUAL: Int + screenTime_SHORTEST_LENGTH_GT: Int + screenTime_SHORTEST_LENGTH_GTE: Int + screenTime_SHORTEST_LENGTH_LT: Int + screenTime_SHORTEST_LENGTH_LTE: Int + screenTime_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] +} + +input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Movie! + screenTime: String +} + +input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput +} + +input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! +} + +input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String +} + +input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] +} + +input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieActedInAggregationSelection { + count: Int! + edge: ActorMovieActedInEdgeAggregateSelection + node: ActorMovieActedInNodeAggregateSelection +} + +type ActorMovieActedInEdgeAggregateSelection { + screenTime: StringAggregateSelectionNullable! +} + +type ActorMovieActedInNodeAggregateSelection { + title: StringAggregateSelectionNullable! +} + +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!] +} + +input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] +} + +\\"\\"\\" +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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_GT: String + name_GTE: String + name_IN: [String] + name_LT: String + name_LTE: String + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String +} + +type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsEdgeAggregateSelection { + screenTime: StringAggregateSelectionNullable! +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + edge: ActedInCreateInput + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_LENGTH_EQUAL: Float + screenTime_AVERAGE_LENGTH_GT: Float + screenTime_AVERAGE_LENGTH_GTE: Float + screenTime_AVERAGE_LENGTH_LT: Float + screenTime_AVERAGE_LENGTH_LTE: Float + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_LENGTH_EQUAL: Int + screenTime_LONGEST_LENGTH_GT: Int + screenTime_LONGEST_LENGTH_GTE: Int + screenTime_LONGEST_LENGTH_LT: Int + screenTime_LONGEST_LENGTH_LTE: Int + screenTime_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_LENGTH_EQUAL: Int + screenTime_SHORTEST_LENGTH_GT: Int + screenTime_SHORTEST_LENGTH_GTE: Int + screenTime_SHORTEST_LENGTH_LT: Int + screenTime_SHORTEST_LENGTH_LTE: Int + screenTime_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + screenTime: String +} + +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: StringAggregateSelectionNullable! +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_GT: String + title_GTE: String + title_IN: [String] + title_LT: String + title_LTE: String + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 444ebfe75f..0da4b1592e 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -53,625 +53,4496 @@ describe("Subscriptions", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - name: String! - } - - 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 ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input ActorUpdateInput { - name: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + name: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + name: String! +} + +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 ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input ActorUpdateInput { + name: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + actorCount: Int + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + node: ActorEventPayload! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actorCount: Int + actors: MovieActorsFieldInput + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - \\"\\"\\"\\"\\"\\" + test("Empty EventPayload type", async () => { + const typeDefs = gql` type Movie { - \\"\\"\\"\\"\\"\\" - actorCount: Int - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - averageRating: Float - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - isActive: Boolean - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - node: ActorEventPayload! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actorCount: Int - actors: MovieActorsFieldInput - averageRating: Float - id: ID - isActive: Boolean - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! + id: ID + actorCount: Int + averageRating: Float + isActive: Boolean + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean + type Actor { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } + `; - 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!] - } + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! +} + +type ActorAggregateSelection { + count: Int! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput +} + +type ActorCreatedEvent { + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + delete: [ActorMoviesDeleteFieldInput!] + disconnect: [ActorMoviesDisconnectFieldInput!] + update: ActorMoviesUpdateConnectionInput + where: ActorMoviesConnectionWhere +} + +input ActorOptions { + limit: Int + offset: Int +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + createdRelationship: ActorConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + deletedRelationship: ActorConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] +} + +type ActorUpdatedEvent { + event: EventType! + timestamp: Float! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + actorCount: Int + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieActorActorsAggregationSelection { + count: Int! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + actorCount: Int + actors: MovieActorsFieldInput + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + movie: MovieSubscriptionWhere +} + +\\"\\"\\" +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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type Subscription { + actorCreated: ActorCreatedEvent! + actorDeleted: ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated: ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere + test("Empty EventPayload type on Union type", async () => { + const typeDefs = gql` + type Movie { + id: ID + actorCount: Int + averageRating: Float + isActive: Boolean + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } + union Actor = Star | Person - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere + type Star { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere + type Person { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } + `; - \\"\\"\\" - 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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection - } + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +union Actor = Person | Star + +input ActorWhere { + Person: PersonWhere + Star: StarWhere +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +type CreateStarsMutationResponse { + info: CreateInfo! + stars: [Star!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + actorCount: Int + actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean +} + +input MovieActorsConnectInput { + Person: [MovieActorsPersonConnectFieldInput!] + Star: [MovieActorsStarConnectFieldInput!] +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + Person: MovieActorsPersonConnectionWhere + Star: MovieActorsStarConnectionWhere +} + +input MovieActorsCreateFieldInput { + Person: [MovieActorsPersonCreateFieldInput!] + Star: [MovieActorsStarCreateFieldInput!] +} + +input MovieActorsCreateInput { + Person: MovieActorsPersonFieldInput + Star: MovieActorsStarFieldInput +} + +input MovieActorsDeleteInput { + Person: [MovieActorsPersonDeleteFieldInput!] + Star: [MovieActorsStarDeleteFieldInput!] +} + +input MovieActorsDisconnectInput { + Person: [MovieActorsPersonDisconnectFieldInput!] + Star: [MovieActorsStarDisconnectFieldInput!] +} + +input MovieActorsPersonConnectFieldInput { + connect: [PersonConnectInput!] + where: PersonConnectWhere +} + +input MovieActorsPersonConnectionWhere { + AND: [MovieActorsPersonConnectionWhere!] + NOT: MovieActorsPersonConnectionWhere + OR: [MovieActorsPersonConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsPersonDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsPersonConnectionWhere +} + +input MovieActorsPersonDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsPersonConnectionWhere +} + +input MovieActorsPersonFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] +} + +input MovieActorsPersonUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsPersonUpdateFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + delete: [MovieActorsPersonDeleteFieldInput!] + disconnect: [MovieActorsPersonDisconnectFieldInput!] + update: MovieActorsPersonUpdateConnectionInput + where: MovieActorsPersonConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsStarConnectFieldInput { + connect: [StarConnectInput!] + where: StarConnectWhere +} + +input MovieActorsStarConnectionWhere { + AND: [MovieActorsStarConnectionWhere!] + NOT: MovieActorsStarConnectionWhere + OR: [MovieActorsStarConnectionWhere!] + node: StarWhere + node_NOT: StarWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsStarCreateFieldInput { + node: StarCreateInput! +} + +input MovieActorsStarDeleteFieldInput { + delete: StarDeleteInput + where: MovieActorsStarConnectionWhere +} + +input MovieActorsStarDisconnectFieldInput { + disconnect: StarDisconnectInput + where: MovieActorsStarConnectionWhere +} + +input MovieActorsStarFieldInput { + connect: [MovieActorsStarConnectFieldInput!] + create: [MovieActorsStarCreateFieldInput!] +} + +input MovieActorsStarUpdateConnectionInput { + node: StarUpdateInput +} + +input MovieActorsStarUpdateFieldInput { + connect: [MovieActorsStarConnectFieldInput!] + create: [MovieActorsStarCreateFieldInput!] + delete: [MovieActorsStarDeleteFieldInput!] + disconnect: [MovieActorsStarDisconnectFieldInput!] + update: MovieActorsStarUpdateConnectionInput + where: MovieActorsStarConnectionWhere +} + +input MovieActorsUpdateInput { + Person: [MovieActorsPersonUpdateFieldInput!] + Star: [MovieActorsStarUpdateFieldInput!] +} + +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + actorCount: Int + actors: MovieActorsCreateInput + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean +} + +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!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +type MovieRelationshipCreatedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + movie: MovieSubscriptionWhere +} + +\\"\\"\\" +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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: MovieActorsUpdateInput + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + createStars(input: [StarCreateInput!]!): CreateStarsMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + deleteStars(delete: StarDeleteInput, where: StarWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + updateStars(connect: StarConnectInput, create: StarRelationInput, delete: StarDeleteInput, disconnect: StarDisconnectInput, update: StarUpdateInput, where: StarWhere): UpdateStarsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! +} + +type PersonAggregateSelection { + count: Int! +} + +input PersonConnectInput { + movies: [PersonMoviesConnectFieldInput!] +} + +input PersonConnectWhere { + node: PersonWhere! +} + +type PersonConnectedRelationships { + movies: PersonMoviesConnectedRelationship +} + +input PersonCreateInput { + movies: PersonMoviesFieldInput +} + +type PersonCreatedEvent { + event: EventType! + timestamp: Float! +} + +input PersonDeleteInput { + movies: [PersonMoviesDeleteFieldInput!] +} + +type PersonDeletedEvent { + event: EventType! + timestamp: Float! +} + +input PersonDisconnectInput { + movies: [PersonMoviesDisconnectFieldInput!] +} + +type PersonEdge { + cursor: String! + node: Person! +} + +type PersonMovieMoviesAggregationSelection { + count: Int! + node: PersonMovieMoviesNodeAggregateSelection +} + +type PersonMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input PersonMoviesAggregateInput { + AND: [PersonMoviesAggregateInput!] + NOT: PersonMoviesAggregateInput + OR: [PersonMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PersonMoviesNodeAggregationWhereInput +} + +input PersonMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type PersonMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type PersonMoviesConnection { + edges: [PersonMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonMoviesConnectionSort { + node: MovieSort +} + +input PersonMoviesConnectionWhere { + AND: [PersonMoviesConnectionWhere!] + NOT: PersonMoviesConnectionWhere + OR: [PersonMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PersonMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input PersonMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: PersonMoviesConnectionWhere +} + +input PersonMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: PersonMoviesConnectionWhere +} + +input PersonMoviesFieldInput { + connect: [PersonMoviesConnectFieldInput!] + create: [PersonMoviesCreateFieldInput!] +} + +input PersonMoviesNodeAggregationWhereInput { + AND: [PersonMoviesNodeAggregationWhereInput!] + NOT: PersonMoviesNodeAggregationWhereInput + OR: [PersonMoviesNodeAggregationWhereInput!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type PersonMoviesRelationship { + cursor: String! + node: Movie! +} + +input PersonMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input PersonMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input PersonMoviesUpdateFieldInput { + connect: [PersonMoviesConnectFieldInput!] + create: [PersonMoviesCreateFieldInput!] + delete: [PersonMoviesDeleteFieldInput!] + disconnect: [PersonMoviesDisconnectFieldInput!] + update: PersonMoviesUpdateConnectionInput + where: PersonMoviesConnectionWhere +} + +input PersonOptions { + limit: Int + offset: Int +} + +input PersonRelationInput { + movies: [PersonMoviesCreateFieldInput!] +} + +type PersonRelationshipCreatedEvent { + createdRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input PersonRelationshipCreatedSubscriptionWhere { + AND: [PersonRelationshipCreatedSubscriptionWhere!] + NOT: PersonRelationshipCreatedSubscriptionWhere + OR: [PersonRelationshipCreatedSubscriptionWhere!] + createdRelationship: PersonRelationshipsSubscriptionWhere +} + +type PersonRelationshipDeletedEvent { + deletedRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input PersonRelationshipDeletedSubscriptionWhere { + AND: [PersonRelationshipDeletedSubscriptionWhere!] + NOT: PersonRelationshipDeletedSubscriptionWhere + OR: [PersonRelationshipDeletedSubscriptionWhere!] + deletedRelationship: PersonRelationshipsSubscriptionWhere +} + +input PersonRelationshipsSubscriptionWhere { + movies: PersonMoviesRelationshipSubscriptionWhere +} + +input PersonUpdateInput { + movies: [PersonMoviesUpdateFieldInput!] +} + +type PersonUpdatedEvent { + event: EventType! + timestamp: Float! +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: PersonMoviesConnectionWhere + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! + stars(options: StarOptions, where: StarWhere): [Star!]! + starsAggregate(where: StarWhere): StarAggregateSelection! + starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type Star { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! +} + +type StarAggregateSelection { + count: Int! +} + +input StarConnectInput { + movies: [StarMoviesConnectFieldInput!] +} + +input StarConnectWhere { + node: StarWhere! +} + +type StarConnectedRelationships { + movies: StarMoviesConnectedRelationship +} + +input StarCreateInput { + movies: StarMoviesFieldInput +} + +type StarCreatedEvent { + event: EventType! + timestamp: Float! +} + +input StarDeleteInput { + movies: [StarMoviesDeleteFieldInput!] +} + +type StarDeletedEvent { + event: EventType! + timestamp: Float! +} + +input StarDisconnectInput { + movies: [StarMoviesDisconnectFieldInput!] +} + +type StarEdge { + cursor: String! + node: Star! +} + +type StarMovieMoviesAggregationSelection { + count: Int! + node: StarMovieMoviesNodeAggregateSelection +} + +type StarMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input StarMoviesAggregateInput { + AND: [StarMoviesAggregateInput!] + NOT: StarMoviesAggregateInput + OR: [StarMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: StarMoviesNodeAggregationWhereInput +} + +input StarMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type StarMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type StarMoviesConnection { + edges: [StarMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input StarMoviesConnectionSort { + node: MovieSort +} + +input StarMoviesConnectionWhere { + AND: [StarMoviesConnectionWhere!] + NOT: StarMoviesConnectionWhere + OR: [StarMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input StarMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input StarMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: StarMoviesConnectionWhere +} + +input StarMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: StarMoviesConnectionWhere +} + +input StarMoviesFieldInput { + connect: [StarMoviesConnectFieldInput!] + create: [StarMoviesCreateFieldInput!] +} + +input StarMoviesNodeAggregationWhereInput { + AND: [StarMoviesNodeAggregationWhereInput!] + NOT: StarMoviesNodeAggregationWhereInput + OR: [StarMoviesNodeAggregationWhereInput!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type StarMoviesRelationship { + cursor: String! + node: Movie! +} + +input StarMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input StarMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input StarMoviesUpdateFieldInput { + connect: [StarMoviesConnectFieldInput!] + create: [StarMoviesCreateFieldInput!] + delete: [StarMoviesDeleteFieldInput!] + disconnect: [StarMoviesDisconnectFieldInput!] + update: StarMoviesUpdateConnectionInput + where: StarMoviesConnectionWhere +} + +input StarOptions { + limit: Int + offset: Int +} + +input StarRelationInput { + movies: [StarMoviesCreateFieldInput!] +} + +type StarRelationshipCreatedEvent { + createdRelationship: StarConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input StarRelationshipCreatedSubscriptionWhere { + AND: [StarRelationshipCreatedSubscriptionWhere!] + NOT: StarRelationshipCreatedSubscriptionWhere + OR: [StarRelationshipCreatedSubscriptionWhere!] + createdRelationship: StarRelationshipsSubscriptionWhere +} + +type StarRelationshipDeletedEvent { + deletedRelationship: StarConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input StarRelationshipDeletedSubscriptionWhere { + AND: [StarRelationshipDeletedSubscriptionWhere!] + NOT: StarRelationshipDeletedSubscriptionWhere + OR: [StarRelationshipDeletedSubscriptionWhere!] + deletedRelationship: StarRelationshipsSubscriptionWhere +} + +input StarRelationshipsSubscriptionWhere { + movies: StarMoviesRelationshipSubscriptionWhere +} + +input StarUpdateInput { + movies: [StarMoviesUpdateFieldInput!] +} + +type StarUpdatedEvent { + event: EventType! + timestamp: Float! +} + +input StarWhere { + AND: [StarWhere!] + NOT: StarWhere + OR: [StarWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: StarMoviesAggregateInput + moviesConnection: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Stars where all of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where none of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: StarMoviesConnectionWhere + moviesConnection_NOT: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Stars where one of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where some of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: StarMoviesConnectionWhere + \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere +} + +type StarsConnection { + edges: [StarEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Subscription { + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + personCreated: PersonCreatedEvent! + personDeleted: PersonDeletedEvent! + personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! + personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! + personUpdated: PersonUpdatedEvent! + starCreated: StarCreatedEvent! + starDeleted: StarDeletedEvent! + starRelationshipCreated(where: StarRelationshipCreatedSubscriptionWhere): StarRelationshipCreatedEvent! + starRelationshipDeleted(where: StarRelationshipDeletedSubscriptionWhere): StarRelationshipDeletedEvent! + starUpdated: StarUpdatedEvent! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +} + +type UpdateStarsMutationResponse { + info: UpdateInfo! + stars: [Star!]! +}" +`); + }); - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! + test("Empty EventPayload type, but @relationshipProperty exists", async () => { + const typeDefs = gql` + type Movie { + id: ID + actorCount: Int + averageRating: Float + isActive: Boolean + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + interface ActedIn @relationshipProperties { + screenTime: Int! } - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! + type Actor { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } + `; - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +interface ActedIn { + screenTime: Int! +} + +input ActedInCreateInput { + screenTime: Int! +} + +input ActedInSort { + screenTime: SortDirection +} + +input ActedInSubscriptionWhere { + AND: [ActedInSubscriptionWhere!] + NOT: ActedInSubscriptionWhere + OR: [ActedInSubscriptionWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int +} + +input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! +} + +type ActorAggregateSelection { + count: Int! +} + +input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] +} + +input ActorConnectWhere { + node: ActorWhere! +} + +type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship +} + +input ActorCreateInput { + movies: ActorMoviesFieldInput +} + +type ActorCreatedEvent { + event: EventType! + timestamp: Float! +} + +input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] +} + +type ActorDeletedEvent { + event: EventType! + timestamp: Float! +} + +input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection +} + +type ActorMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput +} + +input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type ActorMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ActorMoviesConnectionSort { + node: MovieSort +} + +input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ActorMoviesCreateFieldInput { + 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!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type ActorMoviesRelationship { + cursor: String! + node: Movie! +} + +input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + delete: [ActorMoviesDeleteFieldInput!] + disconnect: [ActorMoviesDisconnectFieldInput!] + update: ActorMoviesUpdateConnectionInput + where: ActorMoviesConnectionWhere +} + +input ActorOptions { + limit: Int + offset: Int +} + +input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] +} + +type ActorRelationshipCreatedEvent { + createdRelationship: ActorConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + createdRelationship: ActorRelationshipsSubscriptionWhere +} + +type ActorRelationshipDeletedEvent { + deletedRelationship: ActorConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + deletedRelationship: ActorRelationshipsSubscriptionWhere +} + +input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere +} + +input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] +} + +type ActorUpdatedEvent { + event: EventType! + timestamp: Float! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + actorCount: Int + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection +} + +type MovieActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnectedRelationship { + screenTime: Int! +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + edge: ActedInSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere +} + +input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + screenTime: Int! +} + +input MovieActorsRelationshipSubscriptionWhere { + edge: ActedInSubscriptionWhere +} + +input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieConnectWhere { + node: MovieWhere! +} + +type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship +} + +input MovieCreateInput { + actorCount: Int + actors: MovieActorsFieldInput + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere +} + +input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere +} + +\\"\\"\\" +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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type Subscription { + actorCreated: ActorCreatedEvent! + actorDeleted: ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated: ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC + test("Subscriptions excluded", async () => { + const typeDefs = gql` + type Movie @subscription(events: []) { + id: ID + actorCount: Int + averageRating: Float + isActive: Boolean + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! + type Actor { + name: String! } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Actor { + name: String! +} + +type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! +} + +input ActorConnectWhere { + node: ActorWhere! +} + +input ActorCreateInput { + name: String! +} + +type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! +} + +type ActorEdge { + cursor: String! + node: Actor! +} + +type ActorEventPayload { + name: String! +} + +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 ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input ActorUpdateInput { + name: String +} + +type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! +} + +input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + actorCount: Int + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection +} + +type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! +} + +input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput +} + +input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionSort { + node: ActorSort +} + +input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsCreateFieldInput { + node: ActorCreateInput! +} + +input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere +} + +input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] +} + +input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput +} + +input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere +} + +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] +} + +input MovieCreateInput { + actorCount: Int + actors: MovieActorsFieldInput + averageRating: Float + id: ID + isActive: Boolean +} + +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!] +} + +input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] +} + +\\"\\"\\" +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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection +} + +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! +} + +type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); + }); - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! + test("Type with relationship to a subscriptions excluded type", async () => { + const typeDefs = gql` + type User @mutation(operations: []) @subscription(events: []) { + username: String! + name: String } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! + type Agreement { + id: Int! + name: String + owner: User @relationship(type: "OWNED_BY", direction: OUT) } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); + expect(printedSchema).toMatchInlineSnapshot(` +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +type Agreement { + id: Int! + name: String + owner(directed: Boolean = true, options: UserOptions, where: UserWhere): User + ownerAggregate(directed: Boolean = true, where: UserWhere): AgreementUserOwnerAggregationSelection + ownerConnection(after: String, directed: Boolean = true, first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! +} + +type AgreementAggregateSelection { + count: Int! + id: IntAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! +} + +input AgreementConnectInput { + owner: AgreementOwnerConnectFieldInput +} + +type AgreementConnectedRelationships { + owner: AgreementOwnerConnectedRelationship +} + +input AgreementCreateInput { + id: Int! + name: String + owner: AgreementOwnerFieldInput +} + +type AgreementCreatedEvent { + createdAgreement: AgreementEventPayload! + event: EventType! + timestamp: Float! +} + +input AgreementDeleteInput { + owner: AgreementOwnerDeleteFieldInput +} + +type AgreementDeletedEvent { + deletedAgreement: AgreementEventPayload! + event: EventType! + timestamp: Float! +} + +input AgreementDisconnectInput { + owner: AgreementOwnerDisconnectFieldInput +} + +type AgreementEdge { + cursor: String! + node: Agreement! +} + +type AgreementEventPayload { + id: Int! + name: String +} + +input AgreementOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AgreementSort objects to sort Agreements by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AgreementSort!] +} + +input AgreementOwnerAggregateInput { + AND: [AgreementOwnerAggregateInput!] + NOT: AgreementOwnerAggregateInput + OR: [AgreementOwnerAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: AgreementOwnerNodeAggregationWhereInput +} + +input AgreementOwnerConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere +} + +type AgreementOwnerConnectedRelationship { + node: UserEventPayload! +} + +type AgreementOwnerConnection { + edges: [AgreementOwnerRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input AgreementOwnerConnectionSort { + node: UserSort +} + +input AgreementOwnerConnectionWhere { + AND: [AgreementOwnerConnectionWhere!] + NOT: AgreementOwnerConnectionWhere + OR: [AgreementOwnerConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input AgreementOwnerCreateFieldInput { + node: UserCreateInput! +} + +input AgreementOwnerDeleteFieldInput { + where: AgreementOwnerConnectionWhere +} + +input AgreementOwnerDisconnectFieldInput { + where: AgreementOwnerConnectionWhere +} + +input AgreementOwnerFieldInput { + connect: AgreementOwnerConnectFieldInput + create: AgreementOwnerCreateFieldInput +} + +input AgreementOwnerNodeAggregationWhereInput { + AND: [AgreementOwnerNodeAggregationWhereInput!] + NOT: AgreementOwnerNodeAggregationWhereInput + OR: [AgreementOwnerNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") +} + +type AgreementOwnerRelationship { + cursor: String! + node: User! +} + +input AgreementOwnerRelationshipSubscriptionWhere { + node: UserSubscriptionWhere +} + +input AgreementOwnerUpdateConnectionInput { + node: UserUpdateInput +} + +input AgreementOwnerUpdateFieldInput { + connect: AgreementOwnerConnectFieldInput + create: AgreementOwnerCreateFieldInput + delete: AgreementOwnerDeleteFieldInput + disconnect: AgreementOwnerDisconnectFieldInput + update: AgreementOwnerUpdateConnectionInput + where: AgreementOwnerConnectionWhere +} + +input AgreementRelationInput { + owner: AgreementOwnerCreateFieldInput +} + +type AgreementRelationshipCreatedEvent { + agreement: AgreementEventPayload! + createdRelationship: AgreementConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input AgreementRelationshipCreatedSubscriptionWhere { + AND: [AgreementRelationshipCreatedSubscriptionWhere!] + NOT: AgreementRelationshipCreatedSubscriptionWhere + OR: [AgreementRelationshipCreatedSubscriptionWhere!] + agreement: AgreementSubscriptionWhere + createdRelationship: AgreementRelationshipsSubscriptionWhere +} + +type AgreementRelationshipDeletedEvent { + agreement: AgreementEventPayload! + deletedRelationship: AgreementConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! +} + +input AgreementRelationshipDeletedSubscriptionWhere { + AND: [AgreementRelationshipDeletedSubscriptionWhere!] + NOT: AgreementRelationshipDeletedSubscriptionWhere + OR: [AgreementRelationshipDeletedSubscriptionWhere!] + agreement: AgreementSubscriptionWhere + deletedRelationship: AgreementRelationshipsSubscriptionWhere +} + +input AgreementRelationshipsSubscriptionWhere { + owner: AgreementOwnerRelationshipSubscriptionWhere +} + +\\"\\"\\" +Fields to sort Agreements by. The order in which sorts are applied is not guaranteed when specifying many fields in one AgreementSort object. +\\"\\"\\" +input AgreementSort { + id: SortDirection + name: SortDirection +} + +input AgreementSubscriptionWhere { + AND: [AgreementSubscriptionWhere!] + NOT: AgreementSubscriptionWhere + OR: [AgreementSubscriptionWhere!] + id: Int + id_GT: Int + id_GTE: Int + id_IN: [Int] + id_LT: Int + id_LTE: Int + id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String +} + +input AgreementUpdateInput { + id: Int + id_DECREMENT: Int + id_INCREMENT: Int + name: String + owner: AgreementOwnerUpdateFieldInput +} + +type AgreementUpdatedEvent { + event: EventType! + previousState: AgreementEventPayload! + timestamp: Float! + updatedAgreement: AgreementEventPayload! +} + +type AgreementUserOwnerAggregationSelection { + count: Int! + node: AgreementUserOwnerNodeAggregateSelection +} + +type AgreementUserOwnerNodeAggregateSelection { + name: StringAggregateSelectionNullable! + username: StringAggregateSelectionNonNullable! +} + +input AgreementWhere { + AND: [AgreementWhere!] + NOT: AgreementWhere + OR: [AgreementWhere!] + id: Int + id_GT: Int + id_GTE: Int + id_IN: [Int!] + id_LT: Int + id_LTE: Int + id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + owner: UserWhere + ownerAggregate: AgreementOwnerAggregateInput + ownerConnection: AgreementOwnerConnectionWhere + ownerConnection_NOT: AgreementOwnerConnectionWhere + owner_NOT: UserWhere +} + +type AgreementsConnection { + edges: [AgreementEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CreateAgreementsMutationResponse { + agreements: [Agreement!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Mutation { + createAgreements(input: [AgreementCreateInput!]!): CreateAgreementsMutationResponse! + deleteAgreements(delete: AgreementDeleteInput, where: AgreementWhere): DeleteInfo! + updateAgreements(connect: AgreementConnectInput, create: AgreementRelationInput, delete: AgreementDeleteInput, disconnect: AgreementDisconnectInput, update: AgreementUpdateInput, where: AgreementWhere): UpdateAgreementsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + agreements(options: AgreementOptions, where: AgreementWhere): [Agreement!]! + agreementsAggregate(where: AgreementWhere): AgreementAggregateSelection! + agreementsConnection(after: String, first: Int, sort: [AgreementSort], where: AgreementWhere): AgreementsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type StringAggregateSelectionNullable { + longest: String + shortest: String +} + +type Subscription { + agreementCreated(where: AgreementSubscriptionWhere): AgreementCreatedEvent! + agreementDeleted(where: AgreementSubscriptionWhere): AgreementDeletedEvent! + agreementRelationshipCreated(where: AgreementRelationshipCreatedSubscriptionWhere): AgreementRelationshipCreatedEvent! + agreementRelationshipDeleted(where: AgreementRelationshipDeletedSubscriptionWhere): AgreementRelationshipDeletedEvent! + agreementUpdated(where: AgreementSubscriptionWhere): AgreementUpdatedEvent! +} + +type UpdateAgreementsMutationResponse { + agreements: [Agreement!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type User { + name: String + username: String! +} + +type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + username: StringAggregateSelectionNonNullable! +} + +input UserConnectWhere { + node: UserWhere! +} + +input UserCreateInput { + name: String + username: String! +} + +type UserEdge { + cursor: String! + node: User! +} + +type UserEventPayload { + name: String + username: String! +} + +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 + username: SortDirection +} + +input UserSubscriptionWhere { + AND: [UserSubscriptionWhere!] + NOT: UserSubscriptionWhere + OR: [UserSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +input UserUpdateInput { + name: String + username: String +} + +input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String +} + +type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! +}" +`); }); - test("Empty EventPayload type", async () => { + test("Type with relationship to a subscriptions excluded type + Union type", async () => { const typeDefs = gql` type Movie { id: ID @@ -681,7 +4552,12 @@ describe("Subscriptions", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - type Actor { + union Actor = Star | Person + + type Star @subscription(events: []) { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + type Person { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } `; @@ -696,6003 +4572,2052 @@ describe("Subscriptions", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +union Actor = Person | Star + +input ActorWhere { + Person: PersonWhere + Star: StarWhere +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +type CreateStarsMutationResponse { + info: CreateInfo! + stars: [Star!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int +} + +type Movie { + actorCount: Int + actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean +} + +input MovieActorsConnectInput { + Person: [MovieActorsPersonConnectFieldInput!] + Star: [MovieActorsStarConnectFieldInput!] +} + +type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieActorsConnectionWhere { + Person: MovieActorsPersonConnectionWhere + Star: MovieActorsStarConnectionWhere +} + +input MovieActorsCreateFieldInput { + Person: [MovieActorsPersonCreateFieldInput!] + Star: [MovieActorsStarCreateFieldInput!] +} + +input MovieActorsCreateInput { + Person: MovieActorsPersonFieldInput + Star: MovieActorsStarFieldInput +} + +input MovieActorsDeleteInput { + Person: [MovieActorsPersonDeleteFieldInput!] + Star: [MovieActorsStarDeleteFieldInput!] +} + +input MovieActorsDisconnectInput { + Person: [MovieActorsPersonDisconnectFieldInput!] + Star: [MovieActorsStarDisconnectFieldInput!] +} + +input MovieActorsPersonConnectFieldInput { + connect: [PersonConnectInput!] + where: PersonConnectWhere +} + +input MovieActorsPersonConnectionWhere { + AND: [MovieActorsPersonConnectionWhere!] + NOT: MovieActorsPersonConnectionWhere + OR: [MovieActorsPersonConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsPersonCreateFieldInput { + node: PersonCreateInput! +} + +input MovieActorsPersonDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsPersonConnectionWhere +} + +input MovieActorsPersonDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsPersonConnectionWhere +} + +input MovieActorsPersonFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] +} + +input MovieActorsPersonUpdateConnectionInput { + node: PersonUpdateInput +} + +input MovieActorsPersonUpdateFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + delete: [MovieActorsPersonDeleteFieldInput!] + disconnect: [MovieActorsPersonDisconnectFieldInput!] + update: MovieActorsPersonUpdateConnectionInput + where: MovieActorsPersonConnectionWhere +} + +type MovieActorsRelationship { + cursor: String! + node: Actor! +} + +input MovieActorsStarConnectFieldInput { + connect: [StarConnectInput!] + where: StarConnectWhere +} + +input MovieActorsStarConnectionWhere { + AND: [MovieActorsStarConnectionWhere!] + NOT: MovieActorsStarConnectionWhere + OR: [MovieActorsStarConnectionWhere!] + node: StarWhere + node_NOT: StarWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieActorsStarCreateFieldInput { + node: StarCreateInput! +} + +input MovieActorsStarDeleteFieldInput { + delete: StarDeleteInput + where: MovieActorsStarConnectionWhere +} + +input MovieActorsStarDisconnectFieldInput { + disconnect: StarDisconnectInput + where: MovieActorsStarConnectionWhere +} + +input MovieActorsStarFieldInput { + connect: [MovieActorsStarConnectFieldInput!] + create: [MovieActorsStarCreateFieldInput!] +} + +input MovieActorsStarUpdateConnectionInput { + node: StarUpdateInput +} + +input MovieActorsStarUpdateFieldInput { + connect: [MovieActorsStarConnectFieldInput!] + create: [MovieActorsStarCreateFieldInput!] + delete: [MovieActorsStarDeleteFieldInput!] + disconnect: [MovieActorsStarDisconnectFieldInput!] + update: MovieActorsStarUpdateConnectionInput + where: MovieActorsStarConnectionWhere +} + +input MovieActorsUpdateInput { + Person: [MovieActorsPersonUpdateFieldInput!] + Star: [MovieActorsStarUpdateFieldInput!] +} + +type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + actors: MovieActorsConnectInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + actorCount: Int + actors: MovieActorsCreateInput + averageRating: Float + id: ID + isActive: Boolean +} + +type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDeleteInput { + actors: MovieActorsDeleteInput +} + +type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! +} + +input MovieDisconnectInput { + actors: MovieActorsDisconnectInput +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean +} + +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!] +} + +input MovieRelationInput { + actors: MovieActorsCreateFieldInput +} + +type MovieRelationshipCreatedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + movie: MovieSubscriptionWhere +} + +type MovieRelationshipDeletedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! +} + +input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + movie: MovieSubscriptionWhere +} + +\\"\\"\\" +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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: MovieActorsUpdateInput + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean +} + +type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + createStars(input: [StarCreateInput!]!): CreateStarsMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + deleteStars(delete: StarDeleteInput, where: StarWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + updateStars(connect: StarConnectInput, create: StarRelationInput, delete: StarDeleteInput, disconnect: StarDisconnectInput, update: StarUpdateInput, where: StarWhere): UpdateStarsMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! +} + +type PersonAggregateSelection { + count: Int! +} + +input PersonConnectInput { + movies: [PersonMoviesConnectFieldInput!] +} + +input PersonConnectWhere { + node: PersonWhere! +} + +type PersonConnectedRelationships { + movies: PersonMoviesConnectedRelationship +} + +input PersonCreateInput { + movies: PersonMoviesFieldInput +} + +type PersonCreatedEvent { + event: EventType! + timestamp: Float! +} + +input PersonDeleteInput { + movies: [PersonMoviesDeleteFieldInput!] +} + +type PersonDeletedEvent { + event: EventType! + timestamp: Float! +} + +input PersonDisconnectInput { + movies: [PersonMoviesDisconnectFieldInput!] +} + +type PersonEdge { + cursor: String! + node: Person! +} + +type PersonMovieMoviesAggregationSelection { + count: Int! + node: PersonMovieMoviesNodeAggregateSelection +} + +type PersonMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input PersonMoviesAggregateInput { + AND: [PersonMoviesAggregateInput!] + NOT: PersonMoviesAggregateInput + OR: [PersonMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PersonMoviesNodeAggregationWhereInput +} + +input PersonMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type PersonMoviesConnectedRelationship { + node: MovieEventPayload! +} + +type PersonMoviesConnection { + edges: [PersonMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input PersonMoviesConnectionSort { + node: MovieSort +} + +input PersonMoviesConnectionWhere { + AND: [PersonMoviesConnectionWhere!] + NOT: PersonMoviesConnectionWhere + OR: [PersonMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input PersonMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input PersonMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: PersonMoviesConnectionWhere +} + +input PersonMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: PersonMoviesConnectionWhere +} + +input PersonMoviesFieldInput { + connect: [PersonMoviesConnectFieldInput!] + create: [PersonMoviesCreateFieldInput!] +} + +input PersonMoviesNodeAggregationWhereInput { + AND: [PersonMoviesNodeAggregationWhereInput!] + NOT: PersonMoviesNodeAggregationWhereInput + OR: [PersonMoviesNodeAggregationWhereInput!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type PersonMoviesRelationship { + cursor: String! + node: Movie! +} + +input PersonMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere +} + +input PersonMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input PersonMoviesUpdateFieldInput { + connect: [PersonMoviesConnectFieldInput!] + create: [PersonMoviesCreateFieldInput!] + delete: [PersonMoviesDeleteFieldInput!] + disconnect: [PersonMoviesDisconnectFieldInput!] + update: PersonMoviesUpdateConnectionInput + where: PersonMoviesConnectionWhere +} + +input PersonOptions { + limit: Int + offset: Int +} + +input PersonRelationInput { + movies: [PersonMoviesCreateFieldInput!] +} + +type PersonRelationshipCreatedEvent { + createdRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input PersonRelationshipCreatedSubscriptionWhere { + AND: [PersonRelationshipCreatedSubscriptionWhere!] + NOT: PersonRelationshipCreatedSubscriptionWhere + OR: [PersonRelationshipCreatedSubscriptionWhere!] + createdRelationship: PersonRelationshipsSubscriptionWhere +} + +type PersonRelationshipDeletedEvent { + deletedRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input PersonRelationshipDeletedSubscriptionWhere { + AND: [PersonRelationshipDeletedSubscriptionWhere!] + NOT: PersonRelationshipDeletedSubscriptionWhere + OR: [PersonRelationshipDeletedSubscriptionWhere!] + deletedRelationship: PersonRelationshipsSubscriptionWhere +} + +input PersonRelationshipsSubscriptionWhere { + movies: PersonMoviesRelationshipSubscriptionWhere +} + +input PersonUpdateInput { + movies: [PersonMoviesUpdateFieldInput!] +} + +type PersonUpdatedEvent { + event: EventType! + timestamp: Float! +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: PersonMoviesConnectionWhere + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! + stars(options: StarOptions, where: StarWhere): [Star!]! + starsAggregate(where: StarWhere): StarAggregateSelection! + starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type Star { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! +} + +type StarAggregateSelection { + count: Int! +} + +input StarConnectInput { + movies: [StarMoviesConnectFieldInput!] +} + +input StarConnectWhere { + node: StarWhere! +} + +input StarCreateInput { + movies: StarMoviesFieldInput +} + +input StarDeleteInput { + movies: [StarMoviesDeleteFieldInput!] +} + +input StarDisconnectInput { + movies: [StarMoviesDisconnectFieldInput!] +} + +type StarEdge { + cursor: String! + node: Star! +} + +type StarMovieMoviesAggregationSelection { + count: Int! + node: StarMovieMoviesNodeAggregateSelection +} + +type StarMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input StarMoviesAggregateInput { + AND: [StarMoviesAggregateInput!] + NOT: StarMoviesAggregateInput + OR: [StarMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: StarMoviesNodeAggregationWhereInput +} + +input StarMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere +} + +type StarMoviesConnection { + edges: [StarMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input StarMoviesConnectionSort { + node: MovieSort +} + +input StarMoviesConnectionWhere { + AND: [StarMoviesConnectionWhere!] + NOT: StarMoviesConnectionWhere + OR: [StarMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input StarMoviesCreateFieldInput { + node: MovieCreateInput! +} + +input StarMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: StarMoviesConnectionWhere +} + +input StarMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: StarMoviesConnectionWhere +} + +input StarMoviesFieldInput { + connect: [StarMoviesConnectFieldInput!] + create: [StarMoviesCreateFieldInput!] +} + +input StarMoviesNodeAggregationWhereInput { + AND: [StarMoviesNodeAggregationWhereInput!] + NOT: StarMoviesNodeAggregationWhereInput + OR: [StarMoviesNodeAggregationWhereInput!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") +} + +type StarMoviesRelationship { + cursor: String! + node: Movie! +} + +input StarMoviesUpdateConnectionInput { + node: MovieUpdateInput +} + +input StarMoviesUpdateFieldInput { + connect: [StarMoviesConnectFieldInput!] + create: [StarMoviesCreateFieldInput!] + delete: [StarMoviesDeleteFieldInput!] + disconnect: [StarMoviesDisconnectFieldInput!] + update: StarMoviesUpdateConnectionInput + where: StarMoviesConnectionWhere +} + +input StarOptions { + limit: Int + offset: Int +} + +input StarRelationInput { + movies: [StarMoviesCreateFieldInput!] +} + +input StarUpdateInput { + movies: [StarMoviesUpdateFieldInput!] +} + +input StarWhere { + AND: [StarWhere!] + NOT: StarWhere + OR: [StarWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: StarMoviesAggregateInput + moviesConnection: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Stars where all of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where none of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: StarMoviesConnectionWhere + moviesConnection_NOT: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Stars where one of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where some of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: StarMoviesConnectionWhere + \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere +} + +type StarsConnection { + edges: [StarEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Subscription { + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + personCreated: PersonCreatedEvent! + personDeleted: PersonDeletedEvent! + personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! + personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! + personUpdated: PersonUpdatedEvent! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +} + +type UpdateStarsMutationResponse { + info: UpdateInfo! + stars: [Star!]! +}" +`); + }); - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + test("Type with relationship to a subscriptions excluded type + Interface type", async () => { + const typeDefs = gql` + type Movie implements Production @subscription(events: []) { + title: String! + id: ID @unique + director: Creature! } - type ActorAggregateSelection { - count: Int! + type Series implements Production { + title: String! + episode: Int! + id: ID @unique + director: Creature! } - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] + interface Production { + id: ID + director: Creature! @relationship(type: "DIRECTED", direction: IN) } - input ActorConnectWhere { - node: ActorWhere! + type Person implements Creature { + movies: Production! } - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship + interface Creature { + movies: Production! @relationship(type: "DIRECTED", direction: OUT) } + `; - input ActorCreateInput { - movies: ActorMoviesFieldInput - } + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); - type ActorCreatedEvent { - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - delete: [ActorMoviesDeleteFieldInput!] - disconnect: [ActorMoviesDisconnectFieldInput!] - update: ActorMoviesUpdateConnectionInput - where: ActorMoviesConnectionWhere - } - - input ActorOptions { - limit: Int - offset: Int - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - createdRelationship: ActorConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - deletedRelationship: ActorConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - } - - type ActorUpdatedEvent { - event: EventType! - timestamp: Float! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actorCount: Int - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - averageRating: Float - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - isActive: Boolean - } - - type MovieActorActorsAggregationSelection { - count: Int! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actorCount: Int - actors: MovieActorsFieldInput - averageRating: Float - id: ID - isActive: Boolean - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - movie: MovieSubscriptionWhere - } - - \\"\\"\\" - 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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type Subscription { - actorCreated: ActorCreatedEvent! - actorDeleted: ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated: ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("Empty EventPayload type on Union type", async () => { - const typeDefs = gql` - type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - union Actor = Star | Person - - type Star { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - type Person { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - `; - - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - union Actor = Person | Star - - input ActorWhere { - Person: PersonWhere - Star: StarWhere - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - type CreateStarsMutationResponse { - info: CreateInfo! - stars: [Star!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actorCount: Int - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - averageRating: Float - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - isActive: Boolean - } - - input MovieActorsConnectInput { - Person: [MovieActorsPersonConnectFieldInput!] - Star: [MovieActorsStarConnectFieldInput!] - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - Person: MovieActorsPersonConnectionWhere - Star: MovieActorsStarConnectionWhere - } - - input MovieActorsCreateFieldInput { - Person: [MovieActorsPersonCreateFieldInput!] - Star: [MovieActorsStarCreateFieldInput!] - } - - input MovieActorsCreateInput { - Person: MovieActorsPersonFieldInput - Star: MovieActorsStarFieldInput - } - - input MovieActorsDeleteInput { - Person: [MovieActorsPersonDeleteFieldInput!] - Star: [MovieActorsStarDeleteFieldInput!] - } - - input MovieActorsDisconnectInput { - Person: [MovieActorsPersonDisconnectFieldInput!] - Star: [MovieActorsStarDisconnectFieldInput!] - } - - input MovieActorsPersonConnectFieldInput { - connect: [PersonConnectInput!] - where: PersonConnectWhere - } - - input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsPersonDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsPersonConnectionWhere - } - - input MovieActorsPersonDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsPersonConnectionWhere - } - - input MovieActorsPersonFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - } - - input MovieActorsPersonUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsPersonUpdateFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - delete: [MovieActorsPersonDeleteFieldInput!] - disconnect: [MovieActorsPersonDisconnectFieldInput!] - update: MovieActorsPersonUpdateConnectionInput - where: MovieActorsPersonConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsStarConnectFieldInput { - connect: [StarConnectInput!] - where: StarConnectWhere - } - - input MovieActorsStarConnectionWhere { - AND: [MovieActorsStarConnectionWhere!] - NOT: MovieActorsStarConnectionWhere - OR: [MovieActorsStarConnectionWhere!] - node: StarWhere - node_NOT: StarWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsStarCreateFieldInput { - node: StarCreateInput! - } - - input MovieActorsStarDeleteFieldInput { - delete: StarDeleteInput - where: MovieActorsStarConnectionWhere - } - - input MovieActorsStarDisconnectFieldInput { - disconnect: StarDisconnectInput - where: MovieActorsStarConnectionWhere - } - - input MovieActorsStarFieldInput { - connect: [MovieActorsStarConnectFieldInput!] - create: [MovieActorsStarCreateFieldInput!] - } - - input MovieActorsStarUpdateConnectionInput { - node: StarUpdateInput - } - - input MovieActorsStarUpdateFieldInput { - connect: [MovieActorsStarConnectFieldInput!] - create: [MovieActorsStarCreateFieldInput!] - delete: [MovieActorsStarDeleteFieldInput!] - disconnect: [MovieActorsStarDisconnectFieldInput!] - update: MovieActorsStarUpdateConnectionInput - where: MovieActorsStarConnectionWhere - } - - input MovieActorsUpdateInput { - Person: [MovieActorsPersonUpdateFieldInput!] - Star: [MovieActorsStarUpdateFieldInput!] - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: MovieActorsConnectInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actorCount: Int - actors: MovieActorsCreateInput - averageRating: Float - id: ID - isActive: Boolean - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: MovieActorsDeleteInput - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean - } - - 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!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - type MovieRelationshipCreatedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - movie: MovieSubscriptionWhere - } - - \\"\\"\\" - 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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: MovieActorsUpdateInput - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - createStars(input: [StarCreateInput!]!): CreateStarsMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - deleteStars(delete: StarDeleteInput, where: StarWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - updateStars(connect: StarConnectInput, create: StarRelationInput, delete: StarDeleteInput, disconnect: StarDisconnectInput, update: StarUpdateInput, where: StarWhere): UpdateStarsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! - } - - type PersonAggregateSelection { - count: Int! - } - - input PersonConnectInput { - movies: [PersonMoviesConnectFieldInput!] - } - - input PersonConnectWhere { - node: PersonWhere! - } - - type PersonConnectedRelationships { - movies: PersonMoviesConnectedRelationship - } - - input PersonCreateInput { - movies: PersonMoviesFieldInput - } - - type PersonCreatedEvent { - event: EventType! - timestamp: Float! - } - - input PersonDeleteInput { - movies: [PersonMoviesDeleteFieldInput!] - } - - type PersonDeletedEvent { - event: EventType! - timestamp: Float! - } - - input PersonDisconnectInput { - movies: [PersonMoviesDisconnectFieldInput!] - } - - type PersonEdge { - cursor: String! - node: Person! - } - - type PersonMovieMoviesAggregationSelection { - count: Int! - node: PersonMovieMoviesNodeAggregateSelection - } - - type PersonMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input PersonMoviesAggregateInput { - AND: [PersonMoviesAggregateInput!] - NOT: PersonMoviesAggregateInput - OR: [PersonMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PersonMoviesNodeAggregationWhereInput - } - - input PersonMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type PersonMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type PersonMoviesConnection { - edges: [PersonMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonMoviesConnectionSort { - node: MovieSort - } - - input PersonMoviesConnectionWhere { - AND: [PersonMoviesConnectionWhere!] - NOT: PersonMoviesConnectionWhere - OR: [PersonMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PersonMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input PersonMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: PersonMoviesConnectionWhere - } - - input PersonMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: PersonMoviesConnectionWhere - } - - input PersonMoviesFieldInput { - connect: [PersonMoviesConnectFieldInput!] - create: [PersonMoviesCreateFieldInput!] - } - - input PersonMoviesNodeAggregationWhereInput { - AND: [PersonMoviesNodeAggregationWhereInput!] - NOT: PersonMoviesNodeAggregationWhereInput - OR: [PersonMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type PersonMoviesRelationship { - cursor: String! - node: Movie! - } - - input PersonMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input PersonMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input PersonMoviesUpdateFieldInput { - connect: [PersonMoviesConnectFieldInput!] - create: [PersonMoviesCreateFieldInput!] - delete: [PersonMoviesDeleteFieldInput!] - disconnect: [PersonMoviesDisconnectFieldInput!] - update: PersonMoviesUpdateConnectionInput - where: PersonMoviesConnectionWhere - } - - input PersonOptions { - limit: Int - offset: Int - } - - input PersonRelationInput { - movies: [PersonMoviesCreateFieldInput!] - } - - type PersonRelationshipCreatedEvent { - createdRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input PersonRelationshipCreatedSubscriptionWhere { - AND: [PersonRelationshipCreatedSubscriptionWhere!] - NOT: PersonRelationshipCreatedSubscriptionWhere - OR: [PersonRelationshipCreatedSubscriptionWhere!] - createdRelationship: PersonRelationshipsSubscriptionWhere - } - - type PersonRelationshipDeletedEvent { - deletedRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input PersonRelationshipDeletedSubscriptionWhere { - AND: [PersonRelationshipDeletedSubscriptionWhere!] - NOT: PersonRelationshipDeletedSubscriptionWhere - OR: [PersonRelationshipDeletedSubscriptionWhere!] - deletedRelationship: PersonRelationshipsSubscriptionWhere - } - - input PersonRelationshipsSubscriptionWhere { - movies: PersonMoviesRelationshipSubscriptionWhere - } - - input PersonUpdateInput { - movies: [PersonMoviesUpdateFieldInput!] - } - - type PersonUpdatedEvent { - event: EventType! - timestamp: Float! - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: PersonMoviesAggregateInput - moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return People where all of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere - \\"\\"\\" - Return People where none of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere - moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return People where one of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere - \\"\\"\\" - Return People where some of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere - \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - stars(options: StarOptions, where: StarWhere): [Star!]! - starsAggregate(where: StarWhere): StarAggregateSelection! - starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"\\"\\"\\" - type Star { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! - } - - type StarAggregateSelection { - count: Int! - } - - input StarConnectInput { - movies: [StarMoviesConnectFieldInput!] - } - - input StarConnectWhere { - node: StarWhere! - } - - type StarConnectedRelationships { - movies: StarMoviesConnectedRelationship - } - - input StarCreateInput { - movies: StarMoviesFieldInput - } - - type StarCreatedEvent { - event: EventType! - timestamp: Float! - } - - input StarDeleteInput { - movies: [StarMoviesDeleteFieldInput!] - } - - type StarDeletedEvent { - event: EventType! - timestamp: Float! - } - - input StarDisconnectInput { - movies: [StarMoviesDisconnectFieldInput!] - } - - type StarEdge { - cursor: String! - node: Star! - } - - type StarMovieMoviesAggregationSelection { - count: Int! - node: StarMovieMoviesNodeAggregateSelection - } - - type StarMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input StarMoviesAggregateInput { - AND: [StarMoviesAggregateInput!] - NOT: StarMoviesAggregateInput - OR: [StarMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: StarMoviesNodeAggregationWhereInput - } - - input StarMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type StarMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type StarMoviesConnection { - edges: [StarMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input StarMoviesConnectionSort { - node: MovieSort - } - - input StarMoviesConnectionWhere { - AND: [StarMoviesConnectionWhere!] - NOT: StarMoviesConnectionWhere - OR: [StarMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input StarMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input StarMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: StarMoviesConnectionWhere - } - - input StarMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: StarMoviesConnectionWhere - } - - input StarMoviesFieldInput { - connect: [StarMoviesConnectFieldInput!] - create: [StarMoviesCreateFieldInput!] - } - - input StarMoviesNodeAggregationWhereInput { - AND: [StarMoviesNodeAggregationWhereInput!] - NOT: StarMoviesNodeAggregationWhereInput - OR: [StarMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type StarMoviesRelationship { - cursor: String! - node: Movie! - } - - input StarMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input StarMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input StarMoviesUpdateFieldInput { - connect: [StarMoviesConnectFieldInput!] - create: [StarMoviesCreateFieldInput!] - delete: [StarMoviesDeleteFieldInput!] - disconnect: [StarMoviesDisconnectFieldInput!] - update: StarMoviesUpdateConnectionInput - where: StarMoviesConnectionWhere - } - - input StarOptions { - limit: Int - offset: Int - } - - input StarRelationInput { - movies: [StarMoviesCreateFieldInput!] - } - - type StarRelationshipCreatedEvent { - createdRelationship: StarConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input StarRelationshipCreatedSubscriptionWhere { - AND: [StarRelationshipCreatedSubscriptionWhere!] - NOT: StarRelationshipCreatedSubscriptionWhere - OR: [StarRelationshipCreatedSubscriptionWhere!] - createdRelationship: StarRelationshipsSubscriptionWhere - } - - type StarRelationshipDeletedEvent { - deletedRelationship: StarConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input StarRelationshipDeletedSubscriptionWhere { - AND: [StarRelationshipDeletedSubscriptionWhere!] - NOT: StarRelationshipDeletedSubscriptionWhere - OR: [StarRelationshipDeletedSubscriptionWhere!] - deletedRelationship: StarRelationshipsSubscriptionWhere - } - - input StarRelationshipsSubscriptionWhere { - movies: StarMoviesRelationshipSubscriptionWhere - } - - input StarUpdateInput { - movies: [StarMoviesUpdateFieldInput!] - } - - type StarUpdatedEvent { - event: EventType! - timestamp: Float! - } - - input StarWhere { - AND: [StarWhere!] - NOT: StarWhere - OR: [StarWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: StarMoviesAggregateInput - moviesConnection: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Stars where all of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: StarMoviesConnectionWhere - \\"\\"\\" - Return Stars where none of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: StarMoviesConnectionWhere - moviesConnection_NOT: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Stars where one of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: StarMoviesConnectionWhere - \\"\\"\\" - Return Stars where some of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: StarMoviesConnectionWhere - \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - } - - type StarsConnection { - edges: [StarEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Subscription { - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - personCreated: PersonCreatedEvent! - personDeleted: PersonDeletedEvent! - personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! - personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! - personUpdated: PersonUpdatedEvent! - starCreated: StarCreatedEvent! - starDeleted: StarDeletedEvent! - starRelationshipCreated(where: StarRelationshipCreatedSubscriptionWhere): StarRelationshipCreatedEvent! - starRelationshipDeleted(where: StarRelationshipDeletedSubscriptionWhere): StarRelationshipDeletedEvent! - starUpdated: StarUpdatedEvent! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - } - - type UpdateStarsMutationResponse { - info: UpdateInfo! - stars: [Star!]! - }" - `); - }); - - test("Empty EventPayload type, but @relationshipProperty exists", async () => { - const typeDefs = gql` - type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) - } - - interface ActedIn @relationshipProperties { - screenTime: Int! - } - - type Actor { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - `; - - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - interface ActedIn { - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input ActedInCreateInput { - screenTime: Int! - } - - input ActedInSort { - screenTime: SortDirection - } - - input ActedInSubscriptionWhere { - AND: [ActedInSubscriptionWhere!] - NOT: ActedInSubscriptionWhere - OR: [ActedInSubscriptionWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - } - - type ActorAggregateSelection { - count: Int! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - } - - type ActorCreatedEvent { - event: EventType! - timestamp: Float! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - type ActorDeletedEvent { - event: EventType! - timestamp: Float! - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type ActorMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ActorMoviesCreateFieldInput { - 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!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - } - - input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - delete: [ActorMoviesDeleteFieldInput!] - disconnect: [ActorMoviesDisconnectFieldInput!] - update: ActorMoviesUpdateConnectionInput - where: ActorMoviesConnectionWhere - } - - input ActorOptions { - limit: Int - offset: Int - } - - input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] - } - - type ActorRelationshipCreatedEvent { - createdRelationship: ActorConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - createdRelationship: ActorRelationshipsSubscriptionWhere - } - - type ActorRelationshipDeletedEvent { - deletedRelationship: ActorConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - deletedRelationship: ActorRelationshipsSubscriptionWhere - } - - input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - } - - type ActorUpdatedEvent { - event: EventType! - timestamp: Float! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actorCount: Int - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - averageRating: Float - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - isActive: Boolean - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnectedRelationship { - screenTime: Int! - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - edge: ActedInSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - \\"\\"\\"\\"\\"\\" - screenTime: Int! - } - - input MovieActorsRelationshipSubscriptionWhere { - edge: ActedInSubscriptionWhere - } - - input MovieActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship - } - - input MovieCreateInput { - actorCount: Int - actors: MovieActorsFieldInput - averageRating: Float - id: ID - isActive: Boolean - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere - } - - input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere - } - - \\"\\"\\" - 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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type Subscription { - actorCreated: ActorCreatedEvent! - actorDeleted: ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated: ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("Subscriptions excluded", async () => { - const typeDefs = gql` - type Movie @subscription(events: []) { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type Actor { - name: String! - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Actor { - \\"\\"\\"\\"\\"\\" - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String! - } - - type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorEventPayload { - name: String! - } - - 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 ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input ActorUpdateInput { - name: String - } - - type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actorCount: Int - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - averageRating: Float - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - isActive: Boolean - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieCreateInput { - actorCount: Int - actors: MovieActorsFieldInput - averageRating: Float - id: ID - isActive: Boolean - } - - 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!] - } - - input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] - } - - \\"\\"\\" - 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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection - } - - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("Type with relationship to a subscriptions excluded type", async () => { - const typeDefs = gql` - type User @mutation(operations: []) @subscription(events: []) { - username: String! - name: String - } - type Agreement { - id: Int! - name: String - owner: User @relationship(type: "OWNED_BY", direction: OUT) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"\\"\\"\\" - type Agreement { - \\"\\"\\"\\"\\"\\" - id: Int! - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - owner(directed: Boolean = true, options: UserOptions, where: UserWhere): User - ownerAggregate(directed: Boolean = true, where: UserWhere): AgreementUserOwnerAggregationSelection - ownerConnection(after: String, directed: Boolean = true, first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! - } - - type AgreementAggregateSelection { - count: Int! - id: IntAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - } - - input AgreementConnectInput { - owner: AgreementOwnerConnectFieldInput - } - - type AgreementConnectedRelationships { - owner: AgreementOwnerConnectedRelationship - } - - input AgreementCreateInput { - id: Int! - name: String - owner: AgreementOwnerFieldInput - } - - type AgreementCreatedEvent { - createdAgreement: AgreementEventPayload! - event: EventType! - timestamp: Float! - } - - input AgreementDeleteInput { - owner: AgreementOwnerDeleteFieldInput - } - - type AgreementDeletedEvent { - deletedAgreement: AgreementEventPayload! - event: EventType! - timestamp: Float! - } - - input AgreementDisconnectInput { - owner: AgreementOwnerDisconnectFieldInput - } - - type AgreementEdge { - cursor: String! - node: Agreement! - } - - type AgreementEventPayload { - id: Int! - name: String - } - - input AgreementOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AgreementSort objects to sort Agreements by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AgreementSort!] - } - - input AgreementOwnerAggregateInput { - AND: [AgreementOwnerAggregateInput!] - NOT: AgreementOwnerAggregateInput - OR: [AgreementOwnerAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AgreementOwnerNodeAggregationWhereInput - } - - input AgreementOwnerConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere - } - - type AgreementOwnerConnectedRelationship { - node: UserEventPayload! - } - - type AgreementOwnerConnection { - edges: [AgreementOwnerRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input AgreementOwnerConnectionSort { - node: UserSort - } - - input AgreementOwnerConnectionWhere { - AND: [AgreementOwnerConnectionWhere!] - NOT: AgreementOwnerConnectionWhere - OR: [AgreementOwnerConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input AgreementOwnerCreateFieldInput { - node: UserCreateInput! - } - - input AgreementOwnerDeleteFieldInput { - where: AgreementOwnerConnectionWhere - } - - input AgreementOwnerDisconnectFieldInput { - where: AgreementOwnerConnectionWhere - } - - input AgreementOwnerFieldInput { - connect: AgreementOwnerConnectFieldInput - create: AgreementOwnerCreateFieldInput - } - - input AgreementOwnerNodeAggregationWhereInput { - AND: [AgreementOwnerNodeAggregationWhereInput!] - NOT: AgreementOwnerNodeAggregationWhereInput - OR: [AgreementOwnerNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - - type AgreementOwnerRelationship { - cursor: String! - node: User! - } - - input AgreementOwnerRelationshipSubscriptionWhere { - node: UserSubscriptionWhere - } - - input AgreementOwnerUpdateConnectionInput { - node: UserUpdateInput - } - - input AgreementOwnerUpdateFieldInput { - connect: AgreementOwnerConnectFieldInput - create: AgreementOwnerCreateFieldInput - delete: AgreementOwnerDeleteFieldInput - disconnect: AgreementOwnerDisconnectFieldInput - update: AgreementOwnerUpdateConnectionInput - where: AgreementOwnerConnectionWhere - } - - input AgreementRelationInput { - owner: AgreementOwnerCreateFieldInput - } - - type AgreementRelationshipCreatedEvent { - agreement: AgreementEventPayload! - createdRelationship: AgreementConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input AgreementRelationshipCreatedSubscriptionWhere { - AND: [AgreementRelationshipCreatedSubscriptionWhere!] - NOT: AgreementRelationshipCreatedSubscriptionWhere - OR: [AgreementRelationshipCreatedSubscriptionWhere!] - agreement: AgreementSubscriptionWhere - createdRelationship: AgreementRelationshipsSubscriptionWhere - } - - type AgreementRelationshipDeletedEvent { - agreement: AgreementEventPayload! - deletedRelationship: AgreementConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! - } - - input AgreementRelationshipDeletedSubscriptionWhere { - AND: [AgreementRelationshipDeletedSubscriptionWhere!] - NOT: AgreementRelationshipDeletedSubscriptionWhere - OR: [AgreementRelationshipDeletedSubscriptionWhere!] - agreement: AgreementSubscriptionWhere - deletedRelationship: AgreementRelationshipsSubscriptionWhere - } - - input AgreementRelationshipsSubscriptionWhere { - owner: AgreementOwnerRelationshipSubscriptionWhere - } - - \\"\\"\\" - Fields to sort Agreements by. The order in which sorts are applied is not guaranteed when specifying many fields in one AgreementSort object. - \\"\\"\\" - input AgreementSort { - id: SortDirection - name: SortDirection - } - - input AgreementSubscriptionWhere { - AND: [AgreementSubscriptionWhere!] - NOT: AgreementSubscriptionWhere - OR: [AgreementSubscriptionWhere!] - id: Int - id_GT: Int - id_GTE: Int - id_IN: [Int] - id_LT: Int - id_LTE: Int - id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - } - - input AgreementUpdateInput { - id: Int - id_DECREMENT: Int - id_INCREMENT: Int - name: String - owner: AgreementOwnerUpdateFieldInput - } - - type AgreementUpdatedEvent { - event: EventType! - previousState: AgreementEventPayload! - timestamp: Float! - updatedAgreement: AgreementEventPayload! - } - - type AgreementUserOwnerAggregationSelection { - count: Int! - node: AgreementUserOwnerNodeAggregateSelection - } - - type AgreementUserOwnerNodeAggregateSelection { - name: StringAggregateSelectionNullable! - username: StringAggregateSelectionNonNullable! - } - - input AgreementWhere { - AND: [AgreementWhere!] - NOT: AgreementWhere - OR: [AgreementWhere!] - id: Int - id_GT: Int - id_GTE: Int - id_IN: [Int!] - id_LT: Int - id_LTE: Int - id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - owner: UserWhere - ownerAggregate: AgreementOwnerAggregateInput - ownerConnection: AgreementOwnerConnectionWhere - ownerConnection_NOT: AgreementOwnerConnectionWhere - owner_NOT: UserWhere - } - - type AgreementsConnection { - edges: [AgreementEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateAgreementsMutationResponse { - agreements: [Agreement!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - type Mutation { - createAgreements(input: [AgreementCreateInput!]!): CreateAgreementsMutationResponse! - deleteAgreements(delete: AgreementDeleteInput, where: AgreementWhere): DeleteInfo! - updateAgreements(connect: AgreementConnectInput, create: AgreementRelationInput, delete: AgreementDeleteInput, disconnect: AgreementDisconnectInput, update: AgreementUpdateInput, where: AgreementWhere): UpdateAgreementsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - agreements(options: AgreementOptions, where: AgreementWhere): [Agreement!]! - agreementsAggregate(where: AgreementWhere): AgreementAggregateSelection! - agreementsConnection(after: String, first: Int, sort: [AgreementSort], where: AgreementWhere): AgreementsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type StringAggregateSelectionNullable { - longest: String - shortest: String - } - - type Subscription { - agreementCreated(where: AgreementSubscriptionWhere): AgreementCreatedEvent! - agreementDeleted(where: AgreementSubscriptionWhere): AgreementDeletedEvent! - agreementRelationshipCreated(where: AgreementRelationshipCreatedSubscriptionWhere): AgreementRelationshipCreatedEvent! - agreementRelationshipDeleted(where: AgreementRelationshipDeletedSubscriptionWhere): AgreementRelationshipDeletedEvent! - agreementUpdated(where: AgreementSubscriptionWhere): AgreementUpdatedEvent! - } - - type UpdateAgreementsMutationResponse { - agreements: [Agreement!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type User { - \\"\\"\\"\\"\\"\\" - name: String - \\"\\"\\"\\"\\"\\" - username: String! - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - username: StringAggregateSelectionNonNullable! - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - name: String - username: String! - } - - type UserEdge { - cursor: String! - node: User! - } - - type UserEventPayload { - name: String - username: String! - } - - 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 - username: SortDirection - } - - input UserSubscriptionWhere { - AND: [UserSubscriptionWhere!] - NOT: UserSubscriptionWhere - OR: [UserSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - input UserUpdateInput { - name: String - username: String - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); - }); - - test("Type with relationship to a subscriptions excluded type + Union type", async () => { - const typeDefs = gql` - type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - - union Actor = Star | Person - - type Star @subscription(events: []) { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - type Person { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - `; - - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - union Actor = Person | Star - - input ActorWhere { - Person: PersonWhere - Star: StarWhere - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - type CreateStarsMutationResponse { - info: CreateInfo! - stars: [Star!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - actorCount: Int - \\"\\"\\"\\"\\"\\" - actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - \\"\\"\\"\\"\\"\\" - averageRating: Float - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - isActive: Boolean - } - - input MovieActorsConnectInput { - Person: [MovieActorsPersonConnectFieldInput!] - Star: [MovieActorsStarConnectFieldInput!] - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionWhere { - Person: MovieActorsPersonConnectionWhere - Star: MovieActorsStarConnectionWhere - } - - input MovieActorsCreateFieldInput { - Person: [MovieActorsPersonCreateFieldInput!] - Star: [MovieActorsStarCreateFieldInput!] - } - - input MovieActorsCreateInput { - Person: MovieActorsPersonFieldInput - Star: MovieActorsStarFieldInput - } - - input MovieActorsDeleteInput { - Person: [MovieActorsPersonDeleteFieldInput!] - Star: [MovieActorsStarDeleteFieldInput!] - } - - input MovieActorsDisconnectInput { - Person: [MovieActorsPersonDisconnectFieldInput!] - Star: [MovieActorsStarDisconnectFieldInput!] - } - - input MovieActorsPersonConnectFieldInput { - connect: [PersonConnectInput!] - where: PersonConnectWhere - } - - input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsPersonCreateFieldInput { - node: PersonCreateInput! - } - - input MovieActorsPersonDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsPersonConnectionWhere - } - - input MovieActorsPersonDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsPersonConnectionWhere - } - - input MovieActorsPersonFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - } - - input MovieActorsPersonUpdateConnectionInput { - node: PersonUpdateInput - } - - input MovieActorsPersonUpdateFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - delete: [MovieActorsPersonDeleteFieldInput!] - disconnect: [MovieActorsPersonDisconnectFieldInput!] - update: MovieActorsPersonUpdateConnectionInput - where: MovieActorsPersonConnectionWhere - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsStarConnectFieldInput { - connect: [StarConnectInput!] - where: StarConnectWhere - } - - input MovieActorsStarConnectionWhere { - AND: [MovieActorsStarConnectionWhere!] - NOT: MovieActorsStarConnectionWhere - OR: [MovieActorsStarConnectionWhere!] - node: StarWhere - node_NOT: StarWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieActorsStarCreateFieldInput { - node: StarCreateInput! - } - - input MovieActorsStarDeleteFieldInput { - delete: StarDeleteInput - where: MovieActorsStarConnectionWhere - } - - input MovieActorsStarDisconnectFieldInput { - disconnect: StarDisconnectInput - where: MovieActorsStarConnectionWhere - } - - input MovieActorsStarFieldInput { - connect: [MovieActorsStarConnectFieldInput!] - create: [MovieActorsStarCreateFieldInput!] - } - - input MovieActorsStarUpdateConnectionInput { - node: StarUpdateInput - } - - input MovieActorsStarUpdateFieldInput { - connect: [MovieActorsStarConnectFieldInput!] - create: [MovieActorsStarCreateFieldInput!] - delete: [MovieActorsStarDeleteFieldInput!] - disconnect: [MovieActorsStarDisconnectFieldInput!] - update: MovieActorsStarUpdateConnectionInput - where: MovieActorsStarConnectionWhere - } - - input MovieActorsUpdateInput { - Person: [MovieActorsPersonUpdateFieldInput!] - Star: [MovieActorsStarUpdateFieldInput!] - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - actors: MovieActorsConnectInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actorCount: Int - actors: MovieActorsCreateInput - averageRating: Float - id: ID - isActive: Boolean - } - - type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDeleteInput { - actors: MovieActorsDeleteInput - } - - type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! - } - - input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean - } - - 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!] - } - - input MovieRelationInput { - actors: MovieActorsCreateFieldInput - } - - type MovieRelationshipCreatedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - movie: MovieSubscriptionWhere - } - - type MovieRelationshipDeletedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! - } - - input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - movie: MovieSubscriptionWhere - } - - \\"\\"\\" - 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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: MovieActorsUpdateInput - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean - } - - type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - createStars(input: [StarCreateInput!]!): CreateStarsMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - deleteStars(delete: StarDeleteInput, where: StarWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - updateStars(connect: StarConnectInput, create: StarRelationInput, delete: StarDeleteInput, disconnect: StarDisconnectInput, update: StarUpdateInput, where: StarWhere): UpdateStarsMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! - } - - type PersonAggregateSelection { - count: Int! - } - - input PersonConnectInput { - movies: [PersonMoviesConnectFieldInput!] - } - - input PersonConnectWhere { - node: PersonWhere! - } - - type PersonConnectedRelationships { - movies: PersonMoviesConnectedRelationship - } - - input PersonCreateInput { - movies: PersonMoviesFieldInput - } - - type PersonCreatedEvent { - event: EventType! - timestamp: Float! - } - - input PersonDeleteInput { - movies: [PersonMoviesDeleteFieldInput!] - } - - type PersonDeletedEvent { - event: EventType! - timestamp: Float! - } - - input PersonDisconnectInput { - movies: [PersonMoviesDisconnectFieldInput!] - } - - type PersonEdge { - cursor: String! - node: Person! - } - - type PersonMovieMoviesAggregationSelection { - count: Int! - node: PersonMovieMoviesNodeAggregateSelection - } - - type PersonMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input PersonMoviesAggregateInput { - AND: [PersonMoviesAggregateInput!] - NOT: PersonMoviesAggregateInput - OR: [PersonMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PersonMoviesNodeAggregationWhereInput - } - - input PersonMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type PersonMoviesConnectedRelationship { - node: MovieEventPayload! - } - - type PersonMoviesConnection { - edges: [PersonMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PersonMoviesConnectionSort { - node: MovieSort - } - - input PersonMoviesConnectionWhere { - AND: [PersonMoviesConnectionWhere!] - NOT: PersonMoviesConnectionWhere - OR: [PersonMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input PersonMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input PersonMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: PersonMoviesConnectionWhere - } - - input PersonMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: PersonMoviesConnectionWhere - } - - input PersonMoviesFieldInput { - connect: [PersonMoviesConnectFieldInput!] - create: [PersonMoviesCreateFieldInput!] - } - - input PersonMoviesNodeAggregationWhereInput { - AND: [PersonMoviesNodeAggregationWhereInput!] - NOT: PersonMoviesNodeAggregationWhereInput - OR: [PersonMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type PersonMoviesRelationship { - cursor: String! - node: Movie! - } - - input PersonMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere - } - - input PersonMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input PersonMoviesUpdateFieldInput { - connect: [PersonMoviesConnectFieldInput!] - create: [PersonMoviesCreateFieldInput!] - delete: [PersonMoviesDeleteFieldInput!] - disconnect: [PersonMoviesDisconnectFieldInput!] - update: PersonMoviesUpdateConnectionInput - where: PersonMoviesConnectionWhere - } - - input PersonOptions { - limit: Int - offset: Int - } - - input PersonRelationInput { - movies: [PersonMoviesCreateFieldInput!] - } - - type PersonRelationshipCreatedEvent { - createdRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input PersonRelationshipCreatedSubscriptionWhere { - AND: [PersonRelationshipCreatedSubscriptionWhere!] - NOT: PersonRelationshipCreatedSubscriptionWhere - OR: [PersonRelationshipCreatedSubscriptionWhere!] - createdRelationship: PersonRelationshipsSubscriptionWhere - } - - type PersonRelationshipDeletedEvent { - deletedRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input PersonRelationshipDeletedSubscriptionWhere { - AND: [PersonRelationshipDeletedSubscriptionWhere!] - NOT: PersonRelationshipDeletedSubscriptionWhere - OR: [PersonRelationshipDeletedSubscriptionWhere!] - deletedRelationship: PersonRelationshipsSubscriptionWhere - } - - input PersonRelationshipsSubscriptionWhere { - movies: PersonMoviesRelationshipSubscriptionWhere - } - - input PersonUpdateInput { - movies: [PersonMoviesUpdateFieldInput!] - } - - type PersonUpdatedEvent { - event: EventType! - timestamp: Float! - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: PersonMoviesAggregateInput - moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return People where all of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere - \\"\\"\\" - Return People where none of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere - moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return People where one of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere - \\"\\"\\" - Return People where some of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere - \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - stars(options: StarOptions, where: StarWhere): [Star!]! - starsAggregate(where: StarWhere): StarAggregateSelection! - starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"\\"\\"\\" - type Star { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! - } - - type StarAggregateSelection { - count: Int! - } - - input StarConnectInput { - movies: [StarMoviesConnectFieldInput!] - } - - input StarConnectWhere { - node: StarWhere! - } - - input StarCreateInput { - movies: StarMoviesFieldInput - } - - input StarDeleteInput { - movies: [StarMoviesDeleteFieldInput!] - } - - input StarDisconnectInput { - movies: [StarMoviesDisconnectFieldInput!] - } - - type StarEdge { - cursor: String! - node: Star! - } - - type StarMovieMoviesAggregationSelection { - count: Int! - node: StarMovieMoviesNodeAggregateSelection - } - - type StarMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input StarMoviesAggregateInput { - AND: [StarMoviesAggregateInput!] - NOT: StarMoviesAggregateInput - OR: [StarMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: StarMoviesNodeAggregationWhereInput - } - - input StarMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere - } - - type StarMoviesConnection { - edges: [StarMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input StarMoviesConnectionSort { - node: MovieSort - } - - input StarMoviesConnectionWhere { - AND: [StarMoviesConnectionWhere!] - NOT: StarMoviesConnectionWhere - OR: [StarMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input StarMoviesCreateFieldInput { - node: MovieCreateInput! - } - - input StarMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: StarMoviesConnectionWhere - } - - input StarMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: StarMoviesConnectionWhere - } - - input StarMoviesFieldInput { - connect: [StarMoviesConnectFieldInput!] - create: [StarMoviesCreateFieldInput!] - } - - input StarMoviesNodeAggregationWhereInput { - AND: [StarMoviesNodeAggregationWhereInput!] - NOT: StarMoviesNodeAggregationWhereInput - OR: [StarMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type StarMoviesRelationship { - cursor: String! - node: Movie! - } - - input StarMoviesUpdateConnectionInput { - node: MovieUpdateInput - } - - input StarMoviesUpdateFieldInput { - connect: [StarMoviesConnectFieldInput!] - create: [StarMoviesCreateFieldInput!] - delete: [StarMoviesDeleteFieldInput!] - disconnect: [StarMoviesDisconnectFieldInput!] - update: StarMoviesUpdateConnectionInput - where: StarMoviesConnectionWhere - } - - input StarOptions { - limit: Int - offset: Int - } - - input StarRelationInput { - movies: [StarMoviesCreateFieldInput!] - } - - input StarUpdateInput { - movies: [StarMoviesUpdateFieldInput!] - } - - input StarWhere { - AND: [StarWhere!] - NOT: StarWhere - OR: [StarWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: StarMoviesAggregateInput - moviesConnection: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Stars where all of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: StarMoviesConnectionWhere - \\"\\"\\" - Return Stars where none of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: StarMoviesConnectionWhere - moviesConnection_NOT: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Stars where one of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: StarMoviesConnectionWhere - \\"\\"\\" - Return Stars where some of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: StarMoviesConnectionWhere - \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - } - - type StarsConnection { - edges: [StarEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Subscription { - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - personCreated: PersonCreatedEvent! - personDeleted: PersonDeletedEvent! - personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! - personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! - personUpdated: PersonUpdatedEvent! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - } - - type UpdateStarsMutationResponse { - info: UpdateInfo! - stars: [Star!]! - }" - `); - }); - - test("Type with relationship to a subscriptions excluded type + Interface type", async () => { - const typeDefs = gql` - type Movie implements Production @subscription(events: []) { - title: String! - id: ID @unique - director: Creature! - } - - type Series implements Production { - title: String! - episode: Int! - id: ID @unique - director: Creature! - } - - interface Production { - id: ID - director: Creature! @relationship(type: "DIRECTED", direction: IN) - } - - type Person implements Creature { - movies: Production! - } - - interface Creature { - movies: Production! @relationship(type: "DIRECTED", direction: OUT) - } - `; - - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - subscription: Subscription - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - interface Creature { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! - } - - input CreatureConnectInput { - _on: CreatureImplementationsConnectInput - movies: CreatureMoviesConnectFieldInput - } - - input CreatureConnectWhere { - node: CreatureWhere! - } - - input CreatureCreateInput { - Person: PersonCreateInput - } - - input CreatureDeleteInput { - _on: CreatureImplementationsDeleteInput - movies: CreatureMoviesDeleteFieldInput - } - - input CreatureDisconnectInput { - _on: CreatureImplementationsDisconnectInput - movies: CreatureMoviesDisconnectFieldInput - } - - input CreatureImplementationsConnectInput { - Person: [PersonConnectInput!] - } - - input CreatureImplementationsDeleteInput { - Person: [PersonDeleteInput!] - } - - input CreatureImplementationsDisconnectInput { - Person: [PersonDisconnectInput!] - } - - input CreatureImplementationsUpdateInput { - Person: PersonUpdateInput - } - - input CreatureImplementationsWhere { - Person: PersonWhere - } - - input CreatureMoviesConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere - } - - type CreatureMoviesConnection { - edges: [CreatureMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input CreatureMoviesConnectionSort { - node: ProductionSort - } - - input CreatureMoviesConnectionWhere { - AND: [CreatureMoviesConnectionWhere!] - NOT: CreatureMoviesConnectionWhere - OR: [CreatureMoviesConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input CreatureMoviesCreateFieldInput { - node: ProductionCreateInput! - } - - input CreatureMoviesDeleteFieldInput { - delete: ProductionDeleteInput - where: CreatureMoviesConnectionWhere - } - - input CreatureMoviesDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: CreatureMoviesConnectionWhere - } - - input CreatureMoviesFieldInput { - connect: CreatureMoviesConnectFieldInput - create: CreatureMoviesCreateFieldInput - } - - type CreatureMoviesRelationship { - cursor: String! - node: Production! - } - - input CreatureMoviesUpdateConnectionInput { - node: ProductionUpdateInput - } - - input CreatureMoviesUpdateFieldInput { - connect: CreatureMoviesConnectFieldInput - create: CreatureMoviesCreateFieldInput - delete: CreatureMoviesDeleteFieldInput - disconnect: CreatureMoviesDisconnectFieldInput - update: CreatureMoviesUpdateConnectionInput - where: CreatureMoviesConnectionWhere - } - - input CreatureOptions { - limit: Int - offset: Int - } - - input CreatureUpdateInput { - _on: CreatureImplementationsUpdateInput - movies: CreatureMoviesUpdateFieldInput - } - - input CreatureWhere { - _on: CreatureImplementationsWhere - moviesConnection: CreatureMoviesConnectionWhere - moviesConnection_NOT: CreatureMoviesConnectionWhere - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie implements Production { - \\"\\"\\"\\"\\"\\" - director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! - directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - title: String! - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input MovieConnectInput { - director: MovieDirectorConnectFieldInput - } - - input MovieCreateInput { - director: ProductionDirectorFieldInput - id: ID - title: String! - } - - input MovieDeleteInput { - director: MovieDirectorDeleteFieldInput - } - - input MovieDirectorConnectFieldInput { - connect: CreatureConnectInput - where: CreatureConnectWhere - } - - input MovieDirectorCreateFieldInput { - node: CreatureCreateInput! - } - - input MovieDirectorDeleteFieldInput { - delete: CreatureDeleteInput - where: ProductionDirectorConnectionWhere - } - - input MovieDirectorDisconnectFieldInput { - disconnect: CreatureDisconnectInput - where: ProductionDirectorConnectionWhere - } - - input MovieDirectorUpdateConnectionInput { - node: CreatureUpdateInput - } - - input MovieDirectorUpdateFieldInput { - connect: MovieDirectorConnectFieldInput - create: MovieDirectorCreateFieldInput - delete: MovieDirectorDeleteFieldInput - disconnect: MovieDirectorDisconnectFieldInput - update: MovieDirectorUpdateConnectionInput - where: ProductionDirectorConnectionWhere - } - - input MovieDisconnectInput { - director: MovieDirectorDisconnectFieldInput - } - - 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!] - } - - input MovieRelationInput { - director: MovieDirectorCreateFieldInput - } - - \\"\\"\\" - 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 - title: SortDirection - } - - input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input MovieUpdateInput { - director: MovieDirectorUpdateFieldInput - id: ID - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - directorConnection: ProductionDirectorConnectionWhere - directorConnection_NOT: ProductionDirectorConnectionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - \\"\\"\\"\\"\\"\\" - type Person implements Creature { - \\"\\"\\"\\"\\"\\" - movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! - } - - type PersonAggregateSelection { - count: Int! - } - - input PersonConnectInput { - movies: PersonMoviesConnectFieldInput - } - - type PersonConnectedRelationships { - movies: PersonMoviesConnectedRelationship - } - - input PersonCreateInput { - movies: CreatureMoviesFieldInput - } - - type PersonCreatedEvent { - event: EventType! - timestamp: Float! - } - - input PersonDeleteInput { - movies: PersonMoviesDeleteFieldInput - } - - type PersonDeletedEvent { - event: EventType! - timestamp: Float! - } - - input PersonDisconnectInput { - movies: PersonMoviesDisconnectFieldInput - } - - type PersonEdge { - cursor: String! - node: Person! - } - - input PersonMoviesConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere - } - - type PersonMoviesConnectedRelationship { - node: ProductionEventPayload! - } - - input PersonMoviesCreateFieldInput { - node: ProductionCreateInput! - } - - input PersonMoviesDeleteFieldInput { - delete: ProductionDeleteInput - where: CreatureMoviesConnectionWhere - } - - input PersonMoviesDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: CreatureMoviesConnectionWhere - } - - input PersonMoviesRelationshipSubscriptionWhere { - node: ProductionSubscriptionWhere - } - - input PersonMoviesUpdateConnectionInput { - node: ProductionUpdateInput - } - - input PersonMoviesUpdateFieldInput { - connect: PersonMoviesConnectFieldInput - create: PersonMoviesCreateFieldInput - delete: PersonMoviesDeleteFieldInput - disconnect: PersonMoviesDisconnectFieldInput - update: PersonMoviesUpdateConnectionInput - where: CreatureMoviesConnectionWhere - } - - input PersonOptions { - limit: Int - offset: Int - } - - input PersonRelationInput { - movies: PersonMoviesCreateFieldInput - } - - type PersonRelationshipCreatedEvent { - createdRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input PersonRelationshipCreatedSubscriptionWhere { - AND: [PersonRelationshipCreatedSubscriptionWhere!] - NOT: PersonRelationshipCreatedSubscriptionWhere - OR: [PersonRelationshipCreatedSubscriptionWhere!] - createdRelationship: PersonRelationshipsSubscriptionWhere - } - - type PersonRelationshipDeletedEvent { - deletedRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! - } - - input PersonRelationshipDeletedSubscriptionWhere { - AND: [PersonRelationshipDeletedSubscriptionWhere!] - NOT: PersonRelationshipDeletedSubscriptionWhere - OR: [PersonRelationshipDeletedSubscriptionWhere!] - deletedRelationship: PersonRelationshipsSubscriptionWhere - } - - input PersonRelationshipsSubscriptionWhere { - movies: PersonMoviesRelationshipSubscriptionWhere - } - - input PersonUpdateInput { - movies: PersonMoviesUpdateFieldInput - } - - type PersonUpdatedEvent { - event: EventType! - timestamp: Float! - } - - input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - moviesConnection: CreatureMoviesConnectionWhere - moviesConnection_NOT: CreatureMoviesConnectionWhere - } - - interface Production { - \\"\\"\\"\\"\\"\\" - director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! - directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! - \\"\\"\\"\\"\\"\\" - id: ID - } - - input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - director: ProductionDirectorConnectFieldInput - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - director: ProductionDirectorDeleteFieldInput - } - - input ProductionDirectorConnectFieldInput { - where: CreatureConnectWhere - } - - type ProductionDirectorConnection { - edges: [ProductionDirectorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ProductionDirectorConnectionWhere { - AND: [ProductionDirectorConnectionWhere!] - NOT: ProductionDirectorConnectionWhere - OR: [ProductionDirectorConnectionWhere!] - node: CreatureWhere - node_NOT: CreatureWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input ProductionDirectorCreateFieldInput { - node: CreatureCreateInput! - } - - input ProductionDirectorDeleteFieldInput { - where: ProductionDirectorConnectionWhere - } - - input ProductionDirectorDisconnectFieldInput { - where: ProductionDirectorConnectionWhere - } - - input ProductionDirectorFieldInput { - connect: ProductionDirectorConnectFieldInput - create: ProductionDirectorCreateFieldInput - } - - type ProductionDirectorRelationship { - cursor: String! - node: Creature! - } - - input ProductionDirectorUpdateConnectionInput { - node: CreatureUpdateInput - } - - input ProductionDirectorUpdateFieldInput { - connect: ProductionDirectorConnectFieldInput - create: ProductionDirectorCreateFieldInput - delete: ProductionDirectorDeleteFieldInput - disconnect: ProductionDirectorDisconnectFieldInput - update: ProductionDirectorUpdateConnectionInput - where: ProductionDirectorConnectionWhere - } - - input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - director: ProductionDirectorDisconnectFieldInput - } - - interface ProductionEventPayload { - id: ID - } - - input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] - } - - input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] - } - - input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] - } - - input ProductionImplementationsSubscriptionWhere { - Movie: MovieSubscriptionWhere - Series: SeriesSubscriptionWhere - } - - input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput - } - - input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere - } - - 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 { - id: SortDirection - } - - input ProductionSubscriptionWhere { - AND: [ProductionSubscriptionWhere!] - NOT: ProductionSubscriptionWhere - OR: [ProductionSubscriptionWhere!] - _on: ProductionImplementationsSubscriptionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - director: ProductionDirectorUpdateFieldInput - id: ID - } - - input ProductionWhere { - _on: ProductionImplementationsWhere - directorConnection: ProductionDirectorConnectionWhere - directorConnection_NOT: ProductionDirectorConnectionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! - } - - \\"\\"\\"\\"\\"\\" - type Series implements Production { - \\"\\"\\"\\"\\"\\" - director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! - directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! - \\"\\"\\"\\"\\"\\" - episode: Int! - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - title: String! - } - - type SeriesAggregateSelection { - count: Int! - episode: IntAggregateSelectionNonNullable! - id: IDAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! - } - - input SeriesConnectInput { - director: SeriesDirectorConnectFieldInput - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - director: ProductionDirectorFieldInput - episode: Int! - id: ID - title: String! - } - - type SeriesCreatedEvent { - createdSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! - } - - input SeriesDeleteInput { - director: SeriesDirectorDeleteFieldInput - } - - type SeriesDeletedEvent { - deletedSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! - } - - input SeriesDirectorConnectFieldInput { - connect: CreatureConnectInput - where: CreatureConnectWhere - } - - input SeriesDirectorCreateFieldInput { - node: CreatureCreateInput! - } - - input SeriesDirectorDeleteFieldInput { - delete: CreatureDeleteInput - where: ProductionDirectorConnectionWhere - } - - input SeriesDirectorDisconnectFieldInput { - disconnect: CreatureDisconnectInput - where: ProductionDirectorConnectionWhere - } - - input SeriesDirectorUpdateConnectionInput { - node: CreatureUpdateInput - } - - input SeriesDirectorUpdateFieldInput { - connect: SeriesDirectorConnectFieldInput - create: SeriesDirectorCreateFieldInput - delete: SeriesDirectorDeleteFieldInput - disconnect: SeriesDirectorDisconnectFieldInput - update: SeriesDirectorUpdateConnectionInput - where: ProductionDirectorConnectionWhere - } - - input SeriesDisconnectInput { - director: SeriesDirectorDisconnectFieldInput - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - type SeriesEventPayload implements ProductionEventPayload { - director: Creature! - directorConnection: ProductionDirectorConnection! - episode: Int! - id: ID - title: String! - } - - input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] - } - - input SeriesRelationInput { - director: SeriesDirectorCreateFieldInput - } - - type SeriesRelationshipCreatedEvent { - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! - } - - input SeriesRelationshipCreatedSubscriptionWhere { - AND: [SeriesRelationshipCreatedSubscriptionWhere!] - NOT: SeriesRelationshipCreatedSubscriptionWhere - OR: [SeriesRelationshipCreatedSubscriptionWhere!] - series: SeriesSubscriptionWhere - } - - type SeriesRelationshipDeletedEvent { - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! - } - - input SeriesRelationshipDeletedSubscriptionWhere { - AND: [SeriesRelationshipDeletedSubscriptionWhere!] - NOT: SeriesRelationshipDeletedSubscriptionWhere - OR: [SeriesRelationshipDeletedSubscriptionWhere!] - series: SeriesSubscriptionWhere - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - episode: SortDirection - id: SortDirection - title: SortDirection - } - - input SeriesSubscriptionWhere { - AND: [SeriesSubscriptionWhere!] - NOT: SeriesSubscriptionWhere - OR: [SeriesSubscriptionWhere!] - episode: Int - episode_GT: Int - episode_GTE: Int - episode_IN: [Int] - episode_LT: Int - episode_LTE: Int - episode_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episode_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - input SeriesUpdateInput { - director: SeriesDirectorUpdateFieldInput - episode: Int - episode_DECREMENT: Int - episode_INCREMENT: Int - id: ID - title: String - } - - type SeriesUpdatedEvent { - event: EventType! - previousState: SeriesEventPayload! - timestamp: Float! - updatedSeries: SeriesEventPayload! - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - directorConnection: ProductionDirectorConnectionWhere - directorConnection_NOT: ProductionDirectorConnectionWhere - episode: Int - episode_GT: Int - episode_GTE: Int - episode_IN: [Int!] - episode_LT: Int - episode_LTE: Int - episode_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episode_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type Subscription { - personCreated: PersonCreatedEvent! - personDeleted: PersonDeletedEvent! - personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! - personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! - personUpdated: PersonUpdatedEvent! - seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! - seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! - seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! - seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! - seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); +"schema { + query: Query + mutation: Mutation + subscription: Subscription +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! +} + +type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! +} + +interface Creature { + movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! +} + +input CreatureConnectInput { + _on: CreatureImplementationsConnectInput + movies: CreatureMoviesConnectFieldInput +} + +input CreatureConnectWhere { + node: CreatureWhere! +} + +input CreatureCreateInput { + Person: PersonCreateInput +} + +input CreatureDeleteInput { + _on: CreatureImplementationsDeleteInput + movies: CreatureMoviesDeleteFieldInput +} + +input CreatureDisconnectInput { + _on: CreatureImplementationsDisconnectInput + movies: CreatureMoviesDisconnectFieldInput +} + +input CreatureImplementationsConnectInput { + Person: [PersonConnectInput!] +} + +input CreatureImplementationsDeleteInput { + Person: [PersonDeleteInput!] +} + +input CreatureImplementationsDisconnectInput { + Person: [PersonDisconnectInput!] +} + +input CreatureImplementationsUpdateInput { + Person: PersonUpdateInput +} + +input CreatureImplementationsWhere { + Person: PersonWhere +} + +input CreatureMoviesConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere +} + +type CreatureMoviesConnection { + edges: [CreatureMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input CreatureMoviesConnectionSort { + node: ProductionSort +} + +input CreatureMoviesConnectionWhere { + AND: [CreatureMoviesConnectionWhere!] + NOT: CreatureMoviesConnectionWhere + OR: [CreatureMoviesConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input CreatureMoviesCreateFieldInput { + node: ProductionCreateInput! +} + +input CreatureMoviesDeleteFieldInput { + delete: ProductionDeleteInput + where: CreatureMoviesConnectionWhere +} + +input CreatureMoviesDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: CreatureMoviesConnectionWhere +} + +input CreatureMoviesFieldInput { + connect: CreatureMoviesConnectFieldInput + create: CreatureMoviesCreateFieldInput +} + +type CreatureMoviesRelationship { + cursor: String! + node: Production! +} + +input CreatureMoviesUpdateConnectionInput { + node: ProductionUpdateInput +} + +input CreatureMoviesUpdateFieldInput { + connect: CreatureMoviesConnectFieldInput + create: CreatureMoviesCreateFieldInput + delete: CreatureMoviesDeleteFieldInput + disconnect: CreatureMoviesDisconnectFieldInput + update: CreatureMoviesUpdateConnectionInput + where: CreatureMoviesConnectionWhere +} + +input CreatureOptions { + limit: Int + offset: Int +} + +input CreatureUpdateInput { + _on: CreatureImplementationsUpdateInput + movies: CreatureMoviesUpdateFieldInput +} + +input CreatureWhere { + _on: CreatureImplementationsWhere + moviesConnection: CreatureMoviesConnectionWhere + moviesConnection_NOT: CreatureMoviesConnectionWhere +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! +} + +type Movie implements Production { + director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! + directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + id: ID + title: String! +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input MovieConnectInput { + director: MovieDirectorConnectFieldInput +} + +input MovieCreateInput { + director: ProductionDirectorFieldInput + id: ID + title: String! +} + +input MovieDeleteInput { + director: MovieDirectorDeleteFieldInput +} + +input MovieDirectorConnectFieldInput { + connect: CreatureConnectInput + where: CreatureConnectWhere +} + +input MovieDirectorCreateFieldInput { + node: CreatureCreateInput! +} + +input MovieDirectorDeleteFieldInput { + delete: CreatureDeleteInput + where: ProductionDirectorConnectionWhere +} + +input MovieDirectorDisconnectFieldInput { + disconnect: CreatureDisconnectInput + where: ProductionDirectorConnectionWhere +} + +input MovieDirectorUpdateConnectionInput { + node: CreatureUpdateInput +} + +input MovieDirectorUpdateFieldInput { + connect: MovieDirectorConnectFieldInput + create: MovieDirectorCreateFieldInput + delete: MovieDirectorDeleteFieldInput + disconnect: MovieDirectorDisconnectFieldInput + update: MovieDirectorUpdateConnectionInput + where: ProductionDirectorConnectionWhere +} + +input MovieDisconnectInput { + director: MovieDirectorDisconnectFieldInput +} + +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!] +} + +input MovieRelationInput { + director: MovieDirectorCreateFieldInput +} + +\\"\\"\\" +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 + title: SortDirection +} + +input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input MovieUpdateInput { + director: MovieDirectorUpdateFieldInput + id: ID + title: String +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + directorConnection: ProductionDirectorConnectionWhere + directorConnection_NOT: ProductionDirectorConnectionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Person implements Creature { + movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! +} + +type PersonAggregateSelection { + count: Int! +} + +input PersonConnectInput { + movies: PersonMoviesConnectFieldInput +} + +type PersonConnectedRelationships { + movies: PersonMoviesConnectedRelationship +} + +input PersonCreateInput { + movies: CreatureMoviesFieldInput +} + +type PersonCreatedEvent { + event: EventType! + timestamp: Float! +} + +input PersonDeleteInput { + movies: PersonMoviesDeleteFieldInput +} + +type PersonDeletedEvent { + event: EventType! + timestamp: Float! +} + +input PersonDisconnectInput { + movies: PersonMoviesDisconnectFieldInput +} + +type PersonEdge { + cursor: String! + node: Person! +} + +input PersonMoviesConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere +} + +type PersonMoviesConnectedRelationship { + node: ProductionEventPayload! +} + +input PersonMoviesCreateFieldInput { + node: ProductionCreateInput! +} + +input PersonMoviesDeleteFieldInput { + delete: ProductionDeleteInput + where: CreatureMoviesConnectionWhere +} + +input PersonMoviesDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: CreatureMoviesConnectionWhere +} + +input PersonMoviesRelationshipSubscriptionWhere { + node: ProductionSubscriptionWhere +} + +input PersonMoviesUpdateConnectionInput { + node: ProductionUpdateInput +} + +input PersonMoviesUpdateFieldInput { + connect: PersonMoviesConnectFieldInput + create: PersonMoviesCreateFieldInput + delete: PersonMoviesDeleteFieldInput + disconnect: PersonMoviesDisconnectFieldInput + update: PersonMoviesUpdateConnectionInput + where: CreatureMoviesConnectionWhere +} + +input PersonOptions { + limit: Int + offset: Int +} + +input PersonRelationInput { + movies: PersonMoviesCreateFieldInput +} + +type PersonRelationshipCreatedEvent { + createdRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input PersonRelationshipCreatedSubscriptionWhere { + AND: [PersonRelationshipCreatedSubscriptionWhere!] + NOT: PersonRelationshipCreatedSubscriptionWhere + OR: [PersonRelationshipCreatedSubscriptionWhere!] + createdRelationship: PersonRelationshipsSubscriptionWhere +} + +type PersonRelationshipDeletedEvent { + deletedRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! +} + +input PersonRelationshipDeletedSubscriptionWhere { + AND: [PersonRelationshipDeletedSubscriptionWhere!] + NOT: PersonRelationshipDeletedSubscriptionWhere + OR: [PersonRelationshipDeletedSubscriptionWhere!] + deletedRelationship: PersonRelationshipsSubscriptionWhere +} + +input PersonRelationshipsSubscriptionWhere { + movies: PersonMoviesRelationshipSubscriptionWhere +} + +input PersonUpdateInput { + movies: PersonMoviesUpdateFieldInput +} + +type PersonUpdatedEvent { + event: EventType! + timestamp: Float! +} + +input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + moviesConnection: CreatureMoviesConnectionWhere + moviesConnection_NOT: CreatureMoviesConnectionWhere +} + +interface Production { + director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! + directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + id: ID +} + +input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + director: ProductionDirectorConnectFieldInput +} + +input ProductionConnectWhere { + node: ProductionWhere! +} + +input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput +} + +input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + director: ProductionDirectorDeleteFieldInput +} + +input ProductionDirectorConnectFieldInput { + where: CreatureConnectWhere +} + +type ProductionDirectorConnection { + edges: [ProductionDirectorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input ProductionDirectorConnectionWhere { + AND: [ProductionDirectorConnectionWhere!] + NOT: ProductionDirectorConnectionWhere + OR: [ProductionDirectorConnectionWhere!] + node: CreatureWhere + node_NOT: CreatureWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input ProductionDirectorCreateFieldInput { + node: CreatureCreateInput! +} + +input ProductionDirectorDeleteFieldInput { + where: ProductionDirectorConnectionWhere +} + +input ProductionDirectorDisconnectFieldInput { + where: ProductionDirectorConnectionWhere +} + +input ProductionDirectorFieldInput { + connect: ProductionDirectorConnectFieldInput + create: ProductionDirectorCreateFieldInput +} + +type ProductionDirectorRelationship { + cursor: String! + node: Creature! +} + +input ProductionDirectorUpdateConnectionInput { + node: CreatureUpdateInput +} + +input ProductionDirectorUpdateFieldInput { + connect: ProductionDirectorConnectFieldInput + create: ProductionDirectorCreateFieldInput + delete: ProductionDirectorDeleteFieldInput + disconnect: ProductionDirectorDisconnectFieldInput + update: ProductionDirectorUpdateConnectionInput + where: ProductionDirectorConnectionWhere +} + +input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + director: ProductionDirectorDisconnectFieldInput +} + +interface ProductionEventPayload { + id: ID +} + +input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] +} + +input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] +} + +input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] +} + +input ProductionImplementationsSubscriptionWhere { + Movie: MovieSubscriptionWhere + Series: SeriesSubscriptionWhere +} + +input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput +} + +input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere +} + +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 { + id: SortDirection +} + +input ProductionSubscriptionWhere { + AND: [ProductionSubscriptionWhere!] + NOT: ProductionSubscriptionWhere + OR: [ProductionSubscriptionWhere!] + _on: ProductionImplementationsSubscriptionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + director: ProductionDirectorUpdateFieldInput + id: ID +} + +input ProductionWhere { + _on: ProductionImplementationsWhere + directorConnection: ProductionDirectorConnectionWhere + directorConnection_NOT: ProductionDirectorConnectionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! +} + +type Series implements Production { + director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! + directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + episode: Int! + id: ID + title: String! +} + +type SeriesAggregateSelection { + count: Int! + episode: IntAggregateSelectionNonNullable! + id: IDAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! +} + +input SeriesConnectInput { + director: SeriesDirectorConnectFieldInput +} + +type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input SeriesCreateInput { + director: ProductionDirectorFieldInput + episode: Int! + id: ID + title: String! +} + +type SeriesCreatedEvent { + createdSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! +} + +input SeriesDeleteInput { + director: SeriesDirectorDeleteFieldInput +} + +type SeriesDeletedEvent { + deletedSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! +} + +input SeriesDirectorConnectFieldInput { + connect: CreatureConnectInput + where: CreatureConnectWhere +} + +input SeriesDirectorCreateFieldInput { + node: CreatureCreateInput! +} + +input SeriesDirectorDeleteFieldInput { + delete: CreatureDeleteInput + where: ProductionDirectorConnectionWhere +} + +input SeriesDirectorDisconnectFieldInput { + disconnect: CreatureDisconnectInput + where: ProductionDirectorConnectionWhere +} + +input SeriesDirectorUpdateConnectionInput { + node: CreatureUpdateInput +} + +input SeriesDirectorUpdateFieldInput { + connect: SeriesDirectorConnectFieldInput + create: SeriesDirectorCreateFieldInput + delete: SeriesDirectorDeleteFieldInput + disconnect: SeriesDirectorDisconnectFieldInput + update: SeriesDirectorUpdateConnectionInput + where: ProductionDirectorConnectionWhere +} + +input SeriesDisconnectInput { + director: SeriesDirectorDisconnectFieldInput +} + +type SeriesEdge { + cursor: String! + node: Series! +} + +type SeriesEventPayload implements ProductionEventPayload { + director: Creature! + directorConnection: ProductionDirectorConnection! + episode: Int! + id: ID + title: String! +} + +input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] +} + +input SeriesRelationInput { + director: SeriesDirectorCreateFieldInput +} + +type SeriesRelationshipCreatedEvent { + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! +} + +input SeriesRelationshipCreatedSubscriptionWhere { + AND: [SeriesRelationshipCreatedSubscriptionWhere!] + NOT: SeriesRelationshipCreatedSubscriptionWhere + OR: [SeriesRelationshipCreatedSubscriptionWhere!] + series: SeriesSubscriptionWhere +} + +type SeriesRelationshipDeletedEvent { + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! +} + +input SeriesRelationshipDeletedSubscriptionWhere { + AND: [SeriesRelationshipDeletedSubscriptionWhere!] + NOT: SeriesRelationshipDeletedSubscriptionWhere + OR: [SeriesRelationshipDeletedSubscriptionWhere!] + series: SeriesSubscriptionWhere +} + +\\"\\"\\" +Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. +\\"\\"\\" +input SeriesSort { + episode: SortDirection + id: SortDirection + title: SortDirection +} + +input SeriesSubscriptionWhere { + AND: [SeriesSubscriptionWhere!] + NOT: SeriesSubscriptionWhere + OR: [SeriesSubscriptionWhere!] + episode: Int + episode_GT: Int + episode_GTE: Int + episode_IN: [Int] + episode_LT: Int + episode_LTE: Int + episode_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episode_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +input SeriesUpdateInput { + director: SeriesDirectorUpdateFieldInput + episode: Int + episode_DECREMENT: Int + episode_INCREMENT: Int + id: ID + title: String +} + +type SeriesUpdatedEvent { + event: EventType! + previousState: SeriesEventPayload! + timestamp: Float! + updatedSeries: SeriesEventPayload! +} + +input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + directorConnection: ProductionDirectorConnectionWhere + directorConnection_NOT: ProductionDirectorConnectionWhere + episode: Int + episode_GT: Int + episode_GTE: Int + episode_IN: [Int!] + episode_LT: Int + episode_LTE: Int + episode_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episode_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type Subscription { + personCreated: PersonCreatedEvent! + personDeleted: PersonDeletedEvent! + personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! + personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! + personUpdated: PersonUpdatedEvent! + seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! + seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! + seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! + seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! + seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +} + +type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! +} + +type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index 70057b8615..66418317a0 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -34,166 +34,163 @@ describe("Bigint", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. - \\"\\"\\" - scalar BigInt - - type BigIntAggregateSelectionNonNullable { - average: BigInt! - max: BigInt! - min: BigInt! - sum: BigInt! - } - - type CreateFilesMutationResponse { - files: [File!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type File { - \\"\\"\\"\\"\\"\\" - name: String! - \\"\\"\\"\\"\\"\\" - size: BigInt! - } - - type FileAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - size: BigIntAggregateSelectionNonNullable! - } - - input FileCreateInput { - name: String! - size: BigInt! - } - - type FileEdge { - cursor: String! - node: File! - } - - input FileOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more FileSort objects to sort Files by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [FileSort!] - } - - \\"\\"\\" - Fields to sort Files by. The order in which sorts are applied is not guaranteed when specifying many fields in one FileSort object. - \\"\\"\\" - input FileSort { - name: SortDirection - size: SortDirection - } - - input FileUpdateInput { - name: String - size: BigInt - size_DECREMENT: BigInt - size_INCREMENT: BigInt - } - - input FileWhere { - AND: [FileWhere!] - NOT: FileWhere - OR: [FileWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - size: BigInt - size_GT: BigInt - size_GTE: BigInt - size_IN: [BigInt!] - size_LT: BigInt - size_LTE: BigInt - size_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - size_NOT_IN: [BigInt!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type FilesConnection { - edges: [FileEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createFiles(input: [FileCreateInput!]!): CreateFilesMutationResponse! - deleteFiles(where: FileWhere): DeleteInfo! - updateFiles(update: FileUpdateInput, where: FileWhere): UpdateFilesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - files(options: FileOptions, where: FileWhere): [File!]! - filesAggregate(where: FileWhere): FileAggregateSelection! - filesConnection(after: String, first: Int, sort: [FileSort], where: FileWhere): FilesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! - } - - type UpdateFilesMutationResponse { - files: [File!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\" +A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. +\\"\\"\\" +scalar BigInt + +type BigIntAggregateSelectionNonNullable { + average: BigInt! + max: BigInt! + min: BigInt! + sum: BigInt! +} + +type CreateFilesMutationResponse { + files: [File!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type File { + name: String! + size: BigInt! +} + +type FileAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + size: BigIntAggregateSelectionNonNullable! +} + +input FileCreateInput { + name: String! + size: BigInt! +} + +type FileEdge { + cursor: String! + node: File! +} + +input FileOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more FileSort objects to sort Files by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [FileSort!] +} + +\\"\\"\\" +Fields to sort Files by. The order in which sorts are applied is not guaranteed when specifying many fields in one FileSort object. +\\"\\"\\" +input FileSort { + name: SortDirection + size: SortDirection +} + +input FileUpdateInput { + name: String + size: BigInt + size_DECREMENT: BigInt + size_INCREMENT: BigInt +} + +input FileWhere { + AND: [FileWhere!] + NOT: FileWhere + OR: [FileWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + size: BigInt + size_GT: BigInt + size_GTE: BigInt + size_IN: [BigInt!] + size_LT: BigInt + size_LTE: BigInt + size_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + size_NOT_IN: [BigInt!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type FilesConnection { + edges: [FileEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createFiles(input: [FileCreateInput!]!): CreateFilesMutationResponse! + deleteFiles(where: FileWhere): DeleteInfo! + updateFiles(update: FileUpdateInput, where: FileWhere): UpdateFilesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + files(options: FileOptions, where: FileWhere): [File!]! + filesAggregate(where: FileWhere): FileAggregateSelection! + filesConnection(after: String, first: Int, sort: [FileSort], where: FileWhere): FilesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! +} + +type UpdateFilesMutationResponse { + files: [File!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index 1d71779245..12ac961adc 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -34,154 +34,151 @@ describe("Date", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" - scalar Date - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - date: Date - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - date: Date - id: ID - } - - 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 { - date: SortDirection - id: SortDirection - } - - input MovieUpdateInput { - date: Date - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - date: Date - date_GT: Date - date_GTE: Date - date_IN: [Date] - date_LT: Date - date_LTE: Date - date_NOT: Date @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - date_NOT_IN: [Date] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" +scalar Date + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + date: Date + id: ID +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + date: Date + id: ID +} + +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 { + date: SortDirection + id: SortDirection +} + +input MovieUpdateInput { + date: Date + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + date: Date + date_GT: Date + date_GTE: Date + date_IN: [Date] + date_LT: Date + date_LTE: Date + date_NOT: Date @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + date_NOT_IN: [Date] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index 6549717293..74548dc63a 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -34,160 +34,157 @@ describe("Datetime", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" - scalar DateTime - - type DateTimeAggregateSelectionNullable { - max: DateTime - min: DateTime - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - datetime: DateTime - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - datetime: DateTimeAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - datetime: DateTime - id: ID - } - - 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 { - datetime: SortDirection - id: SortDirection - } - - input MovieUpdateInput { - datetime: DateTime - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - datetime: DateTime - datetime_GT: DateTime - datetime_GTE: DateTime - datetime_IN: [DateTime] - datetime_LT: DateTime - datetime_LTE: DateTime - datetime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - datetime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" +scalar DateTime + +type DateTimeAggregateSelectionNullable { + max: DateTime + min: DateTime +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + datetime: DateTime + id: ID +} + +type MovieAggregateSelection { + count: Int! + datetime: DateTimeAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + datetime: DateTime + id: ID +} + +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 { + datetime: SortDirection + id: SortDirection +} + +input MovieUpdateInput { + datetime: DateTime + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + datetime: DateTime + datetime_GT: DateTime + datetime_GTE: DateTime + datetime_IN: [DateTime] + datetime_LT: DateTime + datetime_LTE: DateTime + datetime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + datetime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index 67d8881ba0..83efe1fea6 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -34,160 +34,157 @@ describe("Duration", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" - scalar Duration - - type DurationAggregateSelectionNullable { - max: Duration - min: Duration - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - duration: Duration - \\"\\"\\"\\"\\"\\" - id: ID - } - - type MovieAggregateSelection { - count: Int! - duration: DurationAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - - input MovieCreateInput { - duration: Duration - id: ID - } - - 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 { - duration: SortDirection - id: SortDirection - } - - input MovieUpdateInput { - duration: Duration - id: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - duration: Duration - duration_GT: Duration - duration_GTE: Duration - duration_IN: [Duration] - duration_LT: Duration - duration_LTE: Duration - duration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - duration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +\\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" +scalar Duration + +type DurationAggregateSelectionNullable { + max: Duration + min: Duration +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + duration: Duration + id: ID +} + +type MovieAggregateSelection { + count: Int! + duration: DurationAggregateSelectionNullable! + id: IDAggregateSelectionNullable! +} + +input MovieCreateInput { + duration: Duration + id: ID +} + +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 { + duration: SortDirection + id: SortDirection +} + +input MovieUpdateInput { + duration: Duration + id: ID +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + duration: Duration + duration_GT: Duration + duration_GTE: Duration + duration_IN: [Duration] + duration_LT: Duration + duration_LTE: Duration + duration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + duration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index 6dcc9ada70..f143fc596b 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -34,160 +34,157 @@ describe("Localdatetime", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" - scalar LocalDateTime - - type LocalDateTimeAggregateSelectionNullable { - max: LocalDateTime - min: LocalDateTime - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - localDT: LocalDateTime - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - localDT: LocalDateTimeAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - localDT: LocalDateTime - } - - 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 - localDT: SortDirection - } - - input MovieUpdateInput { - id: ID - localDT: LocalDateTime - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - localDT: LocalDateTime - localDT_GT: LocalDateTime - localDT_GTE: LocalDateTime - localDT_IN: [LocalDateTime] - localDT_LT: LocalDateTime - localDT_LTE: LocalDateTime - localDT_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - localDT_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +\\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" +scalar LocalDateTime + +type LocalDateTimeAggregateSelectionNullable { + max: LocalDateTime + min: LocalDateTime +} + +type Movie { + id: ID + localDT: LocalDateTime +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + localDT: LocalDateTimeAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID + localDT: LocalDateTime +} + +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 + localDT: SortDirection +} + +input MovieUpdateInput { + id: ID + localDT: LocalDateTime +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + localDT: LocalDateTime + localDT_GT: LocalDateTime + localDT_GTE: LocalDateTime + localDT_IN: [LocalDateTime] + localDT_LT: LocalDateTime + localDT_LTE: LocalDateTime + localDT_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + localDT_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index 38daede86f..e09387bbe0 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -34,162 +34,159 @@ describe("Localtime", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\" - A local time, represented as a time string without timezone information - \\"\\"\\" - scalar LocalTime - - type LocalTimeAggregateSelectionNullable { - max: LocalTime - min: LocalTime - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - time: LocalTime - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - time: LocalTimeAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - time: LocalTime - } - - 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 - time: SortDirection - } - - input MovieUpdateInput { - id: ID - time: LocalTime - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - time: LocalTime - time_GT: LocalTime - time_GTE: LocalTime - time_IN: [LocalTime] - time_LT: LocalTime - time_LTE: LocalTime - time_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - time_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +\\"\\"\\" +A local time, represented as a time string without timezone information +\\"\\"\\" +scalar LocalTime + +type LocalTimeAggregateSelectionNullable { + max: LocalTime + min: LocalTime +} + +type Movie { + id: ID + time: LocalTime +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + time: LocalTimeAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID + time: LocalTime +} + +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 + time: SortDirection +} + +input MovieUpdateInput { + id: ID + time: LocalTime +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + time: LocalTime + time_GT: LocalTime + time_GTE: LocalTime + time_IN: [LocalTime] + time_LT: LocalTime + time_LTE: LocalTime + time_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + time_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index aec7a0dcc5..5154838eb5 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -33,155 +33,153 @@ describe("Point", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - filmedAt: Point! - } - - type MovieAggregateSelection { - count: Int! - } - - input MovieCreateInput { - filmedAt: PointInput! - } - - 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 { - filmedAt: SortDirection - } - - input MovieUpdateInput { - filmedAt: PointInput - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - filmedAt: PointInput - filmedAt_DISTANCE: PointDistance - filmedAt_GT: PointDistance - filmedAt_GTE: PointDistance - filmedAt_IN: [PointInput!] - filmedAt_LT: PointDistance - filmedAt_LTE: PointDistance - filmedAt_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAt_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"Point type\\"\\"\\" - type Point { - crs: String! - height: Float - latitude: Float! - longitude: Float! - srid: Int! - } - - \\"\\"\\"\\"\\"\\" - input PointDistance { - \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" - distance: Float! - point: PointInput! - } - - \\"\\"\\"\\"\\"\\" - input PointInput { - height: Float - latitude: Float! - longitude: Float! - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + filmedAt: Point! +} + +type MovieAggregateSelection { + count: Int! +} + +input MovieCreateInput { + filmedAt: PointInput! +} + +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 { + filmedAt: SortDirection +} + +input MovieUpdateInput { + filmedAt: PointInput +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + filmedAt: PointInput + filmedAt_DISTANCE: PointDistance + filmedAt_GT: PointDistance + filmedAt_GTE: PointDistance + filmedAt_IN: [PointInput!] + filmedAt_LT: PointDistance + filmedAt_LTE: PointDistance + filmedAt_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAt_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +\\"\\"\\"Point type\\"\\"\\" +type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! +} + +\\"\\"\\"\\"\\"\\" +input PointDistance { + \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" + distance: Float! + point: PointInput! +} + +\\"\\"\\"\\"\\"\\" +input PointInput { + height: Float + latitude: Float! + longitude: Float! +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("CartesianPoint", async () => { @@ -194,154 +192,152 @@ describe("Point", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CartesianPoint type\\"\\"\\" - type CartesianPoint { - crs: String! - srid: Int! - x: Float! - y: Float! - z: Float - } - - \\"\\"\\"\\"\\"\\" - input CartesianPointDistance { - distance: Float! - point: CartesianPointInput! - } - - \\"\\"\\"\\"\\"\\" - input CartesianPointInput { - x: Float! - y: Float! - z: Float - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMachinesMutationResponse { - info: CreateInfo! - machines: [Machine!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Machine { - \\"\\"\\"\\"\\"\\" - partLocation: CartesianPoint! - } - - type MachineAggregateSelection { - count: Int! - } - - input MachineCreateInput { - partLocation: CartesianPointInput! - } - - type MachineEdge { - cursor: String! - node: Machine! - } - - input MachineOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more MachineSort objects to sort Machines by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [MachineSort!] - } - - \\"\\"\\" - Fields to sort Machines by. The order in which sorts are applied is not guaranteed when specifying many fields in one MachineSort object. - \\"\\"\\" - input MachineSort { - partLocation: SortDirection - } - - input MachineUpdateInput { - partLocation: CartesianPointInput - } - - input MachineWhere { - AND: [MachineWhere!] - NOT: MachineWhere - OR: [MachineWhere!] - partLocation: CartesianPointInput - partLocation_DISTANCE: CartesianPointDistance - partLocation_GT: CartesianPointDistance - partLocation_GTE: CartesianPointDistance - partLocation_IN: [CartesianPointInput!] - partLocation_LT: CartesianPointDistance - partLocation_LTE: CartesianPointDistance - partLocation_NOT: CartesianPointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - partLocation_NOT_IN: [CartesianPointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MachinesConnection { - edges: [MachineEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMachines(input: [MachineCreateInput!]!): CreateMachinesMutationResponse! - deleteMachines(where: MachineWhere): DeleteInfo! - updateMachines(update: MachineUpdateInput, where: MachineWhere): UpdateMachinesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - machines(options: MachineOptions, where: MachineWhere): [Machine!]! - machinesAggregate(where: MachineWhere): MachineAggregateSelection! - machinesConnection(after: String, first: Int, sort: [MachineSort], where: MachineWhere): MachinesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMachinesMutationResponse { - info: UpdateInfo! - machines: [Machine!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CartesianPoint type\\"\\"\\" +type CartesianPoint { + crs: String! + srid: Int! + x: Float! + y: Float! + z: Float +} + +\\"\\"\\"\\"\\"\\" +input CartesianPointDistance { + distance: Float! + point: CartesianPointInput! +} + +\\"\\"\\"\\"\\"\\" +input CartesianPointInput { + x: Float! + y: Float! + z: Float +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMachinesMutationResponse { + info: CreateInfo! + machines: [Machine!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Machine { + partLocation: CartesianPoint! +} + +type MachineAggregateSelection { + count: Int! +} + +input MachineCreateInput { + partLocation: CartesianPointInput! +} + +type MachineEdge { + cursor: String! + node: Machine! +} + +input MachineOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more MachineSort objects to sort Machines by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [MachineSort!] +} + +\\"\\"\\" +Fields to sort Machines by. The order in which sorts are applied is not guaranteed when specifying many fields in one MachineSort object. +\\"\\"\\" +input MachineSort { + partLocation: SortDirection +} + +input MachineUpdateInput { + partLocation: CartesianPointInput +} + +input MachineWhere { + AND: [MachineWhere!] + NOT: MachineWhere + OR: [MachineWhere!] + partLocation: CartesianPointInput + partLocation_DISTANCE: CartesianPointDistance + partLocation_GT: CartesianPointDistance + partLocation_GTE: CartesianPointDistance + partLocation_IN: [CartesianPointInput!] + partLocation_LT: CartesianPointDistance + partLocation_LTE: CartesianPointDistance + partLocation_NOT: CartesianPointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + partLocation_NOT_IN: [CartesianPointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MachinesConnection { + edges: [MachineEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMachines(input: [MachineCreateInput!]!): CreateMachinesMutationResponse! + deleteMachines(where: MachineWhere): DeleteInfo! + updateMachines(update: MachineUpdateInput, where: MachineWhere): UpdateMachinesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + machines(options: MachineOptions, where: MachineWhere): [Machine!]! + machinesAggregate(where: MachineWhere): MachineAggregateSelection! + machinesConnection(after: String, first: Int, sort: [MachineSort], where: MachineWhere): MachinesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMachinesMutationResponse { + info: UpdateInfo! + machines: [Machine!]! +}" +`); }); test("Points", async () => { @@ -354,126 +350,124 @@ describe("Point", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - filmedAt: [Point!]! - } - - type MovieAggregateSelection { - count: Int! - } - - input MovieCreateInput { - filmedAt: [PointInput!]! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieOptions { - limit: Int - offset: Int - } - - input MovieUpdateInput { - filmedAt: [PointInput!] - filmedAt_POP: Int - filmedAt_PUSH: [PointInput!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - filmedAt: [PointInput!] - filmedAt_INCLUDES: PointInput - filmedAt_NOT: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAt_NOT_INCLUDES: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - \\"\\"\\"Point type\\"\\"\\" - type Point { - crs: String! - height: Float - latitude: Float! - longitude: Float! - srid: Int! - } - - \\"\\"\\"\\"\\"\\" - input PointInput { - height: Float - latitude: Float! - longitude: Float! - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Movie { + filmedAt: [Point!]! +} + +type MovieAggregateSelection { + count: Int! +} + +input MovieCreateInput { + filmedAt: [PointInput!]! +} + +type MovieEdge { + cursor: String! + node: Movie! +} + +input MovieOptions { + limit: Int + offset: Int +} + +input MovieUpdateInput { + filmedAt: [PointInput!] + filmedAt_POP: Int + filmedAt_PUSH: [PointInput!] +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + filmedAt: [PointInput!] + filmedAt_INCLUDES: PointInput + filmedAt_NOT: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAt_NOT_INCLUDES: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +\\"\\"\\"Point type\\"\\"\\" +type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! +} + +\\"\\"\\"\\"\\"\\" +input PointInput { + height: Float + latitude: Float! + longitude: Float! +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); test("CartesianPoints", async () => { @@ -486,125 +480,123 @@ describe("Point", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CartesianPoint type\\"\\"\\" - type CartesianPoint { - crs: String! - srid: Int! - x: Float! - y: Float! - z: Float - } - - \\"\\"\\"\\"\\"\\" - input CartesianPointInput { - x: Float! - y: Float! - z: Float - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMachinesMutationResponse { - info: CreateInfo! - machines: [Machine!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Machine { - \\"\\"\\"\\"\\"\\" - partLocations: [CartesianPoint!]! - } - - type MachineAggregateSelection { - count: Int! - } - - input MachineCreateInput { - partLocations: [CartesianPointInput!]! - } - - type MachineEdge { - cursor: String! - node: Machine! - } - - input MachineOptions { - limit: Int - offset: Int - } - - input MachineUpdateInput { - partLocations: [CartesianPointInput!] - partLocations_POP: Int - partLocations_PUSH: [CartesianPointInput!] - } - - input MachineWhere { - AND: [MachineWhere!] - NOT: MachineWhere - OR: [MachineWhere!] - partLocations: [CartesianPointInput!] - partLocations_INCLUDES: CartesianPointInput - partLocations_NOT: [CartesianPointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - partLocations_NOT_INCLUDES: CartesianPointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MachinesConnection { - edges: [MachineEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMachines(input: [MachineCreateInput!]!): CreateMachinesMutationResponse! - deleteMachines(where: MachineWhere): DeleteInfo! - updateMachines(update: MachineUpdateInput, where: MachineWhere): UpdateMachinesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - machines(options: MachineOptions, where: MachineWhere): [Machine!]! - machinesAggregate(where: MachineWhere): MachineAggregateSelection! - machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMachinesMutationResponse { - info: UpdateInfo! - machines: [Machine!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CartesianPoint type\\"\\"\\" +type CartesianPoint { + crs: String! + srid: Int! + x: Float! + y: Float! + z: Float +} + +\\"\\"\\"\\"\\"\\" +input CartesianPointInput { + x: Float! + y: Float! + z: Float +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMachinesMutationResponse { + info: CreateInfo! + machines: [Machine!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Machine { + partLocations: [CartesianPoint!]! +} + +type MachineAggregateSelection { + count: Int! +} + +input MachineCreateInput { + partLocations: [CartesianPointInput!]! +} + +type MachineEdge { + cursor: String! + node: Machine! +} + +input MachineOptions { + limit: Int + offset: Int +} + +input MachineUpdateInput { + partLocations: [CartesianPointInput!] + partLocations_POP: Int + partLocations_PUSH: [CartesianPointInput!] +} + +input MachineWhere { + AND: [MachineWhere!] + NOT: MachineWhere + OR: [MachineWhere!] + partLocations: [CartesianPointInput!] + partLocations_INCLUDES: CartesianPointInput + partLocations_NOT: [CartesianPointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + partLocations_NOT_INCLUDES: CartesianPointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MachinesConnection { + edges: [MachineEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMachines(input: [MachineCreateInput!]!): CreateMachinesMutationResponse! + deleteMachines(where: MachineWhere): DeleteInfo! + updateMachines(update: MachineUpdateInput, where: MachineWhere): UpdateMachinesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + machines(options: MachineOptions, where: MachineWhere): [Machine!]! + machinesAggregate(where: MachineWhere): MachineAggregateSelection! + machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMachinesMutationResponse { + info: UpdateInfo! + machines: [Machine!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index 2dafa3a6c7..5fb5de8c15 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -34,160 +34,157 @@ describe("Time", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - time: Time - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - time: TimeAggregateSelectionNullable! - } - - input MovieCreateInput { - id: ID - time: Time - } - - 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 - time: SortDirection - } - - input MovieUpdateInput { - id: ID - time: Time - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - time: Time - time_GT: Time - time_GTE: Time - time_IN: [Time] - time_LT: Time - time_LTE: Time - time_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - time_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" - scalar Time - - type TimeAggregateSelectionNullable { - max: Time - min: Time - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID + time: Time +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + time: TimeAggregateSelectionNullable! +} + +input MovieCreateInput { + id: ID + time: Time +} + +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 + time: SortDirection +} + +input MovieUpdateInput { + id: ID + time: Time +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + time: Time + time_GT: Time + time_GTE: Time + time_IN: [Time] + time_LT: Time + time_LTE: Time + time_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + time_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +\\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" +scalar Time + +type TimeAggregateSelectionNullable { + max: Time + min: Time +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 40212cc390..18d956d02b 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -41,411 +41,405 @@ describe("Unions", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\"CreateInfo\\"\\"\\" - type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"DeleteInfo\\"\\"\\" - type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - \\"\\"\\"\\"\\"\\" - type Genre { - \\"\\"\\"\\"\\"\\" - id: ID - } - - type GenreAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input GenreConnectWhere { - node: GenreWhere! - } - - 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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IDAggregateSelectionNullable { - longest: ID - shortest: ID - } - - \\"\\"\\"\\"\\"\\" - type Movie { - \\"\\"\\"\\"\\"\\" - id: ID - \\"\\"\\"\\"\\"\\" - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! - \\"\\"\\"\\"\\"\\" - searchNoDirective: Search - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - } - - input MovieConnectInput { - search: MovieSearchConnectInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - id: ID - search: MovieSearchCreateInput - } - - input MovieDeleteInput { - search: MovieSearchDeleteInput - } - - input MovieDisconnectInput { - search: MovieSearchDisconnectInput - } - - 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!] - } - - input MovieRelationInput { - search: MovieSearchCreateFieldInput - } - - input MovieSearchConnectInput { - Genre: [MovieSearchGenreConnectFieldInput!] - Movie: [MovieSearchMovieConnectFieldInput!] - } - - type MovieSearchConnection { - edges: [MovieSearchRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieSearchConnectionWhere { - Genre: MovieSearchGenreConnectionWhere - Movie: MovieSearchMovieConnectionWhere - } - - input MovieSearchCreateFieldInput { - Genre: [MovieSearchGenreCreateFieldInput!] - Movie: [MovieSearchMovieCreateFieldInput!] - } - - input MovieSearchCreateInput { - Genre: MovieSearchGenreFieldInput - Movie: MovieSearchMovieFieldInput - } - - input MovieSearchDeleteInput { - Genre: [MovieSearchGenreDeleteFieldInput!] - Movie: [MovieSearchMovieDeleteFieldInput!] - } - - input MovieSearchDisconnectInput { - Genre: [MovieSearchGenreDisconnectFieldInput!] - Movie: [MovieSearchMovieDisconnectFieldInput!] - } - - input MovieSearchGenreConnectFieldInput { - where: GenreConnectWhere - } - - input MovieSearchGenreConnectionWhere { - AND: [MovieSearchGenreConnectionWhere!] - NOT: MovieSearchGenreConnectionWhere - OR: [MovieSearchGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieSearchGenreCreateFieldInput { - node: GenreCreateInput! - } - - input MovieSearchGenreDeleteFieldInput { - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchGenreDisconnectFieldInput { - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchGenreFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] - } - - input MovieSearchGenreUpdateConnectionInput { - node: GenreUpdateInput - } - - input MovieSearchGenreUpdateFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] - delete: [MovieSearchGenreDeleteFieldInput!] - disconnect: [MovieSearchGenreDisconnectFieldInput!] - update: MovieSearchGenreUpdateConnectionInput - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere - } - - input MovieSearchMovieConnectionWhere { - AND: [MovieSearchMovieConnectionWhere!] - NOT: MovieSearchMovieConnectionWhere - OR: [MovieSearchMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - } - - input MovieSearchMovieCreateFieldInput { - node: MovieCreateInput! - } - - input MovieSearchMovieDeleteFieldInput { - delete: MovieDeleteInput - where: MovieSearchMovieConnectionWhere - } - - input MovieSearchMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieSearchMovieConnectionWhere - } - - input MovieSearchMovieFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] - } - - input MovieSearchMovieUpdateConnectionInput { - node: MovieUpdateInput - } - - input MovieSearchMovieUpdateFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] - delete: [MovieSearchMovieDeleteFieldInput!] - disconnect: [MovieSearchMovieDisconnectFieldInput!] - update: MovieSearchMovieUpdateConnectionInput - where: MovieSearchMovieConnectionWhere - } - - type MovieSearchRelationship { - cursor: String! - node: Search! - } - - input MovieSearchUpdateInput { - Genre: [MovieSearchGenreUpdateFieldInput!] - Movie: [MovieSearchMovieUpdateFieldInput!] - } - - \\"\\"\\" - 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 { - id: ID - search: MovieSearchUpdateInput - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - searchConnection: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_ALL: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_NONE: MovieSearchConnectionWhere - searchConnection_NOT: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SINGLE: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SOME: MovieSearchConnectionWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - union Search = Genre | Movie - - input SearchWhere { - Genre: GenreWhere - Movie: MovieWhere - } - - \\"\\"\\"SortDirection\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\"UpdateInfo\\"\\"\\" - type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); +"schema { + query: Query + mutation: Mutation +} + +type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! +} + +\\"\\"\\"CreateInfo\\"\\"\\" +type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! +} + +type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! +} + +\\"\\"\\"DeleteInfo\\"\\"\\" +type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! +} + +type Genre { + id: ID +} + +type GenreAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input GenreConnectWhere { + node: GenreWhere! +} + +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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID +} + +type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IDAggregateSelectionNullable { + longest: ID + shortest: ID +} + +type Movie { + id: ID + search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! + searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + searchNoDirective: Search +} + +type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! +} + +input MovieConnectInput { + search: MovieSearchConnectInput +} + +input MovieConnectWhere { + node: MovieWhere! +} + +input MovieCreateInput { + id: ID + search: MovieSearchCreateInput +} + +input MovieDeleteInput { + search: MovieSearchDeleteInput +} + +input MovieDisconnectInput { + search: MovieSearchDisconnectInput +} + +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!] +} + +input MovieRelationInput { + search: MovieSearchCreateFieldInput +} + +input MovieSearchConnectInput { + Genre: [MovieSearchGenreConnectFieldInput!] + Movie: [MovieSearchMovieConnectFieldInput!] +} + +type MovieSearchConnection { + edges: [MovieSearchRelationship!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input MovieSearchConnectionWhere { + Genre: MovieSearchGenreConnectionWhere + Movie: MovieSearchMovieConnectionWhere +} + +input MovieSearchCreateFieldInput { + Genre: [MovieSearchGenreCreateFieldInput!] + Movie: [MovieSearchMovieCreateFieldInput!] +} + +input MovieSearchCreateInput { + Genre: MovieSearchGenreFieldInput + Movie: MovieSearchMovieFieldInput +} + +input MovieSearchDeleteInput { + Genre: [MovieSearchGenreDeleteFieldInput!] + Movie: [MovieSearchMovieDeleteFieldInput!] +} + +input MovieSearchDisconnectInput { + Genre: [MovieSearchGenreDisconnectFieldInput!] + Movie: [MovieSearchMovieDisconnectFieldInput!] +} + +input MovieSearchGenreConnectFieldInput { + where: GenreConnectWhere +} + +input MovieSearchGenreConnectionWhere { + AND: [MovieSearchGenreConnectionWhere!] + NOT: MovieSearchGenreConnectionWhere + OR: [MovieSearchGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieSearchGenreCreateFieldInput { + node: GenreCreateInput! +} + +input MovieSearchGenreDeleteFieldInput { + where: MovieSearchGenreConnectionWhere +} + +input MovieSearchGenreDisconnectFieldInput { + where: MovieSearchGenreConnectionWhere +} + +input MovieSearchGenreFieldInput { + connect: [MovieSearchGenreConnectFieldInput!] + create: [MovieSearchGenreCreateFieldInput!] +} + +input MovieSearchGenreUpdateConnectionInput { + node: GenreUpdateInput +} + +input MovieSearchGenreUpdateFieldInput { + connect: [MovieSearchGenreConnectFieldInput!] + create: [MovieSearchGenreCreateFieldInput!] + delete: [MovieSearchGenreDeleteFieldInput!] + disconnect: [MovieSearchGenreDisconnectFieldInput!] + update: MovieSearchGenreUpdateConnectionInput + where: MovieSearchGenreConnectionWhere +} + +input MovieSearchMovieConnectFieldInput { + connect: [MovieConnectInput!] + where: MovieConnectWhere +} + +input MovieSearchMovieConnectionWhere { + AND: [MovieSearchMovieConnectionWhere!] + NOT: MovieSearchMovieConnectionWhere + OR: [MovieSearchMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") +} + +input MovieSearchMovieCreateFieldInput { + node: MovieCreateInput! +} + +input MovieSearchMovieDeleteFieldInput { + delete: MovieDeleteInput + where: MovieSearchMovieConnectionWhere +} + +input MovieSearchMovieDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieSearchMovieConnectionWhere +} + +input MovieSearchMovieFieldInput { + connect: [MovieSearchMovieConnectFieldInput!] + create: [MovieSearchMovieCreateFieldInput!] +} + +input MovieSearchMovieUpdateConnectionInput { + node: MovieUpdateInput +} + +input MovieSearchMovieUpdateFieldInput { + connect: [MovieSearchMovieConnectFieldInput!] + create: [MovieSearchMovieCreateFieldInput!] + delete: [MovieSearchMovieDeleteFieldInput!] + disconnect: [MovieSearchMovieDisconnectFieldInput!] + update: MovieSearchMovieUpdateConnectionInput + where: MovieSearchMovieConnectionWhere +} + +type MovieSearchRelationship { + cursor: String! + node: Search! +} + +input MovieSearchUpdateInput { + Genre: [MovieSearchGenreUpdateFieldInput!] + Movie: [MovieSearchMovieUpdateFieldInput!] +} + +\\"\\"\\" +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 { + id: ID + search: MovieSearchUpdateInput +} + +input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + searchConnection: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_ALL: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_NONE: MovieSearchConnectionWhere + searchConnection_NOT: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_SINGLE: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_SOME: MovieSearchConnectionWhere +} + +type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! +} + +\\"\\"\\"Pagination information (Relay)\\"\\"\\" +type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String +} + +type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! +} + +\\"\\"\\"\\"\\"\\" +input QueryOptions { + limit: Int + offset: Int +} + +union Search = Genre | Movie + +input SearchWhere { + Genre: GenreWhere + Movie: MovieWhere +} + +\\"\\"\\"SortDirection\\"\\"\\" +enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC +} + +type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! +} + +\\"\\"\\"UpdateInfo\\"\\"\\" +type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! +} + +type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! +}" +`); }); }); From 870136131a6a027130b590aa04eacdd480db5599 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 13 Sep 2023 17:47:48 +0200 Subject: [PATCH 071/162] feat: add isSpatial() to isOnCreateField() --- .../attribute/model-adapters/AttributeAdapter.ts | 4 +++- packages/graphql/tests/schema/issues/1182.test.ts | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 64e97d0731..aa903e49e7 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -217,7 +217,9 @@ export class AttributeAdapter { ] */ isOnCreateField(): boolean { - return this.isNonGeneratedField() && (this.isScalar() || this.isEnum() || this.isAbstract()); + return ( + this.isNonGeneratedField() && (this.isScalar() || this.isSpatial() || this.isEnum() || this.isAbstract()) + ); } /** diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index 2c34b5f442..2896d9d6a2 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -80,11 +80,11 @@ type ActorEdge { node: Actor! } - input ActorOnCreateInput { - dob: DateTime! - homeAddress: PointInput! - name: String! - } +input ActorOnCreateInput { + dob: DateTime! + homeAddress: PointInput! + name: String! +} input ActorOptions { limit: Int From bea160f0384fa74b823c5319f20f4117d4317c41 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 13 Sep 2023 18:16:57 +0200 Subject: [PATCH 072/162] fix: add limit to directive constants --- packages/graphql/src/constants.ts | 1 + .../schema/validation/utils/invalid-directive-combinations.ts | 1 + packages/graphql/tests/schema/null.test.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/constants.ts b/packages/graphql/src/constants.ts index 5840fb9941..a081389e05 100644 --- a/packages/graphql/src/constants.ts +++ b/packages/graphql/src/constants.ts @@ -144,6 +144,7 @@ export const OBJECT_DIRECTIVES = [ "plural", "query", "queryOptions", + "limit", "shareable", "subscription", "subscriptionsAuthorization", diff --git a/packages/graphql/src/schema/validation/utils/invalid-directive-combinations.ts b/packages/graphql/src/schema/validation/utils/invalid-directive-combinations.ts index 75c0b3843f..6dec7d0dbd 100644 --- a/packages/graphql/src/schema/validation/utils/invalid-directive-combinations.ts +++ b/packages/graphql/src/schema/validation/utils/invalid-directive-combinations.ts @@ -97,4 +97,5 @@ export const invalidObjectCombinations: InvalidObjectCombinations = { shareable: [], subscription: [], subscriptionsAuthorization: [], + limit: [], }; diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index 1459985ee1..bf2b16b03a 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -18,8 +18,8 @@ */ import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import { lexicographicSortSchema } from "graphql/utilities"; import { gql } from "graphql-tag"; +import { lexicographicSortSchema } from "graphql/utilities"; import { Neo4jGraphQL } from "../../src"; describe("Null", () => { From f5f19dc530f3e53651ee79fa5629b28dbee73ed7 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 13 Sep 2023 18:29:58 +0200 Subject: [PATCH 073/162] refactor: remove console.log --- .../schema-model/attribute/model-adapters/AttributeAdapter.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index aa903e49e7..f52f5a648c 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -549,7 +549,6 @@ export class AttributeAdapter { ); } isAggregationFilterable(): boolean { - console.log("isAggregationFilterable", this.annotations.filterable?.byAggregate); return ( this.annotations.filterable?.byAggregate !== false && this.isCustomResolvable() === false && From 6a513e5ba2d7e8beb30e24749677379c2fe764da Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 14 Sep 2023 12:52:40 +0200 Subject: [PATCH 074/162] fix: ensure we can have lowercase type names --- .../model-adapters/RelationshipAdapter.ts | 2 +- .../tests/schema/lowercase-type-names.test.ts | 822 ++++++++++++++++++ .../schema/pluralize-consistency.test.ts | 784 ++++++++--------- 3 files changed, 1215 insertions(+), 393 deletions(-) create mode 100644 packages/graphql/tests/schema/lowercase-type-names.test.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 e94ffee465..3a7a7251f2 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -222,7 +222,7 @@ export class RelationshipAdapter { public getAggregationFieldTypename(nestedField?: "node" | "edge"): string { const nestedFieldStr = upperFirst(nestedField || ""); const aggregationStr = nestedField ? "Aggregate" : "Aggregation"; - return `${this.source.name}${upperFirst(this.target.name)}${upperFirst( + return `${this.source.name}${this.target.name}${upperFirst( this.name )}${nestedFieldStr}${aggregationStr}Selection`; } diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts new file mode 100644 index 0000000000..4d4f4f7afc --- /dev/null +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -0,0 +1,822 @@ +/* + * 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("lower case type names", () => { + test("should generate a valid schema", async () => { + const typeDefs = gql` + type movie { + name: String + year: Int + createdAt: DateTime + testId: String + actors: [actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type actor { + name: String + year: Int + createdAt: DateTime + movies: [movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type ActorsConnection { + edges: [actorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [actor!]! + info: CreateInfo! + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [movie!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNullable { + max: DateTime + min: DateTime + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + 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(connect: actorConnectInput, create: actorRelationInput, delete: actorDeleteInput, disconnect: actorDisconnectInput, update: actorUpdateInput, where: actorWhere): UpdateActorsMutationResponse! + updateMovies(connect: movieConnectInput, create: movieRelationInput, delete: movieDeleteInput, disconnect: movieDisconnectInput, update: movieUpdateInput, where: movieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: actorOptions, where: actorWhere): [actor!]! + actorsAggregate(where: actorWhere): actorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [actorSort], where: actorWhere): ActorsConnection! + movies(options: movieOptions, where: movieWhere): [movie!]! + moviesAggregate(where: movieWhere): movieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [movieSort], where: movieWhere): MoviesConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [actor!]! + info: UpdateInfo! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [movie!]! + } + + type actor { + createdAt: DateTime + movies(directed: Boolean = true, options: movieOptions, where: movieWhere): [movie!]! + moviesAggregate(directed: Boolean = true, where: movieWhere): actormovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [actorMoviesConnectionSort!], where: actorMoviesConnectionWhere): actorMoviesConnection! + name: String + year: Int + } + + type actorAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelectionNullable! + name: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! + } + + input actorConnectInput { + movies: [actorMoviesConnectFieldInput!] + } + + input actorConnectWhere { + node: actorWhere! + } + + input actorCreateInput { + createdAt: DateTime + movies: actorMoviesFieldInput + name: String + year: Int + } + + input actorDeleteInput { + movies: [actorMoviesDeleteFieldInput!] + } + + input actorDisconnectInput { + movies: [actorMoviesDisconnectFieldInput!] + } + + type actorEdge { + cursor: String! + node: actor! + } + + input actorMoviesAggregateInput { + AND: [actorMoviesAggregateInput!] + NOT: actorMoviesAggregateInput + OR: [actorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: actorMoviesNodeAggregationWhereInput + } + + input actorMoviesConnectFieldInput { + connect: [movieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: movieConnectWhere + } + + type actorMoviesConnection { + edges: [actorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input actorMoviesConnectionSort { + node: movieSort + } + + input actorMoviesConnectionWhere { + AND: [actorMoviesConnectionWhere!] + NOT: actorMoviesConnectionWhere + OR: [actorMoviesConnectionWhere!] + node: movieWhere + node_NOT: movieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input actorMoviesCreateFieldInput { + 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!] + createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_MAX_EQUAL: DateTime + createdAt_MAX_GT: DateTime + createdAt_MAX_GTE: DateTime + createdAt_MAX_LT: DateTime + createdAt_MAX_LTE: DateTime + createdAt_MIN_EQUAL: DateTime + createdAt_MIN_GT: DateTime + createdAt_MIN_GTE: DateTime + createdAt_MIN_LT: DateTime + createdAt_MIN_LTE: DateTime + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_AVERAGE_LENGTH_EQUAL: Float + testId_AVERAGE_LENGTH_GT: Float + testId_AVERAGE_LENGTH_GTE: Float + testId_AVERAGE_LENGTH_LT: Float + testId_AVERAGE_LENGTH_LTE: Float + testId_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + testId_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + testId_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + testId_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_LONGEST_LENGTH_EQUAL: Int + testId_LONGEST_LENGTH_GT: Int + testId_LONGEST_LENGTH_GTE: Int + testId_LONGEST_LENGTH_LT: Int + testId_LONGEST_LENGTH_LTE: Int + testId_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + testId_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + testId_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_SHORTEST_LENGTH_EQUAL: Int + testId_SHORTEST_LENGTH_GT: Int + testId_SHORTEST_LENGTH_GTE: Int + testId_SHORTEST_LENGTH_LT: Int + testId_SHORTEST_LENGTH_LTE: Int + testId_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + testId_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + year_AVERAGE_EQUAL: Float + year_AVERAGE_GT: Float + year_AVERAGE_GTE: Float + year_AVERAGE_LT: Float + year_AVERAGE_LTE: Float + year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_MAX_EQUAL: Int + year_MAX_GT: Int + year_MAX_GTE: Int + year_MAX_LT: Int + year_MAX_LTE: Int + year_MIN_EQUAL: Int + year_MIN_GT: Int + year_MIN_GTE: Int + year_MIN_LT: Int + year_MIN_LTE: Int + year_SUM_EQUAL: Int + year_SUM_GT: Int + year_SUM_GTE: Int + year_SUM_LT: Int + year_SUM_LTE: Int + } + + type actorMoviesRelationship { + cursor: String! + node: movie! + } + + input actorMoviesUpdateConnectionInput { + 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!] + } + + input actorRelationInput { + movies: [actorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + createdAt: SortDirection + name: SortDirection + year: SortDirection + } + + input actorUpdateInput { + createdAt: DateTime + movies: [actorMoviesUpdateFieldInput!] + name: String + year: Int + year_DECREMENT: Int + year_INCREMENT: Int + } + + input actorWhere { + AND: [actorWhere!] + NOT: actorWhere + OR: [actorWhere!] + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + movies: movieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: actorMoviesAggregateInput + moviesConnection: actorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: actorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: movieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + year: Int + year_GT: Int + year_GTE: Int + year_IN: [Int] + year_LT: Int + year_LTE: Int + year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type actormovieMoviesAggregationSelection { + count: Int! + node: actormovieMoviesNodeAggregateSelection + } + + type actormovieMoviesNodeAggregateSelection { + createdAt: DateTimeAggregateSelectionNullable! + name: StringAggregateSelectionNullable! + testId: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! + } + + type movie { + actors(directed: Boolean = true, options: actorOptions, where: actorWhere): [actor!]! + actorsAggregate(directed: Boolean = true, where: actorWhere): movieactorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [movieActorsConnectionSort!], where: movieActorsConnectionWhere): movieActorsConnection! + createdAt: DateTime + name: String + testId: String + year: Int + } + + input movieActorsAggregateInput { + AND: [movieActorsAggregateInput!] + NOT: movieActorsAggregateInput + OR: [movieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: movieActorsNodeAggregationWhereInput + } + + input movieActorsConnectFieldInput { + connect: [actorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: actorConnectWhere + } + + type movieActorsConnection { + edges: [movieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input movieActorsConnectionSort { + node: actorSort + } + + input movieActorsConnectionWhere { + AND: [movieActorsConnectionWhere!] + NOT: movieActorsConnectionWhere + OR: [movieActorsConnectionWhere!] + node: actorWhere + node_NOT: actorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input movieActorsCreateFieldInput { + 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!] + createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_MAX_EQUAL: DateTime + createdAt_MAX_GT: DateTime + createdAt_MAX_GTE: DateTime + createdAt_MAX_LT: DateTime + createdAt_MAX_LTE: DateTime + createdAt_MIN_EQUAL: DateTime + createdAt_MIN_GT: DateTime + createdAt_MIN_GTE: DateTime + createdAt_MIN_LT: DateTime + createdAt_MIN_LTE: DateTime + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + year_AVERAGE_EQUAL: Float + year_AVERAGE_GT: Float + year_AVERAGE_GTE: Float + year_AVERAGE_LT: Float + year_AVERAGE_LTE: Float + year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_MAX_EQUAL: Int + year_MAX_GT: Int + year_MAX_GTE: Int + year_MAX_LT: Int + year_MAX_LTE: Int + year_MIN_EQUAL: Int + year_MIN_GT: Int + year_MIN_GTE: Int + year_MIN_LT: Int + year_MIN_LTE: Int + year_SUM_EQUAL: Int + year_SUM_GT: Int + year_SUM_GTE: Int + year_SUM_LT: Int + year_SUM_LTE: Int + } + + type movieActorsRelationship { + cursor: String! + node: actor! + } + + input movieActorsUpdateConnectionInput { + node: actorUpdateInput + } + + input movieActorsUpdateFieldInput { + connect: [movieActorsConnectFieldInput!] + create: [movieActorsCreateFieldInput!] + delete: [movieActorsDeleteFieldInput!] + disconnect: [movieActorsDisconnectFieldInput!] + update: movieActorsUpdateConnectionInput + where: movieActorsConnectionWhere + } + + type movieAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelectionNullable! + name: StringAggregateSelectionNullable! + testId: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! + } + + input movieConnectInput { + actors: [movieActorsConnectFieldInput!] + } + + input movieConnectWhere { + node: movieWhere! + } + + input movieCreateInput { + actors: movieActorsFieldInput + createdAt: DateTime + name: String + testId: String + year: Int + } + + 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!] + } + + input movieRelationInput { + actors: [movieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + createdAt: SortDirection + name: SortDirection + testId: SortDirection + year: SortDirection + } + + input movieUpdateInput { + actors: [movieActorsUpdateFieldInput!] + createdAt: DateTime + name: String + testId: String + year: Int + year_DECREMENT: Int + year_INCREMENT: Int + } + + input movieWhere { + AND: [movieWhere!] + NOT: movieWhere + OR: [movieWhere!] + actors: actorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: movieActorsAggregateInput + actorsConnection: movieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: movieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: actorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + testId: String + testId_CONTAINS: String + testId_ENDS_WITH: String + testId_IN: [String] + testId_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + testId_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + testId_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + testId_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + testId_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + testId_STARTS_WITH: String + year: Int + year_GT: Int + year_GTE: Int + year_IN: [Int] + year_LT: Int + year_LTE: Int + year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type movieactorActorsAggregationSelection { + count: Int! + node: movieactorActorsNodeAggregateSelection + } + + type movieactorActorsNodeAggregateSelection { + createdAt: DateTimeAggregateSelectionNullable! + name: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index 5ea911c6d2..ff948f319c 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -38,397 +38,397 @@ describe("Pluralize consistency", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateSuperFriendsMutationResponse { - info: CreateInfo! - superFriends: [super_friend!]! -} - -type CreateSuperUsersMutationResponse { - info: CreateInfo! - superUsers: [super_user!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createSuperFriends(input: [super_friendCreateInput!]!): CreateSuperFriendsMutationResponse! - createSuperUsers(input: [super_userCreateInput!]!): CreateSuperUsersMutationResponse! - deleteSuperFriends(where: super_friendWhere): DeleteInfo! - deleteSuperUsers(delete: super_userDeleteInput, where: super_userWhere): DeleteInfo! - updateSuperFriends(update: super_friendUpdateInput, where: super_friendWhere): UpdateSuperFriendsMutationResponse! - updateSuperUsers(connect: super_userConnectInput, create: super_userRelationInput, delete: super_userDeleteInput, disconnect: super_userDisconnectInput, update: super_userUpdateInput, where: super_userWhere): UpdateSuperUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - superFriends(options: super_friendOptions, where: super_friendWhere): [super_friend!]! - superFriendsAggregate(where: super_friendWhere): super_friendAggregateSelection! - superFriendsConnection(after: String, first: Int, sort: [super_friendSort], where: super_friendWhere): SuperFriendsConnection! - superUsers(options: super_userOptions, where: super_userWhere): [super_user!]! - superUsersAggregate(where: super_userWhere): super_userAggregateSelection! - superUsersConnection(after: String, first: Int, sort: [super_userSort], where: super_userWhere): SuperUsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type SuperFriendsConnection { - edges: [super_friendEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type SuperUsersConnection { - edges: [super_userEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateSuperFriendsMutationResponse { - info: UpdateInfo! - superFriends: [super_friend!]! -} - -type UpdateSuperUsersMutationResponse { - info: UpdateInfo! - superUsers: [super_user!]! -} - -type super_friend { - name: String! -} - -type super_friendAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input super_friendConnectWhere { - node: super_friendWhere! -} - -input super_friendCreateInput { - name: String! -} - -type super_friendEdge { - cursor: String! - node: super_friend! -} - -input super_friendOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more super_friendSort objects to sort SuperFriends by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [super_friendSort!] -} - -\\"\\"\\" -Fields to sort SuperFriends by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_friendSort object. -\\"\\"\\" -input super_friendSort { - name: SortDirection -} - -input super_friendUpdateInput { - name: String -} - -input super_friendWhere { - AND: [super_friendWhere!] - NOT: super_friendWhere - OR: [super_friendWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type super_user { - my_friend(directed: Boolean = true, options: super_friendOptions, where: super_friendWhere): [super_friend!]! - my_friendAggregate(directed: Boolean = true, where: super_friendWhere): super_userSuper_friendMy_friendAggregationSelection - my_friendConnection(after: String, directed: Boolean = true, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! - name: String! -} - -type super_userAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input super_userConnectInput { - my_friend: [super_userMy_friendConnectFieldInput!] -} - -input super_userCreateInput { - my_friend: super_userMy_friendFieldInput - name: String! -} - -input super_userDeleteInput { - my_friend: [super_userMy_friendDeleteFieldInput!] -} - -input super_userDisconnectInput { - my_friend: [super_userMy_friendDisconnectFieldInput!] -} - -type super_userEdge { - cursor: String! - node: super_user! -} - -input super_userMy_friendAggregateInput { - AND: [super_userMy_friendAggregateInput!] - NOT: super_userMy_friendAggregateInput - OR: [super_userMy_friendAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: super_userMy_friendNodeAggregationWhereInput -} - -input super_userMy_friendConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: super_friendConnectWhere -} - -type super_userMy_friendConnection { - edges: [super_userMy_friendRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input super_userMy_friendConnectionSort { - node: super_friendSort -} - -input super_userMy_friendConnectionWhere { - AND: [super_userMy_friendConnectionWhere!] - NOT: super_userMy_friendConnectionWhere - OR: [super_userMy_friendConnectionWhere!] - node: super_friendWhere - node_NOT: super_friendWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input super_userMy_friendCreateFieldInput { - node: super_friendCreateInput! -} - -input super_userMy_friendDeleteFieldInput { - where: super_userMy_friendConnectionWhere -} - -input super_userMy_friendDisconnectFieldInput { - where: super_userMy_friendConnectionWhere -} - -input super_userMy_friendFieldInput { - connect: [super_userMy_friendConnectFieldInput!] - create: [super_userMy_friendCreateFieldInput!] -} - -input super_userMy_friendNodeAggregationWhereInput { - AND: [super_userMy_friendNodeAggregationWhereInput!] - NOT: super_userMy_friendNodeAggregationWhereInput - OR: [super_userMy_friendNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type super_userMy_friendRelationship { - cursor: String! - node: super_friend! -} - -input super_userMy_friendUpdateConnectionInput { - node: super_friendUpdateInput -} - -input super_userMy_friendUpdateFieldInput { - connect: [super_userMy_friendConnectFieldInput!] - create: [super_userMy_friendCreateFieldInput!] - delete: [super_userMy_friendDeleteFieldInput!] - disconnect: [super_userMy_friendDisconnectFieldInput!] - update: super_userMy_friendUpdateConnectionInput - where: super_userMy_friendConnectionWhere -} - -input super_userOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more super_userSort objects to sort SuperUsers by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [super_userSort!] -} - -input super_userRelationInput { - my_friend: [super_userMy_friendCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort SuperUsers by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_userSort object. -\\"\\"\\" -input super_userSort { - name: SortDirection -} - -type super_userSuper_friendMy_friendAggregationSelection { - count: Int! - node: super_userSuper_friendMy_friendNodeAggregateSelection -} - -type super_userSuper_friendMy_friendNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input super_userUpdateInput { - my_friend: [super_userMy_friendUpdateFieldInput!] - name: String -} - -input super_userWhere { - AND: [super_userWhere!] - NOT: super_userWhere - OR: [super_userWhere!] - my_friend: super_friendWhere @deprecated(reason: \\"Use \`my_friend_SOME\` instead.\\") - my_friendAggregate: super_userMy_friendAggregateInput - my_friendConnection: super_userMy_friendConnectionWhere @deprecated(reason: \\"Use \`my_friendConnection_SOME\` instead.\\") - \\"\\"\\" - Return super_users where all of the related super_userMy_friendConnections match this filter - \\"\\"\\" - my_friendConnection_ALL: super_userMy_friendConnectionWhere - \\"\\"\\" - Return super_users where none of the related super_userMy_friendConnections match this filter - \\"\\"\\" - my_friendConnection_NONE: super_userMy_friendConnectionWhere - my_friendConnection_NOT: super_userMy_friendConnectionWhere @deprecated(reason: \\"Use \`my_friendConnection_NONE\` instead.\\") - \\"\\"\\" - Return super_users where one of the related super_userMy_friendConnections match this filter - \\"\\"\\" - my_friendConnection_SINGLE: super_userMy_friendConnectionWhere - \\"\\"\\" - Return super_users where some of the related super_userMy_friendConnections match this filter - \\"\\"\\" - my_friendConnection_SOME: super_userMy_friendConnectionWhere - \\"\\"\\" - Return super_users where all of the related super_friends match this filter - \\"\\"\\" - my_friend_ALL: super_friendWhere - \\"\\"\\" - Return super_users where none of the related super_friends match this filter - \\"\\"\\" - my_friend_NONE: super_friendWhere - my_friend_NOT: super_friendWhere @deprecated(reason: \\"Use \`my_friend_NONE\` instead.\\") - \\"\\"\\" - Return super_users where one of the related super_friends match this filter - \\"\\"\\" - my_friend_SINGLE: super_friendWhere - \\"\\"\\" - Return super_users where some of the related super_friends match this filter - \\"\\"\\" - my_friend_SOME: super_friendWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateSuperFriendsMutationResponse { + info: CreateInfo! + superFriends: [super_friend!]! + } + + type CreateSuperUsersMutationResponse { + info: CreateInfo! + superUsers: [super_user!]! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createSuperFriends(input: [super_friendCreateInput!]!): CreateSuperFriendsMutationResponse! + createSuperUsers(input: [super_userCreateInput!]!): CreateSuperUsersMutationResponse! + deleteSuperFriends(where: super_friendWhere): DeleteInfo! + deleteSuperUsers(delete: super_userDeleteInput, where: super_userWhere): DeleteInfo! + updateSuperFriends(update: super_friendUpdateInput, where: super_friendWhere): UpdateSuperFriendsMutationResponse! + updateSuperUsers(connect: super_userConnectInput, create: super_userRelationInput, delete: super_userDeleteInput, disconnect: super_userDisconnectInput, update: super_userUpdateInput, where: super_userWhere): UpdateSuperUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + superFriends(options: super_friendOptions, where: super_friendWhere): [super_friend!]! + superFriendsAggregate(where: super_friendWhere): super_friendAggregateSelection! + superFriendsConnection(after: String, first: Int, sort: [super_friendSort], where: super_friendWhere): SuperFriendsConnection! + superUsers(options: super_userOptions, where: super_userWhere): [super_user!]! + superUsersAggregate(where: super_userWhere): super_userAggregateSelection! + superUsersConnection(after: String, first: Int, sort: [super_userSort], where: super_userWhere): SuperUsersConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type SuperFriendsConnection { + edges: [super_friendEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type SuperUsersConnection { + edges: [super_userEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateSuperFriendsMutationResponse { + info: UpdateInfo! + superFriends: [super_friend!]! + } + + type UpdateSuperUsersMutationResponse { + info: UpdateInfo! + superUsers: [super_user!]! + } + + type super_friend { + name: String! + } + + type super_friendAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input super_friendConnectWhere { + node: super_friendWhere! + } + + input super_friendCreateInput { + name: String! + } + + type super_friendEdge { + cursor: String! + node: super_friend! + } + + input super_friendOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more super_friendSort objects to sort SuperFriends by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [super_friendSort!] + } + + \\"\\"\\" + Fields to sort SuperFriends by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_friendSort object. + \\"\\"\\" + input super_friendSort { + name: SortDirection + } + + input super_friendUpdateInput { + name: String + } + + input super_friendWhere { + AND: [super_friendWhere!] + NOT: super_friendWhere + OR: [super_friendWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type super_user { + my_friend(directed: Boolean = true, options: super_friendOptions, where: super_friendWhere): [super_friend!]! + my_friendAggregate(directed: Boolean = true, where: super_friendWhere): super_usersuper_friendMy_friendAggregationSelection + my_friendConnection(after: String, directed: Boolean = true, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! + name: String! + } + + type super_userAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input super_userConnectInput { + my_friend: [super_userMy_friendConnectFieldInput!] + } + + input super_userCreateInput { + my_friend: super_userMy_friendFieldInput + name: String! + } + + input super_userDeleteInput { + my_friend: [super_userMy_friendDeleteFieldInput!] + } + + input super_userDisconnectInput { + my_friend: [super_userMy_friendDisconnectFieldInput!] + } + + type super_userEdge { + cursor: String! + node: super_user! + } + + input super_userMy_friendAggregateInput { + AND: [super_userMy_friendAggregateInput!] + NOT: super_userMy_friendAggregateInput + OR: [super_userMy_friendAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: super_userMy_friendNodeAggregationWhereInput + } + + input super_userMy_friendConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: super_friendConnectWhere + } + + type super_userMy_friendConnection { + edges: [super_userMy_friendRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input super_userMy_friendConnectionSort { + node: super_friendSort + } + + input super_userMy_friendConnectionWhere { + AND: [super_userMy_friendConnectionWhere!] + NOT: super_userMy_friendConnectionWhere + OR: [super_userMy_friendConnectionWhere!] + node: super_friendWhere + node_NOT: super_friendWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input super_userMy_friendCreateFieldInput { + node: super_friendCreateInput! + } + + input super_userMy_friendDeleteFieldInput { + where: super_userMy_friendConnectionWhere + } + + input super_userMy_friendDisconnectFieldInput { + where: super_userMy_friendConnectionWhere + } + + input super_userMy_friendFieldInput { + connect: [super_userMy_friendConnectFieldInput!] + create: [super_userMy_friendCreateFieldInput!] + } + + input super_userMy_friendNodeAggregationWhereInput { + AND: [super_userMy_friendNodeAggregationWhereInput!] + NOT: super_userMy_friendNodeAggregationWhereInput + OR: [super_userMy_friendNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type super_userMy_friendRelationship { + cursor: String! + node: super_friend! + } + + input super_userMy_friendUpdateConnectionInput { + node: super_friendUpdateInput + } + + input super_userMy_friendUpdateFieldInput { + connect: [super_userMy_friendConnectFieldInput!] + create: [super_userMy_friendCreateFieldInput!] + delete: [super_userMy_friendDeleteFieldInput!] + disconnect: [super_userMy_friendDisconnectFieldInput!] + update: super_userMy_friendUpdateConnectionInput + where: super_userMy_friendConnectionWhere + } + + input super_userOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more super_userSort objects to sort SuperUsers by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [super_userSort!] + } + + input super_userRelationInput { + my_friend: [super_userMy_friendCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort SuperUsers by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_userSort object. + \\"\\"\\" + input super_userSort { + name: SortDirection + } + + input super_userUpdateInput { + my_friend: [super_userMy_friendUpdateFieldInput!] + name: String + } + + input super_userWhere { + AND: [super_userWhere!] + NOT: super_userWhere + OR: [super_userWhere!] + my_friend: super_friendWhere @deprecated(reason: \\"Use \`my_friend_SOME\` instead.\\") + my_friendAggregate: super_userMy_friendAggregateInput + my_friendConnection: super_userMy_friendConnectionWhere @deprecated(reason: \\"Use \`my_friendConnection_SOME\` instead.\\") + \\"\\"\\" + Return super_users where all of the related super_userMy_friendConnections match this filter + \\"\\"\\" + my_friendConnection_ALL: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where none of the related super_userMy_friendConnections match this filter + \\"\\"\\" + my_friendConnection_NONE: super_userMy_friendConnectionWhere + my_friendConnection_NOT: super_userMy_friendConnectionWhere @deprecated(reason: \\"Use \`my_friendConnection_NONE\` instead.\\") + \\"\\"\\" + Return super_users where one of the related super_userMy_friendConnections match this filter + \\"\\"\\" + my_friendConnection_SINGLE: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where some of the related super_userMy_friendConnections match this filter + \\"\\"\\" + my_friendConnection_SOME: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where all of the related super_friends match this filter + \\"\\"\\" + my_friend_ALL: super_friendWhere + \\"\\"\\" + Return super_users where none of the related super_friends match this filter + \\"\\"\\" + my_friend_NONE: super_friendWhere + my_friend_NOT: super_friendWhere @deprecated(reason: \\"Use \`my_friend_NONE\` instead.\\") + \\"\\"\\" + Return super_users where one of the related super_friends match this filter + \\"\\"\\" + my_friend_SINGLE: super_friendWhere + \\"\\"\\" + Return super_users where some of the related super_friends match this filter + \\"\\"\\" + my_friend_SOME: super_friendWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type super_usersuper_friendMy_friendAggregationSelection { + count: Int! + node: super_usersuper_friendMy_friendNodeAggregateSelection + } + + type super_usersuper_friendMy_friendNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + }" + `); }); }); From 20a082b709d3c48a9d9b2542a52331a0f1a065c1 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 14 Sep 2023 12:52:50 +0200 Subject: [PATCH 075/162] refactor: remove unneeded function abstraction --- .../src/schema/schema-configuration.ts | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/packages/graphql/src/schema/schema-configuration.ts b/packages/graphql/src/schema/schema-configuration.ts index afec6eba7f..990b830f17 100644 --- a/packages/graphql/src/schema/schema-configuration.ts +++ b/packages/graphql/src/schema/schema-configuration.ts @@ -50,21 +50,6 @@ export type SchemaConfigurationFlags = { subscribeDeleteRelationship: boolean; }; -function getDefaultSchemaConfigurationFlags(): SchemaConfigurationFlags { - return { - read: true, - aggregate: true, - create: true, - delete: true, - update: true, - subscribeCreate: true, - subscribeUpdate: true, - subscribeDelete: true, - subscribeCreateRelationship: true, - subscribeDeleteRelationship: true, - }; -} - // obtain a schema configuration object from a list of SchemaExtensionNode export function schemaConfigurationFromSchemaExtensions(schemaExtensions: SchemaExtensionNode[]): SchemaConfiguration { const schemaConfiguration: SchemaConfiguration = {}; @@ -152,7 +137,18 @@ export function getSchemaConfigurationFlags(options: { throw new Error("@subscription directive already defined at the schema location"); } - const schemaConfigurationFlags = getDefaultSchemaConfigurationFlags(); + const schemaConfigurationFlags: SchemaConfigurationFlags = { + read: true, + aggregate: true, + create: true, + delete: true, + update: true, + subscribeCreate: true, + subscribeUpdate: true, + subscribeDelete: true, + subscribeCreateRelationship: true, + subscribeDeleteRelationship: true, + }; if (options.excludeDirective) { const excludeOperationsSet = new Set(options.excludeDirective.operations); From ac23a3eccb52b919bec8ad5c0f46e9ba5959f878 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 14 Sep 2023 14:24:20 +0200 Subject: [PATCH 076/162] fix: allow falsy default input values --- packages/graphql/src/schema/to-compose.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index e373e927ac..1f72a5fa32 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -55,7 +55,9 @@ export function graphqlArgsToCompose2(args: Argument[]) { [arg.name]: { type: inputValueAdapter.getTypePrettyName(), description: inputValueAdapter.description, - ...(inputValueAdapter.defaultValue ? { defaultValue: inputValueAdapter.defaultValue } : {}), + ...(inputValueAdapter.defaultValue !== undefined + ? { defaultValue: inputValueAdapter.defaultValue } + : {}), }, }; }, {}); From 882efa0ee3657ce9d16e8eaf21fb307ab9d2e72d Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 14 Sep 2023 16:26:10 +0200 Subject: [PATCH 077/162] test: add params inline snapshot test to issue 1566 test --- .../graphql/tests/tck/issues/1566.test.ts | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/graphql/tests/tck/issues/1566.test.ts b/packages/graphql/tests/tck/issues/1566.test.ts index 8bb51203d0..ea4ff021de 100644 --- a/packages/graphql/tests/tck/issues/1566.test.ts +++ b/packages/graphql/tests/tck/issues/1566.test.ts @@ -17,10 +17,10 @@ * limitations under the License. */ -import { gql } from "graphql-tag"; import type { DocumentNode } from "graphql"; +import { gql } from "graphql-tag"; import { Neo4jGraphQL } from "../../../src"; -import { formatCypher, translateQuery } from "../utils/tck-test-utils"; +import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; describe("https://github.com/neo4j/graphql/issues/1566", () => { let typeDefs: DocumentNode; @@ -101,5 +101,22 @@ describe("https://github.com/neo4j/graphql/issues/1566", () => { } RETURN this { .id, hasFeedItems: this0 } AS this" `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": 4656564, + \\"high\\": 0 + }, + \\"param1\\": { + \\"low\\": 10, + \\"high\\": 0 + }, + \\"param2\\": { + \\"low\\": 0, + \\"high\\": 0 + } + }" + `); }); }); From da672e8bfd8209b9e0b49dd8f74f39f3080a6b77 Mon Sep 17 00:00:00 2001 From: a-alle Date: Thu, 14 Sep 2023 15:52:50 +0100 Subject: [PATCH 078/162] generated cypher changes due to order of inputs from resolveTree --- .../graphql/tests/tck/issues/1182.test.ts | 12 ++--- .../graphql/tests/tck/issues/2396.test.ts | 36 +++++++-------- .../tests/tck/subscriptions/create.test.ts | 44 +++++++++---------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/packages/graphql/tests/tck/issues/1182.test.ts b/packages/graphql/tests/tck/issues/1182.test.ts index be108ecf8c..940e1b93ef 100644 --- a/packages/graphql/tests/tck/issues/1182.test.ts +++ b/packages/graphql/tests/tck/issues/1182.test.ts @@ -89,8 +89,8 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { MERGE (this0_actors_connectOrCreate0:Actor { id: $this0_actors_connectOrCreate_param0 }) ON CREATE SET this0_actors_connectOrCreate0.name = $this0_actors_connectOrCreate_param1, - this0_actors_connectOrCreate0.homeAddress = $this0_actors_connectOrCreate_param2, - this0_actors_connectOrCreate0.dob = $this0_actors_connectOrCreate_param3 + this0_actors_connectOrCreate0.dob = $this0_actors_connectOrCreate_param2, + this0_actors_connectOrCreate0.homeAddress = $this0_actors_connectOrCreate_param3 MERGE (this0)<-[this0_actors_connectOrCreate_this0:ACTED_IN]-(this0_actors_connectOrCreate0) RETURN count(*) AS _ } @@ -105,10 +105,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { \\"this0_actors_connectOrCreate_param0\\": \\"1\\", \\"this0_actors_connectOrCreate_param1\\": \\"Tom Hanks\\", \\"this0_actors_connectOrCreate_param2\\": { - \\"longitude\\": 1, - \\"latitude\\": 2 - }, - \\"this0_actors_connectOrCreate_param3\\": { \\"year\\": 1970, \\"month\\": 1, \\"day\\": 1, @@ -118,6 +114,10 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { \\"nanosecond\\": 0, \\"timeZoneOffsetSeconds\\": 0 }, + \\"this0_actors_connectOrCreate_param3\\": { + \\"longitude\\": 1, + \\"latitude\\": 2 + }, \\"resolvedCallbacks\\": {} }" `); diff --git a/packages/graphql/tests/tck/issues/2396.test.ts b/packages/graphql/tests/tck/issues/2396.test.ts index f2d8fd8253..a813cd0ce8 100644 --- a/packages/graphql/tests/tck/issues/2396.test.ts +++ b/packages/graphql/tests/tck/issues/2396.test.ts @@ -177,7 +177,7 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { RETURN count(this2) = 1 AS var4 } WITH * - WHERE (this1.area >= $param1 AND this1.floor >= $param2 AND this1.estateType IN $param3 AND var4 = true) + WHERE (this1.estateType IN $param1 AND this1.area >= $param2 AND this1.floor >= $param3 AND var4 = true) RETURN count(this1) = 1 AS var5 } WITH * @@ -208,14 +208,14 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { \\"param0\\": [ \\"13001\\" ], - \\"param1\\": 0, - \\"param2\\": { + \\"param1\\": [ + \\"APARTMENT\\" + ], + \\"param2\\": 0, + \\"param3\\": { \\"low\\": 0, \\"high\\": 0 }, - \\"param3\\": [ - \\"APARTMENT\\" - ], \\"param4\\": 0, \\"isAuthenticated\\": true }" @@ -280,7 +280,7 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { RETURN count(this2) = 1 AS var4 } WITH * - WHERE (this1.area >= $param1 AND this1.floor >= $param2 AND this1.estateType IN $param3 AND var4 = true) + WHERE (this1.estateType IN $param1 AND this1.area >= $param2 AND this1.floor >= $param3 AND var4 = true) RETURN count(this1) = 1 AS var5 } WITH * @@ -314,14 +314,14 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { \\"param0\\": [ \\"13001\\" ], - \\"param1\\": 0, - \\"param2\\": { + \\"param1\\": [ + \\"APARTMENT\\" + ], + \\"param2\\": 0, + \\"param3\\": { \\"low\\": 0, \\"high\\": 0 }, - \\"param3\\": [ - \\"APARTMENT\\" - ], \\"param4\\": 0, \\"isAuthenticated\\": true, \\"param6\\": { @@ -394,7 +394,7 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { RETURN count(this2) = 1 AS var4 } WITH * - WHERE (this1.area >= $param1 AND this1.floor >= $param2 AND this1.estateType IN $param3 AND var4 = true) + WHERE (this1.estateType IN $param1 AND this1.area >= $param2 AND this1.floor >= $param3 AND var4 = true) RETURN count(this1) = 1 AS var5 } WITH * @@ -428,14 +428,14 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { \\"param0\\": [ \\"13001\\" ], - \\"param1\\": 0, - \\"param2\\": { + \\"param1\\": [ + \\"APARTMENT\\" + ], + \\"param2\\": 0, + \\"param3\\": { \\"low\\": 0, \\"high\\": 0 }, - \\"param3\\": [ - \\"APARTMENT\\" - ], \\"param4\\": 0, \\"isAuthenticated\\": true, \\"param6\\": { diff --git a/packages/graphql/tests/tck/subscriptions/create.test.ts b/packages/graphql/tests/tck/subscriptions/create.test.ts index 9878c7f2c2..4bcbeac93e 100644 --- a/packages/graphql/tests/tck/subscriptions/create.test.ts +++ b/packages/graphql/tests/tck/subscriptions/create.test.ts @@ -399,18 +399,18 @@ describe("Subscriptions metadata on create", () => { WITH [] AS meta CREATE (this0:Movie) SET this0.title = $this0_title - CREATE (this0_directors_Actor0_node:Actor) - SET this0_directors_Actor0_node.name = $this0_directors_Actor0_node_name - WITH meta + { event: \\"create\\", id: id(this0_directors_Actor0_node), properties: { old: null, new: this0_directors_Actor0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_directors_Actor0_node - MERGE (this0)<-[this0_directors_Actor0_relationship:DIRECTED]-(this0_directors_Actor0_node) - SET this0_directors_Actor0_relationship.year = $this0_directors_Actor0_relationship_year - WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0), id: id(this0_directors_Actor0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0 { .* }, relationship: this0_directors_Actor0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node CREATE (this0_directors_Person0_node:Person) SET this0_directors_Person0_node.name = $this0_directors_Person0_node_name WITH meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta, this0, this0_directors_Person0_node MERGE (this0)<-[this0_directors_Person0_relationship:DIRECTED]-(this0_directors_Person0_node) SET this0_directors_Person0_relationship.year = $this0_directors_Person0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Person0_node), id_to: id(this0), id: id(this0_directors_Person0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Person\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Person0_node { .* }, to: this0 { .* }, relationship: this0_directors_Person0_relationship { .* } } } AS meta, this0, this0_directors_Person0_node + CREATE (this0_directors_Actor0_node:Actor) + SET this0_directors_Actor0_node.name = $this0_directors_Actor0_node_name + WITH meta + { event: \\"create\\", id: id(this0_directors_Actor0_node), properties: { old: null, new: this0_directors_Actor0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_directors_Actor0_node + MERGE (this0)<-[this0_directors_Actor0_relationship:DIRECTED]-(this0_directors_Actor0_node) + SET this0_directors_Actor0_relationship.year = $this0_directors_Actor0_relationship_year + WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0), id: id(this0_directors_Actor0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0 { .* }, relationship: this0_directors_Actor0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 RETURN this0, meta AS this0_meta } @@ -436,16 +436,16 @@ describe("Subscriptions metadata on create", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"this0_title\\": \\"The Matrix\\", - \\"this0_directors_Actor0_node_name\\": \\"Keanu Reeves\\", - \\"this0_directors_Actor0_relationship_year\\": { - \\"low\\": 2420, - \\"high\\": 0 - }, \\"this0_directors_Person0_node_name\\": \\"Lilly Wachowski\\", \\"this0_directors_Person0_relationship_year\\": { \\"low\\": 1999, \\"high\\": 0 }, + \\"this0_directors_Actor0_node_name\\": \\"Keanu Reeves\\", + \\"this0_directors_Actor0_relationship_year\\": { + \\"low\\": 2420, + \\"high\\": 0 + }, \\"resolvedCallbacks\\": {} }" `); @@ -539,6 +539,12 @@ describe("Subscriptions metadata on create", () => { WITH [] AS meta CREATE (this0:Movie) SET this0.title = $this0_title + CREATE (this0_directors_Person0_node:Person) + SET this0_directors_Person0_node.name = $this0_directors_Person0_node_name + WITH meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta, this0, this0_directors_Person0_node + MERGE (this0)<-[this0_directors_Person0_relationship:DIRECTED]-(this0_directors_Person0_node) + SET this0_directors_Person0_relationship.year = $this0_directors_Person0_relationship_year + WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Person0_node), id_to: id(this0), id: id(this0_directors_Person0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Person\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Person0_node { .* }, to: this0 { .* }, relationship: this0_directors_Person0_relationship { .* } } } AS meta, this0, this0_directors_Person0_node CREATE (this0_directors_Actor0_node:Actor) SET this0_directors_Actor0_node.name = $this0_directors_Actor0_node_name CREATE (this0_directors_Actor0_node_movies0_node:Movie) @@ -551,12 +557,6 @@ describe("Subscriptions metadata on create", () => { MERGE (this0)<-[this0_directors_Actor0_relationship:DIRECTED]-(this0_directors_Actor0_node) SET this0_directors_Actor0_relationship.year = $this0_directors_Actor0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0), id: id(this0_directors_Actor0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0 { .* }, relationship: this0_directors_Actor0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node - CREATE (this0_directors_Person0_node:Person) - SET this0_directors_Person0_node.name = $this0_directors_Person0_node_name - WITH meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta, this0, this0_directors_Person0_node - MERGE (this0)<-[this0_directors_Person0_relationship:DIRECTED]-(this0_directors_Person0_node) - SET this0_directors_Person0_relationship.year = $this0_directors_Person0_relationship_year - WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Person0_node), id_to: id(this0), id: id(this0_directors_Person0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Person\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Person0_node { .* }, to: this0 { .* }, relationship: this0_directors_Person0_relationship { .* } } } AS meta, this0, this0_directors_Person0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 RETURN this0, meta AS this0_meta } @@ -588,6 +588,11 @@ describe("Subscriptions metadata on create", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"this0_title\\": \\"The Matrix\\", + \\"this0_directors_Person0_node_name\\": \\"Lilly Wachowski\\", + \\"this0_directors_Person0_relationship_year\\": { + \\"low\\": 1999, + \\"high\\": 0 + }, \\"this0_directors_Actor0_node_name\\": \\"Keanu Reeves\\", \\"this0_directors_Actor0_node_movies0_node_title\\": \\"Funny movie\\", \\"this0_directors_Actor0_node_movies0_relationship_screenTime\\": { @@ -598,11 +603,6 @@ describe("Subscriptions metadata on create", () => { \\"low\\": 2420, \\"high\\": 0 }, - \\"this0_directors_Person0_node_name\\": \\"Lilly Wachowski\\", - \\"this0_directors_Person0_relationship_year\\": { - \\"low\\": 1999, - \\"high\\": 0 - }, \\"resolvedCallbacks\\": {} }" `); From 54eb05d2e3acccf50b88d644835e711e2a551f66 Mon Sep 17 00:00:00 2001 From: a-alle Date: Thu, 14 Sep 2023 16:03:12 +0100 Subject: [PATCH 079/162] update tests with descriptions --- packages/ogm/src/generate.test.ts | 20 ++++++++++++++++++++ packages/ogm/tests/issues/3591.test.ts | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/packages/ogm/src/generate.test.ts b/packages/ogm/src/generate.test.ts index a1f27217b0..006b79f6bc 100644 --- a/packages/ogm/src/generate.test.ts +++ b/packages/ogm/src/generate.test.ts @@ -126,6 +126,7 @@ describe("generate", () => { update?: InputMaybe; }; + /** SortDirection */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -133,6 +134,7 @@ describe("generate", () => { Desc = \\"DESC\\", } + /** CreateInfo */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -147,6 +149,7 @@ describe("generate", () => { users: Array; }; + /** DeleteInfo */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -170,6 +173,7 @@ describe("generate", () => { longest?: Maybe; }; + /** UpdateInfo */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -419,6 +423,7 @@ describe("generate", () => { update?: InputMaybe; }; + /** SortDirection */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -426,6 +431,7 @@ describe("generate", () => { Desc = \\"DESC\\", } + /** CreateInfo */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -440,6 +446,7 @@ describe("generate", () => { users: Array; }; + /** DeleteInfo */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -463,6 +470,7 @@ describe("generate", () => { longest?: Maybe; }; + /** UpdateInfo */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -740,6 +748,7 @@ describe("generate", () => { update?: InputMaybe; }; + /** SortDirection */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -747,6 +756,7 @@ describe("generate", () => { Desc = \\"DESC\\", } + /** CreateInfo */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -761,6 +771,7 @@ describe("generate", () => { users: Array; }; + /** DeleteInfo */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -784,6 +795,7 @@ describe("generate", () => { longest?: Maybe; }; + /** UpdateInfo */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1065,6 +1077,7 @@ describe("generate", () => { update?: InputMaybe; }; + /** SortDirection */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -1076,6 +1089,7 @@ describe("generate", () => { screenTime: Scalars[\\"Int\\"][\\"output\\"]; }; + /** CreateInfo */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1096,6 +1110,7 @@ describe("generate", () => { people: Array; }; + /** DeleteInfo */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1228,6 +1243,7 @@ describe("generate", () => { longest: Scalars[\\"String\\"][\\"output\\"]; }; + /** UpdateInfo */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1865,6 +1881,7 @@ describe("generate", () => { connectOrCreate?: InputMaybe; }; + /** SortDirection */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -1888,6 +1905,7 @@ describe("generate", () => { faqs: Array; }; + /** CreateInfo */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1896,6 +1914,7 @@ describe("generate", () => { relationshipsCreated: Scalars[\\"Int\\"][\\"output\\"]; }; + /** DeleteInfo */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -2109,6 +2128,7 @@ describe("generate", () => { faqs: Array; }; + /** UpdateInfo */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ diff --git a/packages/ogm/tests/issues/3591.test.ts b/packages/ogm/tests/issues/3591.test.ts index f47c29ec80..855387378b 100644 --- a/packages/ogm/tests/issues/3591.test.ts +++ b/packages/ogm/tests/issues/3591.test.ts @@ -203,6 +203,7 @@ describe("issues/3591", () => { update?: InputMaybe; }; + /** SortDirection */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -246,6 +247,7 @@ describe("issues/3591", () => { companies: Array; }; + /** CreateInfo */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -266,6 +268,7 @@ describe("issues/3591", () => { users: Array; }; + /** DeleteInfo */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -325,6 +328,7 @@ describe("issues/3591", () => { companies: Array; }; + /** UpdateInfo */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ From 08d36907bb45c53f853ff520231bcacab2cdfad3 Mon Sep 17 00:00:00 2001 From: a-alle Date: Thu, 14 Sep 2023 17:43:22 +0100 Subject: [PATCH 080/162] massive subscriptions refactor to schemaModel --- .../model-adapters/AttributeAdapter.ts | 35 ++ .../model-adapters/ConcreteEntityAdapter.ts | 12 + .../model-adapters/RelationshipAdapter.ts | 5 + .../src/schema/new-make-augmented-schema.ts | 23 +- .../check-authentication-selection-set.ts | 27 +- .../authentication/check-authentication.ts | 4 +- .../authentication/selection-set-parser.ts | 11 +- .../resolvers/subscriptions/subscribe.ts | 73 +++- .../subscriptions/where/authorization.ts | 45 +- .../filters/filter-by-authorization-rules.ts | 128 +++++- .../where/filters/filter-by-properties.ts | 90 +++- .../filter-by-relationship-properties.ts | 90 +++- .../where/utils/filter-relationship-key.ts | 121 +++++- .../where/utils/get-filtering-fn.ts | 15 + .../subscriptions/where/utils/type-checks.ts | 15 + .../resolvers/subscriptions/where/where.ts | 48 ++- .../generate-subscription-connection-types.ts | 135 +++++- .../generate-subscription-types.ts | 394 +++++++++++++++++- .../generate-subscription-where-type.ts | 293 ++++++++++++- packages/graphql/src/schema/to-compose.ts | 71 ++++ 20 files changed, 1606 insertions(+), 29 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index f52f5a648c..8b71548b48 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -207,6 +207,41 @@ export class AttributeAdapter { return this.isEnum() || this.isSpatial() || this.isScalar(); } + /** + * + ...node.primitiveFields, + ...node.enumFields, + ...node.scalarFields, + ...node.temporalFields, + ...node.pointFields, + ...node.cypherFields, + */ + isEventPayloadField(): boolean { + return this.isEnum() || this.isSpatial() || this.isScalar(); + } + /** + * + ...node.primitiveFields, + ...node.enumFields, + ...node.scalarFields, + ...node.temporalFields, + ...node.pointFields, + */ + isSubscriptionWhereField(): boolean { + return (this.isEnum() || this.isSpatial() || this.isScalar()) && !this.isCypher(); + } + /** + * + ...node.primitiveFields, + ...node.enumFields, + ...node.scalarFields, + ...node.temporalFields, + ...node.pointFields, + */ + isSubscriptionConnectedRelationshipField(): boolean { + return (this.isEnum() || this.isSpatial() || this.isScalar()) && !this.isCypher(); + } + /** * [ * ...node.primitiveFields, diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts index 346a94e84b..79f93c17b0 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts @@ -159,6 +159,13 @@ export class ConcreteEntityAdapter { return Array.from(this.attributes.values()).filter((attribute) => attribute.isTemporal()); } + public get subscriptionEventPayloadFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isEventPayloadField()); + } + public get subscriptionWhereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isSubscriptionWhereField()); + } + // TODO: identify usage of old Node.[getLabels | getLabelsString] and migrate them if needed public getLabels(): string[] { return Array.from(this.labels); @@ -197,6 +204,11 @@ export class ConcreteEntityAdapter { return this._operations; } + get isSubscribable(): boolean { + // return !!this.annotations.subscription?.events?.length; + return this.annotations.subscription === undefined || this.annotations.subscription.events?.length > 0; + } + // TODO: Implement the Globals methods toGlobalId and fromGlobalId, getGlobalId etc... get globalIdField() { return this._globalIdField; 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 3a7a7251f2..e852a6c28c 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -330,6 +330,11 @@ export class RelationshipAdapter { public get nonGeneratedProperties(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isNonGeneratedField()); } + public get subscriptionConnectedRelationshipFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => + attribute.isSubscriptionConnectedRelationshipField() + ); + } public get hasNonNullNonGeneratedProperties(): boolean { return this.nonGeneratedProperties.some((property) => property.isRequired()); diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 424c91f36c..2e05ab4358 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -118,7 +118,7 @@ import { schemaConfigurationFromObjectTypeDefinition, schemaConfigurationFromSchemaExtensions, } from "./schema-configuration"; -import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; +import { generateSubscriptionTypes, generateSubscriptionTypes2 } from "./subscriptions/generate-subscription-types"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; @@ -829,6 +829,11 @@ function makeAugmentedSchema( interfaceCommonFields.set(interfaceEntityAdapter.name, interfaceFields); }); + const userDefinedFieldDirectivesForNode = new Map>(); + for (const definitionNode of definitionNodes.objectTypes) { + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } nodes.forEach((node) => { const concreteEntity = schemaModel.getEntity(node.name) as ConcreteEntity; const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); @@ -842,7 +847,10 @@ function makeAugmentedSchema( return; } - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(concreteEntityAdapter.name); + if (!userDefinedFieldDirectives) { + throw new Error("fix user directives for object types."); + } const nodeFields = attributeAdapterToComposeFields( concreteEntityAdapter.objectFields, @@ -1160,9 +1168,18 @@ function makeAugmentedSchema( }); if (generateSubscriptions && nodes.length) { - generateSubscriptionTypes({ + // generateSubscriptionTypes({ + // schemaComposer: composer, + // nodes, + // relationshipFields, + // interfaceCommonFields, + // globalSchemaConfiguration, + // }); + generateSubscriptionTypes2({ schemaComposer: composer, + schemaModel, nodes, + userDefinedFieldDirectivesForNode, relationshipFields, interfaceCommonFields, globalSchemaConfiguration, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication-selection-set.ts b/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication-selection-set.ts index 07f46ce67b..70df9fb8d8 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication-selection-set.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication-selection-set.ts @@ -27,6 +27,7 @@ import type { SelectionFields } from "./selection-set-parser"; import { parseSelectionSetForAuthenticated } from "./selection-set-parser"; import { checkAuthentication } from "./check-authentication"; import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; +import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; export function checkAuthenticationOnSelectionSet( resolveInfo: GraphQLResolveInfo, @@ -54,6 +55,28 @@ export function checkAuthenticationOnSelectionSet( checkAuthenticationOnSelection({ entity, fieldSelection, context }) ); } +export function checkAuthenticationOnSelectionSet2( + resolveInfo: GraphQLResolveInfo, + entityAdapter: ConcreteEntityAdapter, + type: SubscriptionEventType, + context: Neo4jGraphQLComposedSubscriptionsContext +) { + const resolveTree = parseResolveInfo(resolveInfo) as ResolveTree | undefined | null; + if (!resolveTree) { + return; + } + + const authenticatedSelections = parseSelectionSetForAuthenticated({ + resolveTree, + entity: entityAdapter, + entityTypeName: entityAdapter.operations.subscriptionEventTypeNames[type], + entityPayloadTypeName: entityAdapter.operations.subscriptionEventPayloadFieldNames[type], + context, + }); + authenticatedSelections.forEach(({ entity, fieldSelection }) => + checkAuthenticationOnSelection({ entity, fieldSelection, context }) + ); +} function checkAuthenticationOnSelection({ fieldSelection, @@ -61,12 +84,12 @@ function checkAuthenticationOnSelection({ context, }: { fieldSelection: SelectionFields; - entity: ConcreteEntity; + entity: ConcreteEntity | ConcreteEntityAdapter; context: Neo4jGraphQLComposedSubscriptionsContext; }) { checkAuthentication({ authenticated: entity, operation: "READ", context }); for (const selectedField of Object.values(fieldSelection)) { - const field = entity.findAttribute(selectedField.name); + const field = entity.attributes.get(selectedField.name); if (field) { checkAuthentication({ authenticated: field, operation: "READ", context }); } diff --git a/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication.ts b/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication.ts index 40d83314de..5d4bd580e4 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication.ts @@ -24,7 +24,9 @@ import type { AuthenticationOperation, } from "../../../../schema-model/annotation/AuthenticationAnnotation"; import type { Attribute } from "../../../../schema-model/attribute/Attribute"; +import type { AttributeAdapter } from "../../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEntity"; +import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { filterByValues } from "../../../../translate/authorization/utils/filter-by-values"; import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; @@ -33,7 +35,7 @@ export function checkAuthentication({ operation, context, }: { - authenticated: ConcreteEntity | Attribute; + authenticated: ConcreteEntity | Attribute | ConcreteEntityAdapter | AttributeAdapter; operation: AuthenticationOperation; context: Neo4jGraphQLComposedSubscriptionsContext; }) { diff --git a/packages/graphql/src/schema/resolvers/subscriptions/authentication/selection-set-parser.ts b/packages/graphql/src/schema/resolvers/subscriptions/authentication/selection-set-parser.ts index 9ff529c98a..a52bc9d506 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/authentication/selection-set-parser.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/authentication/selection-set-parser.ts @@ -21,6 +21,7 @@ import type { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEnt import type { FieldsByTypeName, ResolveTree } from "graphql-parse-resolve-info"; import { upperFirst } from "../../../../utils/upper-first"; import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; +import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; export type SelectionFields = { [k: string]: ResolveTree }; export function parseSelectionSetForAuthenticated({ @@ -31,12 +32,12 @@ export function parseSelectionSetForAuthenticated({ context, }: { resolveTree: ResolveTree; - entity: ConcreteEntity; + entity: ConcreteEntity | ConcreteEntityAdapter; entityTypeName: string; entityPayloadTypeName: string; context: Neo4jGraphQLComposedSubscriptionsContext; -}): { entity: ConcreteEntity; fieldSelection: SelectionFields }[] { - const authenticated: { entity: ConcreteEntity; fieldSelection: SelectionFields }[] = []; +}): { entity: ConcreteEntity | ConcreteEntityAdapter; fieldSelection: SelectionFields }[] { + const authenticated: { entity: ConcreteEntity | ConcreteEntityAdapter; fieldSelection: SelectionFields }[] = []; const selectionSet = getSelected(resolveTree, entityTypeName); for (const [k, selection] of Object.entries(selectionSet)) { if (k === entityPayloadTypeName || k === "previousState") { @@ -98,10 +99,10 @@ function getTargetEntities({ relationshipField, }: { context: Neo4jGraphQLComposedSubscriptionsContext; - entity: ConcreteEntity; + entity: ConcreteEntity | ConcreteEntityAdapter; relationshipField: ResolveTree; }): ConcreteEntity[] | undefined { - const relationship = entity.findRelationship(relationshipField.name); + const relationship = entity.relationships.get(relationshipField.name); if (!relationship) { return; } diff --git a/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts b/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts index d792a23e97..80d053b135 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts @@ -25,12 +25,16 @@ import type { NodeSubscriptionsEvent, RelationshipSubscriptionsEvent, Subscripti import { filterAsyncIterator } from "./filter-async-iterator"; import type { SubscriptionEventType } from "./types"; import { updateDiffFilter } from "./update-diff-filter"; -import { subscriptionWhere } from "./where/where"; -import { subscriptionAuthorization } from "./where/authorization"; +import { subscriptionWhere, subscriptionWhere2 } from "./where/where"; +import { subscriptionAuthorization, subscriptionAuthorization2 } from "./where/authorization"; import type { GraphQLResolveInfo } from "graphql"; import { checkAuthentication } from "./authentication/check-authentication"; -import { checkAuthenticationOnSelectionSet } from "./authentication/check-authentication-selection-set"; +import { + checkAuthenticationOnSelectionSet, + checkAuthenticationOnSelectionSet2, +} from "./authentication/check-authentication-selection-set"; import type { Neo4jGraphQLComposedSubscriptionsContext } from "../composition/wrap-subscription"; +import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; export function subscriptionResolve(payload: [SubscriptionsEvent]): SubscriptionsEvent { if (!payload) { @@ -112,3 +116,66 @@ export function generateSubscribeMethod({ throw new Neo4jGraphQLError(`Invalid type in subscription: ${type}`); }; } +export function generateSubscribeMethod2({ + entityAdapter, + type, + nodes, + relationshipFields, +}: { + entityAdapter: ConcreteEntityAdapter; + type: SubscriptionEventType; + nodes?: Node[]; + relationshipFields?: Map; +}) { + return ( + _root: any, + args: SubscriptionArgs, + context: Neo4jGraphQLComposedSubscriptionsContext, + resolveInfo: GraphQLResolveInfo + ): AsyncIterator<[SubscriptionsEvent]> => { + checkAuthenticationOnSelectionSet2(resolveInfo, entityAdapter, type, context); + + checkAuthentication({ authenticated: entityAdapter, operation: "SUBSCRIBE", context }); + + const iterable: AsyncIterableIterator<[SubscriptionsEvent]> = on(context.subscriptionsEngine.events, type); + if (["create", "update", "delete"].includes(type)) { + return filterAsyncIterator<[SubscriptionsEvent]>(iterable, (data) => { + return ( + (data[0] as NodeSubscriptionsEvent).typename === entityAdapter.name && + subscriptionAuthorization2({ event: data[0], entity: entityAdapter, context }) && + subscriptionWhere2({ where: args.where, event: data[0], entityAdapter }) && + updateDiffFilter(data[0]) + ); + }); + } + + if (["create_relationship", "delete_relationship"].includes(type)) { + return filterAsyncIterator<[SubscriptionsEvent]>(iterable, (data) => { + const relationEventPayload = data[0] as RelationshipSubscriptionsEvent; + const isOfRelevantType = + relationEventPayload.toTypename === entityAdapter.name || + relationEventPayload.fromTypename === entityAdapter.name; + if (!isOfRelevantType) { + return false; + } + const relationFieldName = Array.from(entityAdapter.relationships.values()).find( + (r) => r.type === relationEventPayload.relationshipName + )?.name; + + return ( + !!relationFieldName && + subscriptionAuthorization2({ + event: data[0], + entity: entityAdapter, + nodes, + relationshipFields, + context, + }) && + subscriptionWhere2({ where: args.where, event: data[0], entityAdapter, nodes, relationshipFields }) + ); + }); + } + + throw new Neo4jGraphQLError(`Invalid type in subscription: ${type}`); + }; +} diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts index dcbc4f2061..e6e33e7f29 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts @@ -20,11 +20,12 @@ import type { SubscriptionsEvent } from "../../../../types"; import type Node from "../../../../classes/Node"; import type { ObjectFields } from "../../../get-obj-field-meta"; -import { filterByAuthorizationRules } from "./filters/filter-by-authorization-rules"; +import { filterByAuthorizationRules, filterByAuthorizationRules2 } from "./filters/filter-by-authorization-rules"; import type { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEntity"; import { multipleConditionsAggregationMap } from "./utils/multiple-conditions-aggregation-map"; import { populateWhereParams } from "./utils/populate-where-params"; import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; +import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; export function subscriptionAuthorization({ event, @@ -70,3 +71,45 @@ export function subscriptionAuthorization({ return multipleConditionsAggregationMap.OR(results); } +export function subscriptionAuthorization2({ + event, + entity, + nodes, + relationshipFields, + context, +}: { + event: SubscriptionsEvent; + entity: ConcreteEntityAdapter; + nodes?: Node[]; + relationshipFields?: Map; + context: Neo4jGraphQLComposedSubscriptionsContext; +}): boolean { + const subscriptionsAuthorization = entity.annotations.subscriptionsAuthorization; + + const matchedRules = (subscriptionsAuthorization?.filter || []).filter((rule) => + rule.events.some((e) => e.toLowerCase() === event.event) + ); + + if (!matchedRules.length) { + return true; + } + + const results = matchedRules.map((rule) => { + if (rule.requireAuthentication && !context.authorization.jwt) { + return false; + } + + const where = populateWhereParams({ where: rule.where, context }); + + return filterByAuthorizationRules2({ + entityAdapter: entity, + where, + event, + nodes, + relationshipFields, + context, + }); + }); + + return multipleConditionsAggregationMap.OR(results); +} diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts index c1f40e7ede..231c23b8b6 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts @@ -20,12 +20,14 @@ import type { Node, RelationField, RelationshipSubscriptionsEvent, SubscriptionsEvent } from "../../../../../types"; import type { ObjectFields } from "../../../../get-obj-field-meta"; import type { RecordType, RelationshipType } from "../../types"; -import { filterByProperties } from "./filter-by-properties"; +import { filterByProperties, filterByProperties2 } from "./filter-by-properties"; import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; -import { filterRelationshipKey } from "../utils/filter-relationship-key"; +import { filterRelationshipKey, filterRelationshipKey2 } from "../utils/filter-relationship-key"; import { filterByValues } from "../../../../../translate/authorization/utils/filter-by-values"; import type { SubscriptionsAuthorizationWhere } from "../../../../../schema-model/annotation/SubscriptionsAuthorizationAnnotation"; import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../../composition/wrap-subscription"; +import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; function isRelationshipSubscriptionsEvent(event: SubscriptionsEvent): event is RelationshipSubscriptionsEvent { return ["create_relationship", "delete_relationship"].includes(event.event); @@ -147,3 +149,125 @@ export function filterByAuthorizationRules({ return multipleConditionsAggregationMap.AND(results); } +export function filterByAuthorizationRules2({ + entityAdapter, + where, + event, + nodes, + relationshipFields, + context, +}: { + entityAdapter: ConcreteEntityAdapter; + where: + | SubscriptionsAuthorizationWhere + | Record< + string, + RecordType | Record | Array> + >; + event: SubscriptionsEvent; + nodes?: Node[]; + relationshipFields?: Map; + context: Neo4jGraphQLComposedSubscriptionsContext; +}): boolean { + const receivedEventProperties = event.properties; + + const results = Object.entries(where).map(([wherePropertyKey, wherePropertyValue]) => { + if (Object.keys(multipleConditionsAggregationMap).includes(wherePropertyKey)) { + const comparisonResultsAggregationFn = multipleConditionsAggregationMap[wherePropertyKey]; + let comparisonResults; + if (wherePropertyKey === "NOT") { + comparisonResults = filterByAuthorizationRules2({ + entityAdapter, + where: wherePropertyValue as Record, + event, + nodes, + relationshipFields, + context, + }); + } else { + comparisonResults = (wherePropertyValue as Array>).map((whereCl) => { + return filterByAuthorizationRules2({ + entityAdapter, + where: whereCl, + event, + nodes, + relationshipFields, + context, + }); + }); + } + + if (!comparisonResultsAggregationFn(comparisonResults)) { + return false; + } + } + + if (wherePropertyKey === "node") { + switch (event.event) { + case "create": + return filterByProperties2({ + entityAdapter, + whereProperties: wherePropertyValue, + receivedProperties: event.properties.new, + }); + case "update": + case "delete": + return filterByProperties2({ + entityAdapter, + whereProperties: wherePropertyValue, + receivedProperties: event.properties.old, + }); + case "create_relationship": + case "delete_relationship": { + const receivedEventRelationshipType = event.relationshipName; + // TODO: this was f.type + const relationships = Array.from(entityAdapter.relationships.values()).filter( + (f) => f.type === receivedEventRelationshipType + ); + if (!relationships.length) { + return false; + } + const receivedEventRelationship = relationships[0] as RelationshipAdapter; // ONE relationship only possible + const key = receivedEventRelationship.direction === "IN" ? "to" : "from"; + return filterByProperties2({ + entityAdapter, + whereProperties: wherePropertyValue, + receivedProperties: receivedEventProperties[key], + }); + } + } + } + + if (wherePropertyKey === "relationship") { + if (!nodes || !relationshipFields || !isRelationshipSubscriptionsEvent(event)) { + return false; + } + + const receivedEventRelationshipType = event.relationshipName; + // TODO: this was f.typeUnescaped + const relationships = Array.from(entityAdapter.relationships.values()).filter( + (f) => f.type === receivedEventRelationshipType + ); + const receivedEventRelationship = relationships[0]; // ONE relationship only possible + if (!receivedEventRelationship) { + return false; + } + + return filterRelationshipKey2({ + receivedEventRelationship, + where: wherePropertyValue, + relationshipFields, + receivedEvent: event, + nodes, + }); + } + + if (wherePropertyKey === "jwt") { + return filterByValues(wherePropertyValue, context.authorization.jwt as Record); + } + + return true; + }); + + return multipleConditionsAggregationMap.AND(results); +} diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts index 473a5d0f4e..36673295f8 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts @@ -18,8 +18,10 @@ */ import { int } from "neo4j-driver"; +import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; +import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { Node, PrimitiveField } from "../../../../../types"; -import { getFilteringFn } from "../utils/get-filtering-fn"; +import { getFilteringFn, getFilteringFn2 } from "../utils/get-filtering-fn"; import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; import { parseFilterProperty } from "../utils/parse-filter-property"; import { isFloatType, isIDAsString, isStringType } from "../utils/type-checks"; @@ -70,6 +72,52 @@ export function filterByProperties({ return true; } +/** Returns true if receivedProperties comply with filters specified in whereProperties, false otherwise. */ +export function filterByProperties2({ + entityAdapter, + whereProperties, + receivedProperties, +}: { + entityAdapter: ConcreteEntityAdapter; + whereProperties: Record> | Record>; + receivedProperties: Record; +}): boolean { + for (const [k, v] of Object.entries(whereProperties)) { + if (Object.keys(multipleConditionsAggregationMap).includes(k)) { + const comparisonResultsAggregationFn = multipleConditionsAggregationMap[k]; + let comparisonResults; + if (k === "NOT") { + comparisonResults = filterByProperties2({ + entityAdapter, + whereProperties: v as Record, + receivedProperties, + }); + } else { + comparisonResults = (v as Array>).map((whereCl) => { + return filterByProperties2({ entityAdapter, whereProperties: whereCl, receivedProperties }); + }); + } + + if (!comparisonResultsAggregationFn(comparisonResults)) { + return false; + } + } else { + const { fieldName, operator } = parseFilterProperty(k); + const receivedValue = receivedProperties[fieldName]; + if (!receivedValue) { + return false; + } + const fieldMeta = entityAdapter.attributes.get(fieldName); + const checkFilterPasses = getFilteringFn2(operator, operatorMapOverrides2); + + if (!checkFilterPasses(receivedValue, v, fieldMeta)) { + return false; + } + } + } + return true; +} + const operatorMapOverrides = { INCLUDES: (received: [string | number], filtered: string | number, fieldMeta: PrimitiveField | undefined) => { if (isFloatType(fieldMeta) || isStringType(fieldMeta) || isIDAsString(fieldMeta, filtered)) { @@ -104,3 +152,43 @@ const operatorMapOverrides = { return !filtered.some((r) => int(r).equals(receivedAsNeo4jInteger)); }, }; + +const isFloatOrStringOrIDAsString = (attributeAdapter: AttributeAdapter | undefined, value: string | number) => + attributeAdapter?.isFloat() || + attributeAdapter?.isString() || + (attributeAdapter?.isID() && int(value).toString() !== value); + +const operatorMapOverrides2 = { + INCLUDES: (received: [string | number], filtered: string | number, fieldMeta: AttributeAdapter | undefined) => { + if (isFloatOrStringOrIDAsString(fieldMeta, filtered)) { + return received.some((v) => v === filtered); + } + // int/ bigint + const filteredAsNeo4jInteger = int(filtered); + return received.some((r) => int(r).equals(filteredAsNeo4jInteger)); + }, + NOT_INCLUDES: (received: [string | number], filtered: string | number, fieldMeta: AttributeAdapter | undefined) => { + if (isFloatOrStringOrIDAsString(fieldMeta, filtered)) { + return !received.some((v) => v === filtered); + } + // int/ bigint + const filteredAsNeo4jInteger = int(filtered); + return !received.some((r) => int(r).equals(filteredAsNeo4jInteger)); + }, + IN: (received: string | number, filtered: [string | number], fieldMeta: AttributeAdapter | undefined) => { + if (isFloatOrStringOrIDAsString(fieldMeta, received)) { + return filtered.some((v) => v === received); + } + // int/ bigint + const receivedAsNeo4jInteger = int(received); + return filtered.some((r) => int(r).equals(receivedAsNeo4jInteger)); + }, + NOT_IN: (received: string | number, filtered: [string | number], fieldMeta: AttributeAdapter | undefined) => { + if (isFloatOrStringOrIDAsString(fieldMeta, received)) { + return !filtered.some((v) => v === received); + } + // int/ bigint + const receivedAsNeo4jInteger = int(received); + return !filtered.some((r) => int(r).equals(receivedAsNeo4jInteger)); + }, +}; diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts index 71d9abd783..9d75ac1be3 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts @@ -20,10 +20,12 @@ import type { Node, RelationField, RelationshipSubscriptionsEvent } from "../../../../../types"; import type { ObjectFields } from "../../../../get-obj-field-meta"; import type { RecordType, RelationshipType } from "../../types"; -import { filterByProperties } from "./filter-by-properties"; +import { filterByProperties, filterByProperties2 } from "./filter-by-properties"; import { parseFilterProperty } from "../utils/parse-filter-property"; import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; -import { filterRelationshipKey } from "../utils/filter-relationship-key"; +import { filterRelationshipKey, filterRelationshipKey2 } from "../utils/filter-relationship-key"; +import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; export function filterByRelationshipProperties({ node, @@ -105,3 +107,87 @@ export function filterByRelationshipProperties({ } return true; } +export function filterByRelationshipProperties2({ + entityAdapter, + whereProperties, + receivedEvent, + nodes, + relationshipFields, +}: { + entityAdapter: ConcreteEntityAdapter; + whereProperties: Record< + string, + RecordType | Record | Array> + >; + receivedEvent: RelationshipSubscriptionsEvent; + nodes: Node[]; + relationshipFields: Map; +}): boolean { + const receivedEventProperties = receivedEvent.properties; + const receivedEventRelationshipType = receivedEvent.relationshipName; + // const relationships = node.relationFields.filter((f) => f.typeUnescaped === receivedEventRelationshipType); + // TODO: this was f.typeUnescaped + const relationships = Array.from(entityAdapter.relationships.values()).filter( + (f) => f.type === receivedEventRelationshipType + ); + if (!relationships.length) { + return false; + } + const receivedEventRelationship = relationships[0] as RelationshipAdapter; // ONE relationship only possible + + for (const [wherePropertyKey, wherePropertyValue] of Object.entries(whereProperties)) { + if (Object.keys(multipleConditionsAggregationMap).includes(wherePropertyKey)) { + const comparisonResultsAggregationFn = multipleConditionsAggregationMap[wherePropertyKey]; + let comparisonResults; + if (wherePropertyKey === "NOT") { + comparisonResults = filterByRelationshipProperties2({ + entityAdapter, + whereProperties: wherePropertyValue as Record, + receivedEvent, + nodes, + relationshipFields, + }); + } else { + comparisonResults = (wherePropertyValue as Array>).map((whereCl) => { + return filterByRelationshipProperties2({ + entityAdapter, + whereProperties: whereCl, + receivedEvent, + nodes, + relationshipFields, + }); + }); + } + + if (!comparisonResultsAggregationFn(comparisonResults)) { + return false; + } + } + const { fieldName } = parseFilterProperty(wherePropertyKey); + + const connectedNodeFieldName = entityAdapter.operations.subscriptionEventPayloadFieldNames.create_relationship; + if (fieldName === connectedNodeFieldName) { + const key = receivedEventRelationship.direction === "IN" ? "to" : "from"; + if ( + !filterByProperties2({ + entityAdapter, + whereProperties: wherePropertyValue, + receivedProperties: receivedEventProperties[key], + }) + ) { + return false; + } + } + + if (fieldName === "createdRelationship" || fieldName === "deletedRelationship") { + return filterRelationshipKey2({ + receivedEventRelationship, + where: wherePropertyValue, + relationshipFields, + receivedEvent, + nodes, + }); + } + } + return true; +} diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts index d7e6115699..3f29f4edd2 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts @@ -17,11 +17,19 @@ * limitations under the License. */ +import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { Node, RelationField, RelationshipSubscriptionsEvent } from "../../../../../types"; import type { ObjectFields } from "../../../../get-obj-field-meta"; import type { InterfaceType, RecordType, RelationshipType, StandardType, UnionType } from "../../types"; -import { filterByProperties } from "../filters/filter-by-properties"; -import { isInterfaceSpecificFieldType, isInterfaceType, isStandardType } from "./type-checks"; +import { filterByProperties, filterByProperties2 } from "../filters/filter-by-properties"; +import { + isInterfaceSpecificFieldType, + isInterfaceType, + isInterfaceType2, + isStandardType, + isStandardType2, +} from "./type-checks"; type EventProperties = { from: Record; @@ -137,6 +145,115 @@ export function filterRelationshipKey({ } return true; } +export function filterRelationshipKey2({ + receivedEventRelationship, + where, + relationshipFields, + receivedEvent, + nodes, +}: { + receivedEventRelationship: RelationshipAdapter; + where: RecordType | Record | Record[]; + relationshipFields: Map; + receivedEvent: RelationshipSubscriptionsEvent; + nodes: Node[]; +}): boolean { + const receivedEventProperties = receivedEvent.properties; + const receivedEventRelationshipName = receivedEventRelationship.name; + const receivedEventRelationshipData = where[receivedEventRelationshipName] as Record; + const isRelationshipOfReceivedTypeFilteredOut = !receivedEventRelationshipData; + if (isRelationshipOfReceivedTypeFilteredOut) { + // case `actors: {}` filtering out relationships of other type + return false; + } + const isRelationshipOfReceivedTypeIncludedWithNoFilters = !Object.keys(receivedEventRelationshipData).length; + if (isRelationshipOfReceivedTypeIncludedWithNoFilters) { + // case `actors: {}` including all relationships of the type + return true; + } + const relationshipPropertiesInterfaceName = receivedEventRelationship.propertiesTypeName || ""; + + const { edge: edgeProperty, node: nodeProperty, ...unionTypes } = receivedEventRelationshipData; + + // relationship properties + if (edgeProperty) { + // apply the filter + if ( + !filterRelationshipEdgeProperty({ + relationshipFields, + relationshipPropertiesInterfaceName, + edgeProperty, + receivedEventProperties, + }) + ) { + return false; + } + } + + const key = receivedEventRelationship.direction === "IN" ? "from" : "to"; + + const isSimpleRelationship = nodeProperty && isStandardType2(nodeProperty, receivedEventRelationship); + const isInterfaceRelationship = nodeProperty && isInterfaceType2(nodeProperty, receivedEventRelationship); + const isUnionRelationship = Object.keys(unionTypes).length; + + if (isSimpleRelationship) { + // const nodeTo = nodes.find((n) => n.name === receivedEventRelationship.typeMeta.name) as Node; + const nodeTo = receivedEventRelationship.target as ConcreteEntityAdapter; //TODO: fix ts. Should be concreteEntity since isSimpleRelationship right?? + + // apply the filter + if ( + !filterByProperties2({ + entityAdapter: nodeTo, + whereProperties: nodeProperty, + receivedProperties: receivedEventProperties[key], + }) + ) { + return false; + } + } + + if (isInterfaceRelationship) { + const targetNodeTypename = receivedEvent[`${key}Typename`]; + + // apply the filter + if ( + !filterRelationshipInterfaceProperty({ + nodeProperty, + nodes, + receivedEventProperties, + targetNodeTypename, + key, + }) + ) { + return false; + } + } + + if (isUnionRelationship) { + const targetNodeTypename = receivedEvent[`${key}Typename`]; + const targetNodePropsByTypename = unionTypes[targetNodeTypename] as Record; + const isRelationshipOfReceivedTypeFilteredOut = !targetNodePropsByTypename; + if (isRelationshipOfReceivedTypeFilteredOut) { + return false; + } + + // apply the filter + if ( + !filterRelationshipUnionProperties({ + targetNodePropsByTypename, + targetNodeTypename, + receivedEventProperties, + relationshipFields, + relationshipPropertiesInterfaceName, + key, + nodes, + }) + ) { + return false; + } + } + return true; +} function filterRelationshipUnionProperties({ targetNodePropsByTypename, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts index 3415828a35..2b193e3230 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts @@ -17,10 +17,13 @@ * limitations under the License. */ +import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { PrimitiveField } from "../../../../../types"; type ComparatorFn = (received: T, filtered: T, fieldMeta?: PrimitiveField | undefined) => boolean; +type ComparatorFn2 = (received: T, filtered: T, fieldMeta?: AttributeAdapter | undefined) => boolean; + const operatorCheckMap = { NOT: (received: string, filtered: string) => received !== filtered, LT: (received: number | string, filtered: number) => { @@ -75,3 +78,15 @@ export function getFilteringFn( return operators[operator]; } +export function getFilteringFn2( + operator: string | undefined, + overrides?: Record boolean> +): ComparatorFn2 { + if (!operator) { + return (received: T, filtered: T) => received === filtered; + } + + const operators = { ...operatorCheckMap, ...overrides }; + + return operators[operator]; +} diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/type-checks.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/type-checks.ts index 8bc527458a..cad3f638af 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/type-checks.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/type-checks.ts @@ -18,6 +18,8 @@ */ import { int } from "neo4j-driver"; +import { InterfaceEntityAdapter } from "../../../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { PrimitiveField, RelationField } from "../../../../../types"; import type { InterfaceSpecificType, InterfaceType, StandardType } from "../../types"; @@ -50,6 +52,19 @@ export function isStandardType( ): node is StandardType { return !receivedEventRelationship.interface?.implementations; } +export function isInterfaceType2( + node: StandardType | InterfaceType, + receivedEventRelationship: RelationshipAdapter +): node is InterfaceType { + return !!(receivedEventRelationship.target instanceof InterfaceEntityAdapter); +} + +export function isStandardType2( + node: StandardType | InterfaceType, + receivedEventRelationship: RelationshipAdapter +): node is StandardType { + return !(receivedEventRelationship.target instanceof InterfaceEntityAdapter); +} export function isInterfaceSpecificFieldType(node: unknown): node is InterfaceSpecificType { return !!node; diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts index 0809705ef0..df862778dd 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts @@ -20,9 +20,13 @@ import type { SubscriptionsEvent } from "../../../../types"; import type Node from "../../../../classes/Node"; import type { ObjectFields } from "../../../get-obj-field-meta"; -import { filterByProperties } from "./filters/filter-by-properties"; -import { filterByRelationshipProperties } from "./filters/filter-by-relationship-properties"; +import { filterByProperties, filterByProperties2 } from "./filters/filter-by-properties"; +import { + filterByRelationshipProperties, + filterByRelationshipProperties2, +} from "./filters/filter-by-relationship-properties"; import type { RecordType, RelationshipType } from "../types"; +import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; export function subscriptionWhere({ where, @@ -64,3 +68,43 @@ export function subscriptionWhere({ return false; } +export function subscriptionWhere2({ + where, + event, + entityAdapter, + nodes, + relationshipFields, +}: { + where: Record | undefined; + event: SubscriptionsEvent; + entityAdapter: ConcreteEntityAdapter; + nodes?: Node[]; + relationshipFields?: Map; +}): boolean { + if (!where) { + return true; + } + + if (event.event === "create") { + return filterByProperties2({ entityAdapter, whereProperties: where, receivedProperties: event.properties.new }); + } + + if (event.event === "update" || event.event === "delete") { + return filterByProperties2({ entityAdapter, whereProperties: where, receivedProperties: event.properties.old }); + } + + if (event.event === "create_relationship" || event.event === "delete_relationship") { + if (!nodes || !relationshipFields) { + return false; + } + return filterByRelationshipProperties2({ + entityAdapter, + whereProperties: where, + receivedEvent: event, + nodes, + relationshipFields, + }); + } + + return false; +} diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts index 67dea8210a..3629c8ce9e 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts @@ -19,11 +19,17 @@ import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; -import { objectFieldsToComposeFields } from "../to-compose"; +import { attributeAdapterToComposeFields, objectFieldsToComposeFields } from "../to-compose"; import { upperFirst } from "../../utils/upper-first"; import type { BaseField, RelationField } from "../../types"; import type { ObjectFields } from "../get-obj-field-meta"; import { filterTruthy } from "../../utils/utils"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { AttributeAdapter } from "../../schema-model/attribute/model-adapters/AttributeAdapter"; +import type { DirectiveNode } from "graphql"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; function buildRelationshipDestinationUnionNodeType({ unionNodes, @@ -115,6 +121,48 @@ function buildRelationshipDestinationAbstractType({ } return undefined; } +function buildRelationshipDestinationAbstractType2({ + relationshipAdapter, + relationNodeTypeName, + interfaceCommonFields, + schemaComposer, + nodeNameToEventPayloadTypes, +}: { + relationshipAdapter: RelationshipAdapter; + relationNodeTypeName: string; + interfaceCommonFields: Map; + schemaComposer: SchemaComposer; + nodeNameToEventPayloadTypes: Record; +}) { + const unionNodeTypes = + relationshipAdapter.target instanceof UnionEntityAdapter + ? relationshipAdapter.target.concreteEntities + : undefined; + if (unionNodeTypes) { + const unionNodes = filterTruthy( + unionNodeTypes?.map((unionEntity) => nodeNameToEventPayloadTypes[unionEntity.name]) + ); + return buildRelationshipDestinationUnionNodeType({ unionNodes, relationNodeTypeName, schemaComposer }); + } + const interfaceNodeTypeNames = + relationshipAdapter.target instanceof InterfaceEntityAdapter + ? relationshipAdapter.target.concreteEntities + : undefined; + if (interfaceNodeTypeNames) { + // TODO: take interfaceCommonFields from interfaceEntity + const relevantInterfaceFields = interfaceCommonFields.get(relationNodeTypeName) || ({} as ObjectFields); + const interfaceNodes = filterTruthy( + interfaceNodeTypeNames.map((interfaceEntity) => nodeNameToEventPayloadTypes[interfaceEntity.name]) + ); + return buildRelationshipDestinationInterfaceNodeType({ + schemaComposer, + relevantInterface: relevantInterfaceFields, + interfaceNodes, + relationNodeTypeName, + }); + } + return undefined; +} function buildRelationshipFieldDestinationTypes({ relationField, @@ -143,6 +191,33 @@ function buildRelationshipFieldDestinationTypes({ }); } +function buildRelationshipFieldDestinationTypes2({ + relationshipAdapter, + interfaceCommonFields, + schemaComposer, + nodeNameToEventPayloadTypes, +}: { + relationshipAdapter: RelationshipAdapter; + interfaceCommonFields: Map; + schemaComposer: SchemaComposer; + nodeNameToEventPayloadTypes: Record; +}) { + const relationNodeTypeName = relationshipAdapter.target.name; + const nodeTo = nodeNameToEventPayloadTypes[relationNodeTypeName]; + if (nodeTo) { + // standard type + return hasProperties(nodeTo) && nodeTo; + } + // union/interface type + return buildRelationshipDestinationAbstractType2({ + relationshipAdapter, + relationNodeTypeName, + interfaceCommonFields, + schemaComposer, + nodeNameToEventPayloadTypes, + }); +} + function getRelationshipFields({ relationField, relationshipFields, @@ -162,6 +237,14 @@ function getRelationshipFields({ } } +function getRelationshipFields2({ + relationshipAdapter, +}: { + relationshipAdapter: RelationshipAdapter; +}): AttributeAdapter[] { + return relationshipAdapter.subscriptionConnectedRelationshipFields; +} + export function hasProperties(x: ObjectTypeComposer): boolean { return !!Object.keys(x.getFields()).length; } @@ -216,3 +299,53 @@ export function getConnectedTypes({ return acc; }, {}); } + +export function getConnectedTypes2({ + entityAdapter, + interfaceCommonFields, + schemaComposer, + nodeNameToEventPayloadTypes, +}: { + entityAdapter: ConcreteEntityAdapter; + interfaceCommonFields: Map; + schemaComposer: SchemaComposer; + nodeNameToEventPayloadTypes: Record; +}) { + // const { name, relationFields } = node; + + return Array.from(entityAdapter.relationships.values()) + .map((relationshipAdapter) => { + const fieldName = relationshipAdapter.name; + + const relationshipFieldType = schemaComposer.createObjectTC({ + name: `${entityAdapter.name}${upperFirst(fieldName)}ConnectedRelationship`, + }); + + const edgeProps = getRelationshipFields2({ relationshipAdapter }); + if (edgeProps.length) { + const composeFields = attributeAdapterToComposeFields(edgeProps, new Map()); // TODO: instead of new map??? + relationshipFieldType.addFields(composeFields); + } + + const nodeTo = buildRelationshipFieldDestinationTypes2({ + relationshipAdapter, + interfaceCommonFields, + schemaComposer, + nodeNameToEventPayloadTypes, + }); + if (nodeTo) { + relationshipFieldType.addFields({ node: nodeTo.getTypeNonNull() }); + } + + return { + relationshipFieldType, + fieldName, + }; + }) + .reduce((acc, { relationshipFieldType, fieldName }) => { + if (relationshipFieldType && hasProperties(relationshipFieldType)) { + acc[fieldName] = relationshipFieldType; + } + return acc; + }, {}); +} diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts index 6963008aa8..a676f7ed0d 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts @@ -17,6 +17,7 @@ * limitations under the License. */ +import type { DirectiveNode } from "graphql"; import { GraphQLFloat, GraphQLNonNull, GraphQLString } from "graphql"; import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; @@ -24,9 +25,15 @@ import { EventType } from "../../graphql/enums/EventType"; import { generateSubscriptionWhereType, generateSubscriptionConnectionWhereType, + generateSubscriptionWhereType2, + generateSubscriptionConnectionWhereType2, } from "./generate-subscription-where-type"; import { generateEventPayloadType } from "./generate-event-payload-type"; -import { generateSubscribeMethod, subscriptionResolve } from "../resolvers/subscriptions/subscribe"; +import { + generateSubscribeMethod, + generateSubscribeMethod2, + subscriptionResolve, +} from "../resolvers/subscriptions/subscribe"; import type { NodeSubscriptionsEvent, RelationField, @@ -34,9 +41,13 @@ import type { SubscriptionsEvent, } from "../../types"; import type { ObjectFields } from "../get-obj-field-meta"; -import { getConnectedTypes, hasProperties } from "./generate-subscription-connection-types"; +import { getConnectedTypes, getConnectedTypes2, hasProperties } from "./generate-subscription-connection-types"; import type { SchemaConfiguration } from "../schema-configuration"; import { getSchemaConfigurationFlags } from "../schema-configuration"; +import type { Neo4jGraphQLSchemaModel } from "../../schema-model/Neo4jGraphQLSchemaModel"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { attributeAdapterToComposeFields } from "../to-compose"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; export function generateSubscriptionTypes({ schemaComposer, @@ -264,7 +275,7 @@ export function generateSubscriptionTypes({ nodeSchemaConfiguration: node.schemaConfiguration, excludeDirective: node.exclude, }); - + if (schemaConfigurationFlags.subscribeCreate) { subscriptionComposer.addFields({ [subscribeOperation.created]: { @@ -338,6 +349,322 @@ export function generateSubscriptionTypes({ }); } +export function generateSubscriptionTypes2({ + schemaComposer, + schemaModel, + nodes, + userDefinedFieldDirectivesForNode, + relationshipFields, + interfaceCommonFields, + globalSchemaConfiguration, +}: { + schemaComposer: SchemaComposer; + schemaModel: Neo4jGraphQLSchemaModel; + nodes: Node[]; + userDefinedFieldDirectivesForNode: Map>; + relationshipFields: Map; + interfaceCommonFields: Map; + globalSchemaConfiguration: SchemaConfiguration; +}): void { + const subscriptionComposer = schemaComposer.Subscription; + + const eventTypeEnum = schemaComposer.createEnumTC(EventType); + + const allNodes = schemaModel.concreteEntities.map((e) => new ConcreteEntityAdapter(e)); + const nodesWithSubscriptionOperation = allNodes.filter((e) => e.isSubscribable); + + const nodeNameToEventPayloadTypes: Record = allNodes.reduce((acc, entityAdapter) => { + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(entityAdapter.name); + if (!userDefinedFieldDirectives) { + throw new Error("fix user directives for object types in subscriptions."); + } + const eventPayloadType = schemaComposer.createObjectTC({ + name: `${entityAdapter.name}EventPayload`, + fields: attributeAdapterToComposeFields( + entityAdapter.subscriptionEventPayloadFields, + userDefinedFieldDirectives + ), + }); + acc[entityAdapter.name] = eventPayloadType; + return acc; + }, {}); + + allNodes.forEach((entityAdapter) => generateSubscriptionWhereType2(entityAdapter, schemaComposer)); + + const nodeToRelationFieldMap: Map> = new Map(); + nodesWithSubscriptionOperation.forEach((entityAdapter) => { + // TODO: remove + const node = nodes.find((n) => n.name === entityAdapter.name) as Node; + const eventPayload = nodeNameToEventPayloadTypes[entityAdapter.name] as ObjectTypeComposer; + const where = generateSubscriptionWhereType2(entityAdapter, schemaComposer); + + const nodeCreatedEvent = schemaComposer.createObjectTC({ + name: entityAdapter.operations.subscriptionEventTypeNames.create, + fields: { + event: { + type: eventTypeEnum.NonNull, + resolve: () => EventType.getValue("CREATE")?.value, + }, + timestamp: { + type: new GraphQLNonNull(GraphQLFloat), + resolve: (source: SubscriptionsEvent) => source.timestamp, + }, + }, + }); + + const nodeUpdatedEvent = schemaComposer.createObjectTC({ + name: entityAdapter.operations.subscriptionEventTypeNames.update, + fields: { + event: { + type: eventTypeEnum.NonNull, + resolve: () => EventType.getValue("UPDATE")?.value, + }, + timestamp: { + type: new GraphQLNonNull(GraphQLFloat), + resolve: (source: SubscriptionsEvent) => source.timestamp, + }, + }, + }); + + const nodeDeletedEvent = schemaComposer.createObjectTC({ + name: entityAdapter.operations.subscriptionEventTypeNames.delete, + fields: { + event: { + type: eventTypeEnum.NonNull, + resolve: () => EventType.getValue("DELETE")?.value, + }, + timestamp: { + type: new GraphQLNonNull(GraphQLFloat), + resolve: (source: SubscriptionsEvent) => source.timestamp, + }, + }, + }); + + const relationshipCreatedEvent = schemaComposer.createObjectTC({ + name: entityAdapter.operations.subscriptionEventTypeNames.create_relationship, + fields: { + event: { + type: eventTypeEnum.NonNull, + resolve: () => EventType.getValue("CREATE_RELATIONSHIP")?.value, + }, + timestamp: { + type: new GraphQLNonNull(GraphQLFloat), + resolve: (source: RelationshipSubscriptionsEvent) => source.timestamp, + }, + }, + }); + + const relationshipDeletedEvent = schemaComposer.createObjectTC({ + name: entityAdapter.operations.subscriptionEventTypeNames.delete_relationship, + fields: { + event: { + type: eventTypeEnum.NonNull, + resolve: () => EventType.getValue("DELETE_RELATIONSHIP")?.value, + }, + timestamp: { + type: new GraphQLNonNull(GraphQLFloat), + resolve: (source: RelationshipSubscriptionsEvent) => source.timestamp, + }, + }, + }); + + const connectedTypes = getConnectedTypes2({ + entityAdapter, + interfaceCommonFields, + schemaComposer, + nodeNameToEventPayloadTypes, + }); + + const relationsEventPayload = schemaComposer.createObjectTC({ + name: `${entityAdapter.name}ConnectedRelationships`, + fields: connectedTypes, + }); + + if (hasProperties(eventPayload)) { + nodeCreatedEvent.addFields({ + [entityAdapter.operations.subscriptionEventPayloadFieldNames.create]: { + type: eventPayload.NonNull, + resolve: (source: SubscriptionsEvent) => (source as NodeSubscriptionsEvent).properties.new, + }, + }); + + nodeUpdatedEvent.addFields({ + previousState: { + type: eventPayload.NonNull, + resolve: (source: SubscriptionsEvent) => (source as NodeSubscriptionsEvent).properties.old, + }, + [entityAdapter.operations.subscriptionEventPayloadFieldNames.update]: { + type: eventPayload.NonNull, + resolve: (source: SubscriptionsEvent) => (source as NodeSubscriptionsEvent).properties.new, + }, + }); + + nodeDeletedEvent.addFields({ + [entityAdapter.operations.subscriptionEventPayloadFieldNames.delete]: { + type: eventPayload.NonNull, + resolve: (source: SubscriptionsEvent) => (source as NodeSubscriptionsEvent).properties.old, + }, + }); + + relationshipCreatedEvent.addFields({ + [entityAdapter.operations.subscriptionEventPayloadFieldNames.create_relationship]: { + type: eventPayload.NonNull, + resolve: (source: RelationshipSubscriptionsEvent) => { + return getRelationshipEventDataForNode2(source, entityAdapter, nodeToRelationFieldMap) + .properties; + }, + }, + relationshipFieldName: { + type: new GraphQLNonNull(GraphQLString), + resolve: (source: RelationshipSubscriptionsEvent) => { + return getRelationField2({ + entityAdapter, + relationshipName: source.relationshipName, + nodeToRelationFieldMap, + })?.name; + }, + }, + }); + + relationshipDeletedEvent.addFields({ + [entityAdapter.operations.subscriptionEventPayloadFieldNames.delete_relationship]: { + type: eventPayload.NonNull, + resolve: (source: RelationshipSubscriptionsEvent) => { + return getRelationshipEventDataForNode2(source, entityAdapter, nodeToRelationFieldMap) + .properties; + }, + }, + relationshipFieldName: { + type: new GraphQLNonNull(GraphQLString), + resolve: (source: RelationshipSubscriptionsEvent) => { + return getRelationField2({ + entityAdapter, + relationshipName: source.relationshipName, + nodeToRelationFieldMap, + })?.name; + }, + }, + }); + } + + if (hasProperties(relationsEventPayload)) { + const resolveRelationship = (source: RelationshipSubscriptionsEvent) => { + const thisRel = getRelationField2({ + entityAdapter, + relationshipName: source.relationshipName, + nodeToRelationFieldMap, + }); + if (!thisRel) { + return; + } + const { destinationProperties: props, destinationTypename: typename } = + getRelationshipEventDataForNode2(source, entityAdapter, nodeToRelationFieldMap); + + return { + [thisRel.name]: { + ...source.properties.relationship, + node: { + ...props, + __typename: `${typename}EventPayload`, + }, + }, + }; + }; + relationshipCreatedEvent.addFields({ + createdRelationship: { + type: relationsEventPayload.NonNull, + resolve: resolveRelationship, + }, + }); + relationshipDeletedEvent.addFields({ + deletedRelationship: { + type: relationsEventPayload.NonNull, + resolve: resolveRelationship, + }, + }); + } + + const whereArgument = where && { args: { where } }; + + const schemaConfigurationFlags = getSchemaConfigurationFlags({ + globalSchemaConfiguration, + nodeSchemaConfiguration: node.schemaConfiguration, + excludeDirective: node.exclude, + }); + + if (schemaConfigurationFlags.subscribeCreate) { + subscriptionComposer.addFields({ + [entityAdapter.operations.rootTypeFieldNames.subscribe.created]: { + ...whereArgument, + type: nodeCreatedEvent.NonNull, + subscribe: generateSubscribeMethod2({ entityAdapter, type: "create" }), + resolve: subscriptionResolve, + }, + }); + } + if (schemaConfigurationFlags.subscribeUpdate) { + subscriptionComposer.addFields({ + [entityAdapter.operations.rootTypeFieldNames.subscribe.updated]: { + ...whereArgument, + type: nodeUpdatedEvent.NonNull, + subscribe: generateSubscribeMethod2({ entityAdapter, type: "update" }), + resolve: subscriptionResolve, + }, + }); + } + + if (schemaConfigurationFlags.subscribeDelete) { + subscriptionComposer.addFields({ + [entityAdapter.operations.rootTypeFieldNames.subscribe.deleted]: { + ...whereArgument, + type: nodeDeletedEvent.NonNull, + subscribe: generateSubscribeMethod2({ entityAdapter, type: "delete" }), + resolve: subscriptionResolve, + }, + }); + } + + const connectionWhere = generateSubscriptionConnectionWhereType2({ + entityAdapter, + schemaComposer, + relationshipFields, + interfaceCommonFields, + }); + if (entityAdapter.relationships.size > 0) { + if (schemaConfigurationFlags.subscribeCreateRelationship) { + subscriptionComposer.addFields({ + [entityAdapter.operations.rootTypeFieldNames.subscribe.relationship_created]: { + ...(connectionWhere?.created && { args: { where: connectionWhere?.created } }), + type: relationshipCreatedEvent.NonNull, + subscribe: generateSubscribeMethod2({ + entityAdapter, + type: "create_relationship", + nodes, + relationshipFields, + }), + resolve: subscriptionResolve, + }, + }); + } + if (schemaConfigurationFlags.subscribeDeleteRelationship) { + subscriptionComposer.addFields({ + [entityAdapter.operations.rootTypeFieldNames.subscribe.relationship_deleted]: { + ...(connectionWhere?.deleted && { args: { where: connectionWhere?.deleted } }), + type: relationshipDeletedEvent.NonNull, + subscribe: generateSubscribeMethod2({ + entityAdapter, + type: "delete_relationship", + nodes, + relationshipFields, + }), + resolve: subscriptionResolve, + }, + }); + } + } + }); +} + function hydrateSchemaWithSubscriptionWhereTypes( nodesWithSubscriptionOperation: Node[], schemaComposer: SchemaComposer @@ -380,6 +707,41 @@ function getRelationshipEventDataForNode( destinationTypename: event.toTypename, }; } +function getRelationshipEventDataForNode2( + event: RelationshipSubscriptionsEvent, + entityAdapter: ConcreteEntityAdapter, + nodeToRelationFieldMap: Map> +): { + direction: string; + properties: Record; + destinationProperties: Record; + destinationTypename: string; +} { + let condition = event.toTypename === entityAdapter.name; + if (event.toTypename === event.fromTypename) { + // must check relationship direction from schema + const relationship = getRelationField2({ + entityAdapter, + relationshipName: event.relationshipName, + nodeToRelationFieldMap, + }); + condition = relationship?.direction === "IN"; + } + if (condition) { + return { + direction: "IN", + properties: event.properties.to, + destinationProperties: event.properties.from, + destinationTypename: event.fromTypename, + }; + } + return { + direction: "OUT", + properties: event.properties.from, + destinationProperties: event.properties.to, + destinationTypename: event.toTypename, + }; +} function getRelationField({ node, @@ -404,3 +766,29 @@ function getRelationField({ } return relationshipNameToRelationField.get(relationshipName); } +function getRelationField2({ + entityAdapter, + relationshipName, + nodeToRelationFieldMap, +}: { + entityAdapter: ConcreteEntityAdapter; + relationshipName: string; + nodeToRelationFieldMap: Map>; +}): RelationshipAdapter | undefined { + // TODO: move to schemaModel intermediate representation + let relationshipNameToRelationField: Map; + if (!nodeToRelationFieldMap.has(entityAdapter)) { + relationshipNameToRelationField = new Map(); + nodeToRelationFieldMap.set(entityAdapter, relationshipNameToRelationField); + } else { + relationshipNameToRelationField = nodeToRelationFieldMap.get(entityAdapter) as Map< + string, + RelationshipAdapter | undefined + >; + } + if (!relationshipNameToRelationField.has(relationshipName)) { + const relationField = Array.from(entityAdapter.relationships.values()).find((f) => f.type === relationshipName); + relationshipNameToRelationField.set(relationshipName, relationField); + } + return relationshipNameToRelationField.get(relationshipName); +} diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts index 4e749bc781..eb854208a7 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts @@ -19,10 +19,14 @@ import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; -import { objectFieldsToSubscriptionsWhereInputFields } from "../to-compose"; +import { attributesToSubscriptionsWhereInputFields, objectFieldsToSubscriptionsWhereInputFields } from "../to-compose"; import type { ObjectFields } from "../get-obj-field-meta"; import { upperFirst } from "../../utils/upper-first"; import type { RelationField } from "../../types"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; const isEmptyObject = (obj: Record) => !Object.keys(obj).length; @@ -49,6 +53,23 @@ export function generateSubscriptionWhereType( fields: whereFields, }); } +export function generateSubscriptionWhereType2( + entityAdapter: ConcreteEntityAdapter, + schemaComposer: SchemaComposer +): InputTypeComposer | undefined { + const typeName = entityAdapter.name; + if (schemaComposer.has(`${entityAdapter.name}SubscriptionWhere`)) { + return schemaComposer.getITC(`${entityAdapter.name}SubscriptionWhere`); + } + const whereFields = attributesToSubscriptionsWhereInputFields(typeName, entityAdapter.subscriptionWhereFields); + if (isEmptyObject(whereFields)) { + return; + } + return schemaComposer.createInputTC({ + name: `${entityAdapter.name}SubscriptionWhere`, + fields: whereFields, + }); +} export function generateSubscriptionConnectionWhereType({ node, @@ -105,6 +126,61 @@ export function generateSubscriptionConnectionWhereType({ }), }; } +export function generateSubscriptionConnectionWhereType2({ + entityAdapter, + schemaComposer, + relationshipFields, + interfaceCommonFields, +}: { + entityAdapter: ConcreteEntityAdapter; + schemaComposer: SchemaComposer; + relationshipFields: Map; + interfaceCommonFields: Map; +}): { created: InputTypeComposer; deleted: InputTypeComposer } | undefined { + const fieldName = entityAdapter.operations.subscriptionEventPayloadFieldNames.create_relationship; + const typeName = entityAdapter.name; + + const connectedRelationship = getRelationshipConnectionWhereTypes2({ + entityAdapter, + schemaComposer, + relationshipFields, + interfaceCommonFields, + }); + const isConnectedNodeTypeNotExcluded = schemaComposer.has(`${typeName}SubscriptionWhere`); + if (!isConnectedNodeTypeNotExcluded && !connectedRelationship) { + return; + } + + const relationshipCreatedWhere = `${typeName}RelationshipCreatedSubscriptionWhere`; + const relationshipDeletedWhere = `${typeName}RelationshipDeletedSubscriptionWhere`; + + return { + created: schemaComposer.createInputTC({ + name: relationshipCreatedWhere, + fields: { + AND: `[${relationshipCreatedWhere}!]`, + OR: `[${relationshipCreatedWhere}!]`, + NOT: relationshipCreatedWhere, + ...(isConnectedNodeTypeNotExcluded && { + [fieldName]: schemaComposer.getITC(`${typeName}SubscriptionWhere`), + }), + ...(connectedRelationship && { createdRelationship: connectedRelationship }), + }, + }), + deleted: schemaComposer.createInputTC({ + name: relationshipDeletedWhere, + fields: { + AND: `[${relationshipDeletedWhere}!]`, + OR: `[${relationshipDeletedWhere}!]`, + NOT: relationshipDeletedWhere, + ...(isConnectedNodeTypeNotExcluded && { + [fieldName]: schemaComposer.getITC(`${typeName}SubscriptionWhere`), + }), + ...(connectedRelationship && { deletedRelationship: connectedRelationship }), + }, + }), + }; +} function getRelationshipConnectionWhereTypes({ node, @@ -148,6 +224,47 @@ function getRelationshipConnectionWhereTypes({ }); return relationsFieldInputWhereType; } +function getRelationshipConnectionWhereTypes2({ + entityAdapter, + schemaComposer, + relationshipFields, + interfaceCommonFields, +}: { + entityAdapter: ConcreteEntityAdapter; + schemaComposer: SchemaComposer; + relationshipFields: Map; + interfaceCommonFields: Map; +}): InputTypeComposer | undefined { + const relationsFieldInputWhereTypeFields = Array.from(entityAdapter.relationships.values()).reduce((acc, rf) => { + const { name } = rf; + const nodeRelationPrefix = `${entityAdapter.name}${upperFirst(name)}`; + const fields = makeNodeRelationFields2({ + relationshipAdapter: rf, + schemaComposer, + interfaceCommonFields, + relationshipFields, + nodeRelationPrefix, + }); + if (!fields) { + return acc; + } + const relationFieldInputWhereType = schemaComposer.createInputTC({ + name: `${nodeRelationPrefix}RelationshipSubscriptionWhere`, + fields, + }); + acc[name] = relationFieldInputWhereType; + return acc; + }, {}); + + if (isEmptyObject(relationsFieldInputWhereTypeFields)) { + return; + } + const relationsFieldInputWhereType = schemaComposer.createInputTC({ + name: `${entityAdapter.name}RelationshipsSubscriptionWhere`, + fields: relationsFieldInputWhereTypeFields, + }); + return relationsFieldInputWhereType; +} function makeNodeRelationFields({ relationField, @@ -186,6 +303,49 @@ function makeNodeRelationFields({ } return makeRelationshipToConcreteTypeWhereType({ relationField, edgeType, schemaComposer }); } +function makeNodeRelationFields2({ + relationshipAdapter, + schemaComposer, + interfaceCommonFields, + relationshipFields, + nodeRelationPrefix, +}: { + relationshipAdapter: RelationshipAdapter; + nodeRelationPrefix: string; + schemaComposer: SchemaComposer; + relationshipFields: Map; + interfaceCommonFields: Map; +}) { + const edgeType = makeRelationshipWhereType2({ + relationshipFields, + schemaComposer, + relationshipAdapter, + }); + + const unionNodeTypes = + relationshipAdapter.target instanceof UnionEntityAdapter + ? relationshipAdapter.target.concreteEntities + : undefined; + if (unionNodeTypes) { + return makeRelationshipToUnionTypeWhereType2({ unionNodeTypes, schemaComposer, nodeRelationPrefix, edgeType }); + } + const interfaceNodeTypes = + relationshipAdapter.target instanceof InterfaceEntityAdapter + ? relationshipAdapter.target.concreteEntities + : undefined; + if (interfaceNodeTypes) { + const interfaceNodeTypeName = relationshipAdapter.target.name; + const interfaceCommonFieldsOnImplementations = interfaceCommonFields.get(interfaceNodeTypeName); + return makeRelationshipToInterfaceTypeWhereType2({ + interfaceNodeTypeName, + schemaComposer, + interfaceNodeTypes, + interfaceCommonFieldsOnImplementations, + edgeType, + }); + } + return makeRelationshipToConcreteTypeWhereType2({ relationshipAdapter, edgeType, schemaComposer }); +} function makeRelationshipWhereType({ relationshipFields, @@ -211,6 +371,30 @@ function makeRelationshipWhereType({ ) ); } +function makeRelationshipWhereType2({ + relationshipFields, + schemaComposer, + relationshipAdapter, +}: { + schemaComposer: SchemaComposer; + relationshipFields: Map; + relationshipAdapter: RelationshipAdapter; +}): InputTypeComposer | undefined { + const relationProperties = relationshipFields.get(relationshipAdapter.propertiesTypeName || ""); + if (!relationProperties) { + return undefined; + } + return schemaComposer.getOrCreateITC(`${relationshipAdapter.propertiesTypeName}SubscriptionWhere`, (tc) => + tc.addFields( + objectFieldsToSubscriptionsWhereInputFields(relationshipAdapter.propertiesTypeName as string, [ + ...relationProperties.primitiveFields, + ...relationProperties.enumFields, + ...relationProperties.scalarFields, + ...relationProperties.temporalFields, + ]) + ) + ); +} function makeRelationshipToConcreteTypeWhereType({ relationField, @@ -231,6 +415,25 @@ function makeRelationshipToConcreteTypeWhereType({ ...(edgeType && { edge: edgeType }), }; } +function makeRelationshipToConcreteTypeWhereType2({ + relationshipAdapter, + edgeType, + schemaComposer, +}: { + relationshipAdapter: RelationshipAdapter; + edgeType: InputTypeComposer | undefined; + schemaComposer: SchemaComposer; +}): { node?: string; edge?: InputTypeComposer } | undefined { + const nodeTypeName = relationshipAdapter.target.name; + const nodeExists = schemaComposer.has(`${nodeTypeName}SubscriptionWhere`); + if (!nodeExists && !edgeType) { + return undefined; + } + return { + ...(nodeExists && { node: `${nodeTypeName}SubscriptionWhere` }), + ...(edgeType && { edge: edgeType }), + }; +} function makeRelationshipToUnionTypeWhereType({ unionNodeTypes, @@ -265,6 +468,39 @@ function makeRelationshipToUnionTypeWhereType({ } return unionTypes; } +function makeRelationshipToUnionTypeWhereType2({ + unionNodeTypes, + schemaComposer, + nodeRelationPrefix, + edgeType, +}: { + schemaComposer: SchemaComposer; + unionNodeTypes: ConcreteEntityAdapter[]; + nodeRelationPrefix: string; + edgeType: InputTypeComposer | undefined; +}): Record | undefined { + const unionTypes = unionNodeTypes.reduce((acc, concreteEntity) => { + const nodeExists = schemaComposer.has(`${concreteEntity.name}SubscriptionWhere`); + if (!nodeExists && !edgeType) { + return acc; + } + acc[concreteEntity.name] = schemaComposer.getOrCreateITC( + `${nodeRelationPrefix}${concreteEntity.name}SubscriptionWhere`, + (tc) => + tc.addFields({ + ...(nodeExists && { node: `${concreteEntity.name}SubscriptionWhere` }), + ...(edgeType && { edge: edgeType }), + }) + ); + + return acc; + }, {}); + + if (isEmptyObject(unionTypes)) { + return; + } + return unionTypes; +} function makeRelationshipToInterfaceTypeWhereType({ interfaceNodeTypeName, @@ -321,3 +557,58 @@ function makeRelationshipToInterfaceTypeWhereType({ ...(edgeType && { edge: edgeType }), }; } +function makeRelationshipToInterfaceTypeWhereType2({ + interfaceNodeTypeName, + schemaComposer, + interfaceNodeTypes, + interfaceCommonFieldsOnImplementations, + edgeType, +}: { + interfaceNodeTypeName: string; + schemaComposer: SchemaComposer; + interfaceNodeTypes: (ConcreteEntityAdapter | InterfaceEntityAdapter)[]; + interfaceCommonFieldsOnImplementations: ObjectFields | undefined; + edgeType: InputTypeComposer | undefined; +}): { node?: InputTypeComposer; edge?: InputTypeComposer } | undefined { + let interfaceImplementationsType: InputTypeComposer | undefined, + interfaceNodeType: InputTypeComposer | undefined = undefined; + + const implementationsFields = interfaceNodeTypes.reduce((acc, entity) => { + if (schemaComposer.has(`${entity.name}SubscriptionWhere`)) { + acc[entity.name] = `${entity.name}SubscriptionWhere`; + } + return acc; + }, {}); + if (!isEmptyObject(implementationsFields)) { + interfaceImplementationsType = schemaComposer.getOrCreateITC( + `${interfaceNodeTypeName}ImplementationsSubscriptionWhere`, + (tc) => tc.addFields(implementationsFields) + ); + } + if (interfaceImplementationsType || interfaceCommonFieldsOnImplementations) { + const interfaceFields = { + ...(interfaceImplementationsType && { _on: interfaceImplementationsType }), + ...(interfaceCommonFieldsOnImplementations && + objectFieldsToSubscriptionsWhereInputFields(interfaceNodeTypeName, [ + ...interfaceCommonFieldsOnImplementations.primitiveFields, + ...interfaceCommonFieldsOnImplementations.enumFields, + ...interfaceCommonFieldsOnImplementations.scalarFields, + ...interfaceCommonFieldsOnImplementations.temporalFields, + ...interfaceCommonFieldsOnImplementations.pointFields, + ])), + }; + if (!isEmptyObject(interfaceFields)) { + interfaceNodeType = schemaComposer.getOrCreateITC(`${interfaceNodeTypeName}SubscriptionWhere`, (tc) => + tc.addFields(interfaceFields) + ); + } + } + + if (!interfaceNodeType && !edgeType) { + return; + } + return { + ...(interfaceNodeType && { node: interfaceNodeType }), + ...(edgeType && { edge: edgeType }), + }; +} diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index 1f72a5fa32..bfdae8ca82 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -314,6 +314,77 @@ export function objectFieldsToSubscriptionsWhereInputFields( }, {}); } +export function attributesToSubscriptionsWhereInputFields( + typeName: string, + attributes: AttributeAdapter[] +): Record { + return attributes.reduce((res, attribute) => { + if (!attribute.isFilterable()) { + return res; + } + const fieldType = attribute.getInputTypeNames().where.pretty; + + const ifArrayOfAnyTypeExceptBoolean = attribute.isList() && attribute.getTypeName() !== "Boolean"; + const ifAnyTypeExceptArrayAndBoolean = !attribute.isList() && attribute.getTypeName() !== "Boolean"; + const isOneOfNumberTypes = ["Int", "Float", "BigInt"].includes(attribute.getTypeName()) && !attribute.isList(); + const isOneOfStringTypes = ["String", "ID"].includes(attribute.getTypeName()) && !attribute.isList(); + const isOneOfSpatialTypes = ["Point", "CartesianPoint"].includes(attribute.getTypeName()); + + let inputTypeName = attribute.getTypeName(); + if (isOneOfSpatialTypes) { + inputTypeName = `${inputTypeName}Input`; + } + return { + ...res, + AND: `[${typeName}SubscriptionWhere!]`, + OR: `[${typeName}SubscriptionWhere!]`, + NOT: `${typeName}SubscriptionWhere`, + [attribute.name]: fieldType, + [`${attribute.name}_NOT`]: { + type: fieldType, + directives: [DEPRECATE_NOT], + }, + ...(ifArrayOfAnyTypeExceptBoolean && { + [`${attribute.name}_INCLUDES`]: inputTypeName, + [`${attribute.name}_NOT_INCLUDES`]: { + type: inputTypeName, + directives: [DEPRECATE_NOT], + }, + }), + ...(ifAnyTypeExceptArrayAndBoolean && { + [`${attribute.name}_IN`]: `[${inputTypeName}]`, + [`${attribute.name}_NOT_IN`]: { + type: `[${inputTypeName}]`, + directives: [DEPRECATE_NOT], + }, + }), + ...(isOneOfNumberTypes && { + [`${attribute.name}_LT`]: fieldType, + [`${attribute.name}_LTE`]: fieldType, + [`${attribute.name}_GT`]: fieldType, + [`${attribute.name}_GTE`]: fieldType, + }), + ...(isOneOfStringTypes && { + [`${attribute.name}_STARTS_WITH`]: fieldType, + [`${attribute.name}_NOT_STARTS_WITH`]: { + type: fieldType, + directives: [DEPRECATE_NOT], + }, + [`${attribute.name}_ENDS_WITH`]: fieldType, + [`${attribute.name}_NOT_ENDS_WITH`]: { + type: fieldType, + directives: [DEPRECATE_NOT], + }, + [`${attribute.name}_CONTAINS`]: fieldType, + [`${attribute.name}_NOT_CONTAINS`]: { + type: fieldType, + directives: [DEPRECATE_NOT], + }, + }), + }; + }, {}); +} + export function objectFieldsToUpdateInputFields(fields: BaseField[]): Record { return fields.reduce((res, f) => { const deprecatedDirectives = graphqlDirectivesToCompose( From 310dee228d1397e53cd1b40ecf00d9ba680e74f7 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 10:29:25 +0100 Subject: [PATCH 081/162] subscriptions: remove nodes and relationshipFields dependencies from resolvers --- .../resolvers/subscriptions/subscribe.ts | 8 +- .../subscriptions/where/authorization.ts | 6 - .../filters/filter-by-authorization-rules.ts | 19 +-- .../where/filters/filter-by-properties.ts | 11 +- .../filter-by-relationship-properties.ts | 12 +- .../where/utils/filter-relationship-key.ts | 142 ++++++++++++++++-- .../resolvers/subscriptions/where/where.ts | 24 +-- .../generate-subscription-types.ts | 4 - 8 files changed, 152 insertions(+), 74 deletions(-) diff --git a/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts b/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts index 80d053b135..e288db5a2d 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts @@ -119,13 +119,9 @@ export function generateSubscribeMethod({ export function generateSubscribeMethod2({ entityAdapter, type, - nodes, - relationshipFields, }: { entityAdapter: ConcreteEntityAdapter; type: SubscriptionEventType; - nodes?: Node[]; - relationshipFields?: Map; }) { return ( _root: any, @@ -167,11 +163,9 @@ export function generateSubscribeMethod2({ subscriptionAuthorization2({ event: data[0], entity: entityAdapter, - nodes, - relationshipFields, context, }) && - subscriptionWhere2({ where: args.where, event: data[0], entityAdapter, nodes, relationshipFields }) + subscriptionWhere2({ where: args.where, event: data[0], entityAdapter }) ); }); } diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts index e6e33e7f29..7131218105 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts @@ -74,14 +74,10 @@ export function subscriptionAuthorization({ export function subscriptionAuthorization2({ event, entity, - nodes, - relationshipFields, context, }: { event: SubscriptionsEvent; entity: ConcreteEntityAdapter; - nodes?: Node[]; - relationshipFields?: Map; context: Neo4jGraphQLComposedSubscriptionsContext; }): boolean { const subscriptionsAuthorization = entity.annotations.subscriptionsAuthorization; @@ -105,8 +101,6 @@ export function subscriptionAuthorization2({ entityAdapter: entity, where, event, - nodes, - relationshipFields, context, }); }); diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts index 231c23b8b6..b12e6d36f3 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts @@ -153,8 +153,6 @@ export function filterByAuthorizationRules2({ entityAdapter, where, event, - nodes, - relationshipFields, context, }: { entityAdapter: ConcreteEntityAdapter; @@ -165,8 +163,6 @@ export function filterByAuthorizationRules2({ RecordType | Record | Array> >; event: SubscriptionsEvent; - nodes?: Node[]; - relationshipFields?: Map; context: Neo4jGraphQLComposedSubscriptionsContext; }): boolean { const receivedEventProperties = event.properties; @@ -180,8 +176,6 @@ export function filterByAuthorizationRules2({ entityAdapter, where: wherePropertyValue as Record, event, - nodes, - relationshipFields, context, }); } else { @@ -190,8 +184,6 @@ export function filterByAuthorizationRules2({ entityAdapter, where: whereCl, event, - nodes, - relationshipFields, context, }); }); @@ -206,14 +198,14 @@ export function filterByAuthorizationRules2({ switch (event.event) { case "create": return filterByProperties2({ - entityAdapter, + attributes: entityAdapter.attributes, whereProperties: wherePropertyValue, receivedProperties: event.properties.new, }); case "update": case "delete": return filterByProperties2({ - entityAdapter, + attributes: entityAdapter.attributes, whereProperties: wherePropertyValue, receivedProperties: event.properties.old, }); @@ -230,7 +222,7 @@ export function filterByAuthorizationRules2({ const receivedEventRelationship = relationships[0] as RelationshipAdapter; // ONE relationship only possible const key = receivedEventRelationship.direction === "IN" ? "to" : "from"; return filterByProperties2({ - entityAdapter, + attributes: entityAdapter.attributes, whereProperties: wherePropertyValue, receivedProperties: receivedEventProperties[key], }); @@ -239,7 +231,8 @@ export function filterByAuthorizationRules2({ } if (wherePropertyKey === "relationship") { - if (!nodes || !relationshipFields || !isRelationshipSubscriptionsEvent(event)) { + // if (!nodes || !relationshipFields || !isRelationshipSubscriptionsEvent(event)) { + if (!isRelationshipSubscriptionsEvent(event)) { return false; } @@ -256,9 +249,7 @@ export function filterByAuthorizationRules2({ return filterRelationshipKey2({ receivedEventRelationship, where: wherePropertyValue, - relationshipFields, receivedEvent: event, - nodes, }); } diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts index 36673295f8..5266ce8a70 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts @@ -19,7 +19,6 @@ import { int } from "neo4j-driver"; import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; -import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { Node, PrimitiveField } from "../../../../../types"; import { getFilteringFn, getFilteringFn2 } from "../utils/get-filtering-fn"; import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; @@ -74,11 +73,11 @@ export function filterByProperties({ /** Returns true if receivedProperties comply with filters specified in whereProperties, false otherwise. */ export function filterByProperties2({ - entityAdapter, + attributes, whereProperties, receivedProperties, }: { - entityAdapter: ConcreteEntityAdapter; + attributes: Map; whereProperties: Record> | Record>; receivedProperties: Record; }): boolean { @@ -88,13 +87,13 @@ export function filterByProperties2({ let comparisonResults; if (k === "NOT") { comparisonResults = filterByProperties2({ - entityAdapter, + attributes, whereProperties: v as Record, receivedProperties, }); } else { comparisonResults = (v as Array>).map((whereCl) => { - return filterByProperties2({ entityAdapter, whereProperties: whereCl, receivedProperties }); + return filterByProperties2({ attributes, whereProperties: whereCl, receivedProperties }); }); } @@ -107,7 +106,7 @@ export function filterByProperties2({ if (!receivedValue) { return false; } - const fieldMeta = entityAdapter.attributes.get(fieldName); + const fieldMeta = attributes.get(fieldName); const checkFilterPasses = getFilteringFn2(operator, operatorMapOverrides2); if (!checkFilterPasses(receivedValue, v, fieldMeta)) { diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts index 9d75ac1be3..004c145103 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts @@ -111,8 +111,6 @@ export function filterByRelationshipProperties2({ entityAdapter, whereProperties, receivedEvent, - nodes, - relationshipFields, }: { entityAdapter: ConcreteEntityAdapter; whereProperties: Record< @@ -120,8 +118,6 @@ export function filterByRelationshipProperties2({ RecordType | Record | Array> >; receivedEvent: RelationshipSubscriptionsEvent; - nodes: Node[]; - relationshipFields: Map; }): boolean { const receivedEventProperties = receivedEvent.properties; const receivedEventRelationshipType = receivedEvent.relationshipName; @@ -144,8 +140,6 @@ export function filterByRelationshipProperties2({ entityAdapter, whereProperties: wherePropertyValue as Record, receivedEvent, - nodes, - relationshipFields, }); } else { comparisonResults = (wherePropertyValue as Array>).map((whereCl) => { @@ -153,8 +147,6 @@ export function filterByRelationshipProperties2({ entityAdapter, whereProperties: whereCl, receivedEvent, - nodes, - relationshipFields, }); }); } @@ -170,7 +162,7 @@ export function filterByRelationshipProperties2({ const key = receivedEventRelationship.direction === "IN" ? "to" : "from"; if ( !filterByProperties2({ - entityAdapter, + attributes: entityAdapter.attributes, whereProperties: wherePropertyValue, receivedProperties: receivedEventProperties[key], }) @@ -183,9 +175,7 @@ export function filterByRelationshipProperties2({ return filterRelationshipKey2({ receivedEventRelationship, where: wherePropertyValue, - relationshipFields, receivedEvent, - nodes, }); } } diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts index 3f29f4edd2..7862664822 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts @@ -18,6 +18,8 @@ */ import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../../../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../../../../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { Node, RelationField, RelationshipSubscriptionsEvent } from "../../../../../types"; import type { ObjectFields } from "../../../../get-obj-field-meta"; @@ -148,15 +150,11 @@ export function filterRelationshipKey({ export function filterRelationshipKey2({ receivedEventRelationship, where, - relationshipFields, receivedEvent, - nodes, }: { receivedEventRelationship: RelationshipAdapter; where: RecordType | Record | Record[]; - relationshipFields: Map; receivedEvent: RelationshipSubscriptionsEvent; - nodes: Node[]; }): boolean { const receivedEventProperties = receivedEvent.properties; const receivedEventRelationshipName = receivedEventRelationship.name; @@ -171,7 +169,6 @@ export function filterRelationshipKey2({ // case `actors: {}` including all relationships of the type return true; } - const relationshipPropertiesInterfaceName = receivedEventRelationship.propertiesTypeName || ""; const { edge: edgeProperty, node: nodeProperty, ...unionTypes } = receivedEventRelationshipData; @@ -179,9 +176,8 @@ export function filterRelationshipKey2({ if (edgeProperty) { // apply the filter if ( - !filterRelationshipEdgeProperty({ - relationshipFields, - relationshipPropertiesInterfaceName, + !filterRelationshipEdgeProperty2({ + relationshipAdapter: receivedEventRelationship, edgeProperty, receivedEventProperties, }) @@ -203,7 +199,7 @@ export function filterRelationshipKey2({ // apply the filter if ( !filterByProperties2({ - entityAdapter: nodeTo, + attributes: nodeTo.attributes, whereProperties: nodeProperty, receivedProperties: receivedEventProperties[key], }) @@ -217,9 +213,9 @@ export function filterRelationshipKey2({ // apply the filter if ( - !filterRelationshipInterfaceProperty({ + !filterRelationshipInterfaceProperty2({ nodeProperty, - nodes, + relationshipAdapter: receivedEventRelationship, receivedEventProperties, targetNodeTypename, key, @@ -239,14 +235,12 @@ export function filterRelationshipKey2({ // apply the filter if ( - !filterRelationshipUnionProperties({ + !filterRelationshipUnionProperties2({ targetNodePropsByTypename, targetNodeTypename, receivedEventProperties, - relationshipFields, - relationshipPropertiesInterfaceName, + relationshipAdapter: receivedEventRelationship, key, - nodes, }) ) { return false; @@ -299,6 +293,52 @@ function filterRelationshipUnionProperties({ } return true; } +function filterRelationshipUnionProperties2({ + targetNodePropsByTypename, + targetNodeTypename, + receivedEventProperties, + relationshipAdapter, + key, +}: { + targetNodePropsByTypename: Record; + targetNodeTypename: string; + receivedEventProperties: EventProperties; + relationshipAdapter: RelationshipAdapter; + key: string; +}): boolean { + for (const [propertyName, propertyValueAsUnionTypeData] of Object.entries(targetNodePropsByTypename)) { + if (propertyName === "node") { + const unionTarget = relationshipAdapter.target; + if (!(unionTarget instanceof UnionEntityAdapter)) { + throw new Error(`Expected ${unionTarget.name} to be union`); + } + const nodeTo = unionTarget.concreteEntities.find((e) => e.name === targetNodeTypename); + if (!nodeTo) { + throw new Error(`${targetNodeTypename} not found as part of union ${unionTarget.name}`); + } + if ( + !filterByProperties2({ + attributes: nodeTo.attributes, + whereProperties: propertyValueAsUnionTypeData, + receivedProperties: receivedEventProperties[key], + }) + ) { + return false; + } + } + if ( + propertyName === "edge" && + !filterRelationshipEdgeProperty2({ + relationshipAdapter, + edgeProperty: propertyValueAsUnionTypeData, + receivedEventProperties, + }) + ) { + return false; + } + } + return true; +} function filterRelationshipInterfaceProperty({ nodeProperty, @@ -345,6 +385,59 @@ function filterRelationshipInterfaceProperty({ } return true; } +function filterRelationshipInterfaceProperty2({ + nodeProperty, + relationshipAdapter, + receivedEventProperties, + targetNodeTypename, + key, +}: { + nodeProperty: InterfaceType; + relationshipAdapter: RelationshipAdapter; + receivedEventProperties: EventProperties; + targetNodeTypename: string; + key: string; +}): boolean { + const { _on, ...commonFields } = nodeProperty; + const targetNode = relationshipAdapter.target; + if (!(targetNode instanceof InterfaceEntityAdapter)) { + throw new Error(`Expected ${targetNode.name} to be interface`); + } + const nodeTo = targetNode.concreteEntities.find((e) => e.name === targetNodeTypename); + if (!nodeTo) { + throw new Error(`${targetNodeTypename} not found as part of interface ${targetNode.name}`); + } + // const targetNode = nodes.find((n) => n.name === targetNodeTypename) as Node; + if (commonFields && !_on) { + if ( + !filterByProperties2({ + attributes: nodeTo.attributes, + whereProperties: commonFields, + receivedProperties: receivedEventProperties[key], + }) + ) { + return false; + } + } + if (isInterfaceSpecificFieldType(_on)) { + const isRelationshipOfReceivedTypeFilteredOut = !_on[targetNodeTypename]; + if (isRelationshipOfReceivedTypeFilteredOut) { + return false; + } + const commonFieldsMergedWithSpecificFields = { ...commonFields, ..._on[targetNodeTypename] }; //override common combination with specific + + if ( + !filterByProperties2({ + attributes: nodeTo.attributes, + whereProperties: commonFieldsMergedWithSpecificFields, + receivedProperties: receivedEventProperties[key], + }) + ) { + return false; + } + } + return true; +} function filterRelationshipEdgeProperty({ relationshipFields, @@ -368,3 +461,22 @@ function filterRelationshipEdgeProperty({ receivedProperties: receivedEventProperties.relationship, }); } +function filterRelationshipEdgeProperty2({ + relationshipAdapter, + edgeProperty, + receivedEventProperties, +}: { + relationshipAdapter: RelationshipAdapter; + edgeProperty: StandardType; + receivedEventProperties: EventProperties; +}): boolean { + const noRelationshipPropertiesFound = !relationshipAdapter.attributes.size; + if (noRelationshipPropertiesFound) { + return true; + } + return filterByProperties2({ + attributes: relationshipAdapter.attributes, + whereProperties: edgeProperty, + receivedProperties: receivedEventProperties.relationship, + }); +} diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts index df862778dd..48f869a7a7 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts @@ -72,37 +72,39 @@ export function subscriptionWhere2({ where, event, entityAdapter, - nodes, - relationshipFields, }: { where: Record | undefined; event: SubscriptionsEvent; entityAdapter: ConcreteEntityAdapter; - nodes?: Node[]; - relationshipFields?: Map; }): boolean { if (!where) { return true; } if (event.event === "create") { - return filterByProperties2({ entityAdapter, whereProperties: where, receivedProperties: event.properties.new }); + return filterByProperties2({ + attributes: entityAdapter.attributes, + whereProperties: where, + receivedProperties: event.properties.new, + }); } if (event.event === "update" || event.event === "delete") { - return filterByProperties2({ entityAdapter, whereProperties: where, receivedProperties: event.properties.old }); + return filterByProperties2({ + attributes: entityAdapter.attributes, + whereProperties: where, + receivedProperties: event.properties.old, + }); } if (event.event === "create_relationship" || event.event === "delete_relationship") { - if (!nodes || !relationshipFields) { - return false; - } + // if (!nodes || !relationshipFields) { + // return false; + // } return filterByRelationshipProperties2({ entityAdapter, whereProperties: where, receivedEvent: event, - nodes, - relationshipFields, }); } diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts index a676f7ed0d..4143f6dd38 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts @@ -639,8 +639,6 @@ export function generateSubscriptionTypes2({ subscribe: generateSubscribeMethod2({ entityAdapter, type: "create_relationship", - nodes, - relationshipFields, }), resolve: subscriptionResolve, }, @@ -654,8 +652,6 @@ export function generateSubscriptionTypes2({ subscribe: generateSubscribeMethod2({ entityAdapter, type: "delete_relationship", - nodes, - relationshipFields, }), resolve: subscriptionResolve, }, From f5e90cf1b58b4612c4841415ba0a554c09d9bca6 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 11:46:25 +0100 Subject: [PATCH 082/162] subscriptions: delete interfaceCommonFields map and remove relationshipFields map from all places except Relationship for backwards compatibility with translation layer --- .../model-adapters/InterfaceEntityAdapter.ts | 6 + .../model-adapters/RelationshipAdapter.ts | 4 + .../src/schema/new-make-augmented-schema.ts | 21 +--- .../generate-subscription-connection-types.ts | 106 ++++++++++++------ .../generate-subscription-types.ts | 11 +- .../generate-subscription-where-type.ts | 92 +++++---------- 6 files changed, 118 insertions(+), 122 deletions(-) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts index cabe350edc..b90baf745e 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts @@ -111,4 +111,10 @@ export class InterfaceEntityAdapter { public get updateInputFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); } + public get subscriptionEventPayloadFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isEventPayloadField()); + } + public get subscriptionWhereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isSubscriptionWhereField()); + } } 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 e852a6c28c..ae5cc2d9b4 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -359,4 +359,8 @@ export class RelationshipAdapter { public get arrayMethodFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isArrayMethodField()); } + + public get subscriptionWhereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isSubscriptionWhereField()); + } } diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 2e05ab4358..4c98fd7146 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -701,7 +701,6 @@ function makeAugmentedSchema( ); const relationshipFields = new Map(); - const interfaceCommonFields = new Map(); // helper to only create relationshipProperties Interface types once, even if multiple relationships reference it const seenRelationshipPropertiesInterfaces = new Set(); @@ -816,24 +815,18 @@ function makeAugmentedSchema( if (updatedRelationships) { relationships = updatedRelationships; } - // TODO: Remove this - const interfaceFields = getObjFieldMeta({ - enums: enumTypes, - interfaces: [...filteredInterfaceTypes, ...interfaceRelationships], - objects: objectTypes, - scalars: scalarTypes, - unions: unionTypes, - obj: interfaceRelationship, - callbacks, - }); - interfaceCommonFields.set(interfaceEntityAdapter.name, interfaceFields); }); + // TODO: find some solution for this const userDefinedFieldDirectivesForNode = new Map>(); for (const definitionNode of definitionNodes.objectTypes) { const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); } + for (const definitionNode of definitionNodes.interfaceTypes) { + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } nodes.forEach((node) => { const concreteEntity = schemaModel.getEntity(node.name) as ConcreteEntity; const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); @@ -1032,8 +1025,6 @@ function makeAugmentedSchema( entityAdapter: concreteEntityAdapter, schemaComposer: composer, composeNode, - // sourceName: concreteEntityAdapter.name, - // relationshipPropertyFields: relationshipFields, subgraph, userDefinedFieldDirectives, }); @@ -1180,8 +1171,6 @@ function makeAugmentedSchema( schemaModel, nodes, userDefinedFieldDirectivesForNode, - relationshipFields, - interfaceCommonFields, globalSchemaConfiguration, }); } diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts index 3629c8ce9e..8ce6b4b2ca 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts @@ -19,14 +19,17 @@ import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; -import { attributeAdapterToComposeFields, objectFieldsToComposeFields } from "../to-compose"; +import { + attributeAdapterToComposeFields, + objectFieldsToComposeFields, + relationshipAdapterToComposeFields, +} from "../to-compose"; import { upperFirst } from "../../utils/upper-first"; import type { BaseField, RelationField } from "../../types"; import type { ObjectFields } from "../get-obj-field-meta"; import { filterTruthy } from "../../utils/utils"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { AttributeAdapter } from "../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { DirectiveNode } from "graphql"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; @@ -87,6 +90,44 @@ function buildRelationshipDestinationInterfaceNodeType({ return nodeTo; } } +function buildRelationshipDestinationInterfaceNodeType2({ + interfaceEntity, + interfaceNodes, + relationNodeTypeName, + schemaComposer, + userDefinedFieldDirectivesForNode, +}: { + interfaceEntity: InterfaceEntityAdapter; + interfaceNodes: ObjectTypeComposer[]; + relationNodeTypeName: string; + schemaComposer: SchemaComposer; + userDefinedFieldDirectivesForNode: Map>; +}): InterfaceTypeComposer | undefined { + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(interfaceEntity.name); + if (!userDefinedFieldDirectives) { + throw new Error("fix user directives for interface types in subscriptions."); + } + const interfaceConnectionComposeFields = relationshipAdapterToComposeFields( + Array.from(interfaceEntity.relationships.values()), + userDefinedFieldDirectives + ); + const interfaceComposeFields = attributeAdapterToComposeFields( + interfaceEntity.subscriptionEventPayloadFields, + userDefinedFieldDirectives + ); + + if (Object.keys(interfaceComposeFields).length) { + const nodeTo = schemaComposer.createInterfaceTC({ + name: `${relationNodeTypeName}EventPayload`, + fields: interfaceComposeFields, + }); + interfaceNodes?.forEach((interfaceNodeType) => { + nodeTo.addTypeResolver(interfaceNodeType, () => true); + interfaceNodeType.addFields(interfaceConnectionComposeFields); + }); + return nodeTo; + } +} function buildRelationshipDestinationAbstractType({ relationField, @@ -124,41 +165,36 @@ function buildRelationshipDestinationAbstractType({ function buildRelationshipDestinationAbstractType2({ relationshipAdapter, relationNodeTypeName, - interfaceCommonFields, + userDefinedFieldDirectivesForNode, schemaComposer, nodeNameToEventPayloadTypes, }: { relationshipAdapter: RelationshipAdapter; relationNodeTypeName: string; - interfaceCommonFields: Map; + userDefinedFieldDirectivesForNode: Map>; schemaComposer: SchemaComposer; nodeNameToEventPayloadTypes: Record; }) { - const unionNodeTypes = - relationshipAdapter.target instanceof UnionEntityAdapter - ? relationshipAdapter.target.concreteEntities - : undefined; - if (unionNodeTypes) { + const unionEntity = + relationshipAdapter.target instanceof UnionEntityAdapter ? relationshipAdapter.target : undefined; + if (unionEntity) { const unionNodes = filterTruthy( - unionNodeTypes?.map((unionEntity) => nodeNameToEventPayloadTypes[unionEntity.name]) + unionEntity?.concreteEntities?.map((unionEntity) => nodeNameToEventPayloadTypes[unionEntity.name]) ); return buildRelationshipDestinationUnionNodeType({ unionNodes, relationNodeTypeName, schemaComposer }); } - const interfaceNodeTypeNames = - relationshipAdapter.target instanceof InterfaceEntityAdapter - ? relationshipAdapter.target.concreteEntities - : undefined; - if (interfaceNodeTypeNames) { - // TODO: take interfaceCommonFields from interfaceEntity - const relevantInterfaceFields = interfaceCommonFields.get(relationNodeTypeName) || ({} as ObjectFields); + const interfaceEntity = + relationshipAdapter.target instanceof InterfaceEntityAdapter ? relationshipAdapter.target : undefined; + if (interfaceEntity) { const interfaceNodes = filterTruthy( - interfaceNodeTypeNames.map((interfaceEntity) => nodeNameToEventPayloadTypes[interfaceEntity.name]) + interfaceEntity.concreteEntities.map((interfaceEntity) => nodeNameToEventPayloadTypes[interfaceEntity.name]) ); - return buildRelationshipDestinationInterfaceNodeType({ + return buildRelationshipDestinationInterfaceNodeType2({ schemaComposer, - relevantInterface: relevantInterfaceFields, + interfaceEntity, interfaceNodes, relationNodeTypeName, + userDefinedFieldDirectivesForNode, }); } return undefined; @@ -193,12 +229,12 @@ function buildRelationshipFieldDestinationTypes({ function buildRelationshipFieldDestinationTypes2({ relationshipAdapter, - interfaceCommonFields, + userDefinedFieldDirectivesForNode, schemaComposer, nodeNameToEventPayloadTypes, }: { relationshipAdapter: RelationshipAdapter; - interfaceCommonFields: Map; + userDefinedFieldDirectivesForNode: Map>; schemaComposer: SchemaComposer; nodeNameToEventPayloadTypes: Record; }) { @@ -212,7 +248,7 @@ function buildRelationshipFieldDestinationTypes2({ return buildRelationshipDestinationAbstractType2({ relationshipAdapter, relationNodeTypeName, - interfaceCommonFields, + userDefinedFieldDirectivesForNode, schemaComposer, nodeNameToEventPayloadTypes, }); @@ -237,14 +273,6 @@ function getRelationshipFields({ } } -function getRelationshipFields2({ - relationshipAdapter, -}: { - relationshipAdapter: RelationshipAdapter; -}): AttributeAdapter[] { - return relationshipAdapter.subscriptionConnectedRelationshipFields; -} - export function hasProperties(x: ObjectTypeComposer): boolean { return !!Object.keys(x.getFields()).length; } @@ -302,14 +330,14 @@ export function getConnectedTypes({ export function getConnectedTypes2({ entityAdapter, - interfaceCommonFields, schemaComposer, nodeNameToEventPayloadTypes, + userDefinedFieldDirectivesForNode, }: { entityAdapter: ConcreteEntityAdapter; - interfaceCommonFields: Map; schemaComposer: SchemaComposer; nodeNameToEventPayloadTypes: Record; + userDefinedFieldDirectivesForNode: Map>; }) { // const { name, relationFields } = node; @@ -321,15 +349,21 @@ export function getConnectedTypes2({ name: `${entityAdapter.name}${upperFirst(fieldName)}ConnectedRelationship`, }); - const edgeProps = getRelationshipFields2({ relationshipAdapter }); + const edgeProps = relationshipAdapter.subscriptionConnectedRelationshipFields; if (edgeProps.length) { - const composeFields = attributeAdapterToComposeFields(edgeProps, new Map()); // TODO: instead of new map??? + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(entityAdapter.name); + if (!userDefinedFieldDirectives) { + throw new Error( + "fix user directives for relationship properties interface types in subscriptions." + ); + } + const composeFields = attributeAdapterToComposeFields(edgeProps, userDefinedFieldDirectives); relationshipFieldType.addFields(composeFields); } const nodeTo = buildRelationshipFieldDestinationTypes2({ relationshipAdapter, - interfaceCommonFields, + userDefinedFieldDirectivesForNode, schemaComposer, nodeNameToEventPayloadTypes, }); diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts index 4143f6dd38..bd71ff4f97 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts @@ -354,16 +354,12 @@ export function generateSubscriptionTypes2({ schemaModel, nodes, userDefinedFieldDirectivesForNode, - relationshipFields, - interfaceCommonFields, globalSchemaConfiguration, }: { schemaComposer: SchemaComposer; schemaModel: Neo4jGraphQLSchemaModel; nodes: Node[]; userDefinedFieldDirectivesForNode: Map>; - relationshipFields: Map; - interfaceCommonFields: Map; globalSchemaConfiguration: SchemaConfiguration; }): void { const subscriptionComposer = schemaComposer.Subscription; @@ -371,7 +367,6 @@ export function generateSubscriptionTypes2({ const eventTypeEnum = schemaComposer.createEnumTC(EventType); const allNodes = schemaModel.concreteEntities.map((e) => new ConcreteEntityAdapter(e)); - const nodesWithSubscriptionOperation = allNodes.filter((e) => e.isSubscribable); const nodeNameToEventPayloadTypes: Record = allNodes.reduce((acc, entityAdapter) => { const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(entityAdapter.name); @@ -392,6 +387,7 @@ export function generateSubscriptionTypes2({ allNodes.forEach((entityAdapter) => generateSubscriptionWhereType2(entityAdapter, schemaComposer)); const nodeToRelationFieldMap: Map> = new Map(); + const nodesWithSubscriptionOperation = allNodes.filter((e) => e.isSubscribable); nodesWithSubscriptionOperation.forEach((entityAdapter) => { // TODO: remove const node = nodes.find((n) => n.name === entityAdapter.name) as Node; @@ -470,9 +466,9 @@ export function generateSubscriptionTypes2({ const connectedTypes = getConnectedTypes2({ entityAdapter, - interfaceCommonFields, schemaComposer, nodeNameToEventPayloadTypes, + userDefinedFieldDirectivesForNode, }); const relationsEventPayload = schemaComposer.createObjectTC({ @@ -627,8 +623,6 @@ export function generateSubscriptionTypes2({ const connectionWhere = generateSubscriptionConnectionWhereType2({ entityAdapter, schemaComposer, - relationshipFields, - interfaceCommonFields, }); if (entityAdapter.relationships.size > 0) { if (schemaConfigurationFlags.subscribeCreateRelationship) { @@ -772,6 +766,7 @@ function getRelationField2({ nodeToRelationFieldMap: Map>; }): RelationshipAdapter | undefined { // TODO: move to schemaModel intermediate representation + // TODO: relationships by propertiesTypeName instead of by fieldName let relationshipNameToRelationField: Map; if (!nodeToRelationFieldMap.has(entityAdapter)) { relationshipNameToRelationField = new Map(); diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts index eb854208a7..c707f43156 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts @@ -129,13 +129,9 @@ export function generateSubscriptionConnectionWhereType({ export function generateSubscriptionConnectionWhereType2({ entityAdapter, schemaComposer, - relationshipFields, - interfaceCommonFields, }: { entityAdapter: ConcreteEntityAdapter; schemaComposer: SchemaComposer; - relationshipFields: Map; - interfaceCommonFields: Map; }): { created: InputTypeComposer; deleted: InputTypeComposer } | undefined { const fieldName = entityAdapter.operations.subscriptionEventPayloadFieldNames.create_relationship; const typeName = entityAdapter.name; @@ -143,8 +139,6 @@ export function generateSubscriptionConnectionWhereType2({ const connectedRelationship = getRelationshipConnectionWhereTypes2({ entityAdapter, schemaComposer, - relationshipFields, - interfaceCommonFields, }); const isConnectedNodeTypeNotExcluded = schemaComposer.has(`${typeName}SubscriptionWhere`); if (!isConnectedNodeTypeNotExcluded && !connectedRelationship) { @@ -227,22 +221,17 @@ function getRelationshipConnectionWhereTypes({ function getRelationshipConnectionWhereTypes2({ entityAdapter, schemaComposer, - relationshipFields, - interfaceCommonFields, }: { entityAdapter: ConcreteEntityAdapter; schemaComposer: SchemaComposer; - relationshipFields: Map; - interfaceCommonFields: Map; }): InputTypeComposer | undefined { const relationsFieldInputWhereTypeFields = Array.from(entityAdapter.relationships.values()).reduce((acc, rf) => { const { name } = rf; + // TODO: remove const nodeRelationPrefix = `${entityAdapter.name}${upperFirst(name)}`; const fields = makeNodeRelationFields2({ relationshipAdapter: rf, schemaComposer, - interfaceCommonFields, - relationshipFields, nodeRelationPrefix, }); if (!fields) { @@ -306,41 +295,28 @@ function makeNodeRelationFields({ function makeNodeRelationFields2({ relationshipAdapter, schemaComposer, - interfaceCommonFields, - relationshipFields, nodeRelationPrefix, }: { relationshipAdapter: RelationshipAdapter; nodeRelationPrefix: string; schemaComposer: SchemaComposer; - relationshipFields: Map; - interfaceCommonFields: Map; }) { const edgeType = makeRelationshipWhereType2({ - relationshipFields, schemaComposer, relationshipAdapter, }); - const unionNodeTypes = - relationshipAdapter.target instanceof UnionEntityAdapter - ? relationshipAdapter.target.concreteEntities - : undefined; - if (unionNodeTypes) { + const unionNode = relationshipAdapter.target instanceof UnionEntityAdapter ? relationshipAdapter.target : undefined; + if (unionNode) { + const unionNodeTypes = unionNode.concreteEntities; return makeRelationshipToUnionTypeWhereType2({ unionNodeTypes, schemaComposer, nodeRelationPrefix, edgeType }); } - const interfaceNodeTypes = - relationshipAdapter.target instanceof InterfaceEntityAdapter - ? relationshipAdapter.target.concreteEntities - : undefined; - if (interfaceNodeTypes) { - const interfaceNodeTypeName = relationshipAdapter.target.name; - const interfaceCommonFieldsOnImplementations = interfaceCommonFields.get(interfaceNodeTypeName); + const interfaceEntity = + relationshipAdapter.target instanceof InterfaceEntityAdapter ? relationshipAdapter.target : undefined; + if (interfaceEntity) { return makeRelationshipToInterfaceTypeWhereType2({ - interfaceNodeTypeName, schemaComposer, - interfaceNodeTypes, - interfaceCommonFieldsOnImplementations, + interfaceEntity, edgeType, }); } @@ -372,27 +348,23 @@ function makeRelationshipWhereType({ ); } function makeRelationshipWhereType2({ - relationshipFields, schemaComposer, relationshipAdapter, }: { schemaComposer: SchemaComposer; - relationshipFields: Map; relationshipAdapter: RelationshipAdapter; }): InputTypeComposer | undefined { - const relationProperties = relationshipFields.get(relationshipAdapter.propertiesTypeName || ""); - if (!relationProperties) { + const relationProperties = relationshipAdapter.attributes; + if (!relationProperties.size) { return undefined; } + const composeFields = attributesToSubscriptionsWhereInputFields( + relationshipAdapter.propertiesTypeName as string, + relationshipAdapter.subscriptionWhereFields + ); + // TODO: POINT was missing??? return schemaComposer.getOrCreateITC(`${relationshipAdapter.propertiesTypeName}SubscriptionWhere`, (tc) => - tc.addFields( - objectFieldsToSubscriptionsWhereInputFields(relationshipAdapter.propertiesTypeName as string, [ - ...relationProperties.primitiveFields, - ...relationProperties.enumFields, - ...relationProperties.scalarFields, - ...relationProperties.temporalFields, - ]) - ) + tc.addFields(composeFields) ); } @@ -558,22 +530,18 @@ function makeRelationshipToInterfaceTypeWhereType({ }; } function makeRelationshipToInterfaceTypeWhereType2({ - interfaceNodeTypeName, schemaComposer, - interfaceNodeTypes, - interfaceCommonFieldsOnImplementations, + interfaceEntity, edgeType, }: { - interfaceNodeTypeName: string; schemaComposer: SchemaComposer; - interfaceNodeTypes: (ConcreteEntityAdapter | InterfaceEntityAdapter)[]; - interfaceCommonFieldsOnImplementations: ObjectFields | undefined; + interfaceEntity: InterfaceEntityAdapter; edgeType: InputTypeComposer | undefined; }): { node?: InputTypeComposer; edge?: InputTypeComposer } | undefined { let interfaceImplementationsType: InputTypeComposer | undefined, interfaceNodeType: InputTypeComposer | undefined = undefined; - const implementationsFields = interfaceNodeTypes.reduce((acc, entity) => { + const implementationsFields = interfaceEntity.concreteEntities.reduce((acc, entity) => { if (schemaComposer.has(`${entity.name}SubscriptionWhere`)) { acc[entity.name] = `${entity.name}SubscriptionWhere`; } @@ -581,24 +549,24 @@ function makeRelationshipToInterfaceTypeWhereType2({ }, {}); if (!isEmptyObject(implementationsFields)) { interfaceImplementationsType = schemaComposer.getOrCreateITC( - `${interfaceNodeTypeName}ImplementationsSubscriptionWhere`, + `${interfaceEntity.name}ImplementationsSubscriptionWhere`, (tc) => tc.addFields(implementationsFields) ); } - if (interfaceImplementationsType || interfaceCommonFieldsOnImplementations) { + // TODO: refactor this if check does not make sense bc includes more fields than .subscriptionWhereFields + // TODO: refactor attributesToSubscriptionsWhereInputFields to pass in just the entity and it takes .subscriptionWhereFields from the entity?? + const interfaceAttributes = interfaceEntity.attributes; + if (interfaceImplementationsType || interfaceAttributes.size) { + const composeFields = attributesToSubscriptionsWhereInputFields( + interfaceEntity.name, + interfaceEntity.subscriptionWhereFields + ); const interfaceFields = { ...(interfaceImplementationsType && { _on: interfaceImplementationsType }), - ...(interfaceCommonFieldsOnImplementations && - objectFieldsToSubscriptionsWhereInputFields(interfaceNodeTypeName, [ - ...interfaceCommonFieldsOnImplementations.primitiveFields, - ...interfaceCommonFieldsOnImplementations.enumFields, - ...interfaceCommonFieldsOnImplementations.scalarFields, - ...interfaceCommonFieldsOnImplementations.temporalFields, - ...interfaceCommonFieldsOnImplementations.pointFields, - ])), + ...(interfaceAttributes.size && composeFields), }; if (!isEmptyObject(interfaceFields)) { - interfaceNodeType = schemaComposer.getOrCreateITC(`${interfaceNodeTypeName}SubscriptionWhere`, (tc) => + interfaceNodeType = schemaComposer.getOrCreateITC(`${interfaceEntity.name}SubscriptionWhere`, (tc) => tc.addFields(interfaceFields) ); } From 301b1d2d33c08ded3b15152659cc2893a53e57ef Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 12:52:36 +0100 Subject: [PATCH 083/162] add comments to new make-augmented-schema --- .../src/schema/new-make-augmented-schema.ts | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 4c98fd7146..4183f9704d 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -700,12 +700,9 @@ function makeAugmentedSchema( interfaceRelationshipNames ); + // TODO: keeping this `relationshipFields` scaffold for backwards compatibility on translation layer + // actual functional logic is in schemaModel.concreteEntities.forEach const relationshipFields = new Map(); - - // helper to only create relationshipProperties Interface types once, even if multiple relationships reference it - const seenRelationshipPropertiesInterfaces = new Set(); - - // TODO: keeping this for backwards compatibility on translation layer relationshipProperties.forEach((relationship) => { const relFields = getObjFieldMeta({ enums: enumTypes, @@ -720,39 +717,39 @@ function makeAugmentedSchema( relationshipFields.set(relationship.name.value, relFields); /* const baseFields: BaseField[][] = Object.values(relFields); - + const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); - + const propertiesInterface = composer.createInterfaceTC({ name: relationship.name.value, fields: objectComposeFields, }); - + composer.createInputTC({ name: `${relationship.name.value}Sort`, fields: propertiesInterface.getFieldNames().reduce((res, f) => { return { ...res, [f]: "SortDirection" }; }, {}), }); - + const relationshipUpdateITC = composer.createInputTC({ name: `${relationship.name.value}UpdateInput`, fields: objectFieldsToUpdateInputFields([ ...relFields.primitiveFields.filter( (field) => !field.autogenerate && !field.readonly && !field.callback - ), - ...relFields.scalarFields, - ...relFields.enumFields, - ...relFields.temporalFields.filter((field) => !field.timestamps), - ...relFields.pointFields, - ]), + ), + ...relFields.scalarFields, + ...relFields.enumFields, + ...relFields.temporalFields.filter((field) => !field.timestamps), + ...relFields.pointFields, + ]), }); addMathOperatorsToITC(relationshipUpdateITC); - + addArrayMethodsToITC(relationshipUpdateITC, relFields.primitiveFields); addArrayMethodsToITC(relationshipUpdateITC, relFields.pointFields); - + const relationshipWhereFields = getWhereFields({ typeName: relationship.name.value, fields: { @@ -764,12 +761,12 @@ function makeAugmentedSchema( }, features, }); - + composer.createInputTC({ name: `${relationship.name.value}Where`, fields: relationshipWhereFields, }); - + composer.createInputTC({ name: `${relationship.name.value}CreateInput`, fields: objectFieldsToCreateInputFields([ @@ -783,7 +780,9 @@ function makeAugmentedSchema( */ }); - // this is the new way for the above forEach + // this is the new "functional" way for the above forEach + // helper to only create relationshipProperties Interface types once, even if multiple relationships reference it + const seenRelationshipPropertiesInterfaces = new Set(); schemaModel.concreteEntities.forEach((concreteEntity) => { const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); From 692018fbc0b2a5ea9bd2c977ede5bde52b6dd0b8 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 12:53:29 +0100 Subject: [PATCH 084/162] add typenames for subscriptionWhere types --- .../ConcreteEntityOperations.ts | 20 +++ .../InterfaceEntityOperations.ts | 8 + .../model-adapters/RelationshipAdapter.ts | 11 ++ .../generate-subscription-types.ts | 2 +- .../generate-subscription-where-type.ts | 140 ++++++++---------- packages/graphql/src/schema/to-compose.ts | 13 +- 6 files changed, 109 insertions(+), 85 deletions(-) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts index ab0e57fb4b..c120a850b2 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts @@ -137,6 +137,26 @@ export class ConcreteEntityOperations { return `${this.concreteEntityAdapter.name}OnCreateInput`; } + public get subscriptionEventPayloadTypeName(): string { + return `${this.concreteEntityAdapter.name}EventPayload`; + } + + public get subscriptionWhereInputTypeName(): string { + return `${this.concreteEntityAdapter.name}SubscriptionWhere`; + } + + public get relationshipsSubscriptionWhereInputTypeName(): string { + return `${this.concreteEntityAdapter.name}RelationshipsSubscriptionWhere`; + } + + public get relationshipCreatedSubscriptionWhereInputTypeName(): string { + return `${this.concreteEntityAdapter.name}RelationshipCreatedSubscriptionWhere`; + } + + public get relationshipDeletedSubscriptionWhereInputTypeName(): string { + return `${this.concreteEntityAdapter.name}RelationshipDeletedSubscriptionWhere`; + } + public get rootTypeFieldNames(): RootTypeFieldNames { return { create: `create${this.pascalCasePlural}`, diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts index 736a555181..3b8f412e77 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts @@ -137,6 +137,14 @@ export class InterfaceEntityOperations { return `${this.InterfaceEntityAdapter.name}OnCreateInput`; } + public get subscriptionWhereInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}SubscriptionWhere`; + } + + public get implementationsSubscriptionWhereInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ImplementationsSubscriptionWhere`; + } + public get rootTypeFieldNames(): RootTypeFieldNames { return { create: `create${this.pascalCasePlural}`, 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 ae5cc2d9b4..cff4982ade 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -187,6 +187,14 @@ export class RelationshipAdapter { return `${this.source.name}${upperFirst(this.name)}${isA}AggregationWhereInput`; } + public get subscriptionWhereInputTypeName(): string { + return `${this.source.name}${upperFirst(this.name)}RelationshipSubscriptionWhere`; + } + + public getToUnionSubscriptionWhereInputTypeName(ifUnionRelationshipTargetEntity: ConcreteEntityAdapter): string { + return `${this.source.name}${upperFirst(this.name)}${ifUnionRelationshipTargetEntity.name}SubscriptionWhere`; + } + public get edgeCreateInputTypeName(): string { return `${this.propertiesTypeName}CreateInput${this.hasNonNullNonGeneratedProperties ? `!` : ""}`; } @@ -201,6 +209,9 @@ export class RelationshipAdapter { public get edgeWhereInputTypeName(): string { return `${this.propertiesTypeName}Where`; } + public get edgeSubscriptionWhereInputTypeName(): string { + return `${this.propertiesTypeName}SubscriptionWhere`; + } public get edgeSortInputTypeName(): string { return `${this.propertiesTypeName}Sort`; } diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts index bd71ff4f97..d5b5f20513 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts @@ -374,7 +374,7 @@ export function generateSubscriptionTypes2({ throw new Error("fix user directives for object types in subscriptions."); } const eventPayloadType = schemaComposer.createObjectTC({ - name: `${entityAdapter.name}EventPayload`, + name: entityAdapter.operations.subscriptionEventPayloadTypeName, fields: attributeAdapterToComposeFields( entityAdapter.subscriptionEventPayloadFields, userDefinedFieldDirectives diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts index c707f43156..b63d47d6e2 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts @@ -17,7 +17,7 @@ * limitations under the License. */ -import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; import { attributesToSubscriptionsWhereInputFields, objectFieldsToSubscriptionsWhereInputFields } from "../to-compose"; import type { ObjectFields } from "../get-obj-field-meta"; @@ -57,16 +57,15 @@ export function generateSubscriptionWhereType2( entityAdapter: ConcreteEntityAdapter, schemaComposer: SchemaComposer ): InputTypeComposer | undefined { - const typeName = entityAdapter.name; - if (schemaComposer.has(`${entityAdapter.name}SubscriptionWhere`)) { - return schemaComposer.getITC(`${entityAdapter.name}SubscriptionWhere`); + if (schemaComposer.has(entityAdapter.operations.subscriptionWhereInputTypeName)) { + return schemaComposer.getITC(entityAdapter.operations.subscriptionWhereInputTypeName); } - const whereFields = attributesToSubscriptionsWhereInputFields(typeName, entityAdapter.subscriptionWhereFields); + const whereFields = attributesToSubscriptionsWhereInputFields(entityAdapter); if (isEmptyObject(whereFields)) { return; } return schemaComposer.createInputTC({ - name: `${entityAdapter.name}SubscriptionWhere`, + name: entityAdapter.operations.subscriptionWhereInputTypeName, fields: whereFields, }); } @@ -133,42 +132,37 @@ export function generateSubscriptionConnectionWhereType2({ entityAdapter: ConcreteEntityAdapter; schemaComposer: SchemaComposer; }): { created: InputTypeComposer; deleted: InputTypeComposer } | undefined { - const fieldName = entityAdapter.operations.subscriptionEventPayloadFieldNames.create_relationship; - const typeName = entityAdapter.name; - const connectedRelationship = getRelationshipConnectionWhereTypes2({ entityAdapter, schemaComposer, }); - const isConnectedNodeTypeNotExcluded = schemaComposer.has(`${typeName}SubscriptionWhere`); + const isConnectedNodeTypeNotExcluded = schemaComposer.has(entityAdapter.operations.subscriptionWhereInputTypeName); if (!isConnectedNodeTypeNotExcluded && !connectedRelationship) { return; } - const relationshipCreatedWhere = `${typeName}RelationshipCreatedSubscriptionWhere`; - const relationshipDeletedWhere = `${typeName}RelationshipDeletedSubscriptionWhere`; - + const fieldName = entityAdapter.operations.subscriptionEventPayloadFieldNames.create_relationship; return { created: schemaComposer.createInputTC({ - name: relationshipCreatedWhere, + name: entityAdapter.operations.relationshipCreatedSubscriptionWhereInputTypeName, fields: { - AND: `[${relationshipCreatedWhere}!]`, - OR: `[${relationshipCreatedWhere}!]`, - NOT: relationshipCreatedWhere, + AND: `[${entityAdapter.operations.relationshipCreatedSubscriptionWhereInputTypeName}!]`, + OR: `[${entityAdapter.operations.relationshipCreatedSubscriptionWhereInputTypeName}!]`, + NOT: entityAdapter.operations.relationshipCreatedSubscriptionWhereInputTypeName, ...(isConnectedNodeTypeNotExcluded && { - [fieldName]: schemaComposer.getITC(`${typeName}SubscriptionWhere`), + [fieldName]: schemaComposer.getITC(entityAdapter.operations.subscriptionWhereInputTypeName), }), ...(connectedRelationship && { createdRelationship: connectedRelationship }), }, }), deleted: schemaComposer.createInputTC({ - name: relationshipDeletedWhere, + name: entityAdapter.operations.relationshipDeletedSubscriptionWhereInputTypeName, fields: { - AND: `[${relationshipDeletedWhere}!]`, - OR: `[${relationshipDeletedWhere}!]`, - NOT: relationshipDeletedWhere, + AND: `[${entityAdapter.operations.relationshipDeletedSubscriptionWhereInputTypeName}!]`, + OR: `[${entityAdapter.operations.relationshipDeletedSubscriptionWhereInputTypeName}!]`, + NOT: entityAdapter.operations.relationshipDeletedSubscriptionWhereInputTypeName, ...(isConnectedNodeTypeNotExcluded && { - [fieldName]: schemaComposer.getITC(`${typeName}SubscriptionWhere`), + [fieldName]: schemaComposer.getITC(entityAdapter.operations.subscriptionWhereInputTypeName), }), ...(connectedRelationship && { deletedRelationship: connectedRelationship }), }, @@ -225,31 +219,30 @@ function getRelationshipConnectionWhereTypes2({ entityAdapter: ConcreteEntityAdapter; schemaComposer: SchemaComposer; }): InputTypeComposer | undefined { - const relationsFieldInputWhereTypeFields = Array.from(entityAdapter.relationships.values()).reduce((acc, rf) => { - const { name } = rf; - // TODO: remove - const nodeRelationPrefix = `${entityAdapter.name}${upperFirst(name)}`; - const fields = makeNodeRelationFields2({ - relationshipAdapter: rf, - schemaComposer, - nodeRelationPrefix, - }); - if (!fields) { + const relationsFieldInputWhereTypeFields = Array.from(entityAdapter.relationships.values()).reduce( + (acc, relationshipAdapter) => { + const fields = makeNodeRelationFields2({ + relationshipAdapter, + schemaComposer, + }); + if (!fields) { + return acc; + } + const relationFieldInputWhereType = schemaComposer.createInputTC({ + name: relationshipAdapter.subscriptionWhereInputTypeName, + fields, + }); + acc[relationshipAdapter.name] = relationFieldInputWhereType; return acc; - } - const relationFieldInputWhereType = schemaComposer.createInputTC({ - name: `${nodeRelationPrefix}RelationshipSubscriptionWhere`, - fields, - }); - acc[name] = relationFieldInputWhereType; - return acc; - }, {}); + }, + {} + ); if (isEmptyObject(relationsFieldInputWhereTypeFields)) { return; } const relationsFieldInputWhereType = schemaComposer.createInputTC({ - name: `${entityAdapter.name}RelationshipsSubscriptionWhere`, + name: entityAdapter.operations.relationshipsSubscriptionWhereInputTypeName, fields: relationsFieldInputWhereTypeFields, }); return relationsFieldInputWhereType; @@ -295,10 +288,8 @@ function makeNodeRelationFields({ function makeNodeRelationFields2({ relationshipAdapter, schemaComposer, - nodeRelationPrefix, }: { relationshipAdapter: RelationshipAdapter; - nodeRelationPrefix: string; schemaComposer: SchemaComposer; }) { const edgeType = makeRelationshipWhereType2({ @@ -309,7 +300,7 @@ function makeNodeRelationFields2({ const unionNode = relationshipAdapter.target instanceof UnionEntityAdapter ? relationshipAdapter.target : undefined; if (unionNode) { const unionNodeTypes = unionNode.concreteEntities; - return makeRelationshipToUnionTypeWhereType2({ unionNodeTypes, schemaComposer, nodeRelationPrefix, edgeType }); + return makeRelationshipToUnionTypeWhereType2({ unionNodeTypes, schemaComposer, relationshipAdapter, edgeType }); } const interfaceEntity = relationshipAdapter.target instanceof InterfaceEntityAdapter ? relationshipAdapter.target : undefined; @@ -358,12 +349,9 @@ function makeRelationshipWhereType2({ if (!relationProperties.size) { return undefined; } - const composeFields = attributesToSubscriptionsWhereInputFields( - relationshipAdapter.propertiesTypeName as string, - relationshipAdapter.subscriptionWhereFields - ); + const composeFields = attributesToSubscriptionsWhereInputFields(relationshipAdapter); // TODO: POINT was missing??? - return schemaComposer.getOrCreateITC(`${relationshipAdapter.propertiesTypeName}SubscriptionWhere`, (tc) => + return schemaComposer.getOrCreateITC(relationshipAdapter.edgeSubscriptionWhereInputTypeName, (tc) => tc.addFields(composeFields) ); } @@ -396,13 +384,13 @@ function makeRelationshipToConcreteTypeWhereType2({ edgeType: InputTypeComposer | undefined; schemaComposer: SchemaComposer; }): { node?: string; edge?: InputTypeComposer } | undefined { - const nodeTypeName = relationshipAdapter.target.name; - const nodeExists = schemaComposer.has(`${nodeTypeName}SubscriptionWhere`); + const concreteTargetEntity = relationshipAdapter.target as ConcreteEntityAdapter; + const nodeExists = schemaComposer.has(concreteTargetEntity.operations.subscriptionWhereInputTypeName); if (!nodeExists && !edgeType) { return undefined; } return { - ...(nodeExists && { node: `${nodeTypeName}SubscriptionWhere` }), + ...(nodeExists && { node: concreteTargetEntity.operations.subscriptionWhereInputTypeName }), ...(edgeType && { edge: edgeType }), }; } @@ -443,24 +431,24 @@ function makeRelationshipToUnionTypeWhereType({ function makeRelationshipToUnionTypeWhereType2({ unionNodeTypes, schemaComposer, - nodeRelationPrefix, + relationshipAdapter, edgeType, }: { schemaComposer: SchemaComposer; unionNodeTypes: ConcreteEntityAdapter[]; - nodeRelationPrefix: string; + relationshipAdapter: RelationshipAdapter; edgeType: InputTypeComposer | undefined; }): Record | undefined { const unionTypes = unionNodeTypes.reduce((acc, concreteEntity) => { - const nodeExists = schemaComposer.has(`${concreteEntity.name}SubscriptionWhere`); + const nodeExists = schemaComposer.has(concreteEntity.operations.subscriptionWhereInputTypeName); if (!nodeExists && !edgeType) { return acc; } acc[concreteEntity.name] = schemaComposer.getOrCreateITC( - `${nodeRelationPrefix}${concreteEntity.name}SubscriptionWhere`, + relationshipAdapter.getToUnionSubscriptionWhereInputTypeName(concreteEntity), (tc) => tc.addFields({ - ...(nodeExists && { node: `${concreteEntity.name}SubscriptionWhere` }), + ...(nodeExists && { node: concreteEntity.operations.subscriptionWhereInputTypeName }), ...(edgeType && { edge: edgeType }), }) ); @@ -538,40 +526,32 @@ function makeRelationshipToInterfaceTypeWhereType2({ interfaceEntity: InterfaceEntityAdapter; edgeType: InputTypeComposer | undefined; }): { node?: InputTypeComposer; edge?: InputTypeComposer } | undefined { - let interfaceImplementationsType: InputTypeComposer | undefined, - interfaceNodeType: InputTypeComposer | undefined = undefined; + let interfaceImplementationsType: InputTypeComposer | undefined = undefined; + let interfaceNodeType: InputTypeComposer | undefined = undefined; const implementationsFields = interfaceEntity.concreteEntities.reduce((acc, entity) => { - if (schemaComposer.has(`${entity.name}SubscriptionWhere`)) { - acc[entity.name] = `${entity.name}SubscriptionWhere`; + if (schemaComposer.has(entity.operations.subscriptionWhereInputTypeName)) { + acc[entity.name] = entity.operations.subscriptionWhereInputTypeName; } return acc; }, {}); if (!isEmptyObject(implementationsFields)) { interfaceImplementationsType = schemaComposer.getOrCreateITC( - `${interfaceEntity.name}ImplementationsSubscriptionWhere`, + interfaceEntity.operations.implementationsSubscriptionWhereInputTypeName, (tc) => tc.addFields(implementationsFields) ); } - // TODO: refactor this if check does not make sense bc includes more fields than .subscriptionWhereFields - // TODO: refactor attributesToSubscriptionsWhereInputFields to pass in just the entity and it takes .subscriptionWhereFields from the entity?? - const interfaceAttributes = interfaceEntity.attributes; - if (interfaceImplementationsType || interfaceAttributes.size) { - const composeFields = attributesToSubscriptionsWhereInputFields( - interfaceEntity.name, - interfaceEntity.subscriptionWhereFields + const interfaceFields: InputTypeComposerFieldConfigMapDefinition = + attributesToSubscriptionsWhereInputFields(interfaceEntity); + if (interfaceImplementationsType) { + interfaceFields["_on"] = interfaceImplementationsType; + } + if (!isEmptyObject(interfaceFields)) { + interfaceNodeType = schemaComposer.getOrCreateITC( + interfaceEntity.operations.subscriptionWhereInputTypeName, + (tc) => tc.addFields(interfaceFields) ); - const interfaceFields = { - ...(interfaceImplementationsType && { _on: interfaceImplementationsType }), - ...(interfaceAttributes.size && composeFields), - }; - if (!isEmptyObject(interfaceFields)) { - interfaceNodeType = schemaComposer.getOrCreateITC(`${interfaceEntity.name}SubscriptionWhere`, (tc) => - tc.addFields(interfaceFields) - ); - } } - if (!interfaceNodeType && !edgeType) { return; } diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index bfdae8ca82..66d9043eda 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -23,8 +23,10 @@ import { DEPRECATED } from "../constants"; 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 type { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { parseValueNode } from "../schema-model/parser/parse-value-node"; -import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { BaseField, InputField, PrimitiveField, TemporalField } from "../types"; import { DEPRECATE_NOT } from "./constants"; import getFieldTypeMeta from "./get-field-type-meta"; @@ -315,13 +317,16 @@ export function objectFieldsToSubscriptionsWhereInputFields( } export function attributesToSubscriptionsWhereInputFields( - typeName: string, - attributes: AttributeAdapter[] + entityWithAttributes: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter ): Record { - return attributes.reduce((res, attribute) => { + return entityWithAttributes.subscriptionWhereFields.reduce((res, attribute) => { if (!attribute.isFilterable()) { return res; } + const typeName = + entityWithAttributes instanceof RelationshipAdapter + ? entityWithAttributes.propertiesTypeName + : entityWithAttributes.name; const fieldType = attribute.getInputTypeNames().where.pretty; const ifArrayOfAnyTypeExceptBoolean = attribute.isList() && attribute.getTypeName() !== "Boolean"; From 1eb3039a2149c6c0d4006d9908f761d158e50ca7 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 18:02:45 +0100 Subject: [PATCH 085/162] make mutation operations and subscription events sets from arrays --- .../annotation/MutationAnnotation.ts | 6 ++-- .../annotation/SubscriptionAnnotation.ts | 6 ++-- .../src/schema-model/generate-model.test.ts | 14 ++++----- .../mutation-annotation.test.ts | 30 ++++++++++++------- .../annotations-parser/mutation-annotation.ts | 3 +- .../subscription-annotation.test.ts | 12 ++++---- .../subscription-annotation.ts | 5 ++-- 7 files changed, 43 insertions(+), 33 deletions(-) diff --git a/packages/graphql/src/schema-model/annotation/MutationAnnotation.ts b/packages/graphql/src/schema-model/annotation/MutationAnnotation.ts index 4683bc9727..70010b3d32 100644 --- a/packages/graphql/src/schema-model/annotation/MutationAnnotation.ts +++ b/packages/graphql/src/schema-model/annotation/MutationAnnotation.ts @@ -17,10 +17,12 @@ * limitations under the License. */ +import type { MutationOperations } from "../../graphql/directives/mutation"; + export class MutationAnnotation { - public readonly operations: string[]; + public readonly operations: Set; - constructor({ operations }: { operations: string[] }) { + constructor({ operations }: { operations: Set }) { this.operations = operations; } } diff --git a/packages/graphql/src/schema-model/annotation/SubscriptionAnnotation.ts b/packages/graphql/src/schema-model/annotation/SubscriptionAnnotation.ts index f24d024e00..a0b39183c5 100644 --- a/packages/graphql/src/schema-model/annotation/SubscriptionAnnotation.ts +++ b/packages/graphql/src/schema-model/annotation/SubscriptionAnnotation.ts @@ -17,10 +17,12 @@ * limitations under the License. */ +import type { SubscriptionEvent } from "../../graphql/directives/subscription"; + export class SubscriptionAnnotation { - public readonly events: string[]; + public readonly events: Set; - constructor({ events }: { events: string[] }) { + constructor({ events }: { events: Set }) { this.events = events; } } diff --git a/packages/graphql/src/schema-model/generate-model.test.ts b/packages/graphql/src/schema-model/generate-model.test.ts index 1482870eac..1a9f936bc4 100644 --- a/packages/graphql/src/schema-model/generate-model.test.ts +++ b/packages/graphql/src/schema-model/generate-model.test.ts @@ -556,21 +556,17 @@ describe("ConcreteEntity Annotations & Attributes", () => { const userMutation = userEntity?.annotations[AnnotationsKey.mutation]; expect(userMutation).toBeDefined(); - expect(userMutation?.operations).toStrictEqual(["CREATE", "UPDATE", "DELETE"]); + expect(userMutation?.operations).toStrictEqual(new Set(["CREATE", "UPDATE", "DELETE"])); const userSubscription = userEntity?.annotations[AnnotationsKey.subscription]; expect(userSubscription).toBeDefined(); - expect(userSubscription?.events).toStrictEqual([ - "CREATED", - "UPDATED", - "DELETED", - "RELATIONSHIP_CREATED", - "RELATIONSHIP_DELETED", - ]); + expect(userSubscription?.events).toStrictEqual( + new Set(["CREATED", "UPDATED", "DELETED", "RELATIONSHIP_CREATED", "RELATIONSHIP_DELETED"]) + ); const accountSubscription = accountEntity?.annotations[AnnotationsKey.subscription]; expect(accountSubscription).toBeDefined(); - expect(accountSubscription?.events).toStrictEqual(["CREATED"]); + expect(accountSubscription?.events).toStrictEqual(new Set(["CREATED"])); }); test("attributes should be generated with the correct annotations", () => { diff --git a/packages/graphql/src/schema-model/parser/annotations-parser/mutation-annotation.test.ts b/packages/graphql/src/schema-model/parser/annotations-parser/mutation-annotation.test.ts index f9023ae73c..a6b78df4be 100644 --- a/packages/graphql/src/schema-model/parser/annotations-parser/mutation-annotation.test.ts +++ b/packages/graphql/src/schema-model/parser/annotations-parser/mutation-annotation.test.ts @@ -25,32 +25,40 @@ const tests = [ { name: "should parse correctly with a CREATE operation set", directive: makeDirectiveNode("mutation", { operations: [MutationOperations.CREATE] }, mutationDirective), - expected: { operations: [MutationOperations.CREATE] }, + expected: { operations: new Set([MutationOperations.CREATE]) }, }, { name: "should parse correctly with an UPDATE operation set", directive: makeDirectiveNode("mutation", { operations: [MutationOperations.UPDATE] }, mutationDirective), - expected: { operations: [MutationOperations.UPDATE] }, + expected: { operations: new Set([MutationOperations.UPDATE]) }, }, { name: "should parse correctly with a DELETE operation set", directive: makeDirectiveNode("mutation", { operations: [MutationOperations.DELETE] }, mutationDirective), - expected: { operations: [MutationOperations.DELETE] }, + expected: { operations: new Set([MutationOperations.DELETE]) }, }, { name: "should parse correctly with a CREATE and UPDATE operation set", - directive: makeDirectiveNode("mutation", { - operations: [MutationOperations.CREATE, MutationOperations.UPDATE], - }, mutationDirective), - expected: { operations: [MutationOperations.CREATE, MutationOperations.UPDATE] }, + directive: makeDirectiveNode( + "mutation", + { + operations: [MutationOperations.CREATE, MutationOperations.UPDATE], + }, + mutationDirective + ), + expected: { operations: new Set([MutationOperations.CREATE, MutationOperations.UPDATE]) }, }, { name: "should parse correctly with a CREATE, UPDATE and DELETE operation set", - directive: makeDirectiveNode("mutation", { - operations: [MutationOperations.CREATE, MutationOperations.UPDATE, MutationOperations.DELETE], - }, mutationDirective), + directive: makeDirectiveNode( + "mutation", + { + operations: [MutationOperations.CREATE, MutationOperations.UPDATE, MutationOperations.DELETE], + }, + mutationDirective + ), expected: { - operations: [MutationOperations.CREATE, MutationOperations.UPDATE, MutationOperations.DELETE], + operations: new Set([MutationOperations.CREATE, MutationOperations.UPDATE, MutationOperations.DELETE]), }, }, ]; diff --git a/packages/graphql/src/schema-model/parser/annotations-parser/mutation-annotation.ts b/packages/graphql/src/schema-model/parser/annotations-parser/mutation-annotation.ts index c14e3648c5..cedabe4622 100644 --- a/packages/graphql/src/schema-model/parser/annotations-parser/mutation-annotation.ts +++ b/packages/graphql/src/schema-model/parser/annotations-parser/mutation-annotation.ts @@ -21,6 +21,7 @@ import { Neo4jGraphQLSchemaValidationError } from "../../../classes"; import { MutationAnnotation } from "../../annotation/MutationAnnotation"; import { mutationDirective } from "../../../graphql/directives"; import { parseArguments } from "../parse-arguments"; +import type { MutationOperations } from "../../../graphql/directives/mutation"; export function parseMutationAnnotation(directive: DirectiveNode): MutationAnnotation { const { operations } = parseArguments(mutationDirective, directive); @@ -28,6 +29,6 @@ export function parseMutationAnnotation(directive: DirectiveNode): MutationAnnot throw new Neo4jGraphQLSchemaValidationError("@mutation operations must be an array"); } return new MutationAnnotation({ - operations, + operations: new Set(operations), }); } diff --git a/packages/graphql/src/schema-model/parser/annotations-parser/subscription-annotation.test.ts b/packages/graphql/src/schema-model/parser/annotations-parser/subscription-annotation.test.ts index 26da15d2d1..13e33f7ace 100644 --- a/packages/graphql/src/schema-model/parser/annotations-parser/subscription-annotation.test.ts +++ b/packages/graphql/src/schema-model/parser/annotations-parser/subscription-annotation.test.ts @@ -25,20 +25,20 @@ const tests = [ { name: "should parse correctly when CREATED event is passed", directive: makeDirectiveNode("subscription", { events: ["CREATED"] }, subscriptionDirective), - events: ["CREATED"], - expected: { events: ["CREATED"] }, + events: new Set(["CREATED"]), + expected: { events: new Set(["CREATED"]) }, }, { name: "should parse correctly when UPDATED event is passed", directive: makeDirectiveNode("subscription", { events: ["UPDATED"] }, subscriptionDirective), - events: ["UPDATED"], - expected: { events: ["UPDATED"] }, + events: new Set(["UPDATED"]), + expected: { events: new Set(["UPDATED"]) }, }, { name: "should parse correctly when CREATE and UPDATE events are passed", directive: makeDirectiveNode("subscription", { events: ["CREATED", "UPDATED"] }, subscriptionDirective), - events: ["CREATED", "UPDATED"], - expected: { events: ["CREATED", "UPDATED"] }, + events: new Set(["CREATED", "UPDATED"]), + expected: { events: new Set(["CREATED", "UPDATED"]) }, }, ]; diff --git a/packages/graphql/src/schema-model/parser/annotations-parser/subscription-annotation.ts b/packages/graphql/src/schema-model/parser/annotations-parser/subscription-annotation.ts index 75bfb90f74..fb8b3fde9a 100644 --- a/packages/graphql/src/schema-model/parser/annotations-parser/subscription-annotation.ts +++ b/packages/graphql/src/schema-model/parser/annotations-parser/subscription-annotation.ts @@ -18,13 +18,14 @@ */ import type { DirectiveNode } from "graphql"; import { subscriptionDirective } from "../../../graphql/directives"; +import type { SubscriptionEvent } from "../../../graphql/directives/subscription"; import { SubscriptionAnnotation } from "../../annotation/SubscriptionAnnotation"; import { parseArguments } from "../parse-arguments"; export function parseSubscriptionAnnotation(directive: DirectiveNode): SubscriptionAnnotation { - const { events } = parseArguments<{ events: string[] }>(subscriptionDirective, directive); + const { events } = parseArguments<{ events: SubscriptionEvent[] }>(subscriptionDirective, directive); return new SubscriptionAnnotation({ - events, + events: new Set(events), }); } From fedf8701440299c3e54d021ac72e2709cb6b487f Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 18:03:49 +0100 Subject: [PATCH 086/162] propagate schema directives (schema config) on concrete entitites --- .../model-adapters/ConcreteEntityAdapter.ts | 59 ++++++++++++++++++- .../src/schema-model/generate-model.ts | 7 ++- 2 files changed, 63 insertions(+), 3 deletions(-) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts index 79f93c17b0..5b63c06d4d 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts @@ -31,6 +31,8 @@ import type { ConcreteEntity } from "../ConcreteEntity"; import { ConcreteEntityOperations } from "./ConcreteEntityOperations"; import type { InterfaceEntityAdapter } from "./InterfaceEntityAdapter"; import type { UnionEntityAdapter } from "./UnionEntityAdapter"; +import { MutationOperations } from "../../../graphql/directives/mutation"; +import { SubscriptionEvent } from "../../../graphql/directives/subscription"; export class ConcreteEntityAdapter { public readonly name: string; @@ -204,9 +206,62 @@ export class ConcreteEntityAdapter { return this._operations; } + get isReadable(): boolean { + return this.annotations.query === undefined || this.annotations.query.read === true; + } + get isAggregable(): boolean { + return this.annotations.query === undefined || this.annotations.query.aggregate === true; + } + get isCreatable(): boolean { + return ( + this.annotations.mutation === undefined || + this.annotations.mutation.operations.has(MutationOperations.CREATE) + ); + } + get isUpdatable(): boolean { + return ( + this.annotations.mutation === undefined || + this.annotations.mutation.operations.has(MutationOperations.UPDATE) + ); + } + get isDeletable(): boolean { + return ( + this.annotations.mutation === undefined || + this.annotations.mutation.operations.has(MutationOperations.DELETE) + ); + } get isSubscribable(): boolean { - // return !!this.annotations.subscription?.events?.length; - return this.annotations.subscription === undefined || this.annotations.subscription.events?.length > 0; + return this.annotations.subscription === undefined || this.annotations.subscription.events?.size > 0; + } + get isSubscribableOnCreate(): boolean { + return ( + this.annotations.subscription === undefined || + this.annotations.subscription.events.has(SubscriptionEvent.CREATED) + ); + } + get isSubscribableOnUpdate(): boolean { + return ( + this.annotations.subscription === undefined || + this.annotations.subscription.events.has(SubscriptionEvent.UPDATED) + ); + } + get isSubscribableOnDelete(): boolean { + return ( + this.annotations.subscription === undefined || + this.annotations.subscription.events.has(SubscriptionEvent.DELETED) + ); + } + get isSubscribableOnRelationshipCreate(): boolean { + return ( + this.annotations.subscription === undefined || + this.annotations.subscription.events.has(SubscriptionEvent.RELATIONSHIP_CREATED) + ); + } + get isSubscribableOnRelationshipDelete(): boolean { + return ( + this.annotations.subscription === undefined || + this.annotations.subscription.events.has(SubscriptionEvent.RELATIONSHIP_DELETED) + ); } // TODO: Implement the Globals methods toGlobalId and fromGlobalId, getGlobalId etc... diff --git a/packages/graphql/src/schema-model/generate-model.ts b/packages/graphql/src/schema-model/generate-model.ts index 94612d7d87..720523407d 100644 --- a/packages/graphql/src/schema-model/generate-model.ts +++ b/packages/graphql/src/schema-model/generate-model.ts @@ -421,7 +421,12 @@ function generateConcreteEntity( }); const inheritedDirectives = inheritsFrom?.flatMap((i) => i?.directives || []); - const annotations = createEntityAnnotations((definition.directives || []).concat(inheritedDirectives || [])); + // schema directives are propagated onto concrete entities + // TODO: currently all directives are propagated. Filter them here if this changes. + const schemaDirectives = definitionCollection.schemaExtension?.directives; + const annotations = createEntityAnnotations( + (definition.directives || []).concat(inheritedDirectives || []).concat(schemaDirectives || []) + ); return new ConcreteEntity({ name: definition.name.value, From 0b40671c4b5757db115bf936c4a503059b706a58 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 18:04:31 +0100 Subject: [PATCH 087/162] remove reference to nodes for schema config directives from make-augmented-schema --- .../src/schema/new-make-augmented-schema.ts | 24 ++++--------------- .../generate-subscription-types.ts | 23 +++++------------- 2 files changed, 11 insertions(+), 36 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 4183f9704d..6964cdf9cb 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -680,8 +680,6 @@ function makeAugmentedSchema( const aggregationTypesMapper = new AggregationTypesMapper(composer, subgraph); - const globalSchemaConfiguration = schemaConfigurationFromSchemaExtensions(schemaExtensions); - const getNodesResult = getNodes(definitionNodes, { callbacks, userCustomResolvers }); const { nodes, relationshipPropertyInterfaceNames, interfaceRelationshipNames } = getNodesResult; @@ -1054,17 +1052,7 @@ function makeAugmentedSchema( ensureNonEmptyInput(composer, concreteEntityAdapter.operations.updateInputTypeName); ensureNonEmptyInput(composer, concreteEntityAdapter.operations.createInputTypeName); - // TODO: move this somewhere in the schema generator initialisation? - const schemaConfiguration = schemaConfigurationFromObjectTypeDefinition(definitionNode); - - const schemaConfigurationFlags = getSchemaConfigurationFlags({ - globalSchemaConfiguration, - nodeSchemaConfiguration: schemaConfiguration, - // TODO: Check if this is deprecated now - // excludeDirective: node.exclude, - }); - - if (schemaConfigurationFlags.read) { + if (concreteEntityAdapter.isReadable) { composer.Query.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.read]: findResolver2({ node, @@ -1088,7 +1076,7 @@ function makeAugmentedSchema( graphqlDirectivesToCompose(propagatedDirectives) ); } - if (schemaConfigurationFlags.aggregate) { + if (concreteEntityAdapter.isAggregable) { composer.Query.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver2({ node, @@ -1101,7 +1089,7 @@ function makeAugmentedSchema( ); } - if (schemaConfigurationFlags.create) { + if (concreteEntityAdapter.isCreatable) { composer.Mutation.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.create]: createResolver2({ node, @@ -1114,7 +1102,7 @@ function makeAugmentedSchema( ); } - if (schemaConfigurationFlags.delete) { + if (concreteEntityAdapter.isDeletable) { composer.Mutation.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.delete]: deleteResolver2({ node, @@ -1128,7 +1116,7 @@ function makeAugmentedSchema( ); } - if (schemaConfigurationFlags.update) { + if (concreteEntityAdapter.isUpdatable) { composer.Mutation.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.update]: updateResolver2({ node, @@ -1168,9 +1156,7 @@ function makeAugmentedSchema( generateSubscriptionTypes2({ schemaComposer: composer, schemaModel, - nodes, userDefinedFieldDirectivesForNode, - globalSchemaConfiguration, }); } diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts index d5b5f20513..43bb18ff2a 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts @@ -352,15 +352,11 @@ export function generateSubscriptionTypes({ export function generateSubscriptionTypes2({ schemaComposer, schemaModel, - nodes, userDefinedFieldDirectivesForNode, - globalSchemaConfiguration, }: { schemaComposer: SchemaComposer; schemaModel: Neo4jGraphQLSchemaModel; - nodes: Node[]; userDefinedFieldDirectivesForNode: Map>; - globalSchemaConfiguration: SchemaConfiguration; }): void { const subscriptionComposer = schemaComposer.Subscription; @@ -389,8 +385,6 @@ export function generateSubscriptionTypes2({ const nodeToRelationFieldMap: Map> = new Map(); const nodesWithSubscriptionOperation = allNodes.filter((e) => e.isSubscribable); nodesWithSubscriptionOperation.forEach((entityAdapter) => { - // TODO: remove - const node = nodes.find((n) => n.name === entityAdapter.name) as Node; const eventPayload = nodeNameToEventPayloadTypes[entityAdapter.name] as ObjectTypeComposer; const where = generateSubscriptionWhereType2(entityAdapter, schemaComposer); @@ -582,13 +576,7 @@ export function generateSubscriptionTypes2({ const whereArgument = where && { args: { where } }; - const schemaConfigurationFlags = getSchemaConfigurationFlags({ - globalSchemaConfiguration, - nodeSchemaConfiguration: node.schemaConfiguration, - excludeDirective: node.exclude, - }); - - if (schemaConfigurationFlags.subscribeCreate) { + if (entityAdapter.isSubscribableOnCreate) { subscriptionComposer.addFields({ [entityAdapter.operations.rootTypeFieldNames.subscribe.created]: { ...whereArgument, @@ -598,7 +586,7 @@ export function generateSubscriptionTypes2({ }, }); } - if (schemaConfigurationFlags.subscribeUpdate) { + if (entityAdapter.isSubscribableOnUpdate) { subscriptionComposer.addFields({ [entityAdapter.operations.rootTypeFieldNames.subscribe.updated]: { ...whereArgument, @@ -609,7 +597,7 @@ export function generateSubscriptionTypes2({ }); } - if (schemaConfigurationFlags.subscribeDelete) { + if (entityAdapter.isSubscribableOnDelete) { subscriptionComposer.addFields({ [entityAdapter.operations.rootTypeFieldNames.subscribe.deleted]: { ...whereArgument, @@ -625,7 +613,7 @@ export function generateSubscriptionTypes2({ schemaComposer, }); if (entityAdapter.relationships.size > 0) { - if (schemaConfigurationFlags.subscribeCreateRelationship) { + if (entityAdapter.isSubscribableOnRelationshipCreate) { subscriptionComposer.addFields({ [entityAdapter.operations.rootTypeFieldNames.subscribe.relationship_created]: { ...(connectionWhere?.created && { args: { where: connectionWhere?.created } }), @@ -638,7 +626,7 @@ export function generateSubscriptionTypes2({ }, }); } - if (schemaConfigurationFlags.subscribeDeleteRelationship) { + if (entityAdapter.isSubscribableOnRelationshipDelete) { subscriptionComposer.addFields({ [entityAdapter.operations.rootTypeFieldNames.subscribe.relationship_deleted]: { ...(connectionWhere?.deleted && { args: { where: connectionWhere?.deleted } }), @@ -707,6 +695,7 @@ function getRelationshipEventDataForNode2( destinationProperties: Record; destinationTypename: string; } { + // TODO:can I refactor this? let condition = event.toTypename === entityAdapter.name; if (event.toTypename === event.fromTypename) { // must check relationship direction from schema From 42a5a5eddbea39f540a273305a9cf0c7e77a709b Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 18:22:56 +0100 Subject: [PATCH 088/162] minor refactor and comments on user defined directives logic --- .../src/schema/new-make-augmented-schema.ts | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 6964cdf9cb..d6dd80f98b 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -520,6 +520,8 @@ function getUserDefinedFieldDirectivesForDefinition( const userDefinedFieldDirectives = new Map(); const allFields: Array = [...(definitionNode.fields || [])]; + // TODO: is it a good idea to inherit the field directives from implemented interfaces? + // makes sense for deprecated but for other user-defined directives?? if (definitionNode.interfaces) { for (const inheritsFrom of definitionNode.interfaces) { const interfaceDefinition = definitionNodes.interfaceTypes.find( @@ -815,15 +817,34 @@ function makeAugmentedSchema( }); // TODO: find some solution for this + // TODO: should directives be inherited?? they are user-defined after all + // TODO: other considerations might apply to PROPAGATED_DIRECTIVES: deprecated and shareable + // ATM we only test deprecated propagates + // also, should these live in the schema model?? const userDefinedFieldDirectivesForNode = new Map>(); + const userDefinedDirectivesForNode = new Map(); + const propagatedDirectivesForNode = new Map(); + const userDefinedDirectivesForInterface = new Map(); for (const definitionNode of definitionNodes.objectTypes) { + const userDefinedObjectDirectives = + definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; + const propagatedDirectives = + definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || + []; + userDefinedDirectivesForNode.set(definitionNode.name.value, userDefinedObjectDirectives); + propagatedDirectivesForNode.set(definitionNode.name.value, propagatedDirectives); const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); } for (const definitionNode of definitionNodes.interfaceTypes) { + const userDefinedInterfaceDirectives = + definitionNode.directives?.filter((directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value)) || + []; + userDefinedDirectivesForInterface.set(definitionNode.name.value, userDefinedInterfaceDirectives); const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); } + nodes.forEach((node) => { const concreteEntity = schemaModel.getEntity(node.name) as ConcreteEntity; const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); @@ -847,18 +868,14 @@ function makeAugmentedSchema( userDefinedFieldDirectives ); - const userDefinedObjectDirectives = - definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; - - const propagatedDirectives = - definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || - []; - + const propagatedDirectives = propagatedDirectivesForNode.get(concreteEntity.name) || []; + const directives = (userDefinedDirectivesForNode.get(concreteEntity.name) || []).concat(propagatedDirectives); const composeNode = composer.createObjectTC({ name: concreteEntity.name, fields: nodeFields, description: concreteEntityAdapter.description, - directives: graphqlDirectivesToCompose([...userDefinedObjectDirectives, ...propagatedDirectives]), + directives: graphqlDirectivesToCompose(directives), + // TODO: get from schema model once PR has been merged and remove definitionNode ref interfaces: definitionNode.interfaces?.map((x) => x.name.value), // TODO: we need to get the interfaces from somewhere else? }); @@ -1229,11 +1246,6 @@ function makeAugmentedSchema( return; } - const userDefinedInterfaceDirectives = - definitionNode.directives?.filter( - (directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value) - ) || []; - const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); composer.createInterfaceTC({ name: interfaceEntityAdapter.name, @@ -1248,7 +1260,9 @@ function makeAugmentedSchema( getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) ), }, - directives: graphqlDirectivesToCompose(userDefinedInterfaceDirectives), + directives: graphqlDirectivesToCompose( + userDefinedDirectivesForInterface.get(interfaceEntity.name) || [] + ), }); } }); From eb9f1f097d9ac3320aaacd7331e5e173487caa4e Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 18:34:04 +0100 Subject: [PATCH 089/162] remove definitionNode from nodes.forEach in make-augmented-schema --- .../graphql/src/schema/new-make-augmented-schema.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index d6dd80f98b..049ae42411 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -849,15 +849,6 @@ function makeAugmentedSchema( const concreteEntity = schemaModel.getEntity(node.name) as ConcreteEntity; const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - // We wanted to get the userDefinedDirectives - const definitionNode = definitionNodes.objectTypes.find( - (type) => type.name.value === concreteEntityAdapter.name - ); - if (!definitionNode) { - console.error(`Definition node not found for ${concreteEntityAdapter.name}`); - return; - } - const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(concreteEntityAdapter.name); if (!userDefinedFieldDirectives) { throw new Error("fix user directives for object types."); @@ -875,8 +866,7 @@ function makeAugmentedSchema( fields: nodeFields, description: concreteEntityAdapter.description, directives: graphqlDirectivesToCompose(directives), - // TODO: get from schema model once PR has been merged and remove definitionNode ref - interfaces: definitionNode.interfaces?.map((x) => x.name.value), // TODO: we need to get the interfaces from somewhere else? + interfaces: concreteEntity.compositeEntities.filter((e) => e instanceof InterfaceEntity).map((e) => e.name), }); if (concreteEntityAdapter.isGlobalNode()) { From 51f182b7692eb7c843a0ba48239cdf7f0d781b1e Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 15 Sep 2023 18:51:40 +0100 Subject: [PATCH 090/162] only propagate schema config directives to concrete entities --- packages/graphql/src/schema-model/generate-model.ts | 9 +++++---- packages/graphql/src/schema/new-make-augmented-schema.ts | 5 ----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/graphql/src/schema-model/generate-model.ts b/packages/graphql/src/schema-model/generate-model.ts index 720523407d..37c68358c3 100644 --- a/packages/graphql/src/schema-model/generate-model.ts +++ b/packages/graphql/src/schema-model/generate-model.ts @@ -45,6 +45,7 @@ import { parseAttribute, parseAttributeArguments, parseField } from "./parser/pa import { findDirective } from "./parser/utils"; import type { NestedOperation, QueryDirection, RelationshipDirection } from "./relationship/Relationship"; import { Relationship } from "./relationship/Relationship"; +import { PROPAGATED_DIRECTIVES_FROM_SCHEMA_TO_OBJECT } from "../constants"; export function generateModel(document: DocumentNode): Neo4jGraphQLSchemaModel { const definitionCollection: DefinitionCollection = getDefinitionCollection(document); @@ -365,7 +366,6 @@ function generateRelationshipField( const annotations = parseAnnotations(mergedDirectives); const args = parseAttributeArguments(field.arguments || [], definitionCollection); - // TODO: add property interface name return new Relationship({ name: fieldName, type: type as string, @@ -421,9 +421,10 @@ function generateConcreteEntity( }); const inheritedDirectives = inheritsFrom?.flatMap((i) => i?.directives || []); - // schema directives are propagated onto concrete entities - // TODO: currently all directives are propagated. Filter them here if this changes. - const schemaDirectives = definitionCollection.schemaExtension?.directives; + // schema configuration directives are propagated onto concrete entities + const schemaDirectives = definitionCollection.schemaExtension?.directives?.filter((x) => + PROPAGATED_DIRECTIVES_FROM_SCHEMA_TO_OBJECT.includes(x.name.value) + ); const annotations = createEntityAnnotations( (definition.directives || []).concat(inheritedDirectives || []).concat(schemaDirectives || []) ); diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 049ae42411..c50638faac 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -113,11 +113,6 @@ import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; import { addMathOperatorsToITC } from "./math"; -import { - getSchemaConfigurationFlags, - schemaConfigurationFromObjectTypeDefinition, - schemaConfigurationFromSchemaExtensions, -} from "./schema-configuration"; import { generateSubscriptionTypes, generateSubscriptionTypes2 } from "./subscriptions/generate-subscription-types"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { From 8599cce72e71c235ffd323a090e44eb1aee43275 Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:20:44 +0100 Subject: [PATCH 091/162] add schema directives to be propagated to objects in constants --- packages/graphql/src/constants.ts | 2 ++ packages/graphql/src/schema/get-where-fields.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/constants.ts b/packages/graphql/src/constants.ts index a081389e05..f23c12dd3a 100644 --- a/packages/graphql/src/constants.ts +++ b/packages/graphql/src/constants.ts @@ -159,3 +159,5 @@ export type InterfaceDirective = (typeof INTERFACE_DIRECTIVES)[number]; export const DEPRECATED = "deprecated"; export const PROPAGATED_DIRECTIVES = ["shareable", DEPRECATED] as const; + +export const PROPAGATED_DIRECTIVES_FROM_SCHEMA_TO_OBJECT = ["query", "mutation", "subscription"]; diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index 430ea8d966..bd57450b30 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -220,7 +220,8 @@ export function getWhereFieldsFromRelationshipProperties({ return { ...result, ...fields }; } - +// TODO: refactoring needed! +// isWhereField, isFilterable, ... extracted out into attributes category export function getWhereFieldsForAttributes({ attributes, userDefinedFieldDirectives, From 43f7e55f20ec4b5dd2c490eea3cd351b2fc01486 Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:20:58 +0100 Subject: [PATCH 092/162] use schemaModel in fulltext.ts --- .../graphql/src/schema/augment/fulltext.ts | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/packages/graphql/src/schema/augment/fulltext.ts b/packages/graphql/src/schema/augment/fulltext.ts index a4f215276e..8e07f5d145 100644 --- a/packages/graphql/src/schema/augment/fulltext.ts +++ b/packages/graphql/src/schema/augment/fulltext.ts @@ -107,11 +107,11 @@ export function augmentFulltextSchema2( composer: SchemaComposer, concreteEntityAdapter: ConcreteEntityAdapter ) { - if (!node.fulltextDirective) { + if (!concreteEntityAdapter.annotations.fulltext) { return; } - const fields = node.fulltextDirective.indexes.reduce((res, index) => { + const fields = concreteEntityAdapter.annotations.fulltext?.indexes.reduce((res, index) => { const indexName = index.indexName || index.name; if (indexName === undefined) { throw new Error("The name of the fulltext index should be defined using the indexName argument."); @@ -137,47 +137,55 @@ export function augmentFulltextSchema2( }); composer.createInputTC({ - name: node.fulltextTypeNames.sort, + name: concreteEntityAdapter.operations.fulltextTypeNames.sort, description: fulltextSortDescription, fields: { [SCORE_FIELD]: "SortDirection", - [node.singular]: concreteEntityAdapter.operations.sortInputTypeName, + [concreteEntityAdapter.singular]: concreteEntityAdapter.operations.sortInputTypeName, }, }); composer.createInputTC({ - name: node.fulltextTypeNames.where, + name: concreteEntityAdapter.operations.fulltextTypeNames.where, description: fulltextWhereDescription, fields: { [SCORE_FIELD]: FloatWhere.name, - [node.singular]: concreteEntityAdapter.operations.whereInputTypeName, + [concreteEntityAdapter.singular]: concreteEntityAdapter.operations.whereInputTypeName, }, }); composer.createObjectTC({ - name: node.fulltextTypeNames.result, + name: concreteEntityAdapter.operations.fulltextTypeNames.result, description: fulltextResultDescription, fields: { [SCORE_FIELD]: new GraphQLNonNull(GraphQLFloat), - [node.singular]: `${node.name}!`, + [concreteEntityAdapter.singular]: `${concreteEntityAdapter.name}!`, }, }); // TODO: to move this over to the concreteEntityAdapter we need to check what the use of // the queryType and scoreVariable properties are in FulltextContext // and determine if we can remove them - node.fulltextDirective.indexes.forEach((index) => { + concreteEntityAdapter.annotations.fulltext.indexes.forEach((index) => { // TODO: remove indexName assignment and undefined check once the name argument has been removed. const indexName = index.indexName || index.name; if (indexName === undefined) { throw new Error("The name of the fulltext index should be defined using the indexName argument."); } - let queryName = `${node.plural}Fulltext${upperFirst(indexName)}`; + let queryName = `${concreteEntityAdapter.plural}Fulltext${upperFirst(indexName)}`; if (index.queryName) { queryName = index.queryName; } + // TODO: temporary for compatibility with translation layer + const nodeIndex = node.fulltextDirective!.indexes.find((i) => { + const iName = i.indexName || i.name; + return iName === indexName; + }); + if (!nodeIndex) { + throw new Error("fix index from Node "); + } composer.Query.addFields({ - [queryName]: fulltextResolver({ node }, index), + [queryName]: fulltextResolver({ node }, nodeIndex), }); }); } From 1a5ca6c3fb8b43ede0a227eec9073a2b5cdec0b5 Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:21:43 +0100 Subject: [PATCH 093/162] conditionally create MathAdapter only if attribute supports it --- .../model-adapters/AttributeAdapter.test.ts | 41 ++++++++++++------- .../model-adapters/AttributeAdapter.ts | 10 ++++- .../attribute/model-adapters/MathAdapter.ts | 5 ++- 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts index 94fc206727..d2665cde14 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts @@ -598,10 +598,10 @@ describe("Attribute", () => { expect(listElementAttribute).toBeInstanceOf(AttributeAdapter); expect(listElementAttribute.listModel).toBeDefined(); - expect(listElementAttribute.listModel.getIncludes()).toMatchInlineSnapshot(`"test_INCLUDES"`); - expect(listElementAttribute.listModel.getNotIncludes()).toMatchInlineSnapshot(`"test_NOT_INCLUDES"`); - expect(listElementAttribute.listModel.getPop()).toMatchInlineSnapshot(`"test_POP"`); - expect(listElementAttribute.listModel.getPush()).toMatchInlineSnapshot(`"test_PUSH"`); + expect(listElementAttribute.listModel!.getIncludes()).toMatchInlineSnapshot(`"test_INCLUDES"`); + expect(listElementAttribute.listModel!.getNotIncludes()).toMatchInlineSnapshot(`"test_NOT_INCLUDES"`); + expect(listElementAttribute.listModel!.getPop()).toMatchInlineSnapshot(`"test_POP"`); + expect(listElementAttribute.listModel!.getPush()).toMatchInlineSnapshot(`"test_PUSH"`); }); test("Aggregation Model", () => { @@ -670,7 +670,7 @@ describe("Attribute", () => { }); test("Math Model", () => { - const attribute = new AttributeAdapter( + const intAttribute = new AttributeAdapter( new Attribute({ name: "test", annotations: [], @@ -678,17 +678,30 @@ describe("Attribute", () => { args: [], }) ); - // TODO: test it with float as well. - expect(attribute).toBeInstanceOf(AttributeAdapter); - expect(attribute.mathModel).toBeDefined(); - expect(attribute.mathModel.getMathOperations()).toEqual( - expect.arrayContaining(["test_INCREMENT", "test_DECREMENT", "test_MULTIPLY", "test_DIVIDE"]) + expect(intAttribute).toBeInstanceOf(AttributeAdapter); + expect(intAttribute.mathModel).toBeDefined(); + expect(intAttribute.mathModel!.getMathOperations()).toEqual( + expect.arrayContaining(["test_INCREMENT", "test_DECREMENT"]) ); - expect(attribute.mathModel.getAdd()).toMatchInlineSnapshot(`"test_INCREMENT"`); - expect(attribute.mathModel.getSubtract()).toMatchInlineSnapshot(`"test_DECREMENT"`); - expect(attribute.mathModel.getMultiply()).toMatchInlineSnapshot(`"test_MULTIPLY"`); - expect(attribute.mathModel.getDivide()).toMatchInlineSnapshot(`"test_DIVIDE"`); + expect(intAttribute.mathModel!.getAdd()).toMatchInlineSnapshot(`"test_INCREMENT"`); + expect(intAttribute.mathModel!.getSubtract()).toMatchInlineSnapshot(`"test_DECREMENT"`); + expect(intAttribute.mathModel!.getMultiply()).toMatchInlineSnapshot(`"test_MULTIPLY"`); + expect(intAttribute.mathModel!.getDivide()).toMatchInlineSnapshot(`"test_DIVIDE"`); + + const floatAttribute = new AttributeAdapter( + new Attribute({ + name: "test", + annotations: [], + type: new ScalarType(GraphQLBuiltInScalarType.Float, true), + args: [], + }) + ); + expect(floatAttribute).toBeInstanceOf(AttributeAdapter); + expect(floatAttribute.mathModel).toBeDefined(); + expect(floatAttribute.mathModel!.getMathOperations()).toEqual( + expect.arrayContaining(["test_ADD", "test_SUBTRACT", "test_MULTIPLY", "test_DIVIDE"]) + ); }); }); }); diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 8b71548b48..98fc456bc7 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -317,8 +317,11 @@ export class AttributeAdapter { /** * @throws {Error} if the attribute is not a list */ - get listModel(): ListAdapter { + get listModel(): ListAdapter | undefined { if (!this._listModel) { + if (!this.isArrayMethodField()) { + return; + } this._listModel = new ListAdapter(this); } return this._listModel; @@ -327,8 +330,11 @@ export class AttributeAdapter { /** * @throws {Error} if the attribute is not a scalar */ - get mathModel(): MathAdapter { + get mathModel(): MathAdapter | undefined { if (!this._mathModel) { + if (!this.isNumeric() || this.isList()) { + return; + } this._mathModel = new MathAdapter(this); } return this._mathModel; diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/MathAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/MathAdapter.ts index e40009e8d7..d016375e98 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/MathAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/MathAdapter.ts @@ -30,7 +30,10 @@ export class MathAdapter { } getMathOperations(): string[] { - return [this.getAdd(), this.getSubtract(), this.getMultiply(), this.getDivide()]; + const operations = [this.getAdd(), this.getSubtract()]; + this.AttributeAdapter.isFloat() && operations.push(this.getMultiply()); + this.AttributeAdapter.isFloat() && operations.push(this.getDivide()); + return operations; } getAdd(): string { From 40f063d99b86b308b31662597ab1c03f7bb50a48 Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:23:25 +0100 Subject: [PATCH 094/162] add operations to relationshipAdapter --- .../RelationshipAdapter.test.ts | 4 +- .../model-adapters/RelationshipAdapter.ts | 135 +----------- .../model-adapters/RelationshipOperations.ts | 193 ++++++++++++++++++ 3 files changed, 206 insertions(+), 126 deletions(-) create mode 100644 packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts 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 b64011ee8d..35c3d72357 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 @@ -132,12 +132,12 @@ describe("RelationshipAdapter", () => { test("should generate a valid connectionFieldTypename", () => { const relationshipAdapter = userAdapter.relationships.get("accounts"); - expect(relationshipAdapter?.connectionFieldTypename).toBe("UserAccountsConnection"); + expect(relationshipAdapter?.operations.connectionFieldTypename).toBe("UserAccountsConnection"); }); test("should generate a valid relationshipFieldTypename", () => { const relationshipAdapter = userAdapter.relationships.get("accounts"); - expect(relationshipAdapter?.relationshipFieldTypename).toBe("UserAccountsRelationship"); + expect(relationshipAdapter?.operations.relationshipFieldTypename).toBe("UserAccountsRelationship"); }); test("should parse selectable", () => { 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 cff4982ade..9d0309e3dc 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -30,6 +30,7 @@ import { ConcreteEntityAdapter } from "../../entity/model-adapters/ConcreteEntit import { InterfaceEntityAdapter } from "../../entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../entity/model-adapters/UnionEntityAdapter"; import type { NestedOperation, QueryDirection, Relationship, RelationshipDirection } from "../Relationship"; +import { RelationshipOperations } from "./RelationshipOperations"; export class RelationshipAdapter { public readonly name: string; @@ -50,6 +51,9 @@ export class RelationshipAdapter { public readonly annotations: Partial; public readonly args: Argument[]; + // specialize models + private _operations: RelationshipOperations | undefined; + constructor( relationship: Relationship, sourceAdapter?: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter @@ -102,131 +106,11 @@ export class RelationshipAdapter { this.inheritedFrom = inheritedFrom; } - public get prefixForTypename(): string { - // TODO: if relationship field is inherited by source (part of a implemented Interface, not necessarily annotated as rel) - // then return this.interface.name - // TODO: how to get implemented interfaces here?? - // console.log(this.inheritedFrom, this.source.name, this.name); - - return this.inheritedFrom || this.source.name; - } - - public get fieldInputPrefixForTypename(): string { - const isTargetInterface = this.target instanceof InterfaceEntityAdapter; - if (isTargetInterface) { - return this.source.name; - } - return this.prefixForTypename; - } - - /**Note: Required for now to infer the types without ResolveTree */ - public get connectionFieldTypename(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}Connection`; - } - - /**Note: Required for now to infer the types without ResolveTree */ - public get relationshipFieldTypename(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}Relationship`; - } - - public get fieldInputTypeName(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}FieldInput`; - } - - public get updateFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}UpdateFieldInput`; - } - - public get createFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}CreateFieldInput`; - } - - public get deleteFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}DeleteFieldInput`; - } - public get connectFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}ConnectFieldInput`; - } - - public get disconnectFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}DisconnectFieldInput`; - } - - public getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter?: ConcreteEntityAdapter): string { - if (this.target instanceof UnionEntityAdapter) { - if (!concreteTargetEntityAdapter) { - throw new Error("missing concreteTargetEntityAdapter"); - } - return `${this.prefixForTypename}${upperFirst(this.name)}${ - concreteTargetEntityAdapter.name - }ConnectOrCreateFieldInput`; + get operations(): RelationshipOperations { + if (!this._operations) { + return new RelationshipOperations(this); } - return `${this.prefixForTypename}${upperFirst(this.name)}ConnectOrCreateFieldInput`; - } - - public getConnectOrCreateOnCreateFieldInputTypeName(concreteTargetEntityAdapter: ConcreteEntityAdapter): string { - return `${this.getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter)}OnCreate`; - } - - public get connectionFieldName(): string { - return `${this.name}Connection`; - } - - public get connectionWhereTypename(): string { - return `${this.prefixForTypename}${upperFirst(this.name)}ConnectionWhere`; - } - public get updateConnectionInputTypename(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.name)}UpdateConnectionInput`; - } - - public get aggregateInputTypeName(): string { - return `${this.source.name}${upperFirst(this.name)}AggregateInput`; - } - - public getAggregationWhereInputTypeName(isA: "Node" | "Edge"): string { - return `${this.source.name}${upperFirst(this.name)}${isA}AggregationWhereInput`; - } - - public get subscriptionWhereInputTypeName(): string { - return `${this.source.name}${upperFirst(this.name)}RelationshipSubscriptionWhere`; - } - - public getToUnionSubscriptionWhereInputTypeName(ifUnionRelationshipTargetEntity: ConcreteEntityAdapter): string { - return `${this.source.name}${upperFirst(this.name)}${ifUnionRelationshipTargetEntity.name}SubscriptionWhere`; - } - - public get edgeCreateInputTypeName(): string { - return `${this.propertiesTypeName}CreateInput${this.hasNonNullNonGeneratedProperties ? `!` : ""}`; - } - public get edgeCreateInputTypeName2(): string { - return `${this.propertiesTypeName}CreateInput`; - } - - public get edgeUpdateInputTypeName(): string { - return `${this.propertiesTypeName}UpdateInput`; - } - - public get edgeWhereInputTypeName(): string { - return `${this.propertiesTypeName}Where`; - } - public get edgeSubscriptionWhereInputTypeName(): string { - return `${this.propertiesTypeName}SubscriptionWhere`; - } - public get edgeSortInputTypeName(): string { - return `${this.propertiesTypeName}Sort`; - } - - public getConnectOrCreateInputFields(target: ConcreteEntityAdapter) { - // TODO: use this._target in the end; currently passed-in as argument because unions need this per refNode - // const target = this._target; - // if (!(target instanceof ConcreteEntityAdapter)) { - // // something is wrong - // return;= - // } - return { - where: `${target.operations.connectOrCreateWhereInputTypeName}!`, - onCreate: `${this.getConnectOrCreateOnCreateFieldInputTypeName(target)}!`, - }; + return this._operations; } /**Note: Required for now to infer the types without ResolveTree */ @@ -366,6 +250,9 @@ export class RelationshipAdapter { public get updateInputFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); } + public get sortableFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isSortableField()); + } public get arrayMethodFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isArrayMethodField()); diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts new file mode 100644 index 0000000000..6d28cfc515 --- /dev/null +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts @@ -0,0 +1,193 @@ +/* + * 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 { upperFirst } from "../../../utils/upper-first"; +import type { ConcreteEntityAdapter } from "../../entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../../entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../entity/model-adapters/UnionEntityAdapter"; +import type { RelationshipAdapter } from "./RelationshipAdapter"; + +export type UpdateMutationArgumentNames = { + connect: string; + disconnect: string; + create: string; + update: string; + delete: string; + connectOrCreate: string; + where: string; +}; + +export type CreateMutationArgumentNames = { + input: string; +}; + +export class RelationshipOperations { + private readonly relationshipEntityAdapter: RelationshipAdapter; + + constructor(relationshipEntityAdapter: RelationshipAdapter) { + this.relationshipEntityAdapter = relationshipEntityAdapter; + } + + public get prefixForTypename(): string { + // TODO: if relationship field is inherited by source (part of a implemented Interface, not necessarily annotated as rel) + // then return this.interface.name + // TODO: how to get implemented interfaces here?? + // console.log(this.inheritedFrom, this.source.name, this.name); + + return this.relationshipEntityAdapter.inheritedFrom || this.relationshipEntityAdapter.source.name; + } + + public get fieldInputPrefixForTypename(): string { + const isTargetInterface = this.relationshipEntityAdapter.target instanceof InterfaceEntityAdapter; + if (isTargetInterface) { + return this.relationshipEntityAdapter.source.name; + } + return this.prefixForTypename; + } + + /**Note: Required for now to infer the types without ResolveTree */ + public get connectionFieldTypename(): string { + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}Connection`; + } + + /**Note: Required for now to infer the types without ResolveTree */ + public get relationshipFieldTypename(): string { + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}Relationship`; + } + + public get fieldInputTypeName(): string { + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}FieldInput`; + } + + public get updateFieldInputTypeName(): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}UpdateFieldInput`; + } + + public get createFieldInputTypeName(): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}CreateFieldInput`; + } + + public get deleteFieldInputTypeName(): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}DeleteFieldInput`; + } + public get connectFieldInputTypeName(): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectFieldInput`; + } + + public get disconnectFieldInputTypeName(): string { + return `${this.fieldInputPrefixForTypename}${upperFirst( + this.relationshipEntityAdapter.name + )}DisconnectFieldInput`; + } + + public getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter?: ConcreteEntityAdapter): string { + if (this.relationshipEntityAdapter.target instanceof UnionEntityAdapter) { + if (!concreteTargetEntityAdapter) { + throw new Error("missing concreteTargetEntityAdapter"); + } + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + concreteTargetEntityAdapter.name + }ConnectOrCreateFieldInput`; + } + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectOrCreateFieldInput`; + } + + public getConnectOrCreateOnCreateFieldInputTypeName(concreteTargetEntityAdapter: ConcreteEntityAdapter): string { + return `${this.getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter)}OnCreate`; + } + + public get connectionFieldName(): string { + return `${this.relationshipEntityAdapter.name}Connection`; + } + + public get connectionWhereTypename(): string { + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectionWhere`; + } + public get updateConnectionInputTypename(): string { + return `${this.fieldInputPrefixForTypename}${upperFirst( + this.relationshipEntityAdapter.name + )}UpdateConnectionInput`; + } + + public get aggregateInputTypeName(): string { + return `${this.relationshipEntityAdapter.source.name}${upperFirst( + this.relationshipEntityAdapter.name + )}AggregateInput`; + } + + public getAggregationWhereInputTypeName(isA: "Node" | "Edge"): string { + return `${this.relationshipEntityAdapter.source.name}${upperFirst( + this.relationshipEntityAdapter.name + )}${isA}AggregationWhereInput`; + } + + public get subscriptionWhereInputTypeName(): string { + return `${this.relationshipEntityAdapter.source.name}${upperFirst( + this.relationshipEntityAdapter.name + )}RelationshipSubscriptionWhere`; + } + + public getToUnionSubscriptionWhereInputTypeName(ifUnionRelationshipTargetEntity: ConcreteEntityAdapter): string { + return `${this.relationshipEntityAdapter.source.name}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity.name + }SubscriptionWhere`; + } + + public get subscriptionConnectedRelationshipTypeName(): string { + return `${this.relationshipEntityAdapter.source.name}${upperFirst( + this.relationshipEntityAdapter.name + )}ConnectedRelationship`; + } + + public get edgeCreateInputTypeName(): string { + return `${this.relationshipEntityAdapter.propertiesTypeName}CreateInput${ + this.relationshipEntityAdapter.hasNonNullNonGeneratedProperties ? `!` : "" + }`; + } + public get createInputTypeName(): string { + return `${this.relationshipEntityAdapter.propertiesTypeName}CreateInput`; + } + + public get edgeUpdateInputTypeName(): string { + return `${this.relationshipEntityAdapter.propertiesTypeName}UpdateInput`; + } + + public get whereInputTypeName(): string { + return `${this.relationshipEntityAdapter.propertiesTypeName}Where`; + } + public get edgeSubscriptionWhereInputTypeName(): string { + return `${this.relationshipEntityAdapter.propertiesTypeName}SubscriptionWhere`; + } + public get sortInputTypeName(): string { + return `${this.relationshipEntityAdapter.propertiesTypeName}Sort`; + } + + public getConnectOrCreateInputFields(target: ConcreteEntityAdapter) { + // TODO: use this._target in the end; currently passed-in as argument because unions need this per refNode + // const target = this._target; + // if (!(target instanceof ConcreteEntityAdapter)) { + // // something is wrong + // return;= + // } + return { + where: `${target.operations.connectOrCreateWhereInputTypeName}!`, + onCreate: `${this.getConnectOrCreateOnCreateFieldInputTypeName(target)}!`, + }; + } +} From 135ec25df96b3b59cee2919c2cc423933f21ad53 Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:25:13 +0100 Subject: [PATCH 095/162] use operations from relationshipAdapter --- .../src/schema/create-connection-fields.ts | 51 +++++++----- .../create-aggregation-input-fields.ts | 2 +- .../create-connect-or-create-field.ts | 10 ++- .../create-relationship-fields.ts | 77 ++++++++++--------- .../create-relationship-interface-fields.ts | 43 ++++++----- ...reate-top-level-connect-or-create-input.ts | 2 +- .../generate-subscription-where-type.ts | 6 +- 7 files changed, 107 insertions(+), 84 deletions(-) diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index 5d35667ca0..ddc7b063cc 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -310,19 +310,22 @@ export function createConnectionFields2({ const relationships: Relationship[] = []; entityAdapter.relationships.forEach((relationship) => { - const relationshipObjectType = schemaComposer.getOrCreateOTC(relationship.relationshipFieldTypename, (tc) => { - tc.addFields({ - cursor: "String!", - node: `${relationship.target.name}!`, - }); - }); + const relationshipObjectType = schemaComposer.getOrCreateOTC( + relationship.operations.relationshipFieldTypename, + (tc) => { + tc.addFields({ + cursor: "String!", + node: `${relationship.target.name}!`, + }); + } + ); const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(relationship.name); const deprecatedDirectives = graphqlDirectivesToCompose( (userDefinedDirectivesOnField || []).filter((directive) => directive.name.value === DEPRECATED) ); - const connectionWhereName = `${relationship.connectionFieldTypename}Where`; + const connectionWhereName = `${relationship.operations.connectionFieldTypename}Where`; const connectionWhere = schemaComposer.getOrCreateITC(connectionWhereName); // if (!connectionField.relationship.union) { @@ -335,7 +338,7 @@ export function createConnectionFields2({ }); } - const connection = schemaComposer.getOrCreateOTC(relationship.connectionFieldTypename, (tc) => { + const connection = schemaComposer.getOrCreateOTC(relationship.operations.connectionFieldTypename, (tc) => { tc.addFields({ edges: relationshipObjectType.NonNull.List.NonNull, totalCount: "Int!", @@ -360,8 +363,8 @@ export function createConnectionFields2({ const whereInput = schemaComposer.getITC(`${composeNode.getTypeName()}Where`); if (relationship.isFilterableByValue()) { whereInput.addFields({ - [relationship.connectionFieldName]: connectionWhere, - [`${relationship.connectionFieldName}_NOT`]: { + [relationship.operations.connectionFieldName]: connectionWhere, + [`${relationship.operations.connectionFieldName}_NOT`]: { type: connectionWhere, }, }); @@ -371,9 +374,9 @@ export function createConnectionFields2({ if (relationship.isList && relationship.isFilterableByValue()) { addRelationshipArrayFilters({ whereInput, - fieldName: relationship.connectionFieldName, + fieldName: relationship.operations.connectionFieldName, sourceName: entityAdapter.name, - relatedType: relationship.connectionFieldTypename, + relatedType: relationship.operations.connectionFieldTypename, whereType: connectionWhere, directives: deprecatedDirectives, }); @@ -396,8 +399,12 @@ export function createConnectionFields2({ const composeNodeArgs = addDirectedArgument2(composeNodeBaseArgs, relationship); - if (relationship.propertiesTypeName) { - const connectionSort = schemaComposer.getOrCreateITC(`${relationship.connectionFieldTypename}Sort`); + // TODO: revert this back to commented version if we want relationship properties sortable fields to be all attributes + // if (relationship.propertiesTypeName) { + if (relationship.propertiesTypeName && relationship.sortableFields.length) { + const connectionSort = schemaComposer.getOrCreateITC( + `${relationship.operations.connectionFieldTypename}Sort` + ); connectionSort.addFields({ edge: `${relationship.propertiesTypeName}Sort`, }); @@ -418,7 +425,9 @@ export function createConnectionFields2({ }); if (schemaComposer.has(`${relationship.target.name}Sort`)) { - const connectionSort = schemaComposer.getOrCreateITC(`${relationship.connectionFieldTypename}Sort`); + const connectionSort = schemaComposer.getOrCreateITC( + `${relationship.operations.connectionFieldTypename}Sort` + ); connectionSort.addFields({ node: `${relationship.target.name}Sort`, }); @@ -444,7 +453,7 @@ export function createConnectionFields2({ // const relatedNodes = nodes.filter((n) => connectionField.relationship.union?.nodes?.includes(n.name)); relationship.target.concreteEntities.forEach((n) => { - const connectionName = relationship.connectionFieldTypename; + const connectionName = relationship.operations.connectionFieldTypename; // Append union member name before "ConnectionWhere" const unionWhereName = `${connectionName.substring(0, connectionName.length - "Connection".length)}${ @@ -498,7 +507,9 @@ export function createConnectionFields2({ }); if (relationship.target.sortableFields.length) { - const connectionSort = schemaComposer.getOrCreateITC(`${relationship.connectionFieldTypename}Sort`); + const connectionSort = schemaComposer.getOrCreateITC( + `${relationship.operations.connectionFieldTypename}Sort` + ); connectionSort.addFields({ node: `${relationship.target.name}Sort`, }); @@ -511,13 +522,13 @@ export function createConnectionFields2({ // if (!connectionField.relationship.writeonly && connectionField.selectableOptions.onRead) { if (relationship.isReadable()) { composeNode.addFields({ - [relationship.connectionFieldName]: { + [relationship.operations.connectionFieldName]: { type: connection.NonNull, args: composeNodeArgs, directives: deprecatedDirectives, resolve: (source, args: ConnectionQueryArgs, _ctx, info: GraphQLResolveInfo) => { return connectionFieldResolver2({ - connectionFieldName: relationship.connectionFieldName, + connectionFieldName: relationship.operations.connectionFieldName, args, info, source, @@ -532,7 +543,7 @@ export function createConnectionFields2({ : ({} as ObjectFields | undefined); const r = new Relationship({ - name: relationship.relationshipFieldTypename, + name: relationship.operations.relationshipFieldTypename, type: relationship.type, properties: relationship.propertiesTypeName, ...(relFields diff --git a/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts index 35ae4170c9..2cb532881e 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts @@ -191,7 +191,7 @@ export function createAggregationInputFields2( return; } - const aggregationInputName = rel.getAggregationWhereInputTypeName( + const aggregationInputName = rel.operations.getAggregationWhereInputTypeName( entity instanceof ConcreteEntityAdapter ? `Node` : `Edge` ); const aggregationInput = schemaComposer.createInputTC({ diff --git a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts index 1959f5a030..be95e61f7f 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts @@ -163,7 +163,8 @@ export function createConnectOrCreateField2({ return undefined; } - const connectOrCreateName = relationshipAdapter.getConnectOrCreateFieldInputTypeName(targetEntityAdapter); + const connectOrCreateName = + relationshipAdapter.operations.getConnectOrCreateFieldInputTypeName(targetEntityAdapter); createOnCreateITC2({ schemaComposer, @@ -177,7 +178,7 @@ export function createConnectOrCreateField2({ }); schemaComposer.getOrCreateITC(connectOrCreateName, (tc) => { - tc.addFields(relationshipAdapter.getConnectOrCreateInputFields(targetEntityAdapter) || {}); + tc.addFields(relationshipAdapter.operations.getConnectOrCreateInputFields(targetEntityAdapter) || {}); }); return relationshipAdapter.isList ? `[${connectOrCreateName}!]` : connectOrCreateName; } @@ -193,7 +194,8 @@ function createOnCreateITC2({ targetEntityAdapter: ConcreteEntityAdapter; userDefinedFieldDirectives: Map; }): InputTypeComposer { - const onCreateName = relationshipAdapter.getConnectOrCreateOnCreateFieldInputTypeName(targetEntityAdapter); + const onCreateName = + relationshipAdapter.operations.getConnectOrCreateOnCreateFieldInputTypeName(targetEntityAdapter); const onCreateFields = getOnCreateFields2({ relationshipAdapter, @@ -232,7 +234,7 @@ function getOnCreateFields2({ if (relationshipAdapter.nonGeneratedProperties.length > 0) { return { node: nodeCreateInputFieldName, - edge: relationshipAdapter.edgeCreateInputTypeName, + edge: relationshipAdapter.operations.edgeCreateInputTypeName, }; } return { 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 1c677969ab..a7147ee94f 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 @@ -583,8 +583,6 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } const nestedOperations = new Set(relationshipAdapter.nestedOperations); - const nodeCreateInput = schemaComposer.getITC(entityAdapter.operations.createInputTypeName); - const nodeUpdateInput = schemaComposer.getITC(entityAdapter.operations.updateInputTypeName); // Don't generate empty input type let nodeFieldInput: InputTypeComposer | undefined; @@ -595,7 +593,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && relationshipAdapter.target.uniqueFields.length) ) { - nodeFieldInput = schemaComposer.getOrCreateITC(relationshipAdapter.fieldInputTypeName); + nodeFieldInput = schemaComposer.getOrCreateITC(relationshipAdapter.operations.fieldInputTypeName); } // Don't generate an empty input type let nodeFieldUpdateInput: InputTypeComposer | undefined; @@ -606,10 +604,12 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ !relationshipAdapter.target.uniqueFields.length; if (nestedOperations.size !== 0 && !onlyConnectOrCreateAndNoUniqueFields) { - nodeFieldUpdateInput = schemaComposer.getOrCreateITC(relationshipAdapter.updateFieldInputTypeName); + nodeFieldUpdateInput = schemaComposer.getOrCreateITC( + relationshipAdapter.operations.updateFieldInputTypeName + ); // Add where fields nodeFieldUpdateInput.addFields({ - where: relationshipAdapter.connectionWhereTypename, + where: relationshipAdapter.operations.connectionWhereTypename, }); } @@ -621,31 +621,35 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ const edgeWhereAggregationInput = relFields && createAggregationInputFields2(relationshipAdapter, relationshipAdapter, schemaComposer); - const whereAggregateInput = schemaComposer.getOrCreateITC(relationshipAdapter.aggregateInputTypeName, (tc) => { - tc.addFields({ - count: "Int", - count_LT: "Int", - count_LTE: "Int", - count_GT: "Int", - count_GTE: "Int", - AND: `[${relationshipAdapter.aggregateInputTypeName}!]`, - OR: `[${relationshipAdapter.aggregateInputTypeName}!]`, - NOT: relationshipAdapter.aggregateInputTypeName, - }); - - if (nodeWhereAggregationInput) { + const whereAggregateInput = schemaComposer.getOrCreateITC( + relationshipAdapter.operations.aggregateInputTypeName, + (tc) => { tc.addFields({ - node: nodeWhereAggregationInput, + count: "Int", + count_LT: "Int", + count_LTE: "Int", + count_GT: "Int", + count_GTE: "Int", + AND: `[${relationshipAdapter.operations.aggregateInputTypeName}!]`, + OR: `[${relationshipAdapter.operations.aggregateInputTypeName}!]`, + NOT: relationshipAdapter.operations.aggregateInputTypeName, }); - } - if (edgeWhereAggregationInput) { - tc.addFields({ - edge: edgeWhereAggregationInput, - }); + if (nodeWhereAggregationInput) { + tc.addFields({ + node: nodeWhereAggregationInput, + }); + } + + if (edgeWhereAggregationInput) { + tc.addFields({ + edge: edgeWhereAggregationInput, + }); + } } - }); + ); + // TODO: attempt at this first--------------------------------------------------- const whereInput = schemaComposer.getITC(entityAdapter.operations.whereInputTypeName); if (relationshipAdapter.isFilterableByValue()) { @@ -680,6 +684,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ directives: deprecatedDirectives, }); } + // TODO: up to here------------------------------------------------------------ const relationshipField: { type: string; description?: string; directives: Directive[]; args?: any } = { type: relationshipAdapter.getTargetTypePrettyName(), @@ -733,6 +738,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } } + const nodeCreateInput = schemaComposer.getITC(entityAdapter.operations.createInputTypeName); if (relationshipAdapter.isCreatable()) { // Interface CreateInput does not require relationship input fields // These are specified on the concrete nodes. @@ -783,13 +789,13 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ nestedOperations.has(RelationshipNestedOperationsOption.CREATE) && (nodeFieldInput || nodeFieldUpdateInput) ) { - const createName = relationshipAdapter.createFieldInputTypeName; + const createName = relationshipAdapter.operations.createFieldInputTypeName; const create = relationshipAdapter.isList ? `[${createName}!]` : createName; schemaComposer.getOrCreateITC(createName, (tc) => { tc.addFields({ node: `${relationshipAdapter.target.name}CreateInput!` }); if (hasNonGeneratedProperties) { tc.addFields({ - edge: relationshipAdapter.edgeCreateInputTypeName, + edge: relationshipAdapter.operations.edgeCreateInputTypeName, }); } }); @@ -819,7 +825,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) && (nodeFieldInput || nodeFieldUpdateInput) ) { - const connectName = relationshipAdapter.connectFieldInputTypeName; + const connectName = relationshipAdapter.operations.connectFieldInputTypeName; const connect = relationshipAdapter.isList ? `[${connectName}!]` : connectName; const connectWhereName = `${relationshipAdapter.target.name}ConnectWhere`; @@ -845,7 +851,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ if (hasNonGeneratedProperties) { tc.addFields({ - edge: relationshipAdapter.edgeCreateInputTypeName, + edge: relationshipAdapter.operations.edgeCreateInputTypeName, }); } @@ -870,8 +876,9 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ }); } + const nodeUpdateInput = schemaComposer.getITC(entityAdapter.operations.updateInputTypeName); if (relationshipAdapter.isUpdatable() && nodeFieldUpdateInput) { - const connectionUpdateInputName = relationshipAdapter.updateConnectionInputTypename; + const connectionUpdateInputName = relationshipAdapter.operations.updateConnectionInputTypename; nodeUpdateInput.addFields({ [relationshipAdapter.name]: { @@ -886,7 +893,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ tc.addFields({ node: `${relationshipAdapter.target.name}UpdateInput` }); if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationshipAdapter.edgeUpdateInputTypeName }); + tc.addFields({ edge: relationshipAdapter.operations.edgeUpdateInputTypeName }); } }); @@ -896,7 +903,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } if (nestedOperations.has(RelationshipNestedOperationsOption.DELETE) && nodeFieldUpdateInput) { - const nodeFieldDeleteInputName = relationshipAdapter.deleteFieldInputTypeName; + const nodeFieldDeleteInputName = relationshipAdapter.operations.deleteFieldInputTypeName; nodeFieldUpdateInput.addFields({ delete: relationshipAdapter.isList ? `[${nodeFieldDeleteInputName}!]` : nodeFieldDeleteInputName, @@ -904,7 +911,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ if (!schemaComposer.has(nodeFieldDeleteInputName)) { schemaComposer.getOrCreateITC(nodeFieldDeleteInputName, (tc) => { - tc.addFields({ where: relationshipAdapter.connectionWhereTypename }); + tc.addFields({ where: relationshipAdapter.operations.connectionWhereTypename }); if ( relationshipTargetHasRelationshipWithNestedOperation( @@ -927,11 +934,11 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } if (nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT) && nodeFieldUpdateInput) { - const nodeFieldDisconnectInputName = relationshipAdapter.disconnectFieldInputTypeName; + const nodeFieldDisconnectInputName = relationshipAdapter.operations.disconnectFieldInputTypeName; if (!schemaComposer.has(nodeFieldDisconnectInputName)) { schemaComposer.getOrCreateITC(nodeFieldDisconnectInputName, (tc) => { - tc.addFields({ where: relationshipAdapter.connectionWhereTypename }); + tc.addFields({ where: relationshipAdapter.operations.connectionWhereTypename }); if ( relationshipTargetHasRelationshipWithNestedOperation( diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts index 448e96a489..fd056d9f60 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts @@ -259,50 +259,53 @@ export function createRelationshipInterfaceFields2({ }); }); - const connectFieldInput = schemaComposer.getOrCreateITC(relationship.connectFieldInputTypeName, (tc) => { + const connectFieldInput = schemaComposer.getOrCreateITC(relationship.operations.connectFieldInputTypeName, (tc) => { if (schemaComposer.has(`${relationship.target.name}ConnectInput`)) { tc.addFields({ connect: `${relationship.target.name}ConnectInput` }); } if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationship.edgeCreateInputTypeName }); + tc.addFields({ edge: relationship.operations.edgeCreateInputTypeName }); } tc.addFields({ where: connectWhere }); }); - const deleteFieldInput = schemaComposer.getOrCreateITC(relationship.deleteFieldInputTypeName, (tc) => { + const deleteFieldInput = schemaComposer.getOrCreateITC(relationship.operations.deleteFieldInputTypeName, (tc) => { if (schemaComposer.has(`${relationship.target.name}DeleteInput`)) { tc.addFields({ delete: `${relationship.target.name}DeleteInput` }); } - tc.addFields({ where: relationship.connectionWhereTypename }); + tc.addFields({ where: relationship.operations.connectionWhereTypename }); }); - const disconnectFieldInput = schemaComposer.getOrCreateITC(relationship.disconnectFieldInputTypeName, (tc) => { - if (schemaComposer.has(`${relationship.target.name}DisconnectInput`)) { - tc.addFields({ disconnect: `${relationship.target.name}DisconnectInput` }); - } + const disconnectFieldInput = schemaComposer.getOrCreateITC( + relationship.operations.disconnectFieldInputTypeName, + (tc) => { + if (schemaComposer.has(`${relationship.target.name}DisconnectInput`)) { + tc.addFields({ disconnect: `${relationship.target.name}DisconnectInput` }); + } - tc.addFields({ where: relationship.connectionWhereTypename }); - }); + tc.addFields({ where: relationship.operations.connectionWhereTypename }); + } + ); - const createFieldInput = schemaComposer.getOrCreateITC(relationship.createFieldInputTypeName, (tc) => { + const createFieldInput = schemaComposer.getOrCreateITC(relationship.operations.createFieldInputTypeName, (tc) => { tc.addFields({ node: `${relationship.target.name}CreateInput!`, }); if (hasNonGeneratedProperties) { tc.addFields({ - edge: relationship.edgeCreateInputTypeName, + edge: relationship.operations.edgeCreateInputTypeName, }); } }); const updateConnectionFieldInput = schemaComposer.getOrCreateITC( - relationship.updateConnectionInputTypename, + relationship.operations.updateConnectionInputTypename, (tc) => { if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationship.edgeUpdateInputTypeName }); + tc.addFields({ edge: relationship.operations.edgeUpdateInputTypeName }); } tc.addFields({ node: `${relationship.target.name}UpdateInput` }); } @@ -312,7 +315,7 @@ export function createRelationshipInterfaceFields2({ nestedOperations.size !== 0 && !(nestedOperations.size === 1 && nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) ) { - const updateFieldInput = schemaComposer.getOrCreateITC(relationship.updateFieldInputTypeName); + const updateFieldInput = schemaComposer.getOrCreateITC(relationship.operations.updateFieldInputTypeName); if (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { const nodeConnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}ConnectInput`); @@ -357,7 +360,7 @@ export function createRelationshipInterfaceFields2({ } updateFieldInput.addFields({ - where: relationship.connectionWhereTypename, + where: relationship.operations.connectionWhereTypename, }); if (relationship.isUpdatable()) { @@ -388,7 +391,7 @@ export function createRelationshipInterfaceFields2({ nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || nestedOperations.has(RelationshipNestedOperationsOption.CREATE) ) { - const nodeFieldInput = schemaComposer.getOrCreateITC(relationship.fieldInputTypeName, (tc) => { + const nodeFieldInput = schemaComposer.getOrCreateITC(relationship.operations.fieldInputTypeName, (tc) => { if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { tc.addFields({ create: relationship.isList ? createFieldInput.NonNull.List : createFieldInput, @@ -402,13 +405,13 @@ export function createRelationshipInterfaceFields2({ }); refNodes.forEach((n) => { - if (!schemaComposer.has(relationship.createFieldInputTypeName)) { - schemaComposer.getOrCreateITC(relationship.createFieldInputTypeName, (tc) => { + if (!schemaComposer.has(relationship.operations.createFieldInputTypeName)) { + schemaComposer.getOrCreateITC(relationship.operations.createFieldInputTypeName, (tc) => { tc.addFields({ node: `${n.name}CreateInput!` }); if (hasNonGeneratedProperties) { tc.addFields({ - edge: relationship.edgeCreateInputTypeName, + edge: relationship.operations.edgeCreateInputTypeName, }); } }); diff --git a/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts b/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts index 7bc0c1c522..b68ec16847 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts @@ -59,7 +59,7 @@ export function createTopLevelConnectOrCreateInput2({ `${sourceName}ConnectOrCreateInput` ); - const nodeFieldConnectOrCreateInputName = relationshipAdapter.getConnectOrCreateFieldInputTypeName(); + const nodeFieldConnectOrCreateInputName = relationshipAdapter.operations.getConnectOrCreateFieldInputTypeName(); nodeConnectOrCreateInput.addFields({ [relationshipAdapter.name]: relationshipAdapter.isList diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts index b63d47d6e2..75b90b8b4f 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts @@ -229,7 +229,7 @@ function getRelationshipConnectionWhereTypes2({ return acc; } const relationFieldInputWhereType = schemaComposer.createInputTC({ - name: relationshipAdapter.subscriptionWhereInputTypeName, + name: relationshipAdapter.operations.subscriptionWhereInputTypeName, fields, }); acc[relationshipAdapter.name] = relationFieldInputWhereType; @@ -351,7 +351,7 @@ function makeRelationshipWhereType2({ } const composeFields = attributesToSubscriptionsWhereInputFields(relationshipAdapter); // TODO: POINT was missing??? - return schemaComposer.getOrCreateITC(relationshipAdapter.edgeSubscriptionWhereInputTypeName, (tc) => + return schemaComposer.getOrCreateITC(relationshipAdapter.operations.edgeSubscriptionWhereInputTypeName, (tc) => tc.addFields(composeFields) ); } @@ -445,7 +445,7 @@ function makeRelationshipToUnionTypeWhereType2({ return acc; } acc[concreteEntity.name] = schemaComposer.getOrCreateITC( - relationshipAdapter.getToUnionSubscriptionWhereInputTypeName(concreteEntity), + relationshipAdapter.operations.getToUnionSubscriptionWhereInputTypeName(concreteEntity), (tc) => tc.addFields({ ...(nodeExists && { node: concreteEntity.operations.subscriptionWhereInputTypeName }), From 61eae53601142b949bb379abb86ae22aa2bfd92e Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:27:15 +0100 Subject: [PATCH 096/162] add operations to unionAdapter --- .../model-adapters/UnionEntityAdapter.ts | 11 ++++++ .../model-adapters/UnionEntityOperations.ts | 32 ++++++++++++++++ .../generate-subscription-connection-types.ts | 37 ++++++++++++------- 3 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 packages/graphql/src/schema-model/entity/model-adapters/UnionEntityOperations.ts diff --git a/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityAdapter.ts index 013c1c0dd8..8e6ed91ad2 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityAdapter.ts @@ -20,11 +20,15 @@ import type { ConcreteEntity } from "../ConcreteEntity"; import type { UnionEntity } from "../UnionEntity"; import { ConcreteEntityAdapter } from "./ConcreteEntityAdapter"; +import { UnionEntityOperations } from "./UnionEntityOperations"; export class UnionEntityAdapter { public readonly name: string; public concreteEntities: ConcreteEntityAdapter[]; + // specialize models + private _operations: UnionEntityOperations | undefined; + constructor(entity: UnionEntity) { this.name = entity.name; this.concreteEntities = []; @@ -37,4 +41,11 @@ export class UnionEntityAdapter { this.concreteEntities.push(entityAdapter); } } + + get operations(): UnionEntityOperations { + if (!this._operations) { + return new UnionEntityOperations(this); + } + return this._operations; + } } diff --git a/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityOperations.ts new file mode 100644 index 0000000000..a280306dd9 --- /dev/null +++ b/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityOperations.ts @@ -0,0 +1,32 @@ +/* + * 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 { UnionEntityAdapter } from "./UnionEntityAdapter"; + +export class UnionEntityOperations { + private readonly unionEntityAdapter: UnionEntityAdapter; + + constructor(unionEntityAdapter: UnionEntityAdapter) { + this.unionEntityAdapter = unionEntityAdapter; + } + + public get whereInputTypeName(): string { + return `${this.unionEntityAdapter.name}Where`; + } +} diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts index 8ce6b4b2ca..45cbabf952 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts @@ -52,6 +52,24 @@ function buildRelationshipDestinationUnionNodeType({ types: unionNodes, }); } +function buildRelationshipDestinationUnionNodeType2({ + unionNodes, + unionEntity, + schemaComposer, +}: { + unionNodes: ObjectTypeComposer[]; + unionEntity: UnionEntityAdapter; + schemaComposer: SchemaComposer; +}) { + const atLeastOneTypeHasProperties = unionNodes.filter(hasProperties).length; + if (!atLeastOneTypeHasProperties) { + return null; + } + return schemaComposer.createUnionTC({ + name: unionEntity.operations.subscriptionEventPayloadTypeName, + types: unionNodes, + }); +} function buildRelationshipDestinationInterfaceNodeType({ relevantInterface, @@ -93,13 +111,11 @@ function buildRelationshipDestinationInterfaceNodeType({ function buildRelationshipDestinationInterfaceNodeType2({ interfaceEntity, interfaceNodes, - relationNodeTypeName, schemaComposer, userDefinedFieldDirectivesForNode, }: { interfaceEntity: InterfaceEntityAdapter; interfaceNodes: ObjectTypeComposer[]; - relationNodeTypeName: string; schemaComposer: SchemaComposer; userDefinedFieldDirectivesForNode: Map>; }): InterfaceTypeComposer | undefined { @@ -118,7 +134,7 @@ function buildRelationshipDestinationInterfaceNodeType2({ if (Object.keys(interfaceComposeFields).length) { const nodeTo = schemaComposer.createInterfaceTC({ - name: `${relationNodeTypeName}EventPayload`, + name: interfaceEntity.operations.subscriptionEventPayloadTypeName, fields: interfaceComposeFields, }); interfaceNodes?.forEach((interfaceNodeType) => { @@ -164,13 +180,11 @@ function buildRelationshipDestinationAbstractType({ } function buildRelationshipDestinationAbstractType2({ relationshipAdapter, - relationNodeTypeName, userDefinedFieldDirectivesForNode, schemaComposer, nodeNameToEventPayloadTypes, }: { relationshipAdapter: RelationshipAdapter; - relationNodeTypeName: string; userDefinedFieldDirectivesForNode: Map>; schemaComposer: SchemaComposer; nodeNameToEventPayloadTypes: Record; @@ -181,7 +195,7 @@ function buildRelationshipDestinationAbstractType2({ const unionNodes = filterTruthy( unionEntity?.concreteEntities?.map((unionEntity) => nodeNameToEventPayloadTypes[unionEntity.name]) ); - return buildRelationshipDestinationUnionNodeType({ unionNodes, relationNodeTypeName, schemaComposer }); + return buildRelationshipDestinationUnionNodeType2({ unionNodes, unionEntity, schemaComposer }); } const interfaceEntity = relationshipAdapter.target instanceof InterfaceEntityAdapter ? relationshipAdapter.target : undefined; @@ -193,7 +207,6 @@ function buildRelationshipDestinationAbstractType2({ schemaComposer, interfaceEntity, interfaceNodes, - relationNodeTypeName, userDefinedFieldDirectivesForNode, }); } @@ -238,8 +251,7 @@ function buildRelationshipFieldDestinationTypes2({ schemaComposer: SchemaComposer; nodeNameToEventPayloadTypes: Record; }) { - const relationNodeTypeName = relationshipAdapter.target.name; - const nodeTo = nodeNameToEventPayloadTypes[relationNodeTypeName]; + const nodeTo = nodeNameToEventPayloadTypes[relationshipAdapter.target.name]; if (nodeTo) { // standard type return hasProperties(nodeTo) && nodeTo; @@ -247,7 +259,6 @@ function buildRelationshipFieldDestinationTypes2({ // union/interface type return buildRelationshipDestinationAbstractType2({ relationshipAdapter, - relationNodeTypeName, userDefinedFieldDirectivesForNode, schemaComposer, nodeNameToEventPayloadTypes, @@ -343,10 +354,8 @@ export function getConnectedTypes2({ return Array.from(entityAdapter.relationships.values()) .map((relationshipAdapter) => { - const fieldName = relationshipAdapter.name; - const relationshipFieldType = schemaComposer.createObjectTC({ - name: `${entityAdapter.name}${upperFirst(fieldName)}ConnectedRelationship`, + name: relationshipAdapter.operations.subscriptionConnectedRelationshipTypeName, }); const edgeProps = relationshipAdapter.subscriptionConnectedRelationshipFields; @@ -373,7 +382,7 @@ export function getConnectedTypes2({ return { relationshipFieldType, - fieldName, + fieldName: relationshipAdapter.name, }; }) .reduce((acc, { relationshipFieldType, fieldName }) => { From 24bf58a64c53632f5f3f4bd6004383bd0085e205 Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:27:34 +0100 Subject: [PATCH 097/162] adjustments to interfaceEntityAdapter and operations --- .../schema-model/entity/InterfaceEntity.ts | 1 + .../model-adapters/InterfaceEntityAdapter.ts | 5 ++++ .../InterfaceEntityOperations.ts | 24 +++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/packages/graphql/src/schema-model/entity/InterfaceEntity.ts b/packages/graphql/src/schema-model/entity/InterfaceEntity.ts index c8dbda3b35..337cdb3829 100644 --- a/packages/graphql/src/schema-model/entity/InterfaceEntity.ts +++ b/packages/graphql/src/schema-model/entity/InterfaceEntity.ts @@ -28,6 +28,7 @@ import type { ConcreteEntity } from "./ConcreteEntity"; export class InterfaceEntity implements CompositeEntity { public readonly name: string; public readonly description?: string; + // TODO: this is really (ConcreteEntity|InterfaceEntity)... public readonly concreteEntities: ConcreteEntity[]; public readonly attributes: Map = new Map(); public readonly relationships: Map = new Map(); diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts index b90baf745e..8b08deef5b 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts @@ -17,6 +17,7 @@ * limitations under the License. */ +import { upperFirst } from "../../../utils/upper-first"; import type { Annotations } from "../../annotation/Annotation"; import type { Attribute } from "../../attribute/Attribute"; import { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapter"; @@ -93,6 +94,10 @@ export class InterfaceEntityAdapter { return this._plural; } + public get upperFirstPlural(): string { + return upperFirst(this.plural); + } + get operations(): InterfaceEntityOperations { if (!this._operations) { return new InterfaceEntityOperations(this); diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts index 3b8f412e77..5deb6f2d64 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts @@ -88,6 +88,10 @@ export class InterfaceEntityOperations { return `${this.InterfaceEntityAdapter.name}Where`; } + public get whereOnImplementationsWhereInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ImplementationsWhere`; + } + public get uniqueWhereInputTypeName(): string { // ConnectOrCreateWhere.node return `${this.InterfaceEntityAdapter.name}UniqueWhere`; @@ -105,10 +109,18 @@ export class InterfaceEntityOperations { return `${this.InterfaceEntityAdapter.name}UpdateInput`; } + public get whereOnImplementationsUpdateInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ImplementationsUpdateInput`; + } + public get deleteInputTypeName(): string { return `${this.InterfaceEntityAdapter.name}DeleteInput`; } + public get whereOnImplementationsDeleteInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ImplementationsDeleteInput`; + } + public get optionsInputTypeName(): string { return `${this.InterfaceEntityAdapter.name}Options`; } @@ -129,10 +141,18 @@ export class InterfaceEntityOperations { return `${this.InterfaceEntityAdapter.name}ConnectInput`; } + public get whereOnImplementationsConnectInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ImplementationsConnectInput`; + } + public get disconnectInputTypeName(): string { return `${this.InterfaceEntityAdapter.name}DisconnectInput`; } + public get whereOnImplementationsDisconnectInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ImplementationsDisconnectInput`; + } + public get onCreateInputTypeName(): string { return `${this.InterfaceEntityAdapter.name}OnCreateInput`; } @@ -141,6 +161,10 @@ export class InterfaceEntityOperations { return `${this.InterfaceEntityAdapter.name}SubscriptionWhere`; } + public get subscriptionEventPayloadTypeName(): string { + return `${this.InterfaceEntityAdapter.name}EventPayload`; + } + public get implementationsSubscriptionWhereInputTypeName(): string { return `${this.InterfaceEntityAdapter.name}ImplementationsSubscriptionWhere`; } From b9c080864a4cc8a334ea2d7031f50a28c7c13576 Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:29:00 +0100 Subject: [PATCH 098/162] make-augmented-schema restructure v1: introducing type-creating functions used for everything but top-level cypher fields and relationship/connection types --- .../src/schema/new-make-augmented-schema.ts | 1374 +++++++++++------ packages/graphql/src/schema/to-compose.ts | 52 +- 2 files changed, 970 insertions(+), 456 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index c50638faac..cf1447c82d 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -18,14 +18,16 @@ */ import type { IResolvers } from "@graphql-tools/utils"; -import type { +import { DefinitionNode, DirectiveNode, DocumentNode, FieldDefinitionNode, GraphQLEnumType, GraphQLInputObjectType, + GraphQLInt, GraphQLInterfaceType, + GraphQLList, GraphQLObjectType, GraphQLScalarType, InterfaceTypeDefinitionNode, @@ -34,7 +36,15 @@ import type { SchemaExtensionNode, } from "graphql"; import { GraphQLID, GraphQLNonNull, Kind, parse, print } from "graphql"; -import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, ObjectTypeComposer } from "graphql-compose"; +import type { + InputTypeComposer, + InputTypeComposerFieldConfigMapDefinition, + InterfaceTypeComposer, + ObjectTypeComposer, + ObjectTypeComposerFieldConfigMap, + ObjectTypeComposerFieldConfigMapDefinition, + UnionTypeComposer, +} from "graphql-compose"; import { SchemaComposer } from "graphql-compose"; import pluralize from "pluralize"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; @@ -69,6 +79,8 @@ import { concreteEntityToUpdateInputFields, graphqlDirectivesToCompose, relationshipAdapterToComposeFields, + withArrayOperators, + withMathOperators, } from "./to-compose"; // GraphQL type imports @@ -98,11 +110,11 @@ import type { Operation } from "../schema-model/Operation"; import { OperationAdapter } from "../schema-model/OperationAdapter"; import { ConcreteEntity } from "../schema-model/entity/ConcreteEntity"; import { InterfaceEntity } from "../schema-model/entity/InterfaceEntity"; -import type { UnionEntity } from "../schema-model/entity/UnionEntity"; +import { UnionEntity } from "../schema-model/entity/UnionEntity"; import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; -import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { CypherField, Neo4jFeaturesSettings } from "../types"; import { isInArray } from "../utils/is-in-array"; import { addArrayMethodsToITC2 } from "./array-methods"; @@ -114,6 +126,7 @@ import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; import { addMathOperatorsToITC } from "./math"; import { generateSubscriptionTypes, generateSubscriptionTypes2 } from "./subscriptions/generate-subscription-types"; +import { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; @@ -444,67 +457,6 @@ class ToComposer { // _composer.merge(t); } - - // ==== to compose - - private static _attributesToComposeFields(attributes: AttributeAdapter[]): { - [k: string]: ObjectTypeComposerFieldConfigAsObjectDefinition; - } { - return attributes.reduce((res, model) => { - if (!model.isReadable()) { - return res; - } - - const newField: ObjectTypeComposerFieldConfigAsObjectDefinition = { - type: model.type.getPretty(), - args: {}, - description: model.description, - }; - - if (Object.keys(model.getPropagatedAnnotations()).length) { - newField.directives = this._graphqlDirectivesToCompose(model.getPropagatedAnnotations()); - } - - if (["Int", "Float"].includes(model.type.getName())) { - newField.resolve = numericalResolver; - } - - if (model.type.getName() === "ID") { - newField.resolve = idResolver; - } - - if (model.attributeArguments) { - newField.args = this._graphqlArgsToCompose(model.attributeArguments); - } - - return { ...res, [model.name]: newField }; - }, {}); - } - - // TODO: add arguments on annotations - private static _graphqlDirectivesToCompose(annotations: Partial): Directive[] { - return Object.entries(annotations).map(([, annotation]) => ({ - args: (annotation.arguments || [])?.reduce( - (r: DirectiveArgs, d) => ({ ...r, [d.name.value]: parseValueNode(d.value) }), - {} - ), - name: annotation.name, - })); - } - - // TODO: check on Arguments class - private static _graphqlArgsToCompose(args: InputValue[]) { - return args.reduce((res, arg) => { - return { - ...res, - [arg.name]: { - type: arg.type.getPretty(), - description: arg.description, - ...(arg.defaultValue ? { defaultValue: arg.defaultValue } : {}), - }, - }; - }, {}); - } } */ @@ -542,6 +494,503 @@ function getUserDefinedFieldDirectivesForDefinition( return userDefinedFieldDirectives; } +// make types +function withObjectType( + concreteEntity: ConcreteEntityAdapter, // required + userDefinedFieldDirectives: Map, + directives: DirectiveNode[], + composer: SchemaComposer +): ObjectTypeComposer { + const nodeFields = attributeAdapterToComposeFields(concreteEntity.objectFields, userDefinedFieldDirectives); + const composeNode = composer.createObjectTC({ + name: concreteEntity.name, + fields: nodeFields, + description: concreteEntity.description, + directives: graphqlDirectivesToCompose(directives), + interfaces: concreteEntity.compositeEntities.filter((e) => e instanceof InterfaceEntity).map((e) => e.name), + }); + // TODO: maybe split this global node logic? + if (concreteEntity.isGlobalNode()) { + composeNode.setField("id", { + type: new GraphQLNonNull(GraphQLID), + resolve: (src) => { + const field = concreteEntity.globalIdField.name; + const value = src[field] as string | number; + return concreteEntity.toGlobalId(value.toString()); + }, + }); + composeNode.addInterface("Node"); + } + return composeNode; +} + +function withInterfaceType( + entityAdapter: InterfaceEntityAdapter | RelationshipAdapter, // required + userDefinedFieldDirectives: Map, + directives: DirectiveNode[], + composer: SchemaComposer, + config = { + includeRelationships: false, + } +): InterfaceTypeComposer { + // TODO: maybe create interfaceEntity.interfaceFields() method abstraction even if it retrieves all attributes? + // can also take includeRelationships as argument + const objectComposeFields = attributeAdapterToComposeFields( + Array.from(entityAdapter.attributes.values()), + userDefinedFieldDirectives + ); + let fields = objectComposeFields; + if (config.includeRelationships && entityAdapter instanceof InterfaceEntityAdapter) { + fields = { + ...fields, + ...relationshipAdapterToComposeFields( + Array.from(entityAdapter.relationships.values()), + userDefinedFieldDirectives + ), + }; + } + const interfaceTypeName = + entityAdapter instanceof InterfaceEntityAdapter + ? entityAdapter.name + : (entityAdapter.propertiesTypeName as string); // this is checked one layer above in execution + const composeInterface = composer.createInterfaceTC({ + name: interfaceTypeName, + fields: fields, + directives: graphqlDirectivesToCompose(directives), + }); + return composeInterface; +} + +function withOptionsInputType( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter, // required + userDefinedFieldDirectives: Map, + composer: SchemaComposer +): InputTypeComposer { + const optionsInputType = makeOptionsInput(entityAdapter, composer); + if (!entityAdapter.sortableFields.length) { + return optionsInputType; + } + const sortInput = makeSortInput(entityAdapter, userDefinedFieldDirectives, composer); + // TODO: Concrete vs Abstract discrepency + // is this intended? For ConcreteEntity is NonNull, for InterfaceEntity is nullable + const sortFieldType = entityAdapter instanceof ConcreteEntityAdapter ? sortInput.NonNull.List : sortInput.List; + optionsInputType.addFields({ + sort: { + description: `Specify one or more ${entityAdapter.operations.sortInputTypeName} objects to sort ${entityAdapter.upperFirstPlural} by. The sorts will be applied in the order in which they are arranged in the array.`, + type: sortFieldType, + }, + }); + return optionsInputType; +} + +function withSortInputType( + relationshipAdapter: RelationshipAdapter, // required + userDefinedFieldDirectives: Map, + composer: SchemaComposer +): InputTypeComposer | undefined { + // TODO: for relationships we used to get all attributes, not just sortableFields + // Clarify if this is intended? + if (!relationshipAdapter.sortableFields.length) { + return; + } + return makeSortInput(relationshipAdapter, userDefinedFieldDirectives, composer); +} + +function withWhereInputType( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter, // required + userDefinedFieldDirectives: Map, + features: Neo4jFeaturesSettings | undefined, + composer: SchemaComposer +): InputTypeComposer { + const whereInputType = makeWhereInput(entityAdapter, userDefinedFieldDirectives, features, composer); + + if (entityAdapter instanceof ConcreteEntityAdapter) { + whereInputType.addFields({ + OR: `[${entityAdapter.operations.whereInputTypeName}!]`, + AND: `[${entityAdapter.operations.whereInputTypeName}!]`, + NOT: entityAdapter.operations.whereInputTypeName, + }); + if (entityAdapter.isGlobalNode()) { + whereInputType.addFields({ id: GraphQLID }); + } + } else if (entityAdapter instanceof RelationshipAdapter) { + whereInputType.addFields({ + OR: `[${entityAdapter.operations.whereInputTypeName}!]`, + AND: `[${entityAdapter.operations.whereInputTypeName}!]`, + NOT: entityAdapter.operations.whereInputTypeName, + }); + } else if (entityAdapter instanceof InterfaceEntityAdapter) { + const implementationsWhereInputType = makeImplementationsWhereInput(entityAdapter, composer); + whereInputType.addFields({ _on: implementationsWhereInputType }); + } + return whereInputType; +} + +function withUniqueWhereInputType( + entityAdapter: ConcreteEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer { + const uniqueWhereFields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const attribute of entityAdapter.uniqueFields) { + uniqueWhereFields[attribute.name] = attribute.getFieldTypeName(); + } + const uniqueWhereInputType = composer.createInputTC({ + name: entityAdapter.operations.uniqueWhereInputTypeName, + fields: uniqueWhereFields, + }); + return uniqueWhereInputType; +} + +function withAggregateSelectionType( + concreteEntity: ConcreteEntityAdapter, // required + aggregationTypesMapper: AggregationTypesMapper, + propagatedDirectives: DirectiveNode[], + composer: SchemaComposer +): ObjectTypeComposer { + const aggregateSelection = composer.createObjectTC({ + name: concreteEntity.operations.aggregateTypeNames.selection, + fields: { + count: { + type: new GraphQLNonNull(GraphQLInt), + resolve: numericalResolver, + args: {}, + }, + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); + aggregateSelection.addFields(makeAggregableFields(concreteEntity, aggregationTypesMapper)); + return aggregateSelection; +} + +function withCreateInputType( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter, // required + userDefinedFieldDirectives: Map, + composer: SchemaComposer +): InputTypeComposer { + const createInputType = composer.createInputTC({ + name: entityAdapter.operations.createInputTypeName, + fields: {}, + }); + + if (entityAdapter instanceof ConcreteEntityAdapter || entityAdapter instanceof RelationshipAdapter) { + createInputType.addFields( + concreteEntityToCreateInputFields(entityAdapter.createInputFields, userDefinedFieldDirectives) + ); + } else { + createInputType.addFields(makeCreateInputFields(entityAdapter)); + } + + // ensureNonEmptyInput(composer, createInputType); - not for relationshipAdapter + return createInputType; +} + +function withUpdateInputType( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter, // required + userDefinedFieldDirectives: Map, + composer: SchemaComposer +): InputTypeComposer { + const inputTypeName = + entityAdapter instanceof RelationshipAdapter + ? entityAdapter.operations.edgeUpdateInputTypeName + : entityAdapter.operations.updateMutationArgumentNames.update; + const updateInputType = composer.createInputTC({ + name: inputTypeName, + fields: {}, + }); + + if (entityAdapter instanceof ConcreteEntityAdapter || entityAdapter instanceof RelationshipAdapter) { + updateInputType.addFields( + concreteEntityToUpdateInputFields(entityAdapter.updateInputFields, userDefinedFieldDirectives, [ + withMathOperators(), + withArrayOperators(), + ]) + ); + } else { + updateInputType.addFields( + concreteEntityToUpdateInputFields(entityAdapter.updateInputFields, userDefinedFieldDirectives, [ + withMathOperators(), + ]) + ); + const implementationsUpdateInputType = makeImplementationsUpdateInput(entityAdapter, composer); + updateInputType.addFields({ _on: implementationsUpdateInputType }); + } + + // ensureNonEmptyInput(composer, updateInputType); - not for relationshipAdapter + return updateInputType; +} + +function withDeleteInputType( + entityAdapter: InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer | undefined { + const implementationsUpdateInputType = makeImplementationsDeleteInput(entityAdapter, composer); + if (implementationsUpdateInputType) { + const deleteInputType = composer.getOrCreateITC(entityAdapter.operations.updateMutationArgumentNames.delete); + deleteInputType.setField("_on", implementationsUpdateInputType); + return deleteInputType; + } + return undefined; +} +function withConnectInputType( + entityAdapter: InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer | undefined { + const implementationsConnectInputType = makeImplementationsConnectInput(entityAdapter, composer); + if (implementationsConnectInputType) { + const connectInputType = composer.getOrCreateITC(entityAdapter.operations.updateMutationArgumentNames.connect); + connectInputType.setField("_on", implementationsConnectInputType); + return connectInputType; + } + return undefined; +} +function withDisconnectInputType( + entityAdapter: InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer | undefined { + const implementationsDisconnectInputType = makeImplementationsDisconnectInput(entityAdapter, composer); + if (implementationsDisconnectInputType) { + const disconnectInputType = composer.getOrCreateITC( + entityAdapter.operations.updateMutationArgumentNames.disconnect + ); + disconnectInputType.setField("_on", implementationsDisconnectInputType); + return disconnectInputType; + } + return undefined; +} + +function withMutationResponseTypes( + concreteEntityAdapter: ConcreteEntityAdapter, // required + propagatedDirectives: DirectiveNode[], + composer: SchemaComposer +): void { + composer.createObjectTC({ + name: concreteEntityAdapter.operations.mutationResponseTypeNames.create, + fields: { + info: new GraphQLNonNull(CreateInfo), + [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); + + composer.createObjectTC({ + name: concreteEntityAdapter.operations.mutationResponseTypeNames.update, + fields: { + info: new GraphQLNonNull(UpdateInfo), + [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); +} + +// make "helper" types +function makeOptionsInput( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer { + const optionsInput = composer.createInputTC({ + name: entityAdapter.operations.optionsInputTypeName, + fields: { limit: GraphQLInt, offset: GraphQLInt }, + }); + return optionsInput; +} +function makeSortFields( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter, // required + userDefinedFieldDirectives: Map +): InputTypeComposerFieldConfigMapDefinition { + const sortFields: InputTypeComposerFieldConfigMapDefinition = {}; + const sortableAttributes = entityAdapter.sortableFields; + for (const attribute of sortableAttributes) { + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attribute.name) || []; + const deprecatedDirective = userDefinedDirectivesOnField.filter( + (directive) => directive.name.value === DEPRECATED + ); + sortFields[attribute.name] = { + type: SortDirection, + directives: graphqlDirectivesToCompose(deprecatedDirective), + }; + } + return sortFields; +} +function makeSortInput( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter, // required + userDefinedFieldDirectives: Map, + composer: SchemaComposer +): InputTypeComposer { + const sortFields = makeSortFields(entityAdapter, userDefinedFieldDirectives); + const sortInput = composer.createInputTC({ + name: entityAdapter.operations.sortInputTypeName, + fields: sortFields, + }); + if (!(entityAdapter instanceof RelationshipAdapter)) { + sortInput.setDescription( + `Fields to sort ${entityAdapter.upperFirstPlural} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${entityAdapter.operations.sortInputTypeName} object.` + ); + } + return sortInput; +} +function makeAggregableFields( + concreteEntity: ConcreteEntityAdapter, // required + aggregationTypesMapper: AggregationTypesMapper +): ObjectTypeComposerFieldConfigMapDefinition { + const aggregableFields: ObjectTypeComposerFieldConfigMapDefinition = {}; + const aggregableAttributes = concreteEntity.aggregableFields; + for (const attribute of aggregableAttributes) { + const objectTypeComposer = aggregationTypesMapper.getAggregationType({ + fieldName: attribute.getTypeName(), + nullable: !attribute.isRequired(), + }); + if (objectTypeComposer) { + aggregableFields[attribute.name] = objectTypeComposer.NonNull; + } + } + return aggregableFields; +} +function makeWhereInput( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter, // required + userDefinedFieldDirectives: Map, + features: Neo4jFeaturesSettings | undefined, + composer: SchemaComposer +): InputTypeComposer { + const whereFields = makeWhereFields(entityAdapter, userDefinedFieldDirectives, features); + const whereInputType = composer.createInputTC({ + name: entityAdapter.operations.whereInputTypeName, + fields: whereFields, + }); + return whereInputType; +} +function makeWhereFields( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter, // required + userDefinedFieldDirectives: Map, + features: Neo4jFeaturesSettings | undefined +): InputTypeComposerFieldConfigMapDefinition { + if (entityAdapter instanceof UnionEntityAdapter) { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const concreteEntity of entityAdapter.concreteEntities) { + fields[concreteEntity.name] = concreteEntity.operations.whereInputTypeName; + } + return fields; + } + // TODO: make a a category for these including filtering logic from getWhereFieldsForAttributes + const filterableAttributes = Array.from(entityAdapter.attributes.values()); + return getWhereFieldsForAttributes({ + attributes: filterableAttributes, + userDefinedFieldDirectives, + features, + }); +} +function makeCreateInputFields( + interfaceEntityAdapter: InterfaceEntityAdapter // required +): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + fields[entityAdapter.name] = { + type: entityAdapter.operations.createInputTypeName, + }; + } + return fields; +} +// TODO: maybe combine implementationsInputTypes creation into one function? +function makeImplementationsWhereInput( + interfaceEntityAdapter: InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + fields[entityAdapter.name] = { + type: entityAdapter.operations.whereInputTypeName, + }; + } + const implementationsWhereType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsWhereInputTypeName, + fields, + }); + ensureNonEmptyInput(composer, implementationsWhereType); + return implementationsWhereType; +} +function makeImplementationsUpdateInput( + interfaceEntityAdapter: InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + fields[entityAdapter.name] = { + type: entityAdapter.operations.updateInputTypeName, + }; + } + const implementationsUpdateType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsUpdateInputTypeName, + fields, + }); + ensureNonEmptyInput(composer, implementationsUpdateType); + return implementationsUpdateType; +} +function makeImplementationsDeleteInput( + interfaceEntityAdapter: InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer | undefined { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + if (entityAdapter.relationships.size) { + fields[entityAdapter.name] = { + type: `[${entityAdapter.operations.deleteInputTypeName}!]`, + }; + } + } + if (Object.keys(fields).length) { + const implementationsDeleteType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsDeleteInputTypeName, + fields, + }); + // ensureNonEmptyInput(composer, implementationsDeleteType); + return implementationsDeleteType; + } + return undefined; +} +function makeImplementationsConnectInput( + interfaceEntityAdapter: InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer | undefined { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + if (entityAdapter.relationships.size) { + fields[entityAdapter.name] = { + type: `[${entityAdapter.operations.connectInputTypeName}!]`, + }; + } + } + if (Object.keys(fields).length) { + const implementationsConnectType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsConnectInputTypeName, + fields, + }); + // ensureNonEmptyInput(composer, implementationsConnectType); + return implementationsConnectType; + } + return undefined; +} +function makeImplementationsDisconnectInput( + interfaceEntityAdapter: InterfaceEntityAdapter, // required + composer: SchemaComposer +): InputTypeComposer | undefined { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + if (entityAdapter.relationships.size) { + fields[entityAdapter.name] = { + type: `[${entityAdapter.operations.disconnectInputTypeName}!]`, + }; + } + } + if (Object.keys(fields).length) { + const implementationsDisconnectType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsDisconnectInputTypeName, + fields, + }); + ensureNonEmptyInput(composer, implementationsDisconnectType); + return implementationsDisconnectType; + } + return undefined; +} + function makeAugmentedSchema( document: DocumentNode, { @@ -795,6 +1244,8 @@ function makeAugmentedSchema( } }); + // TODO: temporary helper to keep track of which interface entities were already "visited" + const seenInterfaces = new Set(); interfaceRelationships.forEach((interfaceRelationship) => { const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); @@ -809,6 +1260,7 @@ function makeAugmentedSchema( if (updatedRelationships) { relationships = updatedRelationships; } + seenInterfaces.add(interfaceRelationship.name.value); }); // TODO: find some solution for this @@ -840,8 +1292,12 @@ function makeAugmentedSchema( userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); } - nodes.forEach((node) => { - const concreteEntity = schemaModel.getEntity(node.name) as ConcreteEntity; + schemaModel.concreteEntities.forEach((concreteEntity) => { + // TODO: temporary for backwards compatibility for translation layer + const node = nodes.find((n) => n.name === concreteEntity.name); + if (!node) { + throw new Error("Fix node not found."); + } const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(concreteEntityAdapter.name); @@ -849,165 +1305,172 @@ function makeAugmentedSchema( throw new Error("fix user directives for object types."); } - const nodeFields = attributeAdapterToComposeFields( - concreteEntityAdapter.objectFields, - userDefinedFieldDirectives - ); - const propagatedDirectives = propagatedDirectivesForNode.get(concreteEntity.name) || []; const directives = (userDefinedDirectivesForNode.get(concreteEntity.name) || []).concat(propagatedDirectives); - const composeNode = composer.createObjectTC({ - name: concreteEntity.name, - fields: nodeFields, - description: concreteEntityAdapter.description, - directives: graphqlDirectivesToCompose(directives), - interfaces: concreteEntity.compositeEntities.filter((e) => e instanceof InterfaceEntity).map((e) => e.name), - }); - - if (concreteEntityAdapter.isGlobalNode()) { - composeNode.setField("id", { - type: new GraphQLNonNull(GraphQLID), - resolve: (src) => { - const field = concreteEntityAdapter.globalIdField.name; - const value = src[field] as string | number; - return concreteEntityAdapter.toGlobalId(value.toString()); - }, - }); - - composeNode.addInterface("Node"); - } - - const sortFields = concreteEntityAdapter.sortableFields.reduce( - (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { - // TODO: make a nicer way of getting these user defined field directives - const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; - return { - ...res, - [attributeAdapter.name]: { - type: "SortDirection", - directives: graphqlDirectivesToCompose( - userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) - ), - }, - }; - }, - {} - ); - - if (Object.keys(sortFields).length) { - const sortInput = composer.createInputTC({ - name: concreteEntityAdapter.operations.sortInputTypeName, - fields: sortFields, - description: `Fields to sort ${concreteEntityAdapter.upperFirstPlural} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${concreteEntityAdapter.operations.sortInputTypeName} object.`, - }); - - composer.createInputTC({ - name: concreteEntityAdapter.operations.optionsInputTypeName, - fields: { - sort: { - description: `Specify one or more ${concreteEntityAdapter.operations.sortInputTypeName} objects to sort ${concreteEntityAdapter.upperFirstPlural} by. The sorts will be applied in the order in which they are arranged in the array.`, - type: sortInput.NonNull.List, - }, - limit: "Int", - offset: "Int", - }, - }); - } else { - composer.createInputTC({ - name: concreteEntityAdapter.operations.optionsInputTypeName, - fields: { limit: "Int", offset: "Int" }, - }); - } - - composer.createObjectTC({ - name: concreteEntityAdapter.operations.aggregateTypeNames.selection, - fields: { - count: { - type: "Int!", - resolve: numericalResolver, - args: {}, - }, - ...concreteEntityAdapter.aggregableFields.reduce((res, field) => { - const objectTypeComposer = aggregationTypesMapper.getAggregationType({ - fieldName: field.getTypeName(), - nullable: !field.isRequired(), - }); - - if (objectTypeComposer) { - res[field.name] = objectTypeComposer.NonNull; - } + // const nodeFields = attributeAdapterToComposeFields( + // concreteEntityAdapter.objectFields, + // userDefinedFieldDirectives + // ); + // const composeNode = composer.createObjectTC({ + // name: concreteEntity.name, + // fields: nodeFields, + // description: concreteEntityAdapter.description, + // directives: graphqlDirectivesToCompose(directives), + // interfaces: concreteEntity.compositeEntities.filter((e) => e instanceof InterfaceEntity).map((e) => e.name), + // }); + // if (concreteEntityAdapter.isGlobalNode()) { + // composeNode.setField("id", { + // type: new GraphQLNonNull(GraphQLID), + // resolve: (src) => { + // const field = concreteEntityAdapter.globalIdField.name; + // const value = src[field] as string | number; + // return concreteEntityAdapter.toGlobalId(value.toString()); + // }, + // }); + + // composeNode.addInterface("Node"); + // } + const composeNode = withObjectType(concreteEntityAdapter, userDefinedFieldDirectives, directives, composer); + + // const sortFields = concreteEntityAdapter.sortableFields.reduce( + // (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { + // // TODO: make a nicer way of getting these user defined field directives + // const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; + // return { + // ...res, + // [attributeAdapter.name]: { + // type: "SortDirection", + // directives: graphqlDirectivesToCompose( + // userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) + // ), + // }, + // }; + // }, + // {} + // ); + // if (Object.keys(sortFields).length) { + // const sortInput = composer.createInputTC({ + // name: concreteEntityAdapter.operations.sortInputTypeName, + // fields: sortFields, + // description: `Fields to sort ${concreteEntityAdapter.upperFirstPlural} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${concreteEntityAdapter.operations.sortInputTypeName} object.`, + // }); + + // composer.createInputTC({ + // name: concreteEntityAdapter.operations.optionsInputTypeName, + // fields: { + // sort: { + // description: `Specify one or more ${concreteEntityAdapter.operations.sortInputTypeName} objects to sort ${concreteEntityAdapter.upperFirstPlural} by. The sorts will be applied in the order in which they are arranged in the array.`, + // type: sortInput.NonNull.List, + // }, + // limit: "Int", + // offset: "Int", + // }, + // }); + // } else { + // composer.createInputTC({ + // name: concreteEntityAdapter.operations.optionsInputTypeName, + // fields: { limit: "Int", offset: "Int" }, + // }); + // } + + withOptionsInputType(concreteEntityAdapter, userDefinedFieldDirectives, composer); + + // composer.createObjectTC({ + // name: concreteEntityAdapter.operations.aggregateTypeNames.selection, + // fields: { + // count: { + // type: "Int!", + // resolve: numericalResolver, + // args: {}, + // }, + // ...concreteEntityAdapter.aggregableFields.reduce((res, field) => { + // const objectTypeComposer = aggregationTypesMapper.getAggregationType({ + // fieldName: field.getTypeName(), + // nullable: !field.isRequired(), + // }); + + // if (objectTypeComposer) { + // res[field.name] = objectTypeComposer.NonNull; + // } + + // return res; + // }, {}), + // }, + // directives: graphqlDirectivesToCompose(propagatedDirectives), + // }); - return res; - }, {}), - }, - directives: graphqlDirectivesToCompose(propagatedDirectives), - }); + withAggregateSelectionType(concreteEntityAdapter, aggregationTypesMapper, propagatedDirectives, composer); // START WHERE FIELD ------------------- - const queryFields = getWhereFieldsFromConcreteEntity({ - concreteEntityAdapter, - userDefinedFieldDirectives, - features, - }); + // const queryFields = getWhereFieldsFromConcreteEntity({ + // concreteEntityAdapter, + // userDefinedFieldDirectives, + // features, + // }); + // composer.createInputTC({ + // name: concreteEntityAdapter.operations.whereInputTypeName, + // fields: concreteEntityAdapter.isGlobalNode() ? { id: "ID", ...queryFields } : queryFields, + // }); - composer.createInputTC({ - name: concreteEntityAdapter.operations.whereInputTypeName, - fields: concreteEntityAdapter.isGlobalNode() ? { id: "ID", ...queryFields } : queryFields, - }); + withWhereInputType(concreteEntityAdapter, userDefinedFieldDirectives, features, composer); + // TODO: new way // TODO: Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model augmentFulltextSchema2(node, composer, concreteEntityAdapter); - composer.createInputTC({ - name: `${concreteEntityAdapter.name}UniqueWhere`, - fields: concreteEntityAdapter.uniqueFields.reduce((res, field) => { - return { - [field.name]: field.getFieldTypeName(), - ...res, - }; - }, {}), - }); + // composer.createInputTC({ + // name: `${concreteEntityAdapter.name}UniqueWhere`, + // fields: concreteEntityAdapter.uniqueFields.reduce((res, field) => { + // return { + // [field.name]: field.getFieldTypeName(), + // ...res, + // }; + // }, {}), + // }); + withUniqueWhereInputType(concreteEntityAdapter, composer); // END WHERE FIELD ------------------- - composer.createInputTC({ - name: concreteEntityAdapter.operations.createInputTypeName, - fields: concreteEntityToCreateInputFields( - concreteEntityAdapter.createInputFields, - userDefinedFieldDirectives - ), - }); - - const nodeUpdateITC = composer.createInputTC({ - name: concreteEntityAdapter.operations.updateMutationArgumentNames.update, - fields: concreteEntityToUpdateInputFields( - concreteEntityAdapter.updateInputFields, - userDefinedFieldDirectives - ), - }); - - addMathOperatorsToITC(nodeUpdateITC); + // composer.createInputTC({ + // name: concreteEntityAdapter.operations.createInputTypeName, + // fields: concreteEntityToCreateInputFields( + // concreteEntityAdapter.createInputFields, + // userDefinedFieldDirectives + // ), + // }); - addArrayMethodsToITC2(nodeUpdateITC, concreteEntityAdapter.arrayMethodFields); + withCreateInputType(concreteEntityAdapter, userDefinedFieldDirectives, composer); - composer.createObjectTC({ - name: concreteEntityAdapter.operations.mutationResponseTypeNames.create, - fields: { - info: `CreateInfo!`, - [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, - }, - directives: graphqlDirectivesToCompose(propagatedDirectives), - }); + // const nodeUpdateITC = composer.createInputTC({ + // name: concreteEntityAdapter.operations.updateMutationArgumentNames.update, + // fields: concreteEntityToUpdateInputFields( + // concreteEntityAdapter.updateInputFields, + // userDefinedFieldDirectives + // ), + // }); + // addMathOperatorsToITC(nodeUpdateITC); + // addArrayMethodsToITC2(nodeUpdateITC, concreteEntityAdapter.arrayMethodFields); + withUpdateInputType(concreteEntityAdapter, userDefinedFieldDirectives, composer); + + // composer.createObjectTC({ + // name: concreteEntityAdapter.operations.mutationResponseTypeNames.create, + // fields: { + // info: `CreateInfo!`, + // [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, + // }, + // directives: graphqlDirectivesToCompose(propagatedDirectives), + // }); - composer.createObjectTC({ - name: concreteEntityAdapter.operations.mutationResponseTypeNames.update, - fields: { - info: `UpdateInfo!`, - [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, - }, - directives: graphqlDirectivesToCompose(propagatedDirectives), - }); + // composer.createObjectTC({ + // name: concreteEntityAdapter.operations.mutationResponseTypeNames.update, + // fields: { + // info: `UpdateInfo!`, + // [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, + // }, + // directives: graphqlDirectivesToCompose(propagatedDirectives), + // }); + withMutationResponseTypes(concreteEntityAdapter, propagatedDirectives, composer); // createRelationshipFields({ // relationshipFields: node.relationFields, @@ -1133,18 +1596,49 @@ function makeAugmentedSchema( } }); - unionTypes.forEach((union) => { - const unionEntity = schemaModel.getEntity(union.name.value); - if (unionEntity?.isCompositeEntity()) { - const fields = unionEntity.concreteEntities.reduce((f: Record, type) => { - return { ...f, [type.name]: `${type.name}Where` }; - }, {}); - - composer.createInputTC({ - name: `${unionEntity.name}Where`, - fields, + schemaModel.compositeEntities.forEach((entity) => { + if (entity instanceof UnionEntity) { + withWhereInputType(new UnionEntityAdapter(entity), new Map(), features, composer); + return; + } + if (entity instanceof InterfaceEntity && !seenInterfaces.has(entity.name)) { + const definitionNode = definitionNodes.interfaceTypes.find((type) => type.name.value === entity.name); + + if (!definitionNode) { + console.error(`Definition node not found for ${entity.name}`); + return; + } + + const interfaceEntityAdapter = new InterfaceEntityAdapter(entity); + // composer.createInterfaceTC({ + // name: interfaceEntityAdapter.name, + // description: interfaceEntity.description, + // fields: { + // ...attributeAdapterToComposeFields( + // Array.from(interfaceEntityAdapter.attributes.values()), + // getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) + // ), + // ...relationshipAdapterToComposeFields( + // Array.from(interfaceEntityAdapter.relationships.values()), + // getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) + // ), + // }, + // directives: graphqlDirectivesToCompose( + // userDefinedDirectivesForInterface.get(interfaceEntity.name) || [] + // ), + // }); + + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition( + definitionNode, + definitionNodes + ); + const directives = userDefinedDirectivesForInterface.get(entity.name) || []; + withInterfaceType(interfaceEntityAdapter, userDefinedFieldDirectives, directives, composer, { + includeRelationships: true, }); + return; } + return; }); if (generateSubscriptions && nodes.length) { @@ -1219,39 +1713,6 @@ function makeAugmentedSchema( } }); - filteredInterfaceTypes.forEach((inter) => { - const interfaceEntity = schemaModel.getEntity(inter.name.value); - if (interfaceEntity?.isCompositeEntity() && interfaceEntity instanceof InterfaceEntity) { - const definitionNode = definitionNodes.interfaceTypes.find( - (type) => type.name.value === interfaceEntity.name - ); - - if (!definitionNode) { - console.error(`Definition node not found for ${interfaceEntity.name}`); - return; - } - - const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); - composer.createInterfaceTC({ - name: interfaceEntityAdapter.name, - description: interfaceEntity.description, - fields: { - ...attributeAdapterToComposeFields( - Array.from(interfaceEntityAdapter.attributes.values()), - getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) - ), - ...relationshipAdapterToComposeFields( - Array.from(interfaceEntityAdapter.relationships.values()), - getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) - ), - }, - directives: graphqlDirectivesToCompose( - userDefinedDirectivesForInterface.get(interfaceEntity.name) || [] - ), - }); - } - }); - if (!Object.values(composer.Mutation.getFields()).length) { composer.delete("Mutation"); } @@ -1387,47 +1848,53 @@ function doForRelationshipPropertiesInterface( const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(obj, definitionNodes); - const composeFields = attributeAdapterToComposeFields( - Array.from(relationship.attributes.values()), - userDefinedFieldDirectives - ); - - const propertiesInterface = composer.createInterfaceTC({ - name: relationship.propertiesTypeName, - fields: composeFields, - }); - - composer.createInputTC({ - name: relationship.edgeSortInputTypeName, - fields: propertiesInterface.getFieldNames().reduce((res, f) => { - return { ...res, [f]: "SortDirection" }; - }, {}), - }); - - const relationshipUpdateITC = composer.createInputTC({ - name: relationship.edgeUpdateInputTypeName, - // better name for this fn pls - we are using interface entity now. - fields: concreteEntityToUpdateInputFields(relationship.updateInputFields, userDefinedFieldDirectives), - }); - addMathOperatorsToITC(relationshipUpdateITC); - addArrayMethodsToITC2(relationshipUpdateITC, relationship.arrayMethodFields); - - const relationshipWhereFields = getWhereFieldsFromRelationshipProperties({ - relationshipAdapter: relationship, - userDefinedFieldDirectives, - features, - }); - - composer.createInputTC({ - name: relationship.edgeWhereInputTypeName, - fields: relationshipWhereFields, - }); - - composer.createInputTC({ - // name: `${relationship.propertiesTypeName}CreateInput`, - name: relationship.edgeCreateInputTypeName2, - fields: concreteEntityToCreateInputFields(relationship.createInputFields, userDefinedFieldDirectives), - }); + // const composeFields = attributeAdapterToComposeFields( + // Array.from(relationship.attributes.values()), + // userDefinedFieldDirectives + // ); + + // const propertiesInterface = composer.createInterfaceTC({ + // name: relationship.propertiesTypeName, + // fields: composeFields, + // }); + + withInterfaceType(relationship, userDefinedFieldDirectives, [], composer); + + // composer.createInputTC({ + // name: relationship.operations.sortInputTypeName, + // fields: propertiesInterface.getFieldNames().reduce((res, f) => { + // return { ...res, [f]: "SortDirection" }; + // }, {}), + // }); + withSortInputType(relationship, userDefinedFieldDirectives, composer); + + // const relationshipUpdateITC = composer.createInputTC({ + // name: relationship.operations.edgeUpdateInputTypeName, + // // better name for this fn pls - we are using interface entity now. + // fields: concreteEntityToUpdateInputFields(relationship.updateInputFields, userDefinedFieldDirectives), + // }); + // addMathOperatorsToITC(relationshipUpdateITC); + // addArrayMethodsToITC2(relationshipUpdateITC, relationship.arrayMethodFields); + withUpdateInputType(relationship, userDefinedFieldDirectives, composer); + + // const relationshipWhereFields = getWhereFieldsFromRelationshipProperties({ + // relationshipAdapter: relationship, + // userDefinedFieldDirectives, + // features, + // }); + + // composer.createInputTC({ + // name: relationship.operations.whereInputTypeName, + // fields: relationshipWhereFields, + // }); + withWhereInputType(relationship, userDefinedFieldDirectives, features, composer); + + // composer.createInputTC({ + // // name: `${relationship.propertiesTypeName}CreateInput`, + // name: relationship.operations.createInputTypeName, + // fields: concreteEntityToCreateInputFields(relationship.createInputFields, userDefinedFieldDirectives), + // }); + withCreateInputType(relationship, userDefinedFieldDirectives, composer); } function doForInterfacesThatAreTargetOfARelationship({ @@ -1458,93 +1925,96 @@ function doForInterfacesThatAreTargetOfARelationship({ const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - const objectComposeFields = attributeAdapterToComposeFields( - Array.from(interfaceEntityAdapter.attributes.values()), - userDefinedFieldDirectives - ); - - const composeInterface = composer.createInterfaceTC({ - name: interfaceEntityAdapter.name, - fields: objectComposeFields, - }); - - const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Options`, (tc) => { - tc.addFields({ - limit: "Int", - offset: "Int", - }); - }); - - const interfaceSortableFields = interfaceEntityAdapter.sortableFields.reduce( - (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { - const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; - return { - ...res, - [attributeAdapter.name]: { - type: "SortDirection", - directives: graphqlDirectivesToCompose( - userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) - ), - }, - }; - }, - {} - ); - - if (Object.keys(interfaceSortableFields).length) { - const interfaceSortInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Sort`, (tc) => { - tc.addFields(interfaceSortableFields); - tc.setDescription( - `Fields to sort ${pluralize( - interfaceEntityAdapter.name - )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceEntityAdapter.name}Sort`} object.` - ); - }); - - interfaceOptionsInput.addFields({ - sort: { - description: `Specify one or more ${`${interfaceEntityAdapter.name}Sort`} objects to sort ${pluralize( - interfaceEntityAdapter.name - )} by. The sorts will be applied in the order in which they are arranged in the array.`, - type: interfaceSortInput.List, - }, - }); - } - - const interfaceWhereFields = getWhereFieldsForAttributes({ - attributes: Array.from(interfaceEntityAdapter.attributes.values()), - userDefinedFieldDirectives, - features, - }); - - const [ - implementationsConnectInput, - implementationsDeleteInput, - implementationsDisconnectInput, - implementationsUpdateInput, - implementationsWhereInput, - ] = ["ConnectInput", "DeleteInput", "DisconnectInput", "UpdateInput", "Where"].map((suffix) => - composer.createInputTC({ - name: `${interfaceEntityAdapter.name}Implementations${suffix}`, - fields: {}, - }) - ) as [InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer]; - - composer.createInputTC({ - name: `${interfaceEntityAdapter.name}Where`, - fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, - }); - - const interfaceCreateInput = composer.createInputTC(`${interfaceEntityAdapter.name}CreateInput`); - - const interfaceRelationshipITC = composer.getOrCreateITC(`${interfaceEntityAdapter.name}UpdateInput`, (tc) => { - tc.addFields({ - ...concreteEntityToUpdateInputFields(interfaceEntityAdapter.updateInputFields, userDefinedFieldDirectives), - _on: implementationsUpdateInput, - }); - }); - - addMathOperatorsToITC(interfaceRelationshipITC); + // const objectComposeFields = attributeAdapterToComposeFields( + // Array.from(interfaceEntityAdapter.attributes.values()), + // userDefinedFieldDirectives + // ); + // const composeInterface = composer.createInterfaceTC({ + // name: interfaceEntityAdapter.name, + // fields: objectComposeFields, + // }); + + const composeInterface = withInterfaceType(interfaceEntityAdapter, userDefinedFieldDirectives, [], composer); + + // const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Options`, (tc) => { + // tc.addFields({ + // limit: "Int", + // offset: "Int", + // }); + // }); + // const interfaceSortableFields = interfaceEntityAdapter.sortableFields.reduce( + // (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { + // const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; + // return { + // ...res, + // [attributeAdapter.name]: { + // type: "SortDirection", + // directives: graphqlDirectivesToCompose( + // userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) + // ), + // }, + // }; + // }, + // {} + // ); + // if (Object.keys(interfaceSortableFields).length) { + // const interfaceSortInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Sort`, (tc) => { + // tc.addFields(interfaceSortableFields); + // tc.setDescription( + // `Fields to sort ${pluralize( + // interfaceEntityAdapter.name + // )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceEntityAdapter.name}Sort`} object.` + // ); + // }); + // interfaceOptionsInput.addFields({ + // sort: { + // description: `Specify one or more ${`${interfaceEntityAdapter.name}Sort`} objects to sort ${pluralize( + // interfaceEntityAdapter.name + // )} by. The sorts will be applied in the order in which they are arranged in the array.`, + // type: interfaceSortInput.List, + // }, + // }); + // } + + withOptionsInputType(interfaceEntityAdapter, userDefinedFieldDirectives, composer); + + // const [ + // implementationsConnectInput, + // implementationsDeleteInput, + // implementationsDisconnectInput, + // implementationsUpdateInput, + // implementationsWhereInput, + // ] = ["ConnectInput", "DisconnectInput", "DeleteInput", "UpdateInput", "Where"].map((suffix) => + // composer.createInputTC({ + // name: `${interfaceEntityAdapter.name}Implementations${suffix}`, + // fields: {}, + // }) + // ) as [InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer]; + + // const interfaceWhereFields = getWhereFieldsForAttributes({ + // attributes: Array.from(interfaceEntityAdapter.attributes.values()), + // userDefinedFieldDirectives, + // features, + // }); + // composer.createInputTC({ + // name: interfaceEntityAdapter.operations.whereInputTypeName, + // fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, + // }); + + withWhereInputType(interfaceEntityAdapter, userDefinedFieldDirectives, features, composer); + + // const interfaceCreateInput = composer.createInputTC(`${interfaceEntityAdapter.name}CreateInput`); + + withCreateInputType(interfaceEntityAdapter, userDefinedFieldDirectives, composer); + + // const interfaceRelationshipITC = composer.getOrCreateITC(`${interfaceEntityAdapter.name}UpdateInput`, (tc) => { + // tc.addFields({ + // ...concreteEntityToUpdateInputFields(interfaceEntityAdapter.updateInputFields, userDefinedFieldDirectives), + // _on: implementationsUpdateInput, + // }); + // }); + // addMathOperatorsToITC(interfaceRelationshipITC); + withUpdateInputType(interfaceEntityAdapter, userDefinedFieldDirectives, composer); createRelationshipFieldsFromConcreteEntityAdapter({ entityAdapter: interfaceEntityAdapter, @@ -1565,79 +2035,83 @@ function doForInterfacesThatAreTargetOfARelationship({ }), ]; - interfaceEntityAdapter.concreteEntities.forEach((implementation) => { - implementationsWhereInput.addFields({ - [implementation.name]: { - type: `${implementation.name}Where`, - }, - }); - - if (implementation.relationships.size) { - implementationsConnectInput.addFields({ - [implementation.name]: { - type: `[${implementation.name}ConnectInput!]`, - }, - }); - - implementationsDeleteInput.addFields({ - [implementation.name]: { - type: `[${implementation.name}DeleteInput!]`, - }, - }); - - implementationsDisconnectInput.addFields({ - [implementation.name]: { - type: `[${implementation.name}DisconnectInput!]`, - }, - }); - } - - interfaceCreateInput.addFields({ - [implementation.name]: { - type: `${implementation.name}CreateInput`, - }, - }); - - implementationsUpdateInput.addFields({ - [implementation.name]: { - type: `${implementation.name}UpdateInput`, - }, - }); - }); - - if (implementationsConnectInput.getFieldNames().length) { - const interfaceConnectInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}ConnectInput`, (tc) => { - tc.addFields({ _on: implementationsConnectInput }); - }); - interfaceConnectInput.setField("_on", implementationsConnectInput); - } - - if (implementationsDeleteInput.getFieldNames().length) { - const interfaceDeleteInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}DeleteInput`, (tc) => { - tc.addFields({ _on: implementationsDeleteInput }); - }); - interfaceDeleteInput.setField("_on", implementationsDeleteInput); - } - - if (implementationsDisconnectInput.getFieldNames().length) { - const interfaceDisconnectInput = composer.getOrCreateITC( - `${interfaceEntityAdapter.name}DisconnectInput`, - (tc) => { - tc.addFields({ _on: implementationsDisconnectInput }); - } - ); - interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); - } + // interfaceEntityAdapter.concreteEntities.forEach((implementation) => { + // implementationsWhereInput.addFields({ + // [implementation.name]: { + // type: `${implementation.name}Where`, + // }, + // }); + + // if (implementation.relationships.size) { + // implementationsConnectInput.addFields({ + // [implementation.name]: { + // type: `[${implementation.name}ConnectInput!]`, + // }, + // }); + + // implementationsDeleteInput.addFields({ + // [implementation.name]: { + // type: `[${implementation.name}DeleteInput!]`, + // }, + // }); + + // implementationsDisconnectInput.addFields({ + // [implementation.name]: { + // type: `[${implementation.name}DisconnectInput!]`, + // }, + // }); + // } + + // interfaceCreateInput.addFields({ + // [implementation.name]: { + // type: `${implementation.name}CreateInput`, + // }, + // }); + + // implementationsUpdateInput.addFields({ + // [implementation.name]: { + // type: `${implementation.name}UpdateInput`, + // }, + // }); + // }); + + // if (implementationsConnectInput.getFieldNames().length) { + // const interfaceConnectInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}ConnectInput`, (tc) => { + // tc.addFields({ _on: implementationsConnectInput }); + // }); + // interfaceConnectInput.setField("_on", implementationsConnectInput); + // } + + // if (implementationsDeleteInput.getFieldNames().length) { + // const interfaceDeleteInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}DeleteInput`, (tc) => { + // tc.addFields({ _on: implementationsDeleteInput }); + // }); + // interfaceDeleteInput.setField("_on", implementationsDeleteInput); + // } + + // if (implementationsDisconnectInput.getFieldNames().length) { + // const interfaceDisconnectInput = composer.getOrCreateITC( + // `${interfaceEntityAdapter.name}DisconnectInput`, + // (tc) => { + // tc.addFields({ _on: implementationsDisconnectInput }); + // } + // ); + // interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); + // } + + withDeleteInputType(interfaceEntityAdapter, composer); + withConnectInputType(interfaceEntityAdapter, composer); + withDisconnectInputType(interfaceEntityAdapter, composer); ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); - [ - implementationsConnectInput, - implementationsDeleteInput, - implementationsDisconnectInput, - implementationsUpdateInput, - implementationsWhereInput, - ].forEach((c) => ensureNonEmptyInput(composer, c)); + // [ + // implementationsConnectInput, + // implementationsDeleteInput, + // implementationsDisconnectInput, + // implementationsUpdateInput, + // implementationsWhereInput, + // ].forEach((c) => ensureNonEmptyInput(composer, c)); return relationships; } diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index 66d9043eda..2e11dab4b8 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -17,8 +17,15 @@ * limitations under the License. */ -import type { DirectiveNode, InputValueDefinitionNode } from "graphql"; -import type { Directive, DirectiveArgs, ObjectTypeComposerFieldConfigAsObjectDefinition } from "graphql-compose"; +import { any } from "@neo4j/cypher-builder"; +import { DirectiveNode, GraphQLInt, InputValueDefinitionNode } from "graphql"; +import type { + Directive, + DirectiveArgs, + InputTypeComposerFieldConfigMapDefinition, + ObjectTypeComposerFieldConfigAsObjectDefinition, +} from "graphql-compose"; +import { argsToArgsConfig } from "graphql/type/definition"; import { DEPRECATED } from "../constants"; import type { Argument } from "../schema-model/argument/Argument"; import { ArgumentAdapter } from "../schema-model/argument/model-adapters/ArgumentAdapter"; @@ -125,8 +132,8 @@ export function relationshipAdapterToComposeFields( fieldName: field.name, }, { - typeName: `${field.connectionFieldTypename}!`, // TODO: Move Adapter so we aren't manually adding the ! - fieldName: field.connectionFieldName, + typeName: `${field.operations.connectionFieldTypename}!`, // TODO: Move Adapter so we aren't manually adding the ! + fieldName: field.operations.connectionFieldName, }, ]; for (const { typeName, fieldName } of relationshipFields) { @@ -415,9 +422,10 @@ export function objectFieldsToUpdateInputFields(fields: BaseField[]): Record + userDefinedFieldDirectives: Map, + additionalFieldsCallbacks: AdditionalFieldsCallback[] = [] ) { - const updateInputFields: Record = {}; + let updateInputFields: InputTypeComposerFieldConfigMapDefinition = {}; for (const field of objectFields) { const newInputField: InputField = { type: field.getInputTypeNames().update.pretty, @@ -432,7 +440,39 @@ export function concreteEntityToUpdateInputFields( } updateInputFields[field.name] = newInputField; + + for (const cb of additionalFieldsCallbacks) { + const additionalFields = cb(field, newInputField); + updateInputFields = { ...updateInputFields, ...additionalFields }; + } } return updateInputFields; } + +export function withMathOperators(): AdditionalFieldsCallback { + return (attribute: AttributeAdapter, fieldDefinition: InputField): Record => { + const fields: Record = {}; + if (attribute.mathModel) { + for (const operation of attribute.mathModel.getMathOperations()) { + fields[operation] = fieldDefinition; + } + } + return fields; + }; +} +export function withArrayOperators(): AdditionalFieldsCallback { + return (attribute: AttributeAdapter): InputTypeComposerFieldConfigMapDefinition => { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + if (attribute.listModel) { + fields[attribute.listModel.getPop()] = GraphQLInt; + fields[attribute.listModel.getPush()] = attribute.getInputTypeNames().update.pretty; + } + return fields; + }; +} + +type AdditionalFieldsCallback = ( + attribute: AttributeAdapter, + fieldDefinition: InputField +) => Record | InputTypeComposerFieldConfigMapDefinition; From 7ff60f12434a004c7453991ece3d0277735ee610 Mon Sep 17 00:00:00 2001 From: a-alle Date: Sun, 17 Sep 2023 17:31:21 +0100 Subject: [PATCH 099/162] add union operation --- .../entity/model-adapters/UnionEntityOperations.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityOperations.ts index a280306dd9..ebfd8c6d48 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityOperations.ts @@ -29,4 +29,8 @@ export class UnionEntityOperations { public get whereInputTypeName(): string { return `${this.unionEntityAdapter.name}Where`; } + + public get subscriptionEventPayloadTypeName(): string { + return `${this.unionEntityAdapter.name}EventPayload`; + } } From cae94df84f38fa07656930cc9ad698d832b300c2 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 10:57:21 +0200 Subject: [PATCH 100/162] refactor: imports --- .../src/schema/new-make-augmented-schema.ts | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index cf1447c82d..aeeb7b437e 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -18,16 +18,14 @@ */ import type { IResolvers } from "@graphql-tools/utils"; -import { +import type { DefinitionNode, DirectiveNode, DocumentNode, FieldDefinitionNode, GraphQLEnumType, GraphQLInputObjectType, - GraphQLInt, GraphQLInterfaceType, - GraphQLList, GraphQLObjectType, GraphQLScalarType, InterfaceTypeDefinitionNode, @@ -35,18 +33,15 @@ import { ObjectTypeDefinitionNode, SchemaExtensionNode, } from "graphql"; -import { GraphQLID, GraphQLNonNull, Kind, parse, print } from "graphql"; +import { GraphQLID, GraphQLInt, GraphQLNonNull, Kind, parse, print } from "graphql"; import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, InterfaceTypeComposer, ObjectTypeComposer, - ObjectTypeComposerFieldConfigMap, ObjectTypeComposerFieldConfigMapDefinition, - UnionTypeComposer, } from "graphql-compose"; import { SchemaComposer } from "graphql-compose"; -import pluralize from "pluralize"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; import { augmentFulltextSchema2 } from "./augment/fulltext"; import { cypherResolver2 } from "./resolvers/field/cypher"; @@ -68,11 +63,7 @@ import type { DefinitionNodes } from "./get-definition-nodes"; import { getDefinitionNodes } from "./get-definition-nodes"; import type { ObjectFields } from "./get-obj-field-meta"; import getObjFieldMeta from "./get-obj-field-meta"; -import { - getWhereFieldsForAttributes, - getWhereFieldsFromConcreteEntity, - getWhereFieldsFromRelationshipProperties, -} from "./get-where-fields"; +import { getWhereFieldsForAttributes } from "./get-where-fields"; import { attributeAdapterToComposeFields, concreteEntityToCreateInputFields, @@ -117,16 +108,13 @@ import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionE import { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { CypherField, Neo4jFeaturesSettings } from "../types"; import { isInArray } from "../utils/is-in-array"; -import { addArrayMethodsToITC2 } from "./array-methods"; import { createConnectionFields2 } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; import { createRelationshipFieldsFromConcreteEntityAdapter } from "./create-relationship-fields/create-relationship-fields"; import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; -import { addMathOperatorsToITC } from "./math"; -import { generateSubscriptionTypes, generateSubscriptionTypes2 } from "./subscriptions/generate-subscription-types"; -import { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; +import { generateSubscriptionTypes2 } from "./subscriptions/generate-subscription-types"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; From a623c9bdc63434cbdcf5686329a9810e48cb33cd Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 18 Sep 2023 10:55:21 +0100 Subject: [PATCH 101/162] add userDefinedInterfaces to relationship properties interface type --- .../src/schema/new-make-augmented-schema.ts | 89 +++++++++++-------- 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index aeeb7b437e..263ecae41d 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -515,7 +515,7 @@ function withObjectType( function withInterfaceType( entityAdapter: InterfaceEntityAdapter | RelationshipAdapter, // required userDefinedFieldDirectives: Map, - directives: DirectiveNode[], + userDefinedInterfaceDirectives: DirectiveNode[], composer: SchemaComposer, config = { includeRelationships: false, @@ -544,7 +544,7 @@ function withInterfaceType( const composeInterface = composer.createInterfaceTC({ name: interfaceTypeName, fields: fields, - directives: graphqlDirectivesToCompose(directives), + directives: graphqlDirectivesToCompose(userDefinedInterfaceDirectives), }); return composeInterface; } @@ -1132,6 +1132,35 @@ function makeAugmentedSchema( interfaceRelationshipNames ); + // TODO: find some solution for this + // TODO: should directives be inherited?? they are user-defined after all + // TODO: other considerations might apply to PROPAGATED_DIRECTIVES: deprecated and shareable + // ATM we only test deprecated propagates + // also, should these live in the schema model?? + const userDefinedFieldDirectivesForNode = new Map>(); + const userDefinedDirectivesForNode = new Map(); + const propagatedDirectivesForNode = new Map(); + const userDefinedDirectivesForInterface = new Map(); + for (const definitionNode of definitionNodes.objectTypes) { + const userDefinedObjectDirectives = + definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; + const propagatedDirectives = + definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || + []; + userDefinedDirectivesForNode.set(definitionNode.name.value, userDefinedObjectDirectives); + propagatedDirectivesForNode.set(definitionNode.name.value, propagatedDirectives); + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } + for (const definitionNode of definitionNodes.interfaceTypes) { + const userDefinedInterfaceDirectives = + definitionNode.directives?.filter((directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value)) || + []; + userDefinedDirectivesForInterface.set(definitionNode.name.value, userDefinedInterfaceDirectives); + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } + // TODO: keeping this `relationshipFields` scaffold for backwards compatibility on translation layer // actual functional logic is in schemaModel.concreteEntities.forEach const relationshipFields = new Map(); @@ -1226,13 +1255,20 @@ function makeAugmentedSchema( ) { continue; } - doForRelationshipPropertiesInterface(composer, relationship, definitionNodes, features); + doForRelationshipPropertiesInterface( + composer, + relationship, + definitionNodes, + userDefinedDirectivesForInterface, + features + ); seenRelationshipPropertiesInterfaces.add(relationship.propertiesTypeName); } } }); // TODO: temporary helper to keep track of which interface entities were already "visited" + // say why this is happening here ALE const seenInterfaces = new Set(); interfaceRelationships.forEach((interfaceRelationship) => { const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; @@ -1251,35 +1287,6 @@ function makeAugmentedSchema( seenInterfaces.add(interfaceRelationship.name.value); }); - // TODO: find some solution for this - // TODO: should directives be inherited?? they are user-defined after all - // TODO: other considerations might apply to PROPAGATED_DIRECTIVES: deprecated and shareable - // ATM we only test deprecated propagates - // also, should these live in the schema model?? - const userDefinedFieldDirectivesForNode = new Map>(); - const userDefinedDirectivesForNode = new Map(); - const propagatedDirectivesForNode = new Map(); - const userDefinedDirectivesForInterface = new Map(); - for (const definitionNode of definitionNodes.objectTypes) { - const userDefinedObjectDirectives = - definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; - const propagatedDirectives = - definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || - []; - userDefinedDirectivesForNode.set(definitionNode.name.value, userDefinedObjectDirectives); - propagatedDirectivesForNode.set(definitionNode.name.value, propagatedDirectives); - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); - } - for (const definitionNode of definitionNodes.interfaceTypes) { - const userDefinedInterfaceDirectives = - definitionNode.directives?.filter((directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value)) || - []; - userDefinedDirectivesForInterface.set(definitionNode.name.value, userDefinedInterfaceDirectives); - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); - } - schemaModel.concreteEntities.forEach((concreteEntity) => { // TODO: temporary for backwards compatibility for translation layer const node = nodes.find((n) => n.name === concreteEntity.name); @@ -1620,10 +1627,16 @@ function makeAugmentedSchema( definitionNode, definitionNodes ); - const directives = userDefinedDirectivesForInterface.get(entity.name) || []; - withInterfaceType(interfaceEntityAdapter, userDefinedFieldDirectives, directives, composer, { - includeRelationships: true, - }); + const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(entity.name) || []; + withInterfaceType( + interfaceEntityAdapter, + userDefinedFieldDirectives, + userDefinedInterfaceDirectives, + composer, + { + includeRelationships: true, + } + ); return; } return; @@ -1823,6 +1836,7 @@ function doForRelationshipPropertiesInterface( composer: SchemaComposer, relationship: RelationshipAdapter, definitionNodes: DefinitionNodes, + userDefinedDirectivesForInterface: Map, features?: Neo4jFeaturesSettings ) { if (!relationship.propertiesTypeName) { @@ -1846,7 +1860,8 @@ function doForRelationshipPropertiesInterface( // fields: composeFields, // }); - withInterfaceType(relationship, userDefinedFieldDirectives, [], composer); + const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(relationship.name) || []; + withInterfaceType(relationship, userDefinedFieldDirectives, userDefinedInterfaceDirectives, composer); // composer.createInputTC({ // name: relationship.operations.sortInputTypeName, From 6b7313065a8e9695a86bcfde7530cde4e1a8b3a5 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 12:29:52 +0200 Subject: [PATCH 102/162] refactor: move generation functions to separate files --- .../src/schema/generation/aggregate-types.ts | 54 ++ .../src/schema/generation/connect-input.ts | 24 + .../src/schema/generation/create-input.ts | 44 ++ .../src/schema/generation/delete-input.ts | 21 + .../src/schema/generation/disconnect-input.ts | 24 + .../generation/implementation-inputs.ts | 124 ++++ .../src/schema/generation/interface-type.ts | 54 ++ .../src/schema/generation/object-type.ts | 42 ++ .../src/schema/generation/response-types.ts | 35 + .../generation/sort-and-options-input.ts | 109 +++ .../src/schema/generation/update-input.ts | 49 ++ .../src/schema/generation/where-input.ts | 110 +++ .../src/schema/new-make-augmented-schema.ts | 628 ++---------------- 13 files changed, 761 insertions(+), 557 deletions(-) create mode 100644 packages/graphql/src/schema/generation/aggregate-types.ts create mode 100644 packages/graphql/src/schema/generation/connect-input.ts create mode 100644 packages/graphql/src/schema/generation/create-input.ts create mode 100644 packages/graphql/src/schema/generation/delete-input.ts create mode 100644 packages/graphql/src/schema/generation/disconnect-input.ts create mode 100644 packages/graphql/src/schema/generation/implementation-inputs.ts create mode 100644 packages/graphql/src/schema/generation/interface-type.ts create mode 100644 packages/graphql/src/schema/generation/object-type.ts create mode 100644 packages/graphql/src/schema/generation/response-types.ts create mode 100644 packages/graphql/src/schema/generation/sort-and-options-input.ts create mode 100644 packages/graphql/src/schema/generation/update-input.ts create mode 100644 packages/graphql/src/schema/generation/where-input.ts diff --git a/packages/graphql/src/schema/generation/aggregate-types.ts b/packages/graphql/src/schema/generation/aggregate-types.ts new file mode 100644 index 0000000000..7da4834dca --- /dev/null +++ b/packages/graphql/src/schema/generation/aggregate-types.ts @@ -0,0 +1,54 @@ +import type { DirectiveNode } from "graphql"; +import { GraphQLInt, GraphQLNonNull } from "graphql"; +import type { ObjectTypeComposer, ObjectTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { AggregationTypesMapper } from "../aggregations/aggregation-types-mapper"; +import { numericalResolver } from "../resolvers/field/numerical"; +import { graphqlDirectivesToCompose } from "../to-compose"; + +export function withAggregateSelectionType({ + concreteEntityAdapter, + aggregationTypesMapper, + propagatedDirectives, + composer, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; // required + aggregationTypesMapper: AggregationTypesMapper; + propagatedDirectives: DirectiveNode[]; + composer: SchemaComposer; +}): ObjectTypeComposer { + const aggregateSelection = composer.createObjectTC({ + name: concreteEntityAdapter.operations.aggregateTypeNames.selection, + fields: { + count: { + type: new GraphQLNonNull(GraphQLInt), + resolve: numericalResolver, + args: {}, + }, + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); + aggregateSelection.addFields(makeAggregableFields({ concreteEntityAdapter, aggregationTypesMapper })); + return aggregateSelection; +} + +function makeAggregableFields({ + concreteEntityAdapter, + aggregationTypesMapper, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; // required + aggregationTypesMapper: AggregationTypesMapper; +}): ObjectTypeComposerFieldConfigMapDefinition { + const aggregableFields: ObjectTypeComposerFieldConfigMapDefinition = {}; + const aggregableAttributes = concreteEntityAdapter.aggregableFields; + for (const attribute of aggregableAttributes) { + const objectTypeComposer = aggregationTypesMapper.getAggregationType({ + fieldName: attribute.getTypeName(), + nullable: !attribute.isRequired(), + }); + if (objectTypeComposer) { + aggregableFields[attribute.name] = objectTypeComposer.NonNull; + } + } + return aggregableFields; +} diff --git a/packages/graphql/src/schema/generation/connect-input.ts b/packages/graphql/src/schema/generation/connect-input.ts new file mode 100644 index 0000000000..daa276fa56 --- /dev/null +++ b/packages/graphql/src/schema/generation/connect-input.ts @@ -0,0 +1,24 @@ +import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { makeImplementationsConnectInput } from "./implementation-inputs"; + +export function withConnectInputType({ + interfaceEntityAdapter, + composer, +}: { + interfaceEntityAdapter: InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer | undefined { + const implementationsConnectInputType = makeImplementationsConnectInput({ + interfaceEntityAdapter, + composer, + }); + if (implementationsConnectInputType) { + const connectInputType = composer.getOrCreateITC( + interfaceEntityAdapter.operations.updateMutationArgumentNames.connect + ); + connectInputType.setField("_on", implementationsConnectInputType); + return connectInputType; + } + return undefined; +} diff --git a/packages/graphql/src/schema/generation/create-input.ts b/packages/graphql/src/schema/generation/create-input.ts new file mode 100644 index 0000000000..964c1f98d4 --- /dev/null +++ b/packages/graphql/src/schema/generation/create-input.ts @@ -0,0 +1,44 @@ +import type { DirectiveNode } from "graphql"; +import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { concreteEntityToCreateInputFields } from "../to-compose"; + +export function withCreateInputType({ + entityAdapter, + userDefinedFieldDirectives, + composer, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; // required + userDefinedFieldDirectives: Map; + composer: SchemaComposer; +}): InputTypeComposer { + const createInputType = composer.createInputTC({ + name: entityAdapter.operations.createInputTypeName, + fields: {}, + }); + + if (entityAdapter instanceof ConcreteEntityAdapter || entityAdapter instanceof RelationshipAdapter) { + createInputType.addFields( + concreteEntityToCreateInputFields(entityAdapter.createInputFields, userDefinedFieldDirectives) + ); + } else { + createInputType.addFields(makeCreateInputFields(entityAdapter)); + } + + // ensureNonEmptyInput(composer, createInputType); - not for relationshipAdapter + return createInputType; +} + +function makeCreateInputFields( + interfaceEntityAdapter: InterfaceEntityAdapter // required +): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + fields[entityAdapter.name] = { + type: entityAdapter.operations.createInputTypeName, + }; + } + return fields; +} diff --git a/packages/graphql/src/schema/generation/delete-input.ts b/packages/graphql/src/schema/generation/delete-input.ts new file mode 100644 index 0000000000..01ce001d8d --- /dev/null +++ b/packages/graphql/src/schema/generation/delete-input.ts @@ -0,0 +1,21 @@ +import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { makeImplementationsDeleteInput } from "./implementation-inputs"; + +export function withDeleteInputType({ + interfaceEntityAdapter, + composer, +}: { + interfaceEntityAdapter: InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer | undefined { + const implementationsUpdateInputType = makeImplementationsDeleteInput({ interfaceEntityAdapter, composer }); + if (implementationsUpdateInputType) { + const deleteInputType = composer.getOrCreateITC( + interfaceEntityAdapter.operations.updateMutationArgumentNames.delete + ); + deleteInputType.setField("_on", implementationsUpdateInputType); + return deleteInputType; + } + return undefined; +} diff --git a/packages/graphql/src/schema/generation/disconnect-input.ts b/packages/graphql/src/schema/generation/disconnect-input.ts new file mode 100644 index 0000000000..dfb34fc0ab --- /dev/null +++ b/packages/graphql/src/schema/generation/disconnect-input.ts @@ -0,0 +1,24 @@ +import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { makeImplementationsDisconnectInput } from "./implementation-inputs"; + +export function withDisconnectInputType({ + interfaceEntityAdapter, + composer, +}: { + interfaceEntityAdapter: InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer | undefined { + const implementationsDisconnectInputType = makeImplementationsDisconnectInput({ + interfaceEntityAdapter, + composer, + }); + if (implementationsDisconnectInputType) { + const disconnectInputType = composer.getOrCreateITC( + interfaceEntityAdapter.operations.updateMutationArgumentNames.disconnect + ); + disconnectInputType.setField("_on", implementationsDisconnectInputType); + return disconnectInputType; + } + return undefined; +} diff --git a/packages/graphql/src/schema/generation/implementation-inputs.ts b/packages/graphql/src/schema/generation/implementation-inputs.ts new file mode 100644 index 0000000000..4e3aa9acfd --- /dev/null +++ b/packages/graphql/src/schema/generation/implementation-inputs.ts @@ -0,0 +1,124 @@ +import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { ensureNonEmptyInput } from "../ensure-non-empty-input"; + +export function makeImplementationsDisconnectInput({ + interfaceEntityAdapter, + composer, +}: { + interfaceEntityAdapter: InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer | undefined { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + if (entityAdapter.relationships.size) { + fields[entityAdapter.name] = { + type: `[${entityAdapter.operations.disconnectInputTypeName}!]`, + }; + } + } + if (Object.keys(fields).length) { + const implementationsDisconnectType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsDisconnectInputTypeName, + fields, + }); + ensureNonEmptyInput(composer, implementationsDisconnectType); + return implementationsDisconnectType; + } + return undefined; +} + +export function makeImplementationsConnectInput({ + interfaceEntityAdapter, + composer, +}: { + interfaceEntityAdapter: InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer | undefined { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + if (entityAdapter.relationships.size) { + fields[entityAdapter.name] = { + type: `[${entityAdapter.operations.connectInputTypeName}!]`, + }; + } + } + if (Object.keys(fields).length) { + const implementationsConnectType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsConnectInputTypeName, + fields, + }); + // ensureNonEmptyInput(composer, implementationsConnectType); + return implementationsConnectType; + } + return undefined; +} + +export function makeImplementationsDeleteInput({ + interfaceEntityAdapter, + composer, +}: { + interfaceEntityAdapter: InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer | undefined { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + if (entityAdapter.relationships.size) { + fields[entityAdapter.name] = { + type: `[${entityAdapter.operations.deleteInputTypeName}!]`, + }; + } + } + if (Object.keys(fields).length) { + const implementationsDeleteType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsDeleteInputTypeName, + fields, + }); + // ensureNonEmptyInput(composer, implementationsDeleteType); + return implementationsDeleteType; + } + return undefined; +} + +export function makeImplementationsUpdateInput({ + interfaceEntityAdapter, + composer, +}: { + interfaceEntityAdapter: InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + fields[entityAdapter.name] = { + type: entityAdapter.operations.updateInputTypeName, + }; + } + const implementationsUpdateType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsUpdateInputTypeName, + fields, + }); + ensureNonEmptyInput(composer, implementationsUpdateType); + return implementationsUpdateType; +} + +// TODO: maybe combine implementationsInputTypes creation into one function? +export function makeImplementationsWhereInput({ + interfaceEntityAdapter, + composer, +}: { + interfaceEntityAdapter: InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + fields[entityAdapter.name] = { + type: entityAdapter.operations.whereInputTypeName, + }; + } + const implementationsWhereType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsWhereInputTypeName, + fields, + }); + ensureNonEmptyInput(composer, implementationsWhereType); + return implementationsWhereType; +} diff --git a/packages/graphql/src/schema/generation/interface-type.ts b/packages/graphql/src/schema/generation/interface-type.ts new file mode 100644 index 0000000000..df67155870 --- /dev/null +++ b/packages/graphql/src/schema/generation/interface-type.ts @@ -0,0 +1,54 @@ +import type { DirectiveNode } from "graphql"; +import type { InterfaceTypeComposer, SchemaComposer } from "graphql-compose"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { + attributeAdapterToComposeFields, + graphqlDirectivesToCompose, + relationshipAdapterToComposeFields, +} from "../to-compose"; + +export function withInterfaceType({ + entityAdapter, + userDefinedFieldDirectives, + userDefinedInterfaceDirectives, + composer, + config = { + includeRelationships: false, + }, +}: { + entityAdapter: InterfaceEntityAdapter | RelationshipAdapter; // required + userDefinedFieldDirectives: Map; + userDefinedInterfaceDirectives: DirectiveNode[]; + composer: SchemaComposer; + config?: { + includeRelationships: boolean; + }; +}): InterfaceTypeComposer { + // TODO: maybe create interfaceEntity.interfaceFields() method abstraction even if it retrieves all attributes? + // can also take includeRelationships as argument + const objectComposeFields = attributeAdapterToComposeFields( + Array.from(entityAdapter.attributes.values()), + userDefinedFieldDirectives + ); + let fields = objectComposeFields; + if (config.includeRelationships && entityAdapter instanceof InterfaceEntityAdapter) { + fields = { + ...fields, + ...relationshipAdapterToComposeFields( + Array.from(entityAdapter.relationships.values()), + userDefinedFieldDirectives + ), + }; + } + const interfaceTypeName = + entityAdapter instanceof InterfaceEntityAdapter + ? entityAdapter.name + : (entityAdapter.propertiesTypeName as string); // this is checked one layer above in execution + const composeInterface = composer.createInterfaceTC({ + name: interfaceTypeName, + fields: fields, + directives: graphqlDirectivesToCompose(userDefinedInterfaceDirectives), + }); + return composeInterface; +} diff --git a/packages/graphql/src/schema/generation/object-type.ts b/packages/graphql/src/schema/generation/object-type.ts new file mode 100644 index 0000000000..916f220760 --- /dev/null +++ b/packages/graphql/src/schema/generation/object-type.ts @@ -0,0 +1,42 @@ +import type { DirectiveNode } from "graphql"; +import { GraphQLID, GraphQLNonNull } from "graphql"; +import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; +import { InterfaceEntity } from "../../schema-model/entity/InterfaceEntity"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "../to-compose"; + +export function withObjectType({ + concreteEntityAdapter, + userDefinedFieldDirectives, + userDefinedObjectDirectives, + composer, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; // required + userDefinedFieldDirectives: Map; + userDefinedObjectDirectives: DirectiveNode[]; + composer: SchemaComposer; +}): ObjectTypeComposer { + const nodeFields = attributeAdapterToComposeFields(concreteEntityAdapter.objectFields, userDefinedFieldDirectives); + const composeNode = composer.createObjectTC({ + name: concreteEntityAdapter.name, + fields: nodeFields, + description: concreteEntityAdapter.description, + directives: graphqlDirectivesToCompose(userDefinedObjectDirectives), + interfaces: concreteEntityAdapter.compositeEntities + .filter((e) => e instanceof InterfaceEntity) + .map((e) => e.name), + }); + // TODO: maybe split this global node logic? + if (concreteEntityAdapter.isGlobalNode()) { + composeNode.setField("id", { + type: new GraphQLNonNull(GraphQLID), + resolve: (src) => { + const field = concreteEntityAdapter.globalIdField.name; + const value = src[field] as string | number; + return concreteEntityAdapter.toGlobalId(value.toString()); + }, + }); + composeNode.addInterface("Node"); + } + return composeNode; +} diff --git a/packages/graphql/src/schema/generation/response-types.ts b/packages/graphql/src/schema/generation/response-types.ts new file mode 100644 index 0000000000..37d423497c --- /dev/null +++ b/packages/graphql/src/schema/generation/response-types.ts @@ -0,0 +1,35 @@ +import type { DirectiveNode } from "graphql"; +import { GraphQLNonNull } from "graphql"; +import type { SchemaComposer } from "graphql-compose"; +import { CreateInfo } from "../../graphql/objects/CreateInfo"; +import { UpdateInfo } from "../../graphql/objects/UpdateInfo"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { graphqlDirectivesToCompose } from "../to-compose"; + +export function withMutationResponseTypes({ + concreteEntityAdapter, + propagatedDirectives, + composer, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; // required + propagatedDirectives: DirectiveNode[]; + composer: SchemaComposer; +}): void { + composer.createObjectTC({ + name: concreteEntityAdapter.operations.mutationResponseTypeNames.create, + fields: { + info: new GraphQLNonNull(CreateInfo), + [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); + + composer.createObjectTC({ + name: concreteEntityAdapter.operations.mutationResponseTypeNames.update, + fields: { + info: new GraphQLNonNull(UpdateInfo), + [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, + }, + directives: graphqlDirectivesToCompose(propagatedDirectives), + }); +} diff --git a/packages/graphql/src/schema/generation/sort-and-options-input.ts b/packages/graphql/src/schema/generation/sort-and-options-input.ts new file mode 100644 index 0000000000..61b74a8514 --- /dev/null +++ b/packages/graphql/src/schema/generation/sort-and-options-input.ts @@ -0,0 +1,109 @@ +import { GraphQLInt, type DirectiveNode } from "graphql"; +import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; +import { DEPRECATED } from "../../constants"; +import { SortDirection } from "../../graphql/enums/SortDirection"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { graphqlDirectivesToCompose } from "../to-compose"; + +export function withOptionsInputType({ + entityAdapter, + userDefinedFieldDirectives, + composer, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; // required + userDefinedFieldDirectives: Map; + composer: SchemaComposer; +}): InputTypeComposer { + const optionsInputType = makeOptionsInput({ entityAdapter, composer }); + if (!entityAdapter.sortableFields.length) { + return optionsInputType; + } + const sortInput = makeSortInput({ entityAdapter, userDefinedFieldDirectives, composer }); + // TODO: Concrete vs Abstract discrepancy + // is this intended? For ConcreteEntity is NonNull, for InterfaceEntity is nullable + const sortFieldType = entityAdapter instanceof ConcreteEntityAdapter ? sortInput.NonNull.List : sortInput.List; + optionsInputType.addFields({ + sort: { + description: `Specify one or more ${entityAdapter.operations.sortInputTypeName} objects to sort ${entityAdapter.upperFirstPlural} by. The sorts will be applied in the order in which they are arranged in the array.`, + type: sortFieldType, + }, + }); + return optionsInputType; +} + +export function withSortInputType({ + relationshipAdapter, + userDefinedFieldDirectives, + composer, +}: { + relationshipAdapter: RelationshipAdapter; // required + userDefinedFieldDirectives: Map; + composer: SchemaComposer; +}): InputTypeComposer | undefined { + // TODO: for relationships we used to get all attributes, not just sortableFields + // Clarify if this is intended? + if (!relationshipAdapter.sortableFields.length) { + return; + } + return makeSortInput({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); +} + +function makeSortFields({ + entityAdapter, + userDefinedFieldDirectives, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; // required + userDefinedFieldDirectives: Map; +}): InputTypeComposerFieldConfigMapDefinition { + const sortFields: InputTypeComposerFieldConfigMapDefinition = {}; + const sortableAttributes = entityAdapter.sortableFields; + for (const attribute of sortableAttributes) { + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attribute.name) || []; + const deprecatedDirective = userDefinedDirectivesOnField.filter( + (directive) => directive.name.value === DEPRECATED + ); + sortFields[attribute.name] = { + type: SortDirection, + directives: graphqlDirectivesToCompose(deprecatedDirective), + }; + } + return sortFields; +} + +function makeSortInput({ + entityAdapter, + userDefinedFieldDirectives, + composer, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; // required + userDefinedFieldDirectives: Map; + composer: SchemaComposer; +}): InputTypeComposer { + const sortFields = makeSortFields({ entityAdapter, userDefinedFieldDirectives }); + const sortInput = composer.createInputTC({ + name: entityAdapter.operations.sortInputTypeName, + fields: sortFields, + }); + if (!(entityAdapter instanceof RelationshipAdapter)) { + sortInput.setDescription( + `Fields to sort ${entityAdapter.upperFirstPlural} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${entityAdapter.operations.sortInputTypeName} object.` + ); + } + return sortInput; +} + +function makeOptionsInput({ + entityAdapter, + composer, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer { + const optionsInput = composer.createInputTC({ + name: entityAdapter.operations.optionsInputTypeName, + fields: { limit: GraphQLInt, offset: GraphQLInt }, + }); + return optionsInput; +} diff --git a/packages/graphql/src/schema/generation/update-input.ts b/packages/graphql/src/schema/generation/update-input.ts new file mode 100644 index 0000000000..10f2e8b9ba --- /dev/null +++ b/packages/graphql/src/schema/generation/update-input.ts @@ -0,0 +1,49 @@ +import type { DirectiveNode } from "graphql"; +import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { concreteEntityToUpdateInputFields, withArrayOperators, withMathOperators } from "../to-compose"; +import { makeImplementationsUpdateInput } from "./implementation-inputs"; + +export function withUpdateInputType({ + entityAdapter, + userDefinedFieldDirectives, + composer, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; // required + userDefinedFieldDirectives: Map; + composer: SchemaComposer; +}): InputTypeComposer { + const inputTypeName = + entityAdapter instanceof RelationshipAdapter + ? entityAdapter.operations.edgeUpdateInputTypeName + : entityAdapter.operations.updateMutationArgumentNames.update; + const updateInputType = composer.createInputTC({ + name: inputTypeName, + fields: {}, + }); + + if (entityAdapter instanceof ConcreteEntityAdapter || entityAdapter instanceof RelationshipAdapter) { + updateInputType.addFields( + concreteEntityToUpdateInputFields(entityAdapter.updateInputFields, userDefinedFieldDirectives, [ + withMathOperators(), + withArrayOperators(), + ]) + ); + } else { + updateInputType.addFields( + concreteEntityToUpdateInputFields(entityAdapter.updateInputFields, userDefinedFieldDirectives, [ + withMathOperators(), + ]) + ); + const implementationsUpdateInputType = makeImplementationsUpdateInput({ + interfaceEntityAdapter: entityAdapter, + composer, + }); + updateInputType.addFields({ _on: implementationsUpdateInputType }); + } + + // ensureNonEmptyInput(composer, updateInputType); - not for relationshipAdapter + return updateInputType; +} diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts new file mode 100644 index 0000000000..de29d6129e --- /dev/null +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -0,0 +1,110 @@ +import type { DirectiveNode } from "graphql"; +import { GraphQLID } from "graphql"; +import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { Neo4jFeaturesSettings } from "../../types"; +import { getWhereFieldsForAttributes } from "../get-where-fields"; +import { makeImplementationsWhereInput } from "./implementation-inputs"; + +export function withUniqueWhereInputType({ + concreteEntityAdapter, + composer, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; // required + composer: SchemaComposer; +}): InputTypeComposer { + const uniqueWhereFields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const attribute of concreteEntityAdapter.uniqueFields) { + uniqueWhereFields[attribute.name] = attribute.getFieldTypeName(); + } + const uniqueWhereInputType = composer.createInputTC({ + name: concreteEntityAdapter.operations.uniqueWhereInputTypeName, + fields: uniqueWhereFields, + }); + return uniqueWhereInputType; +} + +export function withWhereInputType({ + entityAdapter, + userDefinedFieldDirectives, + features, + composer, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; // required + userDefinedFieldDirectives: Map; + features: Neo4jFeaturesSettings | undefined; + composer: SchemaComposer; +}): InputTypeComposer { + const whereInputType = makeWhereInput({ entityAdapter, userDefinedFieldDirectives, features, composer }); + + if (entityAdapter instanceof ConcreteEntityAdapter) { + whereInputType.addFields({ + OR: `[${entityAdapter.operations.whereInputTypeName}!]`, + AND: `[${entityAdapter.operations.whereInputTypeName}!]`, + NOT: entityAdapter.operations.whereInputTypeName, + }); + if (entityAdapter.isGlobalNode()) { + whereInputType.addFields({ id: GraphQLID }); + } + } else if (entityAdapter instanceof RelationshipAdapter) { + whereInputType.addFields({ + OR: `[${entityAdapter.operations.whereInputTypeName}!]`, + AND: `[${entityAdapter.operations.whereInputTypeName}!]`, + NOT: entityAdapter.operations.whereInputTypeName, + }); + } else if (entityAdapter instanceof InterfaceEntityAdapter) { + const implementationsWhereInputType = makeImplementationsWhereInput({ + interfaceEntityAdapter: entityAdapter, + composer, + }); + whereInputType.addFields({ _on: implementationsWhereInputType }); + } + return whereInputType; +} + +function makeWhereInput({ + entityAdapter, + userDefinedFieldDirectives, + features, + composer, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; // required + userDefinedFieldDirectives: Map; + features: Neo4jFeaturesSettings | undefined; + composer: SchemaComposer; +}): InputTypeComposer { + const whereFields = makeWhereFields({ entityAdapter, userDefinedFieldDirectives, features }); + const whereInputType = composer.createInputTC({ + name: entityAdapter.operations.whereInputTypeName, + fields: whereFields, + }); + return whereInputType; +} + +function makeWhereFields({ + entityAdapter, + userDefinedFieldDirectives, + features, +}: { + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; // required + userDefinedFieldDirectives: Map; + features: Neo4jFeaturesSettings | undefined; +}): InputTypeComposerFieldConfigMapDefinition { + if (entityAdapter instanceof UnionEntityAdapter) { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const concreteEntity of entityAdapter.concreteEntities) { + fields[concreteEntity.name] = concreteEntity.operations.whereInputTypeName; + } + return fields; + } + // TODO: make a a category for these including filtering logic from getWhereFieldsForAttributes + const filterableAttributes = Array.from(entityAdapter.attributes.values()); + return getWhereFieldsForAttributes({ + attributes: filterableAttributes, + userDefinedFieldDirectives, + features, + }); +} diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 263ecae41d..e9110b43c8 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -33,19 +33,12 @@ import type { ObjectTypeDefinitionNode, SchemaExtensionNode, } from "graphql"; -import { GraphQLID, GraphQLInt, GraphQLNonNull, Kind, parse, print } from "graphql"; -import type { - InputTypeComposer, - InputTypeComposerFieldConfigMapDefinition, - InterfaceTypeComposer, - ObjectTypeComposer, - ObjectTypeComposerFieldConfigMapDefinition, -} from "graphql-compose"; +import { Kind, parse, print } from "graphql"; +import type { ObjectTypeComposer } from "graphql-compose"; import { SchemaComposer } from "graphql-compose"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; import { augmentFulltextSchema2 } from "./augment/fulltext"; import { cypherResolver2 } from "./resolvers/field/cypher"; -import { numericalResolver } from "./resolvers/field/numerical"; import { createResolver2 } from "./resolvers/mutation/create"; import { deleteResolver2 } from "./resolvers/mutation/delete"; import { updateResolver2 } from "./resolvers/mutation/update"; @@ -63,26 +56,11 @@ import type { DefinitionNodes } from "./get-definition-nodes"; import { getDefinitionNodes } from "./get-definition-nodes"; import type { ObjectFields } from "./get-obj-field-meta"; import getObjFieldMeta from "./get-obj-field-meta"; -import { getWhereFieldsForAttributes } from "./get-where-fields"; -import { - attributeAdapterToComposeFields, - concreteEntityToCreateInputFields, - concreteEntityToUpdateInputFields, - graphqlDirectivesToCompose, - relationshipAdapterToComposeFields, - withArrayOperators, - withMathOperators, -} from "./to-compose"; +import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "./to-compose"; // GraphQL type imports import type { Subgraph } from "../classes/Subgraph"; -import { - DEPRECATED, - FIELD_DIRECTIVES, - INTERFACE_DIRECTIVES, - OBJECT_DIRECTIVES, - PROPAGATED_DIRECTIVES, -} from "../constants"; +import { FIELD_DIRECTIVES, INTERFACE_DIRECTIVES, OBJECT_DIRECTIVES, PROPAGATED_DIRECTIVES } from "../constants"; import { SortDirection } from "../graphql/enums/SortDirection"; import { CartesianPointDistance } from "../graphql/input-objects/CartesianPointDistance"; import { CartesianPointInput } from "../graphql/input-objects/CartesianPointInput"; @@ -105,12 +83,23 @@ import { UnionEntity } from "../schema-model/entity/UnionEntity"; import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; -import { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { CypherField, Neo4jFeaturesSettings } from "../types"; import { isInArray } from "../utils/is-in-array"; import { createConnectionFields2 } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; import { createRelationshipFieldsFromConcreteEntityAdapter } from "./create-relationship-fields/create-relationship-fields"; +import { withAggregateSelectionType } from "./generation/aggregate-types"; +import { withConnectInputType } from "./generation/connect-input"; +import { withCreateInputType } from "./generation/create-input"; +import { withDeleteInputType } from "./generation/delete-input"; +import { withDisconnectInputType } from "./generation/disconnect-input"; +import { withInterfaceType } from "./generation/interface-type"; +import { withObjectType } from "./generation/object-type"; +import { withMutationResponseTypes } from "./generation/response-types"; +import { withOptionsInputType, withSortInputType } from "./generation/sort-and-options-input"; +import { withUpdateInputType } from "./generation/update-input"; +import { withUniqueWhereInputType, withWhereInputType } from "./generation/where-input"; import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; @@ -482,503 +471,6 @@ function getUserDefinedFieldDirectivesForDefinition( return userDefinedFieldDirectives; } -// make types -function withObjectType( - concreteEntity: ConcreteEntityAdapter, // required - userDefinedFieldDirectives: Map, - directives: DirectiveNode[], - composer: SchemaComposer -): ObjectTypeComposer { - const nodeFields = attributeAdapterToComposeFields(concreteEntity.objectFields, userDefinedFieldDirectives); - const composeNode = composer.createObjectTC({ - name: concreteEntity.name, - fields: nodeFields, - description: concreteEntity.description, - directives: graphqlDirectivesToCompose(directives), - interfaces: concreteEntity.compositeEntities.filter((e) => e instanceof InterfaceEntity).map((e) => e.name), - }); - // TODO: maybe split this global node logic? - if (concreteEntity.isGlobalNode()) { - composeNode.setField("id", { - type: new GraphQLNonNull(GraphQLID), - resolve: (src) => { - const field = concreteEntity.globalIdField.name; - const value = src[field] as string | number; - return concreteEntity.toGlobalId(value.toString()); - }, - }); - composeNode.addInterface("Node"); - } - return composeNode; -} - -function withInterfaceType( - entityAdapter: InterfaceEntityAdapter | RelationshipAdapter, // required - userDefinedFieldDirectives: Map, - userDefinedInterfaceDirectives: DirectiveNode[], - composer: SchemaComposer, - config = { - includeRelationships: false, - } -): InterfaceTypeComposer { - // TODO: maybe create interfaceEntity.interfaceFields() method abstraction even if it retrieves all attributes? - // can also take includeRelationships as argument - const objectComposeFields = attributeAdapterToComposeFields( - Array.from(entityAdapter.attributes.values()), - userDefinedFieldDirectives - ); - let fields = objectComposeFields; - if (config.includeRelationships && entityAdapter instanceof InterfaceEntityAdapter) { - fields = { - ...fields, - ...relationshipAdapterToComposeFields( - Array.from(entityAdapter.relationships.values()), - userDefinedFieldDirectives - ), - }; - } - const interfaceTypeName = - entityAdapter instanceof InterfaceEntityAdapter - ? entityAdapter.name - : (entityAdapter.propertiesTypeName as string); // this is checked one layer above in execution - const composeInterface = composer.createInterfaceTC({ - name: interfaceTypeName, - fields: fields, - directives: graphqlDirectivesToCompose(userDefinedInterfaceDirectives), - }); - return composeInterface; -} - -function withOptionsInputType( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter, // required - userDefinedFieldDirectives: Map, - composer: SchemaComposer -): InputTypeComposer { - const optionsInputType = makeOptionsInput(entityAdapter, composer); - if (!entityAdapter.sortableFields.length) { - return optionsInputType; - } - const sortInput = makeSortInput(entityAdapter, userDefinedFieldDirectives, composer); - // TODO: Concrete vs Abstract discrepency - // is this intended? For ConcreteEntity is NonNull, for InterfaceEntity is nullable - const sortFieldType = entityAdapter instanceof ConcreteEntityAdapter ? sortInput.NonNull.List : sortInput.List; - optionsInputType.addFields({ - sort: { - description: `Specify one or more ${entityAdapter.operations.sortInputTypeName} objects to sort ${entityAdapter.upperFirstPlural} by. The sorts will be applied in the order in which they are arranged in the array.`, - type: sortFieldType, - }, - }); - return optionsInputType; -} - -function withSortInputType( - relationshipAdapter: RelationshipAdapter, // required - userDefinedFieldDirectives: Map, - composer: SchemaComposer -): InputTypeComposer | undefined { - // TODO: for relationships we used to get all attributes, not just sortableFields - // Clarify if this is intended? - if (!relationshipAdapter.sortableFields.length) { - return; - } - return makeSortInput(relationshipAdapter, userDefinedFieldDirectives, composer); -} - -function withWhereInputType( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter, // required - userDefinedFieldDirectives: Map, - features: Neo4jFeaturesSettings | undefined, - composer: SchemaComposer -): InputTypeComposer { - const whereInputType = makeWhereInput(entityAdapter, userDefinedFieldDirectives, features, composer); - - if (entityAdapter instanceof ConcreteEntityAdapter) { - whereInputType.addFields({ - OR: `[${entityAdapter.operations.whereInputTypeName}!]`, - AND: `[${entityAdapter.operations.whereInputTypeName}!]`, - NOT: entityAdapter.operations.whereInputTypeName, - }); - if (entityAdapter.isGlobalNode()) { - whereInputType.addFields({ id: GraphQLID }); - } - } else if (entityAdapter instanceof RelationshipAdapter) { - whereInputType.addFields({ - OR: `[${entityAdapter.operations.whereInputTypeName}!]`, - AND: `[${entityAdapter.operations.whereInputTypeName}!]`, - NOT: entityAdapter.operations.whereInputTypeName, - }); - } else if (entityAdapter instanceof InterfaceEntityAdapter) { - const implementationsWhereInputType = makeImplementationsWhereInput(entityAdapter, composer); - whereInputType.addFields({ _on: implementationsWhereInputType }); - } - return whereInputType; -} - -function withUniqueWhereInputType( - entityAdapter: ConcreteEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer { - const uniqueWhereFields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const attribute of entityAdapter.uniqueFields) { - uniqueWhereFields[attribute.name] = attribute.getFieldTypeName(); - } - const uniqueWhereInputType = composer.createInputTC({ - name: entityAdapter.operations.uniqueWhereInputTypeName, - fields: uniqueWhereFields, - }); - return uniqueWhereInputType; -} - -function withAggregateSelectionType( - concreteEntity: ConcreteEntityAdapter, // required - aggregationTypesMapper: AggregationTypesMapper, - propagatedDirectives: DirectiveNode[], - composer: SchemaComposer -): ObjectTypeComposer { - const aggregateSelection = composer.createObjectTC({ - name: concreteEntity.operations.aggregateTypeNames.selection, - fields: { - count: { - type: new GraphQLNonNull(GraphQLInt), - resolve: numericalResolver, - args: {}, - }, - }, - directives: graphqlDirectivesToCompose(propagatedDirectives), - }); - aggregateSelection.addFields(makeAggregableFields(concreteEntity, aggregationTypesMapper)); - return aggregateSelection; -} - -function withCreateInputType( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter, // required - userDefinedFieldDirectives: Map, - composer: SchemaComposer -): InputTypeComposer { - const createInputType = composer.createInputTC({ - name: entityAdapter.operations.createInputTypeName, - fields: {}, - }); - - if (entityAdapter instanceof ConcreteEntityAdapter || entityAdapter instanceof RelationshipAdapter) { - createInputType.addFields( - concreteEntityToCreateInputFields(entityAdapter.createInputFields, userDefinedFieldDirectives) - ); - } else { - createInputType.addFields(makeCreateInputFields(entityAdapter)); - } - - // ensureNonEmptyInput(composer, createInputType); - not for relationshipAdapter - return createInputType; -} - -function withUpdateInputType( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter, // required - userDefinedFieldDirectives: Map, - composer: SchemaComposer -): InputTypeComposer { - const inputTypeName = - entityAdapter instanceof RelationshipAdapter - ? entityAdapter.operations.edgeUpdateInputTypeName - : entityAdapter.operations.updateMutationArgumentNames.update; - const updateInputType = composer.createInputTC({ - name: inputTypeName, - fields: {}, - }); - - if (entityAdapter instanceof ConcreteEntityAdapter || entityAdapter instanceof RelationshipAdapter) { - updateInputType.addFields( - concreteEntityToUpdateInputFields(entityAdapter.updateInputFields, userDefinedFieldDirectives, [ - withMathOperators(), - withArrayOperators(), - ]) - ); - } else { - updateInputType.addFields( - concreteEntityToUpdateInputFields(entityAdapter.updateInputFields, userDefinedFieldDirectives, [ - withMathOperators(), - ]) - ); - const implementationsUpdateInputType = makeImplementationsUpdateInput(entityAdapter, composer); - updateInputType.addFields({ _on: implementationsUpdateInputType }); - } - - // ensureNonEmptyInput(composer, updateInputType); - not for relationshipAdapter - return updateInputType; -} - -function withDeleteInputType( - entityAdapter: InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer | undefined { - const implementationsUpdateInputType = makeImplementationsDeleteInput(entityAdapter, composer); - if (implementationsUpdateInputType) { - const deleteInputType = composer.getOrCreateITC(entityAdapter.operations.updateMutationArgumentNames.delete); - deleteInputType.setField("_on", implementationsUpdateInputType); - return deleteInputType; - } - return undefined; -} -function withConnectInputType( - entityAdapter: InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer | undefined { - const implementationsConnectInputType = makeImplementationsConnectInput(entityAdapter, composer); - if (implementationsConnectInputType) { - const connectInputType = composer.getOrCreateITC(entityAdapter.operations.updateMutationArgumentNames.connect); - connectInputType.setField("_on", implementationsConnectInputType); - return connectInputType; - } - return undefined; -} -function withDisconnectInputType( - entityAdapter: InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer | undefined { - const implementationsDisconnectInputType = makeImplementationsDisconnectInput(entityAdapter, composer); - if (implementationsDisconnectInputType) { - const disconnectInputType = composer.getOrCreateITC( - entityAdapter.operations.updateMutationArgumentNames.disconnect - ); - disconnectInputType.setField("_on", implementationsDisconnectInputType); - return disconnectInputType; - } - return undefined; -} - -function withMutationResponseTypes( - concreteEntityAdapter: ConcreteEntityAdapter, // required - propagatedDirectives: DirectiveNode[], - composer: SchemaComposer -): void { - composer.createObjectTC({ - name: concreteEntityAdapter.operations.mutationResponseTypeNames.create, - fields: { - info: new GraphQLNonNull(CreateInfo), - [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, - }, - directives: graphqlDirectivesToCompose(propagatedDirectives), - }); - - composer.createObjectTC({ - name: concreteEntityAdapter.operations.mutationResponseTypeNames.update, - fields: { - info: new GraphQLNonNull(UpdateInfo), - [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, - }, - directives: graphqlDirectivesToCompose(propagatedDirectives), - }); -} - -// make "helper" types -function makeOptionsInput( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer { - const optionsInput = composer.createInputTC({ - name: entityAdapter.operations.optionsInputTypeName, - fields: { limit: GraphQLInt, offset: GraphQLInt }, - }); - return optionsInput; -} -function makeSortFields( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter, // required - userDefinedFieldDirectives: Map -): InputTypeComposerFieldConfigMapDefinition { - const sortFields: InputTypeComposerFieldConfigMapDefinition = {}; - const sortableAttributes = entityAdapter.sortableFields; - for (const attribute of sortableAttributes) { - const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attribute.name) || []; - const deprecatedDirective = userDefinedDirectivesOnField.filter( - (directive) => directive.name.value === DEPRECATED - ); - sortFields[attribute.name] = { - type: SortDirection, - directives: graphqlDirectivesToCompose(deprecatedDirective), - }; - } - return sortFields; -} -function makeSortInput( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter, // required - userDefinedFieldDirectives: Map, - composer: SchemaComposer -): InputTypeComposer { - const sortFields = makeSortFields(entityAdapter, userDefinedFieldDirectives); - const sortInput = composer.createInputTC({ - name: entityAdapter.operations.sortInputTypeName, - fields: sortFields, - }); - if (!(entityAdapter instanceof RelationshipAdapter)) { - sortInput.setDescription( - `Fields to sort ${entityAdapter.upperFirstPlural} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${entityAdapter.operations.sortInputTypeName} object.` - ); - } - return sortInput; -} -function makeAggregableFields( - concreteEntity: ConcreteEntityAdapter, // required - aggregationTypesMapper: AggregationTypesMapper -): ObjectTypeComposerFieldConfigMapDefinition { - const aggregableFields: ObjectTypeComposerFieldConfigMapDefinition = {}; - const aggregableAttributes = concreteEntity.aggregableFields; - for (const attribute of aggregableAttributes) { - const objectTypeComposer = aggregationTypesMapper.getAggregationType({ - fieldName: attribute.getTypeName(), - nullable: !attribute.isRequired(), - }); - if (objectTypeComposer) { - aggregableFields[attribute.name] = objectTypeComposer.NonNull; - } - } - return aggregableFields; -} -function makeWhereInput( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter, // required - userDefinedFieldDirectives: Map, - features: Neo4jFeaturesSettings | undefined, - composer: SchemaComposer -): InputTypeComposer { - const whereFields = makeWhereFields(entityAdapter, userDefinedFieldDirectives, features); - const whereInputType = composer.createInputTC({ - name: entityAdapter.operations.whereInputTypeName, - fields: whereFields, - }); - return whereInputType; -} -function makeWhereFields( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter, // required - userDefinedFieldDirectives: Map, - features: Neo4jFeaturesSettings | undefined -): InputTypeComposerFieldConfigMapDefinition { - if (entityAdapter instanceof UnionEntityAdapter) { - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const concreteEntity of entityAdapter.concreteEntities) { - fields[concreteEntity.name] = concreteEntity.operations.whereInputTypeName; - } - return fields; - } - // TODO: make a a category for these including filtering logic from getWhereFieldsForAttributes - const filterableAttributes = Array.from(entityAdapter.attributes.values()); - return getWhereFieldsForAttributes({ - attributes: filterableAttributes, - userDefinedFieldDirectives, - features, - }); -} -function makeCreateInputFields( - interfaceEntityAdapter: InterfaceEntityAdapter // required -): InputTypeComposerFieldConfigMapDefinition { - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { - fields[entityAdapter.name] = { - type: entityAdapter.operations.createInputTypeName, - }; - } - return fields; -} -// TODO: maybe combine implementationsInputTypes creation into one function? -function makeImplementationsWhereInput( - interfaceEntityAdapter: InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer { - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { - fields[entityAdapter.name] = { - type: entityAdapter.operations.whereInputTypeName, - }; - } - const implementationsWhereType = composer.createInputTC({ - name: interfaceEntityAdapter.operations.whereOnImplementationsWhereInputTypeName, - fields, - }); - ensureNonEmptyInput(composer, implementationsWhereType); - return implementationsWhereType; -} -function makeImplementationsUpdateInput( - interfaceEntityAdapter: InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer { - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { - fields[entityAdapter.name] = { - type: entityAdapter.operations.updateInputTypeName, - }; - } - const implementationsUpdateType = composer.createInputTC({ - name: interfaceEntityAdapter.operations.whereOnImplementationsUpdateInputTypeName, - fields, - }); - ensureNonEmptyInput(composer, implementationsUpdateType); - return implementationsUpdateType; -} -function makeImplementationsDeleteInput( - interfaceEntityAdapter: InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer | undefined { - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { - if (entityAdapter.relationships.size) { - fields[entityAdapter.name] = { - type: `[${entityAdapter.operations.deleteInputTypeName}!]`, - }; - } - } - if (Object.keys(fields).length) { - const implementationsDeleteType = composer.createInputTC({ - name: interfaceEntityAdapter.operations.whereOnImplementationsDeleteInputTypeName, - fields, - }); - // ensureNonEmptyInput(composer, implementationsDeleteType); - return implementationsDeleteType; - } - return undefined; -} -function makeImplementationsConnectInput( - interfaceEntityAdapter: InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer | undefined { - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { - if (entityAdapter.relationships.size) { - fields[entityAdapter.name] = { - type: `[${entityAdapter.operations.connectInputTypeName}!]`, - }; - } - } - if (Object.keys(fields).length) { - const implementationsConnectType = composer.createInputTC({ - name: interfaceEntityAdapter.operations.whereOnImplementationsConnectInputTypeName, - fields, - }); - // ensureNonEmptyInput(composer, implementationsConnectType); - return implementationsConnectType; - } - return undefined; -} -function makeImplementationsDisconnectInput( - interfaceEntityAdapter: InterfaceEntityAdapter, // required - composer: SchemaComposer -): InputTypeComposer | undefined { - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { - if (entityAdapter.relationships.size) { - fields[entityAdapter.name] = { - type: `[${entityAdapter.operations.disconnectInputTypeName}!]`, - }; - } - } - if (Object.keys(fields).length) { - const implementationsDisconnectType = composer.createInputTC({ - name: interfaceEntityAdapter.operations.whereOnImplementationsDisconnectInputTypeName, - fields, - }); - ensureNonEmptyInput(composer, implementationsDisconnectType); - return implementationsDisconnectType; - } - return undefined; -} - function makeAugmentedSchema( document: DocumentNode, { @@ -1301,7 +793,9 @@ function makeAugmentedSchema( } const propagatedDirectives = propagatedDirectivesForNode.get(concreteEntity.name) || []; - const directives = (userDefinedDirectivesForNode.get(concreteEntity.name) || []).concat(propagatedDirectives); + const userDefinedObjectDirectives = (userDefinedDirectivesForNode.get(concreteEntity.name) || []).concat( + propagatedDirectives + ); // const nodeFields = attributeAdapterToComposeFields( // concreteEntityAdapter.objectFields, // userDefinedFieldDirectives @@ -1325,7 +819,12 @@ function makeAugmentedSchema( // composeNode.addInterface("Node"); // } - const composeNode = withObjectType(concreteEntityAdapter, userDefinedFieldDirectives, directives, composer); + const composeNode = withObjectType({ + concreteEntityAdapter, + userDefinedFieldDirectives, + userDefinedObjectDirectives, + composer, + }); // const sortFields = concreteEntityAdapter.sortableFields.reduce( // (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { @@ -1368,7 +867,7 @@ function makeAugmentedSchema( // }); // } - withOptionsInputType(concreteEntityAdapter, userDefinedFieldDirectives, composer); + withOptionsInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); // composer.createObjectTC({ // name: concreteEntityAdapter.operations.aggregateTypeNames.selection, @@ -1394,7 +893,7 @@ function makeAugmentedSchema( // directives: graphqlDirectivesToCompose(propagatedDirectives), // }); - withAggregateSelectionType(concreteEntityAdapter, aggregationTypesMapper, propagatedDirectives, composer); + withAggregateSelectionType({ concreteEntityAdapter, aggregationTypesMapper, propagatedDirectives, composer }); // START WHERE FIELD ------------------- @@ -1408,7 +907,7 @@ function makeAugmentedSchema( // fields: concreteEntityAdapter.isGlobalNode() ? { id: "ID", ...queryFields } : queryFields, // }); - withWhereInputType(concreteEntityAdapter, userDefinedFieldDirectives, features, composer); + withWhereInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, features, composer }); // TODO: new way // TODO: Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model @@ -1423,7 +922,7 @@ function makeAugmentedSchema( // }; // }, {}), // }); - withUniqueWhereInputType(concreteEntityAdapter, composer); + withUniqueWhereInputType({ concreteEntityAdapter, composer }); // END WHERE FIELD ------------------- @@ -1435,7 +934,7 @@ function makeAugmentedSchema( // ), // }); - withCreateInputType(concreteEntityAdapter, userDefinedFieldDirectives, composer); + withCreateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); // const nodeUpdateITC = composer.createInputTC({ // name: concreteEntityAdapter.operations.updateMutationArgumentNames.update, @@ -1446,7 +945,7 @@ function makeAugmentedSchema( // }); // addMathOperatorsToITC(nodeUpdateITC); // addArrayMethodsToITC2(nodeUpdateITC, concreteEntityAdapter.arrayMethodFields); - withUpdateInputType(concreteEntityAdapter, userDefinedFieldDirectives, composer); + withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); // composer.createObjectTC({ // name: concreteEntityAdapter.operations.mutationResponseTypeNames.create, @@ -1465,7 +964,7 @@ function makeAugmentedSchema( // }, // directives: graphqlDirectivesToCompose(propagatedDirectives), // }); - withMutationResponseTypes(concreteEntityAdapter, propagatedDirectives, composer); + withMutationResponseTypes({ concreteEntityAdapter, propagatedDirectives, composer }); // createRelationshipFields({ // relationshipFields: node.relationFields, @@ -1593,7 +1092,12 @@ function makeAugmentedSchema( schemaModel.compositeEntities.forEach((entity) => { if (entity instanceof UnionEntity) { - withWhereInputType(new UnionEntityAdapter(entity), new Map(), features, composer); + withWhereInputType({ + entityAdapter: new UnionEntityAdapter(entity), + userDefinedFieldDirectives: new Map(), + features, + composer, + }); return; } if (entity instanceof InterfaceEntity && !seenInterfaces.has(entity.name)) { @@ -1628,15 +1132,15 @@ function makeAugmentedSchema( definitionNodes ); const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(entity.name) || []; - withInterfaceType( - interfaceEntityAdapter, + withInterfaceType({ + entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, userDefinedInterfaceDirectives, composer, - { + config: { includeRelationships: true, - } - ); + }, + }); return; } return; @@ -1834,18 +1338,18 @@ export default makeAugmentedSchema; function doForRelationshipPropertiesInterface( composer: SchemaComposer, - relationship: RelationshipAdapter, + relationshipAdapter: RelationshipAdapter, definitionNodes: DefinitionNodes, userDefinedDirectivesForInterface: Map, features?: Neo4jFeaturesSettings ) { - if (!relationship.propertiesTypeName) { + if (!relationshipAdapter.propertiesTypeName) { return; } - const obj = definitionNodes.interfaceTypes.find((i) => i.name.value === relationship.propertiesTypeName); + const obj = definitionNodes.interfaceTypes.find((i) => i.name.value === relationshipAdapter.propertiesTypeName); if (!obj) { - throw new Error(`Could not find interface named ${relationship.propertiesTypeName}`); + throw new Error(`Could not find interface named ${relationshipAdapter.propertiesTypeName}`); } const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(obj, definitionNodes); @@ -1860,8 +1364,13 @@ function doForRelationshipPropertiesInterface( // fields: composeFields, // }); - const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(relationship.name) || []; - withInterfaceType(relationship, userDefinedFieldDirectives, userDefinedInterfaceDirectives, composer); + const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(relationshipAdapter.name) || []; + withInterfaceType({ + entityAdapter: relationshipAdapter, + userDefinedFieldDirectives, + userDefinedInterfaceDirectives, + composer, + }); // composer.createInputTC({ // name: relationship.operations.sortInputTypeName, @@ -1869,7 +1378,7 @@ function doForRelationshipPropertiesInterface( // return { ...res, [f]: "SortDirection" }; // }, {}), // }); - withSortInputType(relationship, userDefinedFieldDirectives, composer); + withSortInputType({ relationshipAdapter, userDefinedFieldDirectives, composer }); // const relationshipUpdateITC = composer.createInputTC({ // name: relationship.operations.edgeUpdateInputTypeName, @@ -1878,7 +1387,7 @@ function doForRelationshipPropertiesInterface( // }); // addMathOperatorsToITC(relationshipUpdateITC); // addArrayMethodsToITC2(relationshipUpdateITC, relationship.arrayMethodFields); - withUpdateInputType(relationship, userDefinedFieldDirectives, composer); + withUpdateInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); // const relationshipWhereFields = getWhereFieldsFromRelationshipProperties({ // relationshipAdapter: relationship, @@ -1890,14 +1399,14 @@ function doForRelationshipPropertiesInterface( // name: relationship.operations.whereInputTypeName, // fields: relationshipWhereFields, // }); - withWhereInputType(relationship, userDefinedFieldDirectives, features, composer); + withWhereInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, features, composer }); // composer.createInputTC({ // // name: `${relationship.propertiesTypeName}CreateInput`, // name: relationship.operations.createInputTypeName, // fields: concreteEntityToCreateInputFields(relationship.createInputFields, userDefinedFieldDirectives), // }); - withCreateInputType(relationship, userDefinedFieldDirectives, composer); + withCreateInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); } function doForInterfacesThatAreTargetOfARelationship({ @@ -1937,7 +1446,12 @@ function doForInterfacesThatAreTargetOfARelationship({ // fields: objectComposeFields, // }); - const composeInterface = withInterfaceType(interfaceEntityAdapter, userDefinedFieldDirectives, [], composer); + const composeInterface = withInterfaceType({ + entityAdapter: interfaceEntityAdapter, + userDefinedFieldDirectives, + userDefinedInterfaceDirectives: [], + composer, + }); // const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Options`, (tc) => { // tc.addFields({ @@ -1979,7 +1493,7 @@ function doForInterfacesThatAreTargetOfARelationship({ // }); // } - withOptionsInputType(interfaceEntityAdapter, userDefinedFieldDirectives, composer); + withOptionsInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); // const [ // implementationsConnectInput, @@ -2004,11 +1518,11 @@ function doForInterfacesThatAreTargetOfARelationship({ // fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, // }); - withWhereInputType(interfaceEntityAdapter, userDefinedFieldDirectives, features, composer); + withWhereInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, features, composer }); // const interfaceCreateInput = composer.createInputTC(`${interfaceEntityAdapter.name}CreateInput`); - withCreateInputType(interfaceEntityAdapter, userDefinedFieldDirectives, composer); + withCreateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); // const interfaceRelationshipITC = composer.getOrCreateITC(`${interfaceEntityAdapter.name}UpdateInput`, (tc) => { // tc.addFields({ @@ -2017,7 +1531,7 @@ function doForInterfacesThatAreTargetOfARelationship({ // }); // }); // addMathOperatorsToITC(interfaceRelationshipITC); - withUpdateInputType(interfaceEntityAdapter, userDefinedFieldDirectives, composer); + withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); createRelationshipFieldsFromConcreteEntityAdapter({ entityAdapter: interfaceEntityAdapter, @@ -2102,9 +1616,9 @@ function doForInterfacesThatAreTargetOfARelationship({ // interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); // } - withDeleteInputType(interfaceEntityAdapter, composer); - withConnectInputType(interfaceEntityAdapter, composer); - withDisconnectInputType(interfaceEntityAdapter, composer); + withDeleteInputType({ interfaceEntityAdapter, composer }); + withConnectInputType({ interfaceEntityAdapter, composer }); + withDisconnectInputType({ interfaceEntityAdapter, composer }); ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); From 8ce211635813de2df1b435aca49f7b1ecbba1403 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 14:59:31 +0200 Subject: [PATCH 103/162] refactor: remove "required" comments --- .../graphql/src/schema/generation/aggregate-types.ts | 4 ++-- .../graphql/src/schema/generation/connect-input.ts | 2 +- packages/graphql/src/schema/generation/create-input.ts | 4 ++-- packages/graphql/src/schema/generation/delete-input.ts | 2 +- .../graphql/src/schema/generation/disconnect-input.ts | 2 +- .../src/schema/generation/implementation-inputs.ts | 10 +++++----- .../graphql/src/schema/generation/interface-type.ts | 2 +- packages/graphql/src/schema/generation/object-type.ts | 2 +- .../graphql/src/schema/generation/response-types.ts | 2 +- .../src/schema/generation/sort-and-options-input.ts | 10 +++++----- packages/graphql/src/schema/generation/update-input.ts | 2 +- packages/graphql/src/schema/generation/where-input.ts | 8 ++++---- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/graphql/src/schema/generation/aggregate-types.ts b/packages/graphql/src/schema/generation/aggregate-types.ts index 7da4834dca..17fb441952 100644 --- a/packages/graphql/src/schema/generation/aggregate-types.ts +++ b/packages/graphql/src/schema/generation/aggregate-types.ts @@ -12,7 +12,7 @@ export function withAggregateSelectionType({ propagatedDirectives, composer, }: { - concreteEntityAdapter: ConcreteEntityAdapter; // required + concreteEntityAdapter: ConcreteEntityAdapter; aggregationTypesMapper: AggregationTypesMapper; propagatedDirectives: DirectiveNode[]; composer: SchemaComposer; @@ -36,7 +36,7 @@ function makeAggregableFields({ concreteEntityAdapter, aggregationTypesMapper, }: { - concreteEntityAdapter: ConcreteEntityAdapter; // required + concreteEntityAdapter: ConcreteEntityAdapter; aggregationTypesMapper: AggregationTypesMapper; }): ObjectTypeComposerFieldConfigMapDefinition { const aggregableFields: ObjectTypeComposerFieldConfigMapDefinition = {}; diff --git a/packages/graphql/src/schema/generation/connect-input.ts b/packages/graphql/src/schema/generation/connect-input.ts index daa276fa56..f5fa8b5902 100644 --- a/packages/graphql/src/schema/generation/connect-input.ts +++ b/packages/graphql/src/schema/generation/connect-input.ts @@ -6,7 +6,7 @@ export function withConnectInputType({ interfaceEntityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; // required + interfaceEntityAdapter: InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { const implementationsConnectInputType = makeImplementationsConnectInput({ diff --git a/packages/graphql/src/schema/generation/create-input.ts b/packages/graphql/src/schema/generation/create-input.ts index 964c1f98d4..7a13e7fbf4 100644 --- a/packages/graphql/src/schema/generation/create-input.ts +++ b/packages/graphql/src/schema/generation/create-input.ts @@ -10,7 +10,7 @@ export function withCreateInputType({ userDefinedFieldDirectives, composer, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; composer: SchemaComposer; }): InputTypeComposer { @@ -32,7 +32,7 @@ export function withCreateInputType({ } function makeCreateInputFields( - interfaceEntityAdapter: InterfaceEntityAdapter // required + interfaceEntityAdapter: InterfaceEntityAdapter ): InputTypeComposerFieldConfigMapDefinition { const fields: InputTypeComposerFieldConfigMapDefinition = {}; for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { diff --git a/packages/graphql/src/schema/generation/delete-input.ts b/packages/graphql/src/schema/generation/delete-input.ts index 01ce001d8d..98bff09c92 100644 --- a/packages/graphql/src/schema/generation/delete-input.ts +++ b/packages/graphql/src/schema/generation/delete-input.ts @@ -6,7 +6,7 @@ export function withDeleteInputType({ interfaceEntityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; // required + interfaceEntityAdapter: InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { const implementationsUpdateInputType = makeImplementationsDeleteInput({ interfaceEntityAdapter, composer }); diff --git a/packages/graphql/src/schema/generation/disconnect-input.ts b/packages/graphql/src/schema/generation/disconnect-input.ts index dfb34fc0ab..9b06f3b415 100644 --- a/packages/graphql/src/schema/generation/disconnect-input.ts +++ b/packages/graphql/src/schema/generation/disconnect-input.ts @@ -6,7 +6,7 @@ export function withDisconnectInputType({ interfaceEntityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; // required + interfaceEntityAdapter: InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { const implementationsDisconnectInputType = makeImplementationsDisconnectInput({ diff --git a/packages/graphql/src/schema/generation/implementation-inputs.ts b/packages/graphql/src/schema/generation/implementation-inputs.ts index 4e3aa9acfd..7b9d510c4c 100644 --- a/packages/graphql/src/schema/generation/implementation-inputs.ts +++ b/packages/graphql/src/schema/generation/implementation-inputs.ts @@ -6,7 +6,7 @@ export function makeImplementationsDisconnectInput({ interfaceEntityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; // required + interfaceEntityAdapter: InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { const fields: InputTypeComposerFieldConfigMapDefinition = {}; @@ -32,7 +32,7 @@ export function makeImplementationsConnectInput({ interfaceEntityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; // required + interfaceEntityAdapter: InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { const fields: InputTypeComposerFieldConfigMapDefinition = {}; @@ -58,7 +58,7 @@ export function makeImplementationsDeleteInput({ interfaceEntityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; // required + interfaceEntityAdapter: InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { const fields: InputTypeComposerFieldConfigMapDefinition = {}; @@ -84,7 +84,7 @@ export function makeImplementationsUpdateInput({ interfaceEntityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; // required + interfaceEntityAdapter: InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer { const fields: InputTypeComposerFieldConfigMapDefinition = {}; @@ -106,7 +106,7 @@ export function makeImplementationsWhereInput({ interfaceEntityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; // required + interfaceEntityAdapter: InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer { const fields: InputTypeComposerFieldConfigMapDefinition = {}; diff --git a/packages/graphql/src/schema/generation/interface-type.ts b/packages/graphql/src/schema/generation/interface-type.ts index df67155870..e8d60ccc6b 100644 --- a/packages/graphql/src/schema/generation/interface-type.ts +++ b/packages/graphql/src/schema/generation/interface-type.ts @@ -17,7 +17,7 @@ export function withInterfaceType({ includeRelationships: false, }, }: { - entityAdapter: InterfaceEntityAdapter | RelationshipAdapter; // required + entityAdapter: InterfaceEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; userDefinedInterfaceDirectives: DirectiveNode[]; composer: SchemaComposer; diff --git a/packages/graphql/src/schema/generation/object-type.ts b/packages/graphql/src/schema/generation/object-type.ts index 916f220760..058ca16ce6 100644 --- a/packages/graphql/src/schema/generation/object-type.ts +++ b/packages/graphql/src/schema/generation/object-type.ts @@ -11,7 +11,7 @@ export function withObjectType({ userDefinedObjectDirectives, composer, }: { - concreteEntityAdapter: ConcreteEntityAdapter; // required + concreteEntityAdapter: ConcreteEntityAdapter; userDefinedFieldDirectives: Map; userDefinedObjectDirectives: DirectiveNode[]; composer: SchemaComposer; diff --git a/packages/graphql/src/schema/generation/response-types.ts b/packages/graphql/src/schema/generation/response-types.ts index 37d423497c..502b0c7304 100644 --- a/packages/graphql/src/schema/generation/response-types.ts +++ b/packages/graphql/src/schema/generation/response-types.ts @@ -11,7 +11,7 @@ export function withMutationResponseTypes({ propagatedDirectives, composer, }: { - concreteEntityAdapter: ConcreteEntityAdapter; // required + concreteEntityAdapter: ConcreteEntityAdapter; propagatedDirectives: DirectiveNode[]; composer: SchemaComposer; }): void { diff --git a/packages/graphql/src/schema/generation/sort-and-options-input.ts b/packages/graphql/src/schema/generation/sort-and-options-input.ts index 61b74a8514..62356510f5 100644 --- a/packages/graphql/src/schema/generation/sort-and-options-input.ts +++ b/packages/graphql/src/schema/generation/sort-and-options-input.ts @@ -12,7 +12,7 @@ export function withOptionsInputType({ userDefinedFieldDirectives, composer, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; userDefinedFieldDirectives: Map; composer: SchemaComposer; }): InputTypeComposer { @@ -38,7 +38,7 @@ export function withSortInputType({ userDefinedFieldDirectives, composer, }: { - relationshipAdapter: RelationshipAdapter; // required + relationshipAdapter: RelationshipAdapter; userDefinedFieldDirectives: Map; composer: SchemaComposer; }): InputTypeComposer | undefined { @@ -54,7 +54,7 @@ function makeSortFields({ entityAdapter, userDefinedFieldDirectives, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; }): InputTypeComposerFieldConfigMapDefinition { const sortFields: InputTypeComposerFieldConfigMapDefinition = {}; @@ -77,7 +77,7 @@ function makeSortInput({ userDefinedFieldDirectives, composer, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; composer: SchemaComposer; }): InputTypeComposer { @@ -98,7 +98,7 @@ function makeOptionsInput({ entityAdapter, composer, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; composer: SchemaComposer; }): InputTypeComposer { const optionsInput = composer.createInputTC({ diff --git a/packages/graphql/src/schema/generation/update-input.ts b/packages/graphql/src/schema/generation/update-input.ts index 10f2e8b9ba..c647a68fae 100644 --- a/packages/graphql/src/schema/generation/update-input.ts +++ b/packages/graphql/src/schema/generation/update-input.ts @@ -11,7 +11,7 @@ export function withUpdateInputType({ userDefinedFieldDirectives, composer, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; composer: SchemaComposer; }): InputTypeComposer { diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index de29d6129e..3451c0120d 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -13,7 +13,7 @@ export function withUniqueWhereInputType({ concreteEntityAdapter, composer, }: { - concreteEntityAdapter: ConcreteEntityAdapter; // required + concreteEntityAdapter: ConcreteEntityAdapter; composer: SchemaComposer; }): InputTypeComposer { const uniqueWhereFields: InputTypeComposerFieldConfigMapDefinition = {}; @@ -33,7 +33,7 @@ export function withWhereInputType({ features, composer, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; features: Neo4jFeaturesSettings | undefined; composer: SchemaComposer; @@ -71,7 +71,7 @@ function makeWhereInput({ features, composer, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; features: Neo4jFeaturesSettings | undefined; composer: SchemaComposer; @@ -89,7 +89,7 @@ function makeWhereFields({ userDefinedFieldDirectives, features, }: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; // required + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; features: Neo4jFeaturesSettings | undefined; }): InputTypeComposerFieldConfigMapDefinition { From 15ee9a0335a13cda8bb73ae64f49e78dbfb1cbb5 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 15:01:42 +0200 Subject: [PATCH 104/162] refactor: prefer early returns --- .../src/schema/generation/connect-input.ts | 16 +++--- .../src/schema/generation/delete-input.ts | 16 +++--- .../src/schema/generation/disconnect-input.ts | 16 +++--- .../generation/implementation-inputs.ts | 53 ++++++++++--------- .../src/schema/generation/object-type.ts | 1 + .../generation/sort-and-options-input.ts | 2 +- 6 files changed, 58 insertions(+), 46 deletions(-) diff --git a/packages/graphql/src/schema/generation/connect-input.ts b/packages/graphql/src/schema/generation/connect-input.ts index f5fa8b5902..e447872085 100644 --- a/packages/graphql/src/schema/generation/connect-input.ts +++ b/packages/graphql/src/schema/generation/connect-input.ts @@ -13,12 +13,14 @@ export function withConnectInputType({ interfaceEntityAdapter, composer, }); - if (implementationsConnectInputType) { - const connectInputType = composer.getOrCreateITC( - interfaceEntityAdapter.operations.updateMutationArgumentNames.connect - ); - connectInputType.setField("_on", implementationsConnectInputType); - return connectInputType; + + if (!implementationsConnectInputType) { + return undefined; } - return undefined; + + const connectInputType = composer.getOrCreateITC( + interfaceEntityAdapter.operations.updateMutationArgumentNames.connect + ); + connectInputType.setField("_on", implementationsConnectInputType); + return connectInputType; } diff --git a/packages/graphql/src/schema/generation/delete-input.ts b/packages/graphql/src/schema/generation/delete-input.ts index 98bff09c92..e5ed2296c8 100644 --- a/packages/graphql/src/schema/generation/delete-input.ts +++ b/packages/graphql/src/schema/generation/delete-input.ts @@ -10,12 +10,14 @@ export function withDeleteInputType({ composer: SchemaComposer; }): InputTypeComposer | undefined { const implementationsUpdateInputType = makeImplementationsDeleteInput({ interfaceEntityAdapter, composer }); - if (implementationsUpdateInputType) { - const deleteInputType = composer.getOrCreateITC( - interfaceEntityAdapter.operations.updateMutationArgumentNames.delete - ); - deleteInputType.setField("_on", implementationsUpdateInputType); - return deleteInputType; + + if (!implementationsUpdateInputType) { + return undefined; } - return undefined; + + const deleteInputType = composer.getOrCreateITC( + interfaceEntityAdapter.operations.updateMutationArgumentNames.delete + ); + deleteInputType.setField("_on", implementationsUpdateInputType); + return deleteInputType; } diff --git a/packages/graphql/src/schema/generation/disconnect-input.ts b/packages/graphql/src/schema/generation/disconnect-input.ts index 9b06f3b415..6255322484 100644 --- a/packages/graphql/src/schema/generation/disconnect-input.ts +++ b/packages/graphql/src/schema/generation/disconnect-input.ts @@ -13,12 +13,14 @@ export function withDisconnectInputType({ interfaceEntityAdapter, composer, }); - if (implementationsDisconnectInputType) { - const disconnectInputType = composer.getOrCreateITC( - interfaceEntityAdapter.operations.updateMutationArgumentNames.disconnect - ); - disconnectInputType.setField("_on", implementationsDisconnectInputType); - return disconnectInputType; + + if (!implementationsDisconnectInputType) { + return undefined; } - return undefined; + + const disconnectInputType = composer.getOrCreateITC( + interfaceEntityAdapter.operations.updateMutationArgumentNames.disconnect + ); + disconnectInputType.setField("_on", implementationsDisconnectInputType); + return disconnectInputType; } diff --git a/packages/graphql/src/schema/generation/implementation-inputs.ts b/packages/graphql/src/schema/generation/implementation-inputs.ts index 7b9d510c4c..a481433604 100644 --- a/packages/graphql/src/schema/generation/implementation-inputs.ts +++ b/packages/graphql/src/schema/generation/implementation-inputs.ts @@ -17,15 +17,16 @@ export function makeImplementationsDisconnectInput({ }; } } - if (Object.keys(fields).length) { - const implementationsDisconnectType = composer.createInputTC({ - name: interfaceEntityAdapter.operations.whereOnImplementationsDisconnectInputTypeName, - fields, - }); - ensureNonEmptyInput(composer, implementationsDisconnectType); - return implementationsDisconnectType; + if (!Object.keys(fields).length) { + return undefined; } - return undefined; + + const implementationsDisconnectType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsDisconnectInputTypeName, + fields, + }); + ensureNonEmptyInput(composer, implementationsDisconnectType); + return implementationsDisconnectType; } export function makeImplementationsConnectInput({ @@ -43,15 +44,17 @@ export function makeImplementationsConnectInput({ }; } } - if (Object.keys(fields).length) { - const implementationsConnectType = composer.createInputTC({ - name: interfaceEntityAdapter.operations.whereOnImplementationsConnectInputTypeName, - fields, - }); - // ensureNonEmptyInput(composer, implementationsConnectType); - return implementationsConnectType; + + if (!Object.keys(fields).length) { + return undefined; } - return undefined; + + const implementationsConnectType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsConnectInputTypeName, + fields, + }); + // ensureNonEmptyInput(composer, implementationsConnectType); + return implementationsConnectType; } export function makeImplementationsDeleteInput({ @@ -69,15 +72,17 @@ export function makeImplementationsDeleteInput({ }; } } - if (Object.keys(fields).length) { - const implementationsDeleteType = composer.createInputTC({ - name: interfaceEntityAdapter.operations.whereOnImplementationsDeleteInputTypeName, - fields, - }); - // ensureNonEmptyInput(composer, implementationsDeleteType); - return implementationsDeleteType; + + if (!Object.keys(fields).length) { + return undefined; } - return undefined; + + const implementationsDeleteType = composer.createInputTC({ + name: interfaceEntityAdapter.operations.whereOnImplementationsDeleteInputTypeName, + fields, + }); + // ensureNonEmptyInput(composer, implementationsDeleteType); + return implementationsDeleteType; } export function makeImplementationsUpdateInput({ diff --git a/packages/graphql/src/schema/generation/object-type.ts b/packages/graphql/src/schema/generation/object-type.ts index 058ca16ce6..e23578d382 100644 --- a/packages/graphql/src/schema/generation/object-type.ts +++ b/packages/graphql/src/schema/generation/object-type.ts @@ -26,6 +26,7 @@ export function withObjectType({ .filter((e) => e instanceof InterfaceEntity) .map((e) => e.name), }); + // TODO: maybe split this global node logic? if (concreteEntityAdapter.isGlobalNode()) { composeNode.setField("id", { diff --git a/packages/graphql/src/schema/generation/sort-and-options-input.ts b/packages/graphql/src/schema/generation/sort-and-options-input.ts index 62356510f5..4d108b8e35 100644 --- a/packages/graphql/src/schema/generation/sort-and-options-input.ts +++ b/packages/graphql/src/schema/generation/sort-and-options-input.ts @@ -45,7 +45,7 @@ export function withSortInputType({ // TODO: for relationships we used to get all attributes, not just sortableFields // Clarify if this is intended? if (!relationshipAdapter.sortableFields.length) { - return; + return undefined; } return makeSortInput({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); } From ef9b16bd600ce4b90167e506b8775b2aaee3c601 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 15:02:17 +0200 Subject: [PATCH 105/162] feat: use whereFields category --- .../model-adapters/AttributeAdapter.ts | 7 +++++- .../model-adapters/InterfaceEntityAdapter.ts | 6 +++++ .../model-adapters/RelationshipAdapter.ts | 5 ++++ .../src/schema/generation/where-input.ts | 5 ++-- .../graphql/src/schema/get-where-fields.ts | 25 +++---------------- 5 files changed, 22 insertions(+), 26 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 98fc456bc7..69d5978a44 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -204,7 +204,12 @@ export class AttributeAdapter { }, */ isWhereField(): boolean { - return this.isEnum() || this.isSpatial() || this.isScalar(); + return ( + (this.isEnum() || this.isSpatial() || this.isScalar()) && + this.isFilterable() && + !this.isCustomResolvable() && + !this.isCypher() + ); } /** diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts index 8b08deef5b..e5f64533a7 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts @@ -113,12 +113,18 @@ export class InterfaceEntityAdapter { return Array.from(this.attributes.values()).filter((attribute) => attribute.isSortableField()); } + public get whereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isWhereField()); + } + public get updateInputFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); } + public get subscriptionEventPayloadFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isEventPayloadField()); } + public get subscriptionWhereFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isSubscriptionWhereField()); } 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 9d0309e3dc..7b9bc8ea4f 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -250,10 +250,15 @@ export class RelationshipAdapter { public get updateInputFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); } + public get sortableFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isSortableField()); } + public get whereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isWhereField()); + } + public get arrayMethodFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isArrayMethodField()); } diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index 3451c0120d..823d01d33d 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -100,10 +100,9 @@ function makeWhereFields({ } return fields; } - // TODO: make a a category for these including filtering logic from getWhereFieldsForAttributes - const filterableAttributes = Array.from(entityAdapter.attributes.values()); + return getWhereFieldsForAttributes({ - attributes: filterableAttributes, + attributes: entityAdapter.whereFields, userDefinedFieldDirectives, features, }); diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index bd57450b30..8f7ee57398 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -188,7 +188,7 @@ export function getWhereFieldsFromConcreteEntity({ }; const fields = getWhereFieldsForAttributes({ - attributes: Array.from(concreteEntityAdapter.attributes.values()), + attributes: concreteEntityAdapter.whereFields, userDefinedFieldDirectives, features, }); @@ -213,13 +213,14 @@ export function getWhereFieldsFromRelationshipProperties({ }; const fields = getWhereFieldsForAttributes({ - attributes: Array.from(relationshipAdapter.attributes.values()), + attributes: relationshipAdapter.whereFields, userDefinedFieldDirectives, features, }); return { ...result, ...fields }; } + // TODO: refactoring needed! // isWhereField, isFilterable, ... extracted out into attributes category export function getWhereFieldsForAttributes({ @@ -247,26 +248,6 @@ export function getWhereFieldsForAttributes({ // Add the where fields for each attribute for (const field of attributes) { - // If the field is not a where field, skip it - if (field.isWhereField() === false) { - continue; - } - - // If the attribute is not filterable, skip it - if (field.isFilterable() === false) { - continue; - } - - // If the field has a custom resolver, skip it - if (field.isCustomResolvable()) { - continue; - } - - // If the field is a custom cypher field, skip it - if (field.isCypher()) { - continue; - } - const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(field.name); const deprecatedDirectives = graphqlDirectivesToCompose( (userDefinedDirectivesOnField || []).filter((directive) => directive.name.value === DEPRECATED) From a85cb1de0ad4df4b7999a7bac9778c21868dadf0 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 15:09:01 +0200 Subject: [PATCH 106/162] refactor: remove old comments --- .../graphql/src/schema/get-where-fields.ts | 52 --- .../src/schema/new-make-augmented-schema.ts | 435 +----------------- 2 files changed, 5 insertions(+), 482 deletions(-) diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index 8f7ee57398..d3f1a5dd34 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -21,8 +21,6 @@ import type { DirectiveNode } from "graphql"; import type { Directive } from "graphql-compose"; import { DEPRECATED } from "../constants"; import type { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; -import type { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { CustomEnumField, CustomScalarField, @@ -171,56 +169,6 @@ function getWhereFields({ export default getWhereFields; -export function getWhereFieldsFromConcreteEntity({ - concreteEntityAdapter, - userDefinedFieldDirectives, - features, -}: { - concreteEntityAdapter: ConcreteEntityAdapter; - userDefinedFieldDirectives: Map; - features?: Neo4jFeaturesSettings; -}): Record { - // Add the default where fields - const result = { - OR: `[${concreteEntityAdapter.name}Where!]`, - AND: `[${concreteEntityAdapter.name}Where!]`, - NOT: `${concreteEntityAdapter.name}Where`, - }; - - const fields = getWhereFieldsForAttributes({ - attributes: concreteEntityAdapter.whereFields, - userDefinedFieldDirectives, - features, - }); - - return { ...result, ...fields }; -} - -export function getWhereFieldsFromRelationshipProperties({ - relationshipAdapter, - userDefinedFieldDirectives, - features, -}: { - relationshipAdapter: RelationshipAdapter; - userDefinedFieldDirectives: Map; - features?: Neo4jFeaturesSettings; -}): Record { - // Add the default where fields - const result = { - OR: `[${relationshipAdapter.propertiesTypeName}Where!]`, - AND: `[${relationshipAdapter.propertiesTypeName}Where!]`, - NOT: `${relationshipAdapter.propertiesTypeName}Where`, - }; - - const fields = getWhereFieldsForAttributes({ - attributes: relationshipAdapter.whereFields, - userDefinedFieldDirectives, - features, - }); - - return { ...result, ...fields }; -} - // TODO: refactoring needed! // isWhereField, isFilterable, ... extracted out into attributes category export function getWhereFieldsForAttributes({ diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index e9110b43c8..a9966777e8 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -535,8 +535,6 @@ function makeAugmentedSchema( composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); } - // """createSomething""" - // TODO: move deprecationMap out to separate file eventually const deprecationMap = new Map< string, @@ -668,69 +666,6 @@ function makeAugmentedSchema( }); relationshipFields.set(relationship.name.value, relFields); - /* - const baseFields: BaseField[][] = Object.values(relFields); - - const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); - - const propertiesInterface = composer.createInterfaceTC({ - name: relationship.name.value, - fields: objectComposeFields, - }); - - composer.createInputTC({ - name: `${relationship.name.value}Sort`, - fields: propertiesInterface.getFieldNames().reduce((res, f) => { - return { ...res, [f]: "SortDirection" }; - }, {}), - }); - - const relationshipUpdateITC = composer.createInputTC({ - name: `${relationship.name.value}UpdateInput`, - fields: objectFieldsToUpdateInputFields([ - ...relFields.primitiveFields.filter( - (field) => !field.autogenerate && !field.readonly && !field.callback - ), - ...relFields.scalarFields, - ...relFields.enumFields, - ...relFields.temporalFields.filter((field) => !field.timestamps), - ...relFields.pointFields, - ]), - }); - - addMathOperatorsToITC(relationshipUpdateITC); - - addArrayMethodsToITC(relationshipUpdateITC, relFields.primitiveFields); - addArrayMethodsToITC(relationshipUpdateITC, relFields.pointFields); - - const relationshipWhereFields = getWhereFields({ - typeName: relationship.name.value, - fields: { - scalarFields: relFields.scalarFields, - enumFields: relFields.enumFields, - temporalFields: relFields.temporalFields, - pointFields: relFields.pointFields, - primitiveFields: relFields.primitiveFields, - }, - features, - }); - - composer.createInputTC({ - name: `${relationship.name.value}Where`, - fields: relationshipWhereFields, - }); - - composer.createInputTC({ - name: `${relationship.name.value}CreateInput`, - fields: objectFieldsToCreateInputFields([ - ...relFields.primitiveFields.filter((field) => !field.autogenerate && !field.callback), - ...relFields.scalarFields, - ...relFields.enumFields, - ...relFields.temporalFields, - ...relFields.pointFields, - ]), - }); - */ }); // this is the new "functional" way for the above forEach @@ -796,29 +731,7 @@ function makeAugmentedSchema( const userDefinedObjectDirectives = (userDefinedDirectivesForNode.get(concreteEntity.name) || []).concat( propagatedDirectives ); - // const nodeFields = attributeAdapterToComposeFields( - // concreteEntityAdapter.objectFields, - // userDefinedFieldDirectives - // ); - // const composeNode = composer.createObjectTC({ - // name: concreteEntity.name, - // fields: nodeFields, - // description: concreteEntityAdapter.description, - // directives: graphqlDirectivesToCompose(directives), - // interfaces: concreteEntity.compositeEntities.filter((e) => e instanceof InterfaceEntity).map((e) => e.name), - // }); - // if (concreteEntityAdapter.isGlobalNode()) { - // composeNode.setField("id", { - // type: new GraphQLNonNull(GraphQLID), - // resolve: (src) => { - // const field = concreteEntityAdapter.globalIdField.name; - // const value = src[field] as string | number; - // return concreteEntityAdapter.toGlobalId(value.toString()); - // }, - // }); - - // composeNode.addInterface("Node"); - // } + const composeNode = withObjectType({ concreteEntityAdapter, userDefinedFieldDirectives, @@ -826,144 +739,22 @@ function makeAugmentedSchema( composer, }); - // const sortFields = concreteEntityAdapter.sortableFields.reduce( - // (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { - // // TODO: make a nicer way of getting these user defined field directives - // const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; - // return { - // ...res, - // [attributeAdapter.name]: { - // type: "SortDirection", - // directives: graphqlDirectivesToCompose( - // userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) - // ), - // }, - // }; - // }, - // {} - // ); - // if (Object.keys(sortFields).length) { - // const sortInput = composer.createInputTC({ - // name: concreteEntityAdapter.operations.sortInputTypeName, - // fields: sortFields, - // description: `Fields to sort ${concreteEntityAdapter.upperFirstPlural} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${concreteEntityAdapter.operations.sortInputTypeName} object.`, - // }); - - // composer.createInputTC({ - // name: concreteEntityAdapter.operations.optionsInputTypeName, - // fields: { - // sort: { - // description: `Specify one or more ${concreteEntityAdapter.operations.sortInputTypeName} objects to sort ${concreteEntityAdapter.upperFirstPlural} by. The sorts will be applied in the order in which they are arranged in the array.`, - // type: sortInput.NonNull.List, - // }, - // limit: "Int", - // offset: "Int", - // }, - // }); - // } else { - // composer.createInputTC({ - // name: concreteEntityAdapter.operations.optionsInputTypeName, - // fields: { limit: "Int", offset: "Int" }, - // }); - // } - withOptionsInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - // composer.createObjectTC({ - // name: concreteEntityAdapter.operations.aggregateTypeNames.selection, - // fields: { - // count: { - // type: "Int!", - // resolve: numericalResolver, - // args: {}, - // }, - // ...concreteEntityAdapter.aggregableFields.reduce((res, field) => { - // const objectTypeComposer = aggregationTypesMapper.getAggregationType({ - // fieldName: field.getTypeName(), - // nullable: !field.isRequired(), - // }); - - // if (objectTypeComposer) { - // res[field.name] = objectTypeComposer.NonNull; - // } - - // return res; - // }, {}), - // }, - // directives: graphqlDirectivesToCompose(propagatedDirectives), - // }); - withAggregateSelectionType({ concreteEntityAdapter, aggregationTypesMapper, propagatedDirectives, composer }); - // START WHERE FIELD ------------------- - - // const queryFields = getWhereFieldsFromConcreteEntity({ - // concreteEntityAdapter, - // userDefinedFieldDirectives, - // features, - // }); - // composer.createInputTC({ - // name: concreteEntityAdapter.operations.whereInputTypeName, - // fields: concreteEntityAdapter.isGlobalNode() ? { id: "ID", ...queryFields } : queryFields, - // }); - withWhereInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, features, composer }); // TODO: new way // TODO: Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model augmentFulltextSchema2(node, composer, concreteEntityAdapter); - // composer.createInputTC({ - // name: `${concreteEntityAdapter.name}UniqueWhere`, - // fields: concreteEntityAdapter.uniqueFields.reduce((res, field) => { - // return { - // [field.name]: field.getFieldTypeName(), - // ...res, - // }; - // }, {}), - // }); withUniqueWhereInputType({ concreteEntityAdapter, composer }); - // END WHERE FIELD ------------------- - - // composer.createInputTC({ - // name: concreteEntityAdapter.operations.createInputTypeName, - // fields: concreteEntityToCreateInputFields( - // concreteEntityAdapter.createInputFields, - // userDefinedFieldDirectives - // ), - // }); - withCreateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - // const nodeUpdateITC = composer.createInputTC({ - // name: concreteEntityAdapter.operations.updateMutationArgumentNames.update, - // fields: concreteEntityToUpdateInputFields( - // concreteEntityAdapter.updateInputFields, - // userDefinedFieldDirectives - // ), - // }); - // addMathOperatorsToITC(nodeUpdateITC); - // addArrayMethodsToITC2(nodeUpdateITC, concreteEntityAdapter.arrayMethodFields); withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - // composer.createObjectTC({ - // name: concreteEntityAdapter.operations.mutationResponseTypeNames.create, - // fields: { - // info: `CreateInfo!`, - // [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, - // }, - // directives: graphqlDirectivesToCompose(propagatedDirectives), - // }); - - // composer.createObjectTC({ - // name: concreteEntityAdapter.operations.mutationResponseTypeNames.update, - // fields: { - // info: `UpdateInfo!`, - // [concreteEntityAdapter.plural]: `[${concreteEntityAdapter.name}!]!`, - // }, - // directives: graphqlDirectivesToCompose(propagatedDirectives), - // }); withMutationResponseTypes({ concreteEntityAdapter, propagatedDirectives, composer }); // createRelationshipFields({ @@ -1109,23 +900,6 @@ function makeAugmentedSchema( } const interfaceEntityAdapter = new InterfaceEntityAdapter(entity); - // composer.createInterfaceTC({ - // name: interfaceEntityAdapter.name, - // description: interfaceEntity.description, - // fields: { - // ...attributeAdapterToComposeFields( - // Array.from(interfaceEntityAdapter.attributes.values()), - // getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) - // ), - // ...relationshipAdapterToComposeFields( - // Array.from(interfaceEntityAdapter.relationships.values()), - // getUserDefinedFieldDirectivesForDefinition(inter, definitionNodes) - // ), - // }, - // directives: graphqlDirectivesToCompose( - // userDefinedDirectivesForInterface.get(interfaceEntity.name) || [] - // ), - // }); const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition( definitionNode, @@ -1353,17 +1127,6 @@ function doForRelationshipPropertiesInterface( } const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(obj, definitionNodes); - - // const composeFields = attributeAdapterToComposeFields( - // Array.from(relationship.attributes.values()), - // userDefinedFieldDirectives - // ); - - // const propertiesInterface = composer.createInterfaceTC({ - // name: relationship.propertiesTypeName, - // fields: composeFields, - // }); - const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(relationshipAdapter.name) || []; withInterfaceType({ entityAdapter: relationshipAdapter, @@ -1371,41 +1134,9 @@ function doForRelationshipPropertiesInterface( userDefinedInterfaceDirectives, composer, }); - - // composer.createInputTC({ - // name: relationship.operations.sortInputTypeName, - // fields: propertiesInterface.getFieldNames().reduce((res, f) => { - // return { ...res, [f]: "SortDirection" }; - // }, {}), - // }); withSortInputType({ relationshipAdapter, userDefinedFieldDirectives, composer }); - - // const relationshipUpdateITC = composer.createInputTC({ - // name: relationship.operations.edgeUpdateInputTypeName, - // // better name for this fn pls - we are using interface entity now. - // fields: concreteEntityToUpdateInputFields(relationship.updateInputFields, userDefinedFieldDirectives), - // }); - // addMathOperatorsToITC(relationshipUpdateITC); - // addArrayMethodsToITC2(relationshipUpdateITC, relationship.arrayMethodFields); withUpdateInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); - - // const relationshipWhereFields = getWhereFieldsFromRelationshipProperties({ - // relationshipAdapter: relationship, - // userDefinedFieldDirectives, - // features, - // }); - - // composer.createInputTC({ - // name: relationship.operations.whereInputTypeName, - // fields: relationshipWhereFields, - // }); withWhereInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, features, composer }); - - // composer.createInputTC({ - // // name: `${relationship.propertiesTypeName}CreateInput`, - // name: relationship.operations.createInputTypeName, - // fields: concreteEntityToCreateInputFields(relationship.createInputFields, userDefinedFieldDirectives), - // }); withCreateInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); } @@ -1437,14 +1168,10 @@ function doForInterfacesThatAreTargetOfARelationship({ const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - // const objectComposeFields = attributeAdapterToComposeFields( - // Array.from(interfaceEntityAdapter.attributes.values()), - // userDefinedFieldDirectives - // ); - // const composeInterface = composer.createInterfaceTC({ - // name: interfaceEntityAdapter.name, - // fields: objectComposeFields, - // }); + withOptionsInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); + withWhereInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, features, composer }); + withCreateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); + withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); const composeInterface = withInterfaceType({ entityAdapter: interfaceEntityAdapter, @@ -1452,87 +1179,6 @@ function doForInterfacesThatAreTargetOfARelationship({ userDefinedInterfaceDirectives: [], composer, }); - - // const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Options`, (tc) => { - // tc.addFields({ - // limit: "Int", - // offset: "Int", - // }); - // }); - // const interfaceSortableFields = interfaceEntityAdapter.sortableFields.reduce( - // (res: InputTypeComposerFieldConfigMapDefinition, attributeAdapter) => { - // const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attributeAdapter.name) || []; - // return { - // ...res, - // [attributeAdapter.name]: { - // type: "SortDirection", - // directives: graphqlDirectivesToCompose( - // userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) - // ), - // }, - // }; - // }, - // {} - // ); - // if (Object.keys(interfaceSortableFields).length) { - // const interfaceSortInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}Sort`, (tc) => { - // tc.addFields(interfaceSortableFields); - // tc.setDescription( - // `Fields to sort ${pluralize( - // interfaceEntityAdapter.name - // )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceEntityAdapter.name}Sort`} object.` - // ); - // }); - // interfaceOptionsInput.addFields({ - // sort: { - // description: `Specify one or more ${`${interfaceEntityAdapter.name}Sort`} objects to sort ${pluralize( - // interfaceEntityAdapter.name - // )} by. The sorts will be applied in the order in which they are arranged in the array.`, - // type: interfaceSortInput.List, - // }, - // }); - // } - - withOptionsInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); - - // const [ - // implementationsConnectInput, - // implementationsDeleteInput, - // implementationsDisconnectInput, - // implementationsUpdateInput, - // implementationsWhereInput, - // ] = ["ConnectInput", "DisconnectInput", "DeleteInput", "UpdateInput", "Where"].map((suffix) => - // composer.createInputTC({ - // name: `${interfaceEntityAdapter.name}Implementations${suffix}`, - // fields: {}, - // }) - // ) as [InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer]; - - // const interfaceWhereFields = getWhereFieldsForAttributes({ - // attributes: Array.from(interfaceEntityAdapter.attributes.values()), - // userDefinedFieldDirectives, - // features, - // }); - // composer.createInputTC({ - // name: interfaceEntityAdapter.operations.whereInputTypeName, - // fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, - // }); - - withWhereInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, features, composer }); - - // const interfaceCreateInput = composer.createInputTC(`${interfaceEntityAdapter.name}CreateInput`); - - withCreateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); - - // const interfaceRelationshipITC = composer.getOrCreateITC(`${interfaceEntityAdapter.name}UpdateInput`, (tc) => { - // tc.addFields({ - // ...concreteEntityToUpdateInputFields(interfaceEntityAdapter.updateInputFields, userDefinedFieldDirectives), - // _on: implementationsUpdateInput, - // }); - // }); - // addMathOperatorsToITC(interfaceRelationshipITC); - withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); - createRelationshipFieldsFromConcreteEntityAdapter({ entityAdapter: interfaceEntityAdapter, schemaComposer: composer, @@ -1552,83 +1198,12 @@ function doForInterfacesThatAreTargetOfARelationship({ }), ]; - // interfaceEntityAdapter.concreteEntities.forEach((implementation) => { - // implementationsWhereInput.addFields({ - // [implementation.name]: { - // type: `${implementation.name}Where`, - // }, - // }); - - // if (implementation.relationships.size) { - // implementationsConnectInput.addFields({ - // [implementation.name]: { - // type: `[${implementation.name}ConnectInput!]`, - // }, - // }); - - // implementationsDeleteInput.addFields({ - // [implementation.name]: { - // type: `[${implementation.name}DeleteInput!]`, - // }, - // }); - - // implementationsDisconnectInput.addFields({ - // [implementation.name]: { - // type: `[${implementation.name}DisconnectInput!]`, - // }, - // }); - // } - - // interfaceCreateInput.addFields({ - // [implementation.name]: { - // type: `${implementation.name}CreateInput`, - // }, - // }); - - // implementationsUpdateInput.addFields({ - // [implementation.name]: { - // type: `${implementation.name}UpdateInput`, - // }, - // }); - // }); - - // if (implementationsConnectInput.getFieldNames().length) { - // const interfaceConnectInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}ConnectInput`, (tc) => { - // tc.addFields({ _on: implementationsConnectInput }); - // }); - // interfaceConnectInput.setField("_on", implementationsConnectInput); - // } - - // if (implementationsDeleteInput.getFieldNames().length) { - // const interfaceDeleteInput = composer.getOrCreateITC(`${interfaceEntityAdapter.name}DeleteInput`, (tc) => { - // tc.addFields({ _on: implementationsDeleteInput }); - // }); - // interfaceDeleteInput.setField("_on", implementationsDeleteInput); - // } - - // if (implementationsDisconnectInput.getFieldNames().length) { - // const interfaceDisconnectInput = composer.getOrCreateITC( - // `${interfaceEntityAdapter.name}DisconnectInput`, - // (tc) => { - // tc.addFields({ _on: implementationsDisconnectInput }); - // } - // ); - // interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); - // } - withDeleteInputType({ interfaceEntityAdapter, composer }); withConnectInputType({ interfaceEntityAdapter, composer }); withDisconnectInputType({ interfaceEntityAdapter, composer }); ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); - // [ - // implementationsConnectInput, - // implementationsDeleteInput, - // implementationsDisconnectInput, - // implementationsUpdateInput, - // implementationsWhereInput, - // ].forEach((c) => ensureNonEmptyInput(composer, c)); return relationships; } From 00215c489f8b4ee391b45120aeb281fc29db7c80 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 15:14:48 +0200 Subject: [PATCH 107/162] refactor: use GraphQL info object types for name references --- .../graphql/src/schema/deprecation-map.ts | 47 +++++++++++++ .../src/schema/new-make-augmented-schema.ts | 67 +------------------ 2 files changed, 49 insertions(+), 65 deletions(-) create mode 100644 packages/graphql/src/schema/deprecation-map.ts diff --git a/packages/graphql/src/schema/deprecation-map.ts b/packages/graphql/src/schema/deprecation-map.ts new file mode 100644 index 0000000000..0b3732e49e --- /dev/null +++ b/packages/graphql/src/schema/deprecation-map.ts @@ -0,0 +1,47 @@ +import { CreateInfo } from "../graphql/objects/CreateInfo"; +import { DeleteInfo } from "../graphql/objects/DeleteInfo"; +import { UpdateInfo } from "../graphql/objects/UpdateInfo"; + +export const deprecationMap = new Map< + string, + { + field: string; + reason: string; + deprecatedFromVersion: string; + toBeRemovedInVersion: string; + }[] +>([ + [ + CreateInfo.name, + [ + { + field: "bookmark", + reason: "This field has been deprecated because bookmarks are now handled by the driver.", + deprecatedFromVersion: "", + toBeRemovedInVersion: "", + }, + ], + ], + [ + UpdateInfo.name, + [ + { + field: "bookmark", + reason: "This field has been deprecated because bookmarks are now handled by the driver.", + deprecatedFromVersion: "", + toBeRemovedInVersion: "", + }, + ], + ], + [ + DeleteInfo.name, + [ + { + field: "bookmark", + reason: "This field has been deprecated because bookmarks are now handled by the driver.", + deprecatedFromVersion: "", + toBeRemovedInVersion: "", + }, + ], + ], +]); diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index a9966777e8..a294381e7a 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -89,6 +89,7 @@ import { isInArray } from "../utils/is-in-array"; import { createConnectionFields2 } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; import { createRelationshipFieldsFromConcreteEntityAdapter } from "./create-relationship-fields/create-relationship-fields"; +import { deprecationMap } from "./deprecation-map"; import { withAggregateSelectionType } from "./generation/aggregate-types"; import { withConnectInputType } from "./generation/connect-input"; import { withCreateInputType } from "./generation/create-input"; @@ -109,20 +110,6 @@ function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: return "name" in x; } -class SchemaGeneratorModel { - // contains type names for now - static createInfoTypeName: string; - static updateInfoTypeName: string; - static deleteInfoTypeName: string; - static pageInfoTypeName: string; - static { - this.createInfoTypeName = "CreateInfo"; - this.updateInfoTypeName = "UpdateInfo"; - this.deleteInfoTypeName = "DeleteInfo"; - this.pageInfoTypeName = "PageInfo"; - } -} - class AugmentedSchemaGenerator { private composer: SchemaComposer; @@ -535,51 +522,6 @@ function makeAugmentedSchema( composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); } - // TODO: move deprecationMap out to separate file eventually - const deprecationMap = new Map< - string, - { - field: string; - reason: string; - deprecatedFromVersion: string; - toBeRemovedInVersion: string; - }[] - >([ - [ - SchemaGeneratorModel.createInfoTypeName, - [ - { - field: "bookmark", - reason: "This field has been deprecated because bookmarks are now handled by the driver.", - deprecatedFromVersion: "", - toBeRemovedInVersion: "", - }, - ], - ], - [ - SchemaGeneratorModel.updateInfoTypeName, - [ - { - field: "bookmark", - reason: "This field has been deprecated because bookmarks are now handled by the driver.", - deprecatedFromVersion: "", - toBeRemovedInVersion: "", - }, - ], - ], - [ - SchemaGeneratorModel.deleteInfoTypeName, - [ - { - field: "bookmark", - reason: "This field has been deprecated because bookmarks are now handled by the driver.", - deprecatedFromVersion: "", - toBeRemovedInVersion: "", - }, - ], - ], - ]); - // Loop over all entries in the deprecation map and add field deprecations to all types in the map. for (const [typeName, deprecatedFields] of deprecationMap) { const typeComposer = composer.getOTC(typeName); @@ -591,12 +533,7 @@ function makeAugmentedSchema( // TODO: ideally move these in getSubgraphSchema() if (subgraph) { const shareable = subgraph.getFullyQualifiedDirectiveName("shareable"); - [ - SchemaGeneratorModel.createInfoTypeName, - SchemaGeneratorModel.updateInfoTypeName, - SchemaGeneratorModel.deleteInfoTypeName, - SchemaGeneratorModel.pageInfoTypeName, - ].forEach((typeName) => { + [CreateInfo.name, UpdateInfo.name, DeleteInfo.name, PageInfo.name].forEach((typeName) => { const typeComposer = composer.getOTC(typeName); typeComposer.setDirectiveByName(shareable); }); From df3dc21ec01591ddd7ca8449ffb8b2bcfee1d0c6 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 15:40:33 +0200 Subject: [PATCH 108/162] refactor: move fulltext strings to entity operations --- .../ConcreteEntityOperations.ts | 8 ++++ .../graphql/src/schema/augment/fulltext.ts | 43 +++++++++++-------- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts index c120a850b2..10da7a1d5c 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts @@ -117,6 +117,14 @@ export class ConcreteEntityOperations { return `${this.concreteEntityAdapter.name}Fulltext`; } + public getFullTextIndexInputTypeName(indexName: string): string { + return `${this.concreteEntityAdapter.name}${upperFirst(indexName)}Fulltext`; + } + + public getFullTextIndexQueryFieldName(indexName: string): string { + return `${this.concreteEntityAdapter.plural}Fulltext${upperFirst(indexName)}`; + } + public get sortInputTypeName(): string { return `${this.concreteEntityAdapter.name}Sort`; } diff --git a/packages/graphql/src/schema/augment/fulltext.ts b/packages/graphql/src/schema/augment/fulltext.ts index 8e07f5d145..0c471ff91d 100644 --- a/packages/graphql/src/schema/augment/fulltext.ts +++ b/packages/graphql/src/schema/augment/fulltext.ts @@ -18,9 +18,10 @@ */ import { GraphQLFloat, GraphQLNonNull, GraphQLString } from "graphql"; -import type { SchemaComposer } from "graphql-compose"; +import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; import { SCORE_FIELD } from "../../graphql/directives/fulltext"; +import { SortDirection } from "../../graphql/enums/SortDirection"; import { FloatWhere } from "../../graphql/input-objects/FloatWhere"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { upperFirst } from "../../utils/upper-first"; @@ -111,21 +112,24 @@ export function augmentFulltextSchema2( return; } - const fields = concreteEntityAdapter.annotations.fulltext?.indexes.reduce((res, index) => { - const indexName = index.indexName || index.name; - if (indexName === undefined) { - throw new Error("The name of the fulltext index should be defined using the indexName argument."); - } - return { - ...res, - [indexName]: composer.createInputTC({ - name: `${concreteEntityAdapter.name}${upperFirst(indexName)}Fulltext`, - fields: { - phrase: new GraphQLNonNull(GraphQLString), - }, - }), - }; - }, {}); + const fields = concreteEntityAdapter.annotations.fulltext.indexes.reduce( + (res: Record, index): Record => { + const indexName = index.indexName || index.name; + if (indexName === undefined) { + throw new Error("The name of the fulltext index should be defined using the indexName argument."); + } + return { + ...res, + [indexName]: composer.createInputTC({ + name: concreteEntityAdapter.operations.getFullTextIndexInputTypeName(indexName), + fields: { + phrase: new GraphQLNonNull(GraphQLString), + }, + }), + }; + }, + {} + ); const fulltextResultDescription = `The result of a fulltext search on an index of ${concreteEntityAdapter.name}`; const fulltextWhereDescription = `The input for filtering a fulltext query on an index of ${concreteEntityAdapter.name}`; @@ -140,7 +144,7 @@ export function augmentFulltextSchema2( name: concreteEntityAdapter.operations.fulltextTypeNames.sort, description: fulltextSortDescription, fields: { - [SCORE_FIELD]: "SortDirection", + [SCORE_FIELD]: SortDirection.name, [concreteEntityAdapter.singular]: concreteEntityAdapter.operations.sortInputTypeName, }, }); @@ -172,7 +176,8 @@ export function augmentFulltextSchema2( if (indexName === undefined) { throw new Error("The name of the fulltext index should be defined using the indexName argument."); } - let queryName = `${concreteEntityAdapter.plural}Fulltext${upperFirst(indexName)}`; + + let queryName = concreteEntityAdapter.operations.getFullTextIndexQueryFieldName(indexName); if (index.queryName) { queryName = index.queryName; } @@ -182,7 +187,7 @@ export function augmentFulltextSchema2( return iName === indexName; }); if (!nodeIndex) { - throw new Error("fix index from Node "); + throw new Error(`Could not find index ${indexName} on node ${node.name}`); } composer.Query.addFields({ [queryName]: fulltextResolver({ node }, nodeIndex), From 77d830b31dcdd2369067b9301a1297c0f11a87d4 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 15:41:15 +0200 Subject: [PATCH 109/162] refactor: throw proper errors --- packages/graphql/src/schema/new-make-augmented-schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index a294381e7a..cbe98e546e 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -655,13 +655,13 @@ function makeAugmentedSchema( // TODO: temporary for backwards compatibility for translation layer const node = nodes.find((n) => n.name === concreteEntity.name); if (!node) { - throw new Error("Fix node not found."); + throw new Error(`Node not found with the name ${concreteEntity.name}`); } const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(concreteEntityAdapter.name); if (!userDefinedFieldDirectives) { - throw new Error("fix user directives for object types."); + throw new Error(`User defined field directives not found for ${concreteEntityAdapter.name}`); } const propagatedDirectives = propagatedDirectivesForNode.get(concreteEntity.name) || []; From ee35a4fd5dfc974d24094edcc69191b043bf680b Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 18 Sep 2023 15:41:27 +0200 Subject: [PATCH 110/162] refactor: remove comment about point fields --- packages/graphql/src/schema/new-make-augmented-schema.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index cbe98e546e..abf236acdf 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -545,12 +545,6 @@ function makeAugmentedSchema( const { nodes, relationshipPropertyInterfaceNames, interfaceRelationshipNames } = getNodesResult; - // graphql-compose will break if the Point and CartesianPoint types are created but not used, - // because it will purge the unused types but leave behind orphaned field resolvers - // - // These are flags to check whether the types are used and then create them if they are - // let { pointInTypeDefs, cartesianPointInTypeDefs } = getNodesResult; - const hasGlobalNodes = addGlobalNodeFields(nodes, composer); const { relationshipProperties, interfaceRelationships, filteredInterfaceTypes } = filterInterfaceTypes( @@ -568,6 +562,7 @@ function makeAugmentedSchema( const userDefinedDirectivesForNode = new Map(); const propagatedDirectivesForNode = new Map(); const userDefinedDirectivesForInterface = new Map(); + for (const definitionNode of definitionNodes.objectTypes) { const userDefinedObjectDirectives = definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; @@ -579,6 +574,7 @@ function makeAugmentedSchema( const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); } + for (const definitionNode of definitionNodes.interfaceTypes) { const userDefinedInterfaceDirectives = definitionNode.directives?.filter((directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value)) || From 447ff65628fcaac5661f4ce84dd806c5e392cd74 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 19 Sep 2023 14:22:50 +0200 Subject: [PATCH 111/162] test: add test for directive inheritance --- .../graphql/tests/schema/inheritance.test.ts | 462 ++++++++++++++++++ 1 file changed, 462 insertions(+) create mode 100644 packages/graphql/tests/schema/inheritance.test.ts diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts new file mode 100644 index 0000000000..5ec3587129 --- /dev/null +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -0,0 +1,462 @@ +/* + * 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("inheritance", () => { + test("various graphql entities should correctly perform inheritance", async () => { + const typeDefs = gql` + directive @customDirectiveField on FIELD_DEFINITION + directive @customDirectiveObj on OBJECT + directive @customDirectiveInter on INTERFACE + + interface Person @customDirectiveInter { + name: String @customDirectiveField + friends: [Person!]! + @relationship(type: "FRIENDS_WITH", direction: OUT, properties: "FriendsWith") + @customDirectiveField + } + + type Actor implements Person @customDirectiveObj { + name: String + friends: [Person!]! @relationship(type: "FRIENDS_WITH", direction: OUT, properties: "FriendsWith") + } + + interface FriendsWith @relationshipProperties { + since: Int + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + directive @customDirectiveField on FIELD_DEFINITION + + directive @customDirectiveInter on INTERFACE + + directive @customDirectiveObj on OBJECT + + type Actor implements Person @customDirectiveObj { + friends(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! @customDirectiveField + friendsConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonFriendsConnectionSort!], where: PersonFriendsConnectionWhere): PersonFriendsConnection! + name: String @customDirectiveField + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input ActorConnectInput { + friends: [ActorFriendsConnectFieldInput!] + } + + input ActorCreateInput { + friends: PersonFriendsFieldInput + name: String + } + + input ActorDeleteInput { + friends: [ActorFriendsDeleteFieldInput!] + } + + input ActorDisconnectInput { + friends: [ActorFriendsDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + input ActorFriendsConnectFieldInput { + connect: PersonConnectInput + edge: FriendsWithCreateInput + where: PersonConnectWhere + } + + input ActorFriendsCreateFieldInput { + edge: FriendsWithCreateInput + node: PersonCreateInput! + } + + input ActorFriendsDeleteFieldInput { + delete: PersonDeleteInput + where: PersonFriendsConnectionWhere + } + + input ActorFriendsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: PersonFriendsConnectionWhere + } + + input ActorFriendsUpdateConnectionInput { + edge: FriendsWithUpdateInput + node: PersonUpdateInput + } + + input ActorFriendsUpdateFieldInput { + connect: [ActorFriendsConnectFieldInput!] + create: [ActorFriendsCreateFieldInput!] + delete: [ActorFriendsDeleteFieldInput!] + disconnect: [ActorFriendsDisconnectFieldInput!] + update: ActorFriendsUpdateConnectionInput + where: PersonFriendsConnectionWhere + } + + 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!] + } + + input ActorRelationInput { + friends: [ActorFriendsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + friends: [ActorFriendsUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + friendsConnection: PersonFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related PersonFriendsConnections match this filter + \\"\\"\\" + friendsConnection_ALL: PersonFriendsConnectionWhere + \\"\\"\\" + Return Actors where none of the related PersonFriendsConnections match this filter + \\"\\"\\" + friendsConnection_NONE: PersonFriendsConnectionWhere + friendsConnection_NOT: PersonFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related PersonFriendsConnections match this filter + \\"\\"\\" + friendsConnection_SINGLE: PersonFriendsConnectionWhere + \\"\\"\\" + Return Actors where some of the related PersonFriendsConnections match this filter + \\"\\"\\" + friendsConnection_SOME: PersonFriendsConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + interface FriendsWith { + since: Int + } + + input FriendsWithCreateInput { + since: Int + } + + input FriendsWithSort { + since: SortDirection + } + + input FriendsWithUpdateInput { + since: Int + since_DECREMENT: Int + since_INCREMENT: Int + } + + input FriendsWithWhere { + AND: [FriendsWithWhere!] + NOT: FriendsWithWhere + OR: [FriendsWithWhere!] + since: Int + since_GT: Int + since_GTE: Int + since_IN: [Int] + since_LT: Int + since_LTE: Int + since_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + since_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + friends(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! @customDirectiveField + friendsConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonFriendsConnectionSort!], where: PersonFriendsConnectionWhere): PersonFriendsConnection! + name: String @customDirectiveField + } + + input PersonConnectInput { + _on: PersonImplementationsConnectInput + friends: [PersonFriendsConnectFieldInput!] + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + Actor: ActorCreateInput + } + + input PersonDeleteInput { + _on: PersonImplementationsDeleteInput + friends: [PersonFriendsDeleteFieldInput!] + } + + input PersonDisconnectInput { + _on: PersonImplementationsDisconnectInput + friends: [PersonFriendsDisconnectFieldInput!] + } + + input PersonFriendsConnectFieldInput { + edge: FriendsWithCreateInput + where: PersonConnectWhere + } + + type PersonFriendsConnection { + edges: [PersonFriendsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonFriendsConnectionSort { + edge: FriendsWithSort + node: PersonSort + } + + input PersonFriendsConnectionWhere { + AND: [PersonFriendsConnectionWhere!] + NOT: PersonFriendsConnectionWhere + OR: [PersonFriendsConnectionWhere!] + edge: FriendsWithWhere + edge_NOT: FriendsWithWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PersonFriendsCreateFieldInput { + edge: FriendsWithCreateInput + node: PersonCreateInput! + } + + input PersonFriendsDeleteFieldInput { + where: PersonFriendsConnectionWhere + } + + input PersonFriendsDisconnectFieldInput { + where: PersonFriendsConnectionWhere + } + + input PersonFriendsFieldInput { + connect: [PersonFriendsConnectFieldInput!] + create: [PersonFriendsCreateFieldInput!] + } + + type PersonFriendsRelationship implements FriendsWith { + cursor: String! + node: Person! + since: Int + } + + input PersonFriendsUpdateConnectionInput { + edge: FriendsWithUpdateInput + node: PersonUpdateInput + } + + input PersonFriendsUpdateFieldInput { + connect: [PersonFriendsConnectFieldInput!] + create: [PersonFriendsCreateFieldInput!] + delete: [PersonFriendsDeleteFieldInput!] + disconnect: [PersonFriendsDisconnectFieldInput!] + update: PersonFriendsUpdateConnectionInput + where: PersonFriendsConnectionWhere + } + + input PersonImplementationsConnectInput { + Actor: [ActorConnectInput!] + } + + input PersonImplementationsDeleteInput { + Actor: [ActorDeleteInput!] + } + + input PersonImplementationsDisconnectInput { + Actor: [ActorDisconnectInput!] + } + + input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput + } + + input PersonImplementationsWhere { + Actor: ActorWhere + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + friends: [PersonFriendsUpdateFieldInput!] + name: String + } + + input PersonWhere { + _on: PersonImplementationsWhere + friendsConnection: PersonFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonFriendsConnections match this filter + \\"\\"\\" + friendsConnection_ALL: PersonFriendsConnectionWhere + \\"\\"\\" + Return People where none of the related PersonFriendsConnections match this filter + \\"\\"\\" + friendsConnection_NONE: PersonFriendsConnectionWhere + friendsConnection_NOT: PersonFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonFriendsConnections match this filter + \\"\\"\\" + friendsConnection_SINGLE: PersonFriendsConnectionWhere + \\"\\"\\" + Return People where some of the related PersonFriendsConnections match this filter + \\"\\"\\" + friendsConnection_SOME: PersonFriendsConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + }" + `); + }); +}); From 5e6ec8e3ecfae13891288b9ce802e3254a1eae9c Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 21 Sep 2023 13:05:12 +0200 Subject: [PATCH 112/162] refactor: reduce duplicate code in create-connection-fields --- .../model-adapters/RelationshipOperations.ts | 18 + .../schema/create-connection-fields-old.ts | 294 +++++++++ .../src/schema/create-connection-fields.ts | 598 +++++------------- .../src/schema/make-augmented-schema.ts | 2 +- .../src/schema/new-make-augmented-schema.ts | 20 +- 5 files changed, 489 insertions(+), 443 deletions(-) create mode 100644 packages/graphql/src/schema/create-connection-fields-old.ts diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts index 6d28cfc515..9e1b4c33d5 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts @@ -66,6 +66,20 @@ export class RelationshipOperations { return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}Connection`; } + public getConnectionUnionWhereInputTypename(concreteEntityAdapter: ConcreteEntityAdapter): string { + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + concreteEntityAdapter.name + }ConnectionWhere`; + } + + public get connectionSortInputTypename(): string { + return `${this.connectionFieldTypename}Sort`; + } + + public get connectionWhereInputTypename(): string { + return `${this.connectionFieldTypename}Where`; + } + /**Note: Required for now to infer the types without ResolveTree */ public get relationshipFieldTypename(): string { return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}Relationship`; @@ -116,6 +130,10 @@ export class RelationshipOperations { return `${this.relationshipEntityAdapter.name}Connection`; } + public get connectionNotFieldName(): string { + return `${this.connectionFieldName}_NOT`; + } + public get connectionWhereTypename(): string { return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectionWhere`; } diff --git a/packages/graphql/src/schema/create-connection-fields-old.ts b/packages/graphql/src/schema/create-connection-fields-old.ts new file mode 100644 index 0000000000..0b6115270f --- /dev/null +++ b/packages/graphql/src/schema/create-connection-fields-old.ts @@ -0,0 +1,294 @@ +/* + * 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 { GraphQLResolveInfo } from "graphql"; +import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; +import type { Node } from "../classes"; +import { Relationship } from "../classes"; +import { DEPRECATED } from "../constants"; + +import type { ConnectionField, ConnectionQueryArgs } from "../types"; + +import { addRelationshipArrayFilters } from "./augment/add-relationship-array-filters"; +import { DEPRECATE_NOT } from "./constants"; +import { addDirectedArgument } from "./directed-argument"; +import type { ObjectFields } from "./get-obj-field-meta"; +import getSortableFields from "./get-sortable-fields"; +import { connectionFieldResolver } from "./pagination"; +import { graphqlDirectivesToCompose } from "./to-compose"; + +function createConnectionFields({ + connectionFields, + schemaComposer, + composeNode, + sourceName, + nodes, + relationshipPropertyFields, +}: { + connectionFields: ConnectionField[]; + schemaComposer: SchemaComposer; + composeNode: ObjectTypeComposer | InterfaceTypeComposer; + sourceName: string; + nodes: Node[]; + relationshipPropertyFields: Map; +}): Relationship[] { + const relationships: Relationship[] = []; + + const whereInput = schemaComposer.getITC(`${composeNode.getTypeName()}Where`); + + connectionFields.forEach((connectionField) => { + const relationship = schemaComposer.getOrCreateOTC(connectionField.relationshipTypeName, (tc) => { + tc.addFields({ + cursor: "String!", + node: `${connectionField.relationship.typeMeta.name}!`, + }); + }); + const deprecatedDirectives = graphqlDirectivesToCompose( + connectionField.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) + ); + + const connectionWhereName = `${connectionField.typeMeta.name}Where`; + + const connectionWhere = schemaComposer.getOrCreateITC(connectionWhereName); + + if (!connectionField.relationship.union) { + connectionWhere.addFields({ + AND: `[${connectionWhereName}!]`, + OR: `[${connectionWhereName}!]`, + NOT: connectionWhereName, + }); + } + + const connection = schemaComposer.getOrCreateOTC(connectionField.typeMeta.name, (tc) => { + tc.addFields({ + edges: relationship.NonNull.List.NonNull, + totalCount: "Int!", + pageInfo: "PageInfo!", + }); + }); + + if (connectionField.relationship.properties && !connectionField.relationship.union) { + const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); + relationship.addInterface(propertiesInterface); + relationship.addFields(propertiesInterface.getFields()); + + connectionWhere.addFields({ + edge: `${connectionField.relationship.properties}Where`, + edge_NOT: { + type: `${connectionField.relationship.properties}Where`, + directives: [DEPRECATE_NOT], + }, + }); + } + if (connectionField.relationship.filterableOptions.byValue) { + whereInput.addFields({ + [connectionField.fieldName]: connectionWhere, + [`${connectionField.fieldName}_NOT`]: { + type: connectionWhere, + }, + }); + } + + // n..m Relationships + if (connectionField.relationship.typeMeta.array && connectionField.relationship.filterableOptions.byValue) { + addRelationshipArrayFilters({ + whereInput, + fieldName: connectionField.fieldName, + sourceName: sourceName, + relatedType: connectionField.typeMeta.name, + whereType: connectionWhere, + directives: deprecatedDirectives, + }); + } + + const composeNodeBaseArgs: { + where: any; + sort?: any; + first?: any; + after?: any; + } = { + where: connectionWhere, + first: { + type: "Int", + }, + after: { + type: "String", + }, + }; + + const composeNodeArgs = addDirectedArgument(composeNodeBaseArgs, connectionField.relationship); + + if (connectionField.relationship.properties) { + const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); + connectionSort.addFields({ + edge: `${connectionField.relationship.properties}Sort`, + }); + composeNodeArgs.sort = connectionSort.NonNull.List; + } + + if (connectionField.relationship.interface) { + connectionWhere.addFields({ + OR: connectionWhere.NonNull.List, + AND: connectionWhere.NonNull.List, + NOT: connectionWhereName, + node: `${connectionField.relationship.typeMeta.name}Where`, + node_NOT: { + type: `${connectionField.relationship.typeMeta.name}Where`, + directives: [DEPRECATE_NOT], + }, + }); + + if (schemaComposer.has(`${connectionField.relationship.typeMeta.name}Sort`)) { + const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); + connectionSort.addFields({ + node: `${connectionField.relationship.typeMeta.name}Sort`, + }); + if (!composeNodeArgs.sort) { + composeNodeArgs.sort = connectionSort.NonNull.List; + } + } + + if (connectionField.relationship.properties) { + const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); + relationship.addInterface(propertiesInterface); + relationship.addFields(propertiesInterface.getFields()); + + connectionWhere.addFields({ + edge: `${connectionField.relationship.properties}Where`, + edge_NOT: { + type: `${connectionField.relationship.properties}Where`, + directives: [DEPRECATE_NOT], + }, + }); + } + } else if (connectionField.relationship.union) { + const relatedNodes = nodes.filter((n) => connectionField.relationship.union?.nodes?.includes(n.name)); + + relatedNodes.forEach((n) => { + const connectionName = connectionField.typeMeta.name; + + // Append union member name before "ConnectionWhere" + const unionWhereName = `${connectionName.substring(0, connectionName.length - "Connection".length)}${ + n.name + }ConnectionWhere`; + + const unionWhere = schemaComposer.createInputTC({ + name: unionWhereName, + fields: { + OR: `[${unionWhereName}!]`, + AND: `[${unionWhereName}!]`, + NOT: unionWhereName, + }, + }); + + unionWhere.addFields({ + node: `${n.name}Where`, + node_NOT: { + type: `${n.name}Where`, + directives: [DEPRECATE_NOT], + }, + }); + + if (connectionField.relationship.properties) { + const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); + relationship.addInterface(propertiesInterface); + relationship.addFields(propertiesInterface.getFields()); + + unionWhere.addFields({ + edge: `${connectionField.relationship.properties}Where`, + edge_NOT: { + type: `${connectionField.relationship.properties}Where`, + directives: [DEPRECATE_NOT], + }, + }); + } + + connectionWhere.addFields({ + [n.name]: unionWhere, + }); + }); + } else { + const relatedNode = nodes.find((n) => n.name === connectionField.relationship.typeMeta.name) as Node; + + connectionWhere.addFields({ + node: `${connectionField.relationship.typeMeta.name}Where`, + node_NOT: { + type: `${connectionField.relationship.typeMeta.name}Where`, + directives: [DEPRECATE_NOT], + }, + }); + + if (getSortableFields(relatedNode).length) { + const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); + connectionSort.addFields({ + node: `${connectionField.relationship.typeMeta.name}Sort`, + }); + if (!composeNodeArgs.sort) { + composeNodeArgs.sort = connectionSort.NonNull.List; + } + } + } + + if (!connectionField.relationship.writeonly && connectionField.selectableOptions.onRead) { + const deprecatedDirectives = graphqlDirectivesToCompose( + connectionField.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) + ); + composeNode.addFields({ + [connectionField.fieldName]: { + type: connection.NonNull, + args: composeNodeArgs, + directives: deprecatedDirectives, + resolve: (source, args: ConnectionQueryArgs, _ctx, info: GraphQLResolveInfo) => { + return connectionFieldResolver({ + connectionField, + args, + info, + source, + }); + }, + }, + }); + } + + const relFields = connectionField.relationship.properties + ? relationshipPropertyFields.get(connectionField.relationship.properties) + : ({} as ObjectFields | undefined); + + const r = new Relationship({ + name: connectionField.relationshipTypeName, + type: connectionField.relationship.type, + properties: connectionField.relationship.properties, + ...(relFields + ? { + temporalFields: relFields.temporalFields, + scalarFields: relFields.scalarFields, + primitiveFields: relFields.primitiveFields, + enumFields: relFields.enumFields, + pointFields: relFields.pointFields, + customResolverFields: relFields.customResolverFields, + } + : {}), + }); + relationships.push(r); + }); + + return relationships; +} + +export default createConnectionFields; diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index ddc7b063cc..03199782fc 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -17,284 +17,109 @@ * limitations under the License. */ -import type { DirectiveNode, GraphQLResolveInfo } from "graphql"; -import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; -import type { Node } from "../classes"; +import { GraphQLInt, GraphQLNonNull, GraphQLString, type DirectiveNode, type GraphQLResolveInfo } from "graphql"; +import type { + InputTypeComposer, + InterfaceTypeComposer, + ObjectTypeComposer, + ObjectTypeComposerArgumentConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; import { Relationship } from "../classes"; import { DEPRECATED } from "../constants"; -import type { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { PageInfo } from "../graphql/objects/PageInfo"; +import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; -import type { ConnectionField, ConnectionQueryArgs } from "../types"; +import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { ConnectionQueryArgs } from "../types"; import { addRelationshipArrayFilters } from "./augment/add-relationship-array-filters"; import { DEPRECATE_NOT } from "./constants"; -import { addDirectedArgument, addDirectedArgument2 } from "./directed-argument"; +import { addDirectedArgument2 } from "./directed-argument"; import type { ObjectFields } from "./get-obj-field-meta"; -import getSortableFields from "./get-sortable-fields"; -import { connectionFieldResolver, connectionFieldResolver2 } from "./pagination"; +import { connectionFieldResolver2 } from "./pagination"; import { graphqlDirectivesToCompose } from "./to-compose"; -function createConnectionFields({ - connectionFields, - schemaComposer, - composeNode, - sourceName, - nodes, - relationshipPropertyFields, +function addConnectionRelationshipPropertyWhereFields({ + inputTypeComposer, + relationshipAdapter, }: { - connectionFields: ConnectionField[]; - schemaComposer: SchemaComposer; - composeNode: ObjectTypeComposer | InterfaceTypeComposer; - sourceName: string; - nodes: Node[]; - relationshipPropertyFields: Map; -}): Relationship[] { - const relationships: Relationship[] = []; - - const whereInput = schemaComposer.getITC(`${composeNode.getTypeName()}Where`); - - connectionFields.forEach((connectionField) => { - const relationship = schemaComposer.getOrCreateOTC(connectionField.relationshipTypeName, (tc) => { - tc.addFields({ - cursor: "String!", - node: `${connectionField.relationship.typeMeta.name}!`, - }); - }); - const deprecatedDirectives = graphqlDirectivesToCompose( - connectionField.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) - ); - - const connectionWhereName = `${connectionField.typeMeta.name}Where`; - - const connectionWhere = schemaComposer.getOrCreateITC(connectionWhereName); - - if (!connectionField.relationship.union) { - connectionWhere.addFields({ - AND: `[${connectionWhereName}!]`, - OR: `[${connectionWhereName}!]`, - NOT: connectionWhereName, - }); - } - - const connection = schemaComposer.getOrCreateOTC(connectionField.typeMeta.name, (tc) => { - tc.addFields({ - edges: relationship.NonNull.List.NonNull, - totalCount: "Int!", - pageInfo: "PageInfo!", - }); - }); - - if (connectionField.relationship.properties && !connectionField.relationship.union) { - const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); - relationship.addInterface(propertiesInterface); - relationship.addFields(propertiesInterface.getFields()); - - connectionWhere.addFields({ - edge: `${connectionField.relationship.properties}Where`, - edge_NOT: { - type: `${connectionField.relationship.properties}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - if (connectionField.relationship.filterableOptions.byValue) { - whereInput.addFields({ - [connectionField.fieldName]: connectionWhere, - [`${connectionField.fieldName}_NOT`]: { - type: connectionWhere, - }, - }); - } - - // n..m Relationships - if (connectionField.relationship.typeMeta.array && connectionField.relationship.filterableOptions.byValue) { - addRelationshipArrayFilters({ - whereInput, - fieldName: connectionField.fieldName, - sourceName: sourceName, - relatedType: connectionField.typeMeta.name, - whereType: connectionWhere, - directives: deprecatedDirectives, - }); - } - - const composeNodeBaseArgs: { - where: any; - sort?: any; - first?: any; - after?: any; - } = { - where: connectionWhere, - first: { - type: "Int", + inputTypeComposer: InputTypeComposer; + relationshipAdapter: RelationshipAdapter; +}): void { + if (relationshipAdapter.propertiesTypeName) { + inputTypeComposer.addFields({ + edge: relationshipAdapter.operations.whereInputTypeName, + edge_NOT: { + type: relationshipAdapter.operations.whereInputTypeName, + directives: [DEPRECATE_NOT], }, - after: { - type: "String", - }, - }; - - const composeNodeArgs = addDirectedArgument(composeNodeBaseArgs, connectionField.relationship); - - if (connectionField.relationship.properties) { - const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); - connectionSort.addFields({ - edge: `${connectionField.relationship.properties}Sort`, - }); - composeNodeArgs.sort = connectionSort.NonNull.List; - } - - if (connectionField.relationship.interface) { - connectionWhere.addFields({ - OR: connectionWhere.NonNull.List, - AND: connectionWhere.NonNull.List, - NOT: connectionWhereName, - node: `${connectionField.relationship.typeMeta.name}Where`, - node_NOT: { - type: `${connectionField.relationship.typeMeta.name}Where`, - directives: [DEPRECATE_NOT], - }, - }); - - if (schemaComposer.has(`${connectionField.relationship.typeMeta.name}Sort`)) { - const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); - connectionSort.addFields({ - node: `${connectionField.relationship.typeMeta.name}Sort`, - }); - if (!composeNodeArgs.sort) { - composeNodeArgs.sort = connectionSort.NonNull.List; - } - } - - if (connectionField.relationship.properties) { - const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); - relationship.addInterface(propertiesInterface); - relationship.addFields(propertiesInterface.getFields()); - - connectionWhere.addFields({ - edge: `${connectionField.relationship.properties}Where`, - edge_NOT: { - type: `${connectionField.relationship.properties}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - } else if (connectionField.relationship.union) { - const relatedNodes = nodes.filter((n) => connectionField.relationship.union?.nodes?.includes(n.name)); - - relatedNodes.forEach((n) => { - const connectionName = connectionField.typeMeta.name; - - // Append union member name before "ConnectionWhere" - const unionWhereName = `${connectionName.substring(0, connectionName.length - "Connection".length)}${ - n.name - }ConnectionWhere`; - - const unionWhere = schemaComposer.createInputTC({ - name: unionWhereName, - fields: { - OR: `[${unionWhereName}!]`, - AND: `[${unionWhereName}!]`, - NOT: unionWhereName, - }, - }); - - unionWhere.addFields({ - node: `${n.name}Where`, - node_NOT: { - type: `${n.name}Where`, - directives: [DEPRECATE_NOT], - }, - }); - - if (connectionField.relationship.properties) { - const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); - relationship.addInterface(propertiesInterface); - relationship.addFields(propertiesInterface.getFields()); - - unionWhere.addFields({ - edge: `${connectionField.relationship.properties}Where`, - edge_NOT: { - type: `${connectionField.relationship.properties}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - - connectionWhere.addFields({ - [n.name]: unionWhere, - }); - }); - } else { - const relatedNode = nodes.find((n) => n.name === connectionField.relationship.typeMeta.name) as Node; - - connectionWhere.addFields({ - node: `${connectionField.relationship.typeMeta.name}Where`, - node_NOT: { - type: `${connectionField.relationship.typeMeta.name}Where`, - directives: [DEPRECATE_NOT], - }, - }); - - if (getSortableFields(relatedNode).length) { - const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); - connectionSort.addFields({ - node: `${connectionField.relationship.typeMeta.name}Sort`, - }); - if (!composeNodeArgs.sort) { - composeNodeArgs.sort = connectionSort.NonNull.List; - } - } - } + }); + } +} - if (!connectionField.relationship.writeonly && connectionField.selectableOptions.onRead) { - const deprecatedDirectives = graphqlDirectivesToCompose( - connectionField.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) - ); - composeNode.addFields({ - [connectionField.fieldName]: { - type: connection.NonNull, - args: composeNodeArgs, - directives: deprecatedDirectives, - resolve: (source, args: ConnectionQueryArgs, _ctx, info: GraphQLResolveInfo) => { - return connectionFieldResolver({ - connectionField, - args, - info, - source, - }); - }, - }, - }); - } +function addConnectionSortField({ + schemaComposer, + relationshipAdapter, + targetEntityAdapter, + composeNodeArgs, +}: { + schemaComposer: SchemaComposer; + relationshipAdapter: RelationshipAdapter; + targetEntityAdapter: InterfaceEntityAdapter | ConcreteEntityAdapter; + composeNodeArgs: ObjectTypeComposerArgumentConfigMapDefinition; +}): void { + const connectionSortITC = schemaComposer.getOrCreateITC(relationshipAdapter.operations.connectionSortInputTypename); + + connectionSortITC.addFields({ + node: targetEntityAdapter.operations.sortInputTypeName, + }); + // TODO: check why this was in an if statement + // if (composeNodeArgs.sort) { + composeNodeArgs.sort = connectionSortITC.NonNull.List; + // } +} - const relFields = connectionField.relationship.properties - ? relationshipPropertyFields.get(connectionField.relationship.properties) - : ({} as ObjectFields | undefined); +function addConnectionWhereFilterFields({ + inputTypeComposer, + whereInputTypeName, +}: { + inputTypeComposer: InputTypeComposer; + whereInputTypeName: string; +}): void { + inputTypeComposer.addFields({ + OR: inputTypeComposer.NonNull.List, + AND: inputTypeComposer.NonNull.List, + NOT: inputTypeComposer, + node: whereInputTypeName, + node_NOT: { + type: whereInputTypeName, + directives: [DEPRECATE_NOT], + }, + }); +} - const r = new Relationship({ - name: connectionField.relationshipTypeName, - type: connectionField.relationship.type, - properties: connectionField.relationship.properties, - ...(relFields - ? { - temporalFields: relFields.temporalFields, - scalarFields: relFields.scalarFields, - primitiveFields: relFields.primitiveFields, - enumFields: relFields.enumFields, - pointFields: relFields.pointFields, - customResolverFields: relFields.customResolverFields, - } - : {}), - }); - relationships.push(r); +function addConnectionWhereFields({ + inputTypeComposer, + relationshipAdapter, + targetEntity, +}: { + inputTypeComposer: InputTypeComposer; + relationshipAdapter: RelationshipAdapter; + targetEntity: ConcreteEntityAdapter | InterfaceEntityAdapter; +}): void { + addConnectionWhereFilterFields({ + inputTypeComposer, + whereInputTypeName: targetEntity.operations.whereInputTypeName, }); - return relationships; + addConnectionRelationshipPropertyWhereFields({ + inputTypeComposer, + relationshipAdapter, + }); } -export default createConnectionFields; - -export function createConnectionFields2({ +export function createConnectionFields({ entityAdapter, schemaComposer, composeNode, @@ -310,216 +135,125 @@ export function createConnectionFields2({ const relationships: Relationship[] = []; entityAdapter.relationships.forEach((relationship) => { + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(relationship.name); + const deprecatedDirectives = graphqlDirectivesToCompose( + (userDefinedDirectivesOnField || []).filter((directive) => directive.name.value === DEPRECATED) + ); + + const connectionWhereITC = schemaComposer.getOrCreateITC(relationship.operations.connectionWhereInputTypename); + const relationshipObjectType = schemaComposer.getOrCreateOTC( relationship.operations.relationshipFieldTypename, (tc) => { tc.addFields({ - cursor: "String!", + cursor: new GraphQLNonNull(GraphQLString), node: `${relationship.target.name}!`, }); } ); - const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(relationship.name); - const deprecatedDirectives = graphqlDirectivesToCompose( - (userDefinedDirectivesOnField || []).filter((directive) => directive.name.value === DEPRECATED) - ); - - const connectionWhereName = `${relationship.operations.connectionFieldTypename}Where`; - const connectionWhere = schemaComposer.getOrCreateITC(connectionWhereName); - - // if (!connectionField.relationship.union) { - const relatedEntityIsUnionEntity = relationship.target instanceof UnionEntityAdapter; - if (!relatedEntityIsUnionEntity) { - connectionWhere.addFields({ - AND: `[${connectionWhereName}!]`, - OR: `[${connectionWhereName}!]`, - NOT: connectionWhereName, - }); - } - const connection = schemaComposer.getOrCreateOTC(relationship.operations.connectionFieldTypename, (tc) => { tc.addFields({ edges: relationshipObjectType.NonNull.List.NonNull, - totalCount: "Int!", - pageInfo: "PageInfo!", + totalCount: new GraphQLNonNull(GraphQLInt), + pageInfo: new GraphQLNonNull(PageInfo), }); }); - if (relationship.propertiesTypeName && !relatedEntityIsUnionEntity) { + if (relationship.propertiesTypeName) { const propertiesInterface = schemaComposer.getIFTC(relationship.propertiesTypeName); relationshipObjectType.addInterface(propertiesInterface); relationshipObjectType.addFields(propertiesInterface.getFields()); - - connectionWhere.addFields({ - edge: `${relationship.propertiesTypeName}Where`, - edge_NOT: { - type: `${relationship.propertiesTypeName}Where`, - directives: [DEPRECATE_NOT], - }, - }); } - const whereInput = schemaComposer.getITC(`${composeNode.getTypeName()}Where`); if (relationship.isFilterableByValue()) { - whereInput.addFields({ - [relationship.operations.connectionFieldName]: connectionWhere, - [`${relationship.operations.connectionFieldName}_NOT`]: { - type: connectionWhere, + const whereInputITC = schemaComposer.getITC(entityAdapter.operations.whereInputTypeName); + whereInputITC.addFields({ + [relationship.operations.connectionFieldName]: connectionWhereITC, + [relationship.operations.connectionNotFieldName]: { + type: connectionWhereITC, }, }); - } - // n..m Relationships - if (relationship.isList && relationship.isFilterableByValue()) { - addRelationshipArrayFilters({ - whereInput, - fieldName: relationship.operations.connectionFieldName, - sourceName: entityAdapter.name, - relatedType: relationship.operations.connectionFieldTypename, - whereType: connectionWhere, - directives: deprecatedDirectives, - }); + // n..m Relationships + if (relationship.isList) { + addRelationshipArrayFilters({ + whereInput: whereInputITC, + fieldName: relationship.operations.connectionFieldName, + sourceName: entityAdapter.name, + relatedType: relationship.operations.connectionFieldTypename, + whereType: connectionWhereITC, + directives: deprecatedDirectives, + }); + } } - const composeNodeBaseArgs: { - where: any; - sort?: any; - first?: any; - after?: any; - } = { - where: connectionWhere, - first: { - type: "Int", - }, - after: { - type: "String", + const composeNodeArgs = addDirectedArgument2( + { + where: connectionWhereITC, + first: { + type: GraphQLInt, + }, + after: { + type: GraphQLString, + }, }, - }; + relationship + ); - const composeNodeArgs = addDirectedArgument2(composeNodeBaseArgs, relationship); + const relatedEntityIsUnionEntity = relationship.target instanceof UnionEntityAdapter; + if (relatedEntityIsUnionEntity) { + relationship.target.concreteEntities.forEach((concreteEntity) => { + const unionWhereName = relationship.operations.getConnectionUnionWhereInputTypename(concreteEntity); + const unionWhereITC = schemaComposer.getOrCreateITC(unionWhereName); + + addConnectionWhereFields({ + inputTypeComposer: unionWhereITC, + relationshipAdapter: relationship, + targetEntity: concreteEntity, + }); - // TODO: revert this back to commented version if we want relationship properties sortable fields to be all attributes - // if (relationship.propertiesTypeName) { - if (relationship.propertiesTypeName && relationship.sortableFields.length) { - const connectionSort = schemaComposer.getOrCreateITC( - `${relationship.operations.connectionFieldTypename}Sort` - ); - connectionSort.addFields({ - edge: `${relationship.propertiesTypeName}Sort`, + connectionWhereITC.addFields({ + [concreteEntity.name]: unionWhereITC, + }); }); - composeNodeArgs.sort = connectionSort.NonNull.List; - } - - const relatedEntityIsInterfaceEntity = relationship.target instanceof InterfaceEntityAdapter; - if (relatedEntityIsInterfaceEntity) { - connectionWhere.addFields({ - OR: connectionWhere.NonNull.List, - AND: connectionWhere.NonNull.List, - NOT: connectionWhereName, - node: `${relationship.target.name}Where`, - node_NOT: { - type: `${relationship.target.name}Where`, - directives: [DEPRECATE_NOT], - }, + } else { + addConnectionWhereFields({ + inputTypeComposer: connectionWhereITC, + relationshipAdapter: relationship, + targetEntity: relationship.target, }); - if (schemaComposer.has(`${relationship.target.name}Sort`)) { - const connectionSort = schemaComposer.getOrCreateITC( - `${relationship.operations.connectionFieldTypename}Sort` - ); - connectionSort.addFields({ - node: `${relationship.target.name}Sort`, - }); - if (!composeNodeArgs.sort) { - composeNodeArgs.sort = connectionSort.NonNull.List; - } - } + // TODO: Check if we can combine these checks into one property + const targetIsInterfaceWithSortableFields = + relationship.target instanceof InterfaceEntityAdapter && + schemaComposer.has(relationship.target.operations.sortInputTypeName); - if (relationship.propertiesTypeName) { - const propertiesInterface = schemaComposer.getIFTC(relationship.propertiesTypeName); - relationshipObjectType.addInterface(propertiesInterface); - relationshipObjectType.addFields(propertiesInterface.getFields()); + const targetIsConcreteWithSortableFields = + relationship.target instanceof ConcreteEntityAdapter && relationship.target.sortableFields.length; - connectionWhere.addFields({ - edge: `${relationship.propertiesTypeName}Where`, - edge_NOT: { - type: `${relationship.propertiesTypeName}Where`, - directives: [DEPRECATE_NOT], - }, + if (targetIsInterfaceWithSortableFields || targetIsConcreteWithSortableFields) { + addConnectionSortField({ + schemaComposer, + relationshipAdapter: relationship, + composeNodeArgs, + targetEntityAdapter: relationship.target, }); } - } else if (relatedEntityIsUnionEntity) { - // const relatedNodes = nodes.filter((n) => connectionField.relationship.union?.nodes?.includes(n.name)); - - relationship.target.concreteEntities.forEach((n) => { - const connectionName = relationship.operations.connectionFieldTypename; - - // Append union member name before "ConnectionWhere" - const unionWhereName = `${connectionName.substring(0, connectionName.length - "Connection".length)}${ - n.name - }ConnectionWhere`; - - const unionWhere = schemaComposer.createInputTC({ - name: unionWhereName, - fields: { - OR: `[${unionWhereName}!]`, - AND: `[${unionWhereName}!]`, - NOT: unionWhereName, - }, - }); - - unionWhere.addFields({ - node: `${n.name}Where`, - node_NOT: { - type: `${n.name}Where`, - directives: [DEPRECATE_NOT], - }, - }); - - if (relationship.propertiesTypeName) { - const propertiesInterface = schemaComposer.getIFTC(relationship.propertiesTypeName); - relationshipObjectType.addInterface(propertiesInterface); - relationshipObjectType.addFields(propertiesInterface.getFields()); - - unionWhere.addFields({ - edge: `${relationship.propertiesTypeName}Where`, - edge_NOT: { - type: `${relationship.propertiesTypeName}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - - connectionWhere.addFields({ - [n.name]: unionWhere, - }); - }); - } else { - // const relatedNode = nodes.find((n) => n.name === connectionField.relationship.typeMeta.name) as Node; + } - connectionWhere.addFields({ - node: `${relationship.target.name}Where`, - node_NOT: { - type: `${relationship.target.name}Where`, - directives: [DEPRECATE_NOT], - }, + // TODO: revert this back to commented version if we want relationship properties sortable fields to be all attributes + // if (relationship.propertiesTypeName) { + // TODO: Feels like this could be done in addConnectionSortField too + if (relationship.propertiesTypeName && relationship.sortableFields.length) { + const connectionSort = schemaComposer.getOrCreateITC(relationship.operations.connectionSortInputTypename); + connectionSort.addFields({ + edge: relationship.operations.sortInputTypeName, }); - - if (relationship.target.sortableFields.length) { - const connectionSort = schemaComposer.getOrCreateITC( - `${relationship.operations.connectionFieldTypename}Sort` - ); - connectionSort.addFields({ - node: `${relationship.target.name}Sort`, - }); - if (!composeNodeArgs.sort) { - composeNodeArgs.sort = connectionSort.NonNull.List; - } - } + composeNodeArgs.sort = connectionSort.NonNull.List; } - // if (!connectionField.relationship.writeonly && connectionField.selectableOptions.onRead) { + // This needs to be done after the composeNodeArgs.sort is set (through addConnectionSortField for example) if (relationship.isReadable()) { composeNode.addFields({ [relationship.operations.connectionFieldName]: { @@ -538,9 +272,9 @@ export function createConnectionFields2({ }); } - const relFields = relationship.propertiesTypeName + const relFields: ObjectFields | undefined = relationship.propertiesTypeName ? relationshipFields.get(relationship.propertiesTypeName) - : ({} as ObjectFields | undefined); + : undefined; const r = new Relationship({ name: relationship.operations.relationshipFieldTypename, diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 74ed19703b..0b845e057d 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -36,7 +36,7 @@ import * as Scalars from "../graphql/scalars"; import { upperFirst } from "../utils/upper-first"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; import { augmentFulltextSchema } from "./augment/fulltext"; -import createConnectionFields from "./create-connection-fields"; +import createConnectionFields from "./create-connection-fields-old"; import { ensureNonEmptyInput } from "./ensure-non-empty-input"; import getCustomResolvers from "./get-custom-resolvers"; import { getDefinitionNodes } from "./get-definition-nodes"; diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index abf236acdf..00888a0f30 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -86,7 +86,7 @@ import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionE import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { CypherField, Neo4jFeaturesSettings } from "../types"; import { isInArray } from "../utils/is-in-array"; -import { createConnectionFields2 } from "./create-connection-fields"; +import { createConnectionFields } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; import { createRelationshipFieldsFromConcreteEntityAdapter } from "./create-relationship-fields/create-relationship-fields"; import { deprecationMap } from "./deprecation-map"; @@ -665,13 +665,6 @@ function makeAugmentedSchema( propagatedDirectives ); - const composeNode = withObjectType({ - concreteEntityAdapter, - userDefinedFieldDirectives, - userDefinedObjectDirectives, - composer, - }); - withOptionsInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); withAggregateSelectionType({ concreteEntityAdapter, aggregationTypesMapper, propagatedDirectives, composer }); @@ -701,6 +694,13 @@ function makeAugmentedSchema( // subgraph, // }); + const composeNode = withObjectType({ + concreteEntityAdapter, + userDefinedFieldDirectives, + userDefinedObjectDirectives, + composer, + }); + createRelationshipFieldsFromConcreteEntityAdapter({ entityAdapter: concreteEntityAdapter, schemaComposer: composer, @@ -723,7 +723,7 @@ function makeAugmentedSchema( relationships = [ ...relationships, - ...createConnectionFields2({ + ...createConnectionFields({ entityAdapter: concreteEntityAdapter, schemaComposer: composer, composeNode, @@ -1122,7 +1122,7 @@ function doForInterfacesThatAreTargetOfARelationship({ relationships = [ ...relationships, - ...createConnectionFields2({ + ...createConnectionFields({ entityAdapter: interfaceEntityAdapter, schemaComposer: composer, composeNode: composeInterface, From 01e6c4c82da7b52c19ffe2fe31b88d0a0de91023 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 21 Sep 2023 13:05:35 +0200 Subject: [PATCH 113/162] refactor: use input type composer NonNull.List in where-input --- .../graphql/src/schema/generation/where-input.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index 823d01d33d..411a72c3d4 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -42,18 +42,18 @@ export function withWhereInputType({ if (entityAdapter instanceof ConcreteEntityAdapter) { whereInputType.addFields({ - OR: `[${entityAdapter.operations.whereInputTypeName}!]`, - AND: `[${entityAdapter.operations.whereInputTypeName}!]`, - NOT: entityAdapter.operations.whereInputTypeName, + OR: whereInputType.NonNull.List, + AND: whereInputType.NonNull.List, + NOT: whereInputType, }); if (entityAdapter.isGlobalNode()) { whereInputType.addFields({ id: GraphQLID }); } } else if (entityAdapter instanceof RelationshipAdapter) { whereInputType.addFields({ - OR: `[${entityAdapter.operations.whereInputTypeName}!]`, - AND: `[${entityAdapter.operations.whereInputTypeName}!]`, - NOT: entityAdapter.operations.whereInputTypeName, + OR: whereInputType.NonNull.List, + AND: whereInputType.NonNull.List, + NOT: whereInputType, }); } else if (entityAdapter instanceof InterfaceEntityAdapter) { const implementationsWhereInputType = makeImplementationsWhereInput({ From 06ddcbfd63ffe883c40195143ec8f55f3dc29883 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 21 Sep 2023 13:24:29 +0200 Subject: [PATCH 114/162] refactor: replace strings in root-connection --- .../schema/resolvers/query/root-connection.ts | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/packages/graphql/src/schema/resolvers/query/root-connection.ts b/packages/graphql/src/schema/resolvers/query/root-connection.ts index 152f39e49c..b6369a1a23 100644 --- a/packages/graphql/src/schema/resolvers/query/root-connection.ts +++ b/packages/graphql/src/schema/resolvers/query/root-connection.ts @@ -17,11 +17,19 @@ * limitations under the License. */ -import type { DirectiveNode, GraphQLResolveInfo, SelectionSetNode } from "graphql"; +import { + GraphQLInt, + GraphQLNonNull, + GraphQLString, + type DirectiveNode, + type GraphQLResolveInfo, + type SelectionSetNode, +} from "graphql"; import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; import { upperFirst } from "graphql-compose"; -import type { PageInfo } from "graphql-relay"; +import type { PageInfo as PageInfoRelay } from "graphql-relay"; import type { Node } from "../../../classes"; +import { PageInfo } from "../../../graphql/objects/PageInfo"; import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { translateRead } from "../../../translate"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; @@ -60,7 +68,7 @@ export function rootConnectionResolver({ node, composer }: { node: Node; compose let totalCount = 0; let edges: any[] = []; - let pageInfo: PageInfo = { + let pageInfo: PageInfoRelay = { hasNextPage: false, hasPreviousPage: false, startCursor: null, @@ -80,7 +88,7 @@ export function rootConnectionResolver({ node, composer }: { node: Node; compose }); edges = connection.edges as any[]; - pageInfo = connection.pageInfo as PageInfo; + pageInfo = connection.pageInfo as PageInfoRelay; } return { @@ -174,7 +182,7 @@ export function rootConnectionResolver2({ let totalCount = 0; let edges: any[] = []; - let pageInfo: PageInfo = { + let pageInfo: PageInfoRelay = { hasNextPage: false, hasPreviousPage: false, startCursor: null, @@ -195,7 +203,7 @@ export function rootConnectionResolver2({ // TODO: Question why are these not taking into account the potential aliases? edges = connection.edges as any[]; - pageInfo = connection.pageInfo as PageInfo; + pageInfo = connection.pageInfo as PageInfoRelay; } return { @@ -208,7 +216,7 @@ export function rootConnectionResolver2({ const rootEdge = composer.createObjectTC({ name: `${concreteEntityAdapter.name}Edge`, fields: { - cursor: "String!", + cursor: new GraphQLNonNull(GraphQLString), node: `${concreteEntityAdapter.name}!`, }, directives: graphqlDirectivesToCompose(propagatedDirectives), @@ -217,31 +225,31 @@ export function rootConnectionResolver2({ const rootConnection = composer.createObjectTC({ name: `${concreteEntityAdapter.upperFirstPlural}Connection`, fields: { - totalCount: "Int!", - pageInfo: "PageInfo!", + totalCount: new GraphQLNonNull(GraphQLInt), + pageInfo: new GraphQLNonNull(PageInfo), edges: rootEdge.NonNull.List.NonNull, }, directives: graphqlDirectivesToCompose(propagatedDirectives), }); // since sort is not created when there is nothing to sort, we check for its existence - let sortArg: InputTypeComposer | undefined; - if (composer.has(`${concreteEntityAdapter.name}Sort`)) { - sortArg = composer.getITC(`${concreteEntityAdapter.name}Sort`); + let sortArg: InputTypeComposer | undefined; + if (composer.has(concreteEntityAdapter.operations.sortInputTypeName)) { + sortArg = composer.getITC(concreteEntityAdapter.operations.sortInputTypeName); } return { type: rootConnection.NonNull, resolve, args: { - first: "Int", - after: "String", - where: `${concreteEntityAdapter.name}Where`, + first: GraphQLInt, + after: GraphQLString, + where: concreteEntityAdapter.operations.whereInputTypeName, ...(sortArg ? { sort: sortArg.List } : {}), ...(concreteEntityAdapter.annotations.fulltext ? { fulltext: { - type: `${concreteEntityAdapter.name}Fulltext`, + type: concreteEntityAdapter.operations.fullTextInputTypeName, description: "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", }, From c45c0d01b800ebb7fe86ad4f7d656b90c38069e9 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 21 Sep 2023 13:41:19 +0200 Subject: [PATCH 115/162] refactor: use concreteEntityAdapter with fulltext resolver --- .../graphql/src/schema/augment/fulltext.ts | 22 ++++++-- .../src/schema/resolvers/query/fulltext.ts | 50 +++++++++++++++++-- 2 files changed, 62 insertions(+), 10 deletions(-) diff --git a/packages/graphql/src/schema/augment/fulltext.ts b/packages/graphql/src/schema/augment/fulltext.ts index 0c471ff91d..2c559a482a 100644 --- a/packages/graphql/src/schema/augment/fulltext.ts +++ b/packages/graphql/src/schema/augment/fulltext.ts @@ -17,7 +17,7 @@ * limitations under the License. */ -import { GraphQLFloat, GraphQLNonNull, GraphQLString } from "graphql"; +import { GraphQLFloat, GraphQLInt, GraphQLNonNull, GraphQLString } from "graphql"; import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; import { SCORE_FIELD } from "../../graphql/directives/fulltext"; @@ -25,7 +25,7 @@ import { SortDirection } from "../../graphql/enums/SortDirection"; import { FloatWhere } from "../../graphql/input-objects/FloatWhere"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { upperFirst } from "../../utils/upper-first"; -import { fulltextResolver } from "../resolvers/query/fulltext"; +import { fulltextResolver, fulltextResolver2 } from "../resolvers/query/fulltext"; export function augmentFulltextSchema( node: Node, @@ -140,7 +140,7 @@ export function augmentFulltextSchema2( fields, }); - composer.createInputTC({ + const fulltextSortITC = composer.createInputTC({ name: concreteEntityAdapter.operations.fulltextTypeNames.sort, description: fulltextSortDescription, fields: { @@ -158,7 +158,7 @@ export function augmentFulltextSchema2( }, }); - composer.createObjectTC({ + const fulltextResultITC = composer.createObjectTC({ name: concreteEntityAdapter.operations.fulltextTypeNames.result, description: fulltextResultDescription, fields: { @@ -190,7 +190,19 @@ export function augmentFulltextSchema2( throw new Error(`Could not find index ${indexName} on node ${node.name}`); } composer.Query.addFields({ - [queryName]: fulltextResolver({ node }, nodeIndex), + [queryName]: { + type: fulltextResultITC.NonNull.List.NonNull, + description: + "Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the `fulltext` argument under other queries for this functionality.", + resolve: fulltextResolver2({ node, index: nodeIndex }), + args: { + phrase: new GraphQLNonNull(GraphQLString), + where: concreteEntityAdapter.operations.fulltextTypeNames.where, + sort: fulltextSortITC.NonNull.List, + limit: GraphQLInt, + offset: GraphQLInt, + }, + }, }); }); } diff --git a/packages/graphql/src/schema/resolvers/query/fulltext.ts b/packages/graphql/src/schema/resolvers/query/fulltext.ts index 3297e7da7a..27856d078d 100644 --- a/packages/graphql/src/schema/resolvers/query/fulltext.ts +++ b/packages/graphql/src/schema/resolvers/query/fulltext.ts @@ -17,16 +17,16 @@ * limitations under the License. */ +import Cypher from "@neo4j/cypher-builder"; +import type { GraphQLFieldResolver, GraphQLResolveInfo } from "graphql"; import type { ObjectTypeComposerFieldConfigDefinition } from "graphql-compose"; -import type { GraphQLResolveInfo } from "graphql"; -import { execute } from "../../../utils"; -import { translateRead } from "../../../translate"; import type { Node } from "../../../classes"; +import { translateRead } from "../../../translate"; import type { FulltextContext } from "../../../types"; -import Cypher from "@neo4j/cypher-builder"; -import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; +import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; +import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; export function fulltextResolver( { node }: { node: Node }, @@ -73,3 +73,43 @@ export function fulltextResolver( }, }; } + +export function fulltextResolver2({ + node, + index, +}: { + node: Node; + index: FulltextContext; +}): GraphQLFieldResolver { + return async function resolve( + _root: any, + args: any, + context: Neo4jGraphQLComposedContext, + info: GraphQLResolveInfo + ) { + context.fulltext = index; + context.fulltext.scoreVariable = new Cypher.Variable(); + + const resolveTree = getNeo4jResolveTree(info, { args }); + resolveTree.args.options = { + sort: resolveTree.args.sort, + limit: resolveTree.args.limit, + offset: resolveTree.args.offset, + }; + + (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; + + const { cypher, params } = translateRead( + { context: context as Neo4jGraphQLTranslationContext, node }, + node.singular + ); + const executeResult = await execute({ + cypher, + params, + defaultAccessMode: "READ", + context, + info, + }); + return executeResult.records; + }; +} From 04233c748509a12c3ee0fcde6b854af94720967b Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 21 Sep 2023 13:45:13 +0200 Subject: [PATCH 116/162] refactor: use operations to get input type names --- packages/graphql/src/schema/new-make-augmented-schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 00888a0f30..4906a2718e 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -1135,8 +1135,8 @@ function doForInterfacesThatAreTargetOfARelationship({ withConnectInputType({ interfaceEntityAdapter, composer }); withDisconnectInputType({ interfaceEntityAdapter, composer }); - ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); - ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); + ensureNonEmptyInput(composer, interfaceEntityAdapter.operations.createInputTypeName); + ensureNonEmptyInput(composer, interfaceEntityAdapter.operations.updateInputTypeName); return relationships; } From dc2e77e7ed14254599dc7be7e1c8d3141f70aa9f Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 21 Sep 2023 13:53:31 +0200 Subject: [PATCH 117/162] refactor: use GraphQL library constants --- .../graphql/src/schema/new-make-augmented-schema.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 4906a2718e..0f8241933c 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -33,7 +33,7 @@ import type { ObjectTypeDefinitionNode, SchemaExtensionNode, } from "graphql"; -import { Kind, parse, print } from "graphql"; +import { GraphQLBoolean, GraphQLFloat, GraphQLID, GraphQLInt, GraphQLString, Kind, parse, print } from "graphql"; import type { ObjectTypeComposer } from "graphql-compose"; import { SchemaComposer } from "graphql-compose"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; @@ -1010,7 +1010,15 @@ function makeAugmentedSchema( ...parsedDoc.definitions.filter((definition) => { // Filter out default scalars, they are not needed and can cause issues if (definition.kind === Kind.SCALAR_TYPE_DEFINITION) { - if (["Boolean", "Float", "ID", "Int", "String"].includes(definition.name.value)) { + if ( + [ + GraphQLBoolean.toString(), + GraphQLFloat.toString(), + GraphQLID.toString(), + GraphQLInt.toString(), + GraphQLString.toString(), + ].includes(definition.name.value) + ) { return false; } } From 2f4773c3b7547d8b3865cc42e29ae80a1561beed Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 21 Sep 2023 14:16:37 +0200 Subject: [PATCH 118/162] refactor: add types to getResolveAndSubscriptionMethods --- .../get-resolve-and-subscription-methods.ts | 20 +++++++++++++------ .../src/schema/new-make-augmented-schema.ts | 3 ++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/graphql/src/schema/get-resolve-and-subscription-methods.ts b/packages/graphql/src/schema/get-resolve-and-subscription-methods.ts index bcd3d91e1c..4559412b9e 100644 --- a/packages/graphql/src/schema/get-resolve-and-subscription-methods.ts +++ b/packages/graphql/src/schema/get-resolve-and-subscription-methods.ts @@ -18,14 +18,22 @@ */ import type { SchemaComposer } from "graphql-compose"; +import type { GraphQLToolsResolveMethods } from "graphql-compose/lib/SchemaComposer"; -export function getResolveAndSubscriptionMethods(composer: SchemaComposer) { - const resolveMethods = composer.getResolveMethods(); +export function getResolveAndSubscriptionMethods(composer: SchemaComposer): GraphQLToolsResolveMethods { + const resolveMethods: GraphQLToolsResolveMethods = composer.getResolveMethods(); - const subscriptionMethods = Object.entries(composer.Subscription.getFields()).reduce((acc, [key, value]) => { - acc[key] = { subscribe: value.subscribe, resolve: value.resolve }; - return acc; - }, {}); + const subscriptionMethods = Object.entries(composer.Subscription.getFields()).reduce( + (acc: GraphQLToolsResolveMethods, [key, value]) => { + if (!value.subscribe || !value.resolve) { + return acc; + } + + acc[key] = { subscribe: value.subscribe, resolve: value.resolve }; + return acc; + }, + {} + ); return { ...resolveMethods, Subscription: subscriptionMethods, diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index 0f8241933c..8ab541371c 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -59,6 +59,7 @@ import getObjFieldMeta from "./get-obj-field-meta"; import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "./to-compose"; // GraphQL type imports +import type { GraphQLToolsResolveMethods } from "graphql-compose/lib/SchemaComposer"; import type { Subgraph } from "../classes/Subgraph"; import { FIELD_DIRECTIVES, INTERFACE_DIRECTIVES, OBJECT_DIRECTIVES, PROPAGATED_DIRECTIVES } from "../constants"; import { SortDirection } from "../graphql/enums/SortDirection"; @@ -955,7 +956,7 @@ function makeAugmentedSchema( const documentNames = new Set(parsedDoc.definitions.filter(definitionNodeHasName).map((x) => x.name.value)); const resolveMethods = getResolveAndSubscriptionMethods(composer); - const generatedResolveMethods: Record = {}; + const generatedResolveMethods: GraphQLToolsResolveMethods = {}; for (const [key, value] of Object.entries(resolveMethods)) { if (documentNames.has(key)) { From d0ddb9a1623267a6b27a46e7e877d20ac36913c4 Mon Sep 17 00:00:00 2001 From: a-alle Date: Thu, 21 Sep 2023 18:18:50 +0100 Subject: [PATCH 119/162] refactors all relationships into type-creating functions --- .../ConcreteEntityOperations.ts | 13 +- .../InterfaceEntityOperations.ts | 10 +- .../model-adapters/UnionEntityAdapter.ts | 18 + .../model-adapters/RelationshipAdapter.ts | 53 +- .../model-adapters/RelationshipOperations.ts | 115 +- .../field-aggregation-composer.ts | 3 +- .../create-connect-or-create-field.ts | 60 +- .../create-relationship-fields.ts | 447 +----- .../create-relationship-interface-fields.ts | 222 +-- .../create-relationship-union-fields.ts | 433 +----- .../src/schema/generation/aggregate-types.ts | 158 +- .../generation/augment-object-or-interface.ts | 54 + .../schema/generation/augment-where-input.ts | 71 + .../src/schema/generation/connect-input.ts | 122 +- .../src/schema/generation/create-input.ts | 1310 ++++++++++++++++- .../src/schema/generation/delete-input.ts | 123 +- .../src/schema/generation/disconnect-input.ts | 122 +- .../generation/implementation-inputs.ts | 2 + .../src/schema/generation/update-input.ts | 123 +- .../src/schema/generation/where-input.ts | 56 +- .../src/schema/new-make-augmented-schema.ts | 10 +- 21 files changed, 2461 insertions(+), 1064 deletions(-) create mode 100644 packages/graphql/src/schema/generation/augment-object-or-interface.ts create mode 100644 packages/graphql/src/schema/generation/augment-where-input.ts diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts index 10da7a1d5c..f9de40734e 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts @@ -96,6 +96,9 @@ export class ConcreteEntityOperations { public get connectOrCreateWhereInputTypeName(): string { return `${this.concreteEntityAdapter.name}ConnectOrCreateWhere`; } + public get connectWhereInputTypeName(): string { + return `${this.concreteEntityAdapter.name}ConnectWhere`; + } public get createInputTypeName(): string { return `${this.concreteEntityAdapter.name}CreateInput`; @@ -137,6 +140,10 @@ export class ConcreteEntityOperations { return `${this.concreteEntityAdapter.name}ConnectInput`; } + public get connectOrCreateInputTypeName(): string { + return `${this.concreteEntityAdapter.name}ConnectOrCreateInput`; + } + public get disconnectInputTypeName(): string { return `${this.concreteEntityAdapter.name}DisconnectInput`; } @@ -226,12 +233,12 @@ export class ConcreteEntityOperations { public get updateMutationArgumentNames(): UpdateMutationArgumentNames { return { - connect: `${this.concreteEntityAdapter.name}ConnectInput`, - disconnect: `${this.concreteEntityAdapter.name}DisconnectInput`, + connect: this.connectInputTypeName, + disconnect: this.disconnectInputTypeName, create: this.relationInputTypeName, update: this.updateInputTypeName, delete: this.deleteInputTypeName, - connectOrCreate: `${this.concreteEntityAdapter.name}ConnectOrCreateInput`, + connectOrCreate: this.connectOrCreateInputTypeName, where: this.whereInputTypeName, }; } diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts index 5deb6f2d64..be896ff4ec 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityOperations.ts @@ -101,6 +101,10 @@ export class InterfaceEntityOperations { return `${this.InterfaceEntityAdapter.name}ConnectOrCreateWhere`; } + public get connectWhereInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ConnectWhere`; + } + public get createInputTypeName(): string { return `${this.InterfaceEntityAdapter.name}CreateInput`; } @@ -141,6 +145,10 @@ export class InterfaceEntityOperations { return `${this.InterfaceEntityAdapter.name}ConnectInput`; } + public get connectOrCreateInputTypeName(): string { + return `${this.InterfaceEntityAdapter.name}ConnectOrCreateInput`; + } + public get whereOnImplementationsConnectInputTypeName(): string { return `${this.InterfaceEntityAdapter.name}ImplementationsConnectInput`; } @@ -235,7 +243,7 @@ export class InterfaceEntityOperations { create: this.relationInputTypeName, update: this.updateInputTypeName, delete: this.deleteInputTypeName, - connectOrCreate: `${this.InterfaceEntityAdapter.name}ConnectOrCreateInput`, + connectOrCreate: this.connectOrCreateInputTypeName, where: this.whereInputTypeName, }; } diff --git a/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityAdapter.ts index 8e6ed91ad2..de7bc43176 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/UnionEntityAdapter.ts @@ -17,6 +17,7 @@ * limitations under the License. */ +import { plural, singular } from "../../utils/string-manipulation"; import type { ConcreteEntity } from "../ConcreteEntity"; import type { UnionEntity } from "../UnionEntity"; import { ConcreteEntityAdapter } from "./ConcreteEntityAdapter"; @@ -26,6 +27,9 @@ export class UnionEntityAdapter { public readonly name: string; public concreteEntities: ConcreteEntityAdapter[]; + private _singular: string | undefined; + private _plural: string | undefined; + // specialize models private _operations: UnionEntityOperations | undefined; @@ -48,4 +52,18 @@ export class UnionEntityAdapter { } return this._operations; } + + public get singular(): string { + if (!this._singular) { + this._singular = singular(this.name); + } + return this._singular; + } + + public get plural(): string { + if (!this._plural) { + this._plural = plural(this.name); + } + return this._plural; + } } 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 7b9bc8ea4f..ab472ee06f 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -31,6 +31,8 @@ import { InterfaceEntityAdapter } from "../../entity/model-adapters/InterfaceEnt import { UnionEntityAdapter } from "../../entity/model-adapters/UnionEntityAdapter"; import type { NestedOperation, QueryDirection, Relationship, RelationshipDirection } from "../Relationship"; import { RelationshipOperations } from "./RelationshipOperations"; +import { plural, singular } from "../../utils/string-manipulation"; +import { RelationshipNestedOperationsOption } from "../../../constants"; export class RelationshipAdapter { public readonly name: string; @@ -41,7 +43,7 @@ export class RelationshipAdapter { private _target: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | undefined; public readonly direction: RelationshipDirection; public readonly queryDirection: QueryDirection; - public readonly nestedOperations: NestedOperation[]; + public readonly nestedOperations: Set; public readonly aggregate: boolean; public readonly isNullable: boolean; public readonly description?: string; @@ -51,6 +53,9 @@ export class RelationshipAdapter { public readonly annotations: Partial; public readonly args: Argument[]; + private _singular: string | undefined; + private _plural: string | undefined; + // specialize models private _operations: RelationshipOperations | undefined; @@ -95,7 +100,7 @@ export class RelationshipAdapter { this.direction = direction; this.isList = isList; this.queryDirection = queryDirection; - this.nestedOperations = nestedOperations; + this.nestedOperations = new Set(nestedOperations); this.aggregate = aggregate; this.isNullable = isNullable; this.rawEntity = target; @@ -112,6 +117,19 @@ export class RelationshipAdapter { } return this._operations; } + public get singular(): string { + if (!this._singular) { + this._singular = singular(this.name); + } + return this._singular; + } + + public get plural(): string { + if (!this._plural) { + this._plural = plural(this.name); + } + return this._plural; + } /**Note: Required for now to infer the types without ResolveTree */ public getAggregationFieldTypename(nestedField?: "node" | "edge"): string { @@ -212,6 +230,37 @@ export class RelationshipAdapter { return this.annotations.settable?.onUpdate !== false; } + shouldGenerateFieldInputType(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): boolean { + let relationshipTarget = this.target; + if (ifUnionRelationshipTargetEntity) { + relationshipTarget = ifUnionRelationshipTargetEntity; + } + return ( + this.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || + this.nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || + // The connectOrCreate field is not generated if the related type does not have a unique field + (this.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + relationshipTarget instanceof ConcreteEntityAdapter && + relationshipTarget.uniqueFields.length > 0) + ); + } + + shouldGenerateUpdateFieldInputType(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): boolean { + let relationshipTarget = this.target; + if (ifUnionRelationshipTargetEntity) { + relationshipTarget = ifUnionRelationshipTargetEntity; + } + if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { + throw new Error("Expected target to be concrete."); + } + // If the only nestedOperation is connectOrCreate, it won't be generated if there are no unique fields on the related type + const onlyConnectOrCreateAndNoUniqueFields = + this.nestedOperations.size === 1 && + this.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && + !relationshipTarget.uniqueFields.length; + return this.nestedOperations.size > 0 && !onlyConnectOrCreateAndNoUniqueFields; + } + /* const nonGeneratedProperties = [ ...objectFields.primitiveFields.filter((field) => !field.autogenerate), diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts index 6d28cfc515..110ec8beb3 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts @@ -71,29 +71,50 @@ export class RelationshipOperations { return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}Relationship`; } - public get fieldInputTypeName(): string { - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}FieldInput`; + public getFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity?.name || "" + }FieldInput`; } - public get updateFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}UpdateFieldInput`; + public getToUnionFieldInputTypeName(ifUnionRelationshipTargetEntity: ConcreteEntityAdapter): string { + return `${this.relationshipEntityAdapter.source.name}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity.name + }FieldInput`; } - public get createFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}CreateFieldInput`; + public getUpdateFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity?.name || "" + }UpdateFieldInput`; } - public get deleteFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}DeleteFieldInput`; + public getCreateFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity?.name || "" + }CreateFieldInput`; } - public get connectFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectFieldInput`; + + public getDeleteFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity?.name || "" + }DeleteFieldInput`; } - public get disconnectFieldInputTypeName(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst( - this.relationshipEntityAdapter.name - )}DisconnectFieldInput`; + public getConnectFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity?.name || "" + }ConnectFieldInput`; + } + + public getDisconnectFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity?.name || "" + }DisconnectFieldInput`; + } + + public getConnectOrCreateInputTypeName(): string { + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectOrCreateInput`; } public getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter?: ConcreteEntityAdapter): string { @@ -116,13 +137,16 @@ export class RelationshipOperations { return `${this.relationshipEntityAdapter.name}Connection`; } - public get connectionWhereTypename(): string { - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectionWhere`; + public getConnectionWhereTypename(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { + return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity?.name || "" + }ConnectionWhere`; } - public get updateConnectionInputTypename(): string { - return `${this.fieldInputPrefixForTypename}${upperFirst( - this.relationshipEntityAdapter.name - )}UpdateConnectionInput`; + + public getUpdateConnectionInputTypename(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity?.name || "" + }UpdateConnectionInput`; } public get aggregateInputTypeName(): string { @@ -131,6 +155,10 @@ export class RelationshipOperations { )}AggregateInput`; } + public get aggregateTypeName(): string { + return `${this.relationshipEntityAdapter.name}Aggregate`; + } + public getAggregationWhereInputTypeName(isA: "Node" | "Edge"): string { return `${this.relationshipEntityAdapter.source.name}${upperFirst( this.relationshipEntityAdapter.name @@ -149,6 +177,48 @@ export class RelationshipOperations { }SubscriptionWhere`; } + public get unionConnectInputTypeName(): string { + return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( + this.relationshipEntityAdapter.name + )}ConnectInput`; + } + + public get unionDeleteInputTypeName(): string { + return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( + this.relationshipEntityAdapter.name + )}DeleteInput`; + } + + public get unionDisconnectInputTypeName(): string { + return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( + this.relationshipEntityAdapter.name + )}DisconnectInput`; + } + + public get unionCreateInputTypeName(): string { + return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( + this.relationshipEntityAdapter.name + )}CreateInput`; + } + + public get unionCreateFieldInputTypeName(): string { + return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( + this.relationshipEntityAdapter.name + )}CreateFieldInput`; + } + + public get unionUpdateInputTypeName(): string { + return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( + this.relationshipEntityAdapter.name + )}UpdateInput`; + } + + public getToUnionUpdateInputTypeName(ifUnionRelationshipTargetEntity: ConcreteEntityAdapter): string { + return `${this.relationshipEntityAdapter.source.name}${upperFirst(this.relationshipEntityAdapter.name)}${ + ifUnionRelationshipTargetEntity.name + }UpdateInput`; + } + public get subscriptionConnectedRelationshipTypeName(): string { return `${this.relationshipEntityAdapter.source.name}${upperFirst( this.relationshipEntityAdapter.name @@ -180,11 +250,6 @@ export class RelationshipOperations { public getConnectOrCreateInputFields(target: ConcreteEntityAdapter) { // TODO: use this._target in the end; currently passed-in as argument because unions need this per refNode - // const target = this._target; - // if (!(target instanceof ConcreteEntityAdapter)) { - // // something is wrong - // return;= - // } return { where: `${target.operations.connectOrCreateWhereInputTypeName}!`, onCreate: `${this.getConnectOrCreateOnCreateFieldInputTypeName(target)}!`, diff --git a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts index 56e267a58c..b7eb003df6 100644 --- a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts +++ b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts @@ -17,6 +17,7 @@ * limitations under the License. */ +import { GraphQLInt, GraphQLNonNull } from "graphql"; import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; import type { Subgraph } from "../../classes/Subgraph"; @@ -141,7 +142,7 @@ export class FieldAggregationComposer { name: relationshipAdapter.getAggregationFieldTypename(), fields: { count: { - type: "Int!", + type: new GraphQLNonNull(GraphQLInt), resolve: numericalResolver, args: {}, }, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts index be95e61f7f..b14ddb20b6 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts @@ -18,13 +18,14 @@ */ import type { DirectiveNode } from "graphql"; -import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationField } from "../../types"; import { upperFirst } from "../../utils/upper-first"; import { ensureNonEmptyInput } from "../ensure-non-empty-input"; +import { withCreateInputType } from "../generation/create-input"; import { concreteEntityToCreateInputFields, objectFieldsToCreateInputFields } from "../to-compose"; export function createConnectOrCreateField({ @@ -183,7 +184,7 @@ export function createConnectOrCreateField2({ return relationshipAdapter.isList ? `[${connectOrCreateName}!]` : connectOrCreateName; } -function createOnCreateITC2({ +export function createOnCreateITC2({ schemaComposer, relationshipAdapter, targetEntityAdapter, @@ -194,33 +195,7 @@ function createOnCreateITC2({ targetEntityAdapter: ConcreteEntityAdapter; userDefinedFieldDirectives: Map; }): InputTypeComposer { - const onCreateName = - relationshipAdapter.operations.getConnectOrCreateOnCreateFieldInputTypeName(targetEntityAdapter); - - const onCreateFields = getOnCreateFields2({ - relationshipAdapter, - targetEntityAdapter, - schemaComposer, - userDefinedFieldDirectives, - }); - - return schemaComposer.getOrCreateITC(onCreateName, (tc) => { - tc.addFields(onCreateFields); - }); -} - -function getOnCreateFields2({ - relationshipAdapter, - targetEntityAdapter, - schemaComposer, - userDefinedFieldDirectives, -}: { - relationshipAdapter: RelationshipAdapter; - targetEntityAdapter: ConcreteEntityAdapter; - schemaComposer: SchemaComposer; - userDefinedFieldDirectives: Map; -}): { node: string } | { node: string; edge: string } { - schemaComposer.getOrCreateITC(targetEntityAdapter.operations.onCreateInputTypeName, (tc) => { + const onCreateInput = schemaComposer.getOrCreateITC(targetEntityAdapter.operations.onCreateInputTypeName, (tc) => { const nodeFields = concreteEntityToCreateInputFields( targetEntityAdapter.onCreateInputFields, userDefinedFieldDirectives @@ -229,15 +204,22 @@ function getOnCreateFields2({ ensureNonEmptyInput(schemaComposer, tc); }); - const nodeCreateInputFieldName = `${targetEntityAdapter.operations.onCreateInputTypeName}!`; - // TODO: add relationshipAdapter.operations and return fields {edge, node} vs {node} from a method from operations - if (relationshipAdapter.nonGeneratedProperties.length > 0) { - return { - node: nodeCreateInputFieldName, - edge: relationshipAdapter.operations.edgeCreateInputTypeName, + const onCreateName = + relationshipAdapter.operations.getConnectOrCreateOnCreateFieldInputTypeName(targetEntityAdapter); + return schemaComposer.getOrCreateITC(onCreateName, (tc) => { + const onCreateFields: InputTypeComposerFieldConfigMapDefinition = { + node: onCreateInput.NonNull, }; - } - return { - node: nodeCreateInputFieldName, - }; + if (relationshipAdapter.nonGeneratedProperties.length > 0) { + const edgeFieldType = withCreateInputType({ + entityAdapter: relationshipAdapter, + userDefinedFieldDirectives, + composer: schemaComposer, + }); + onCreateFields["edge"] = relationshipAdapter.hasNonNullNonGeneratedProperties + ? edgeFieldType.NonNull + : edgeFieldType; + } + tc.addFields(onCreateFields); + }); } 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 a7147ee94f..420588a125 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 @@ -31,19 +31,27 @@ import { upperFirst } from "../../utils/upper-first"; import { FieldAggregationComposer } from "../aggregations/field-aggregation-composer"; import { addRelationshipArrayFilters } from "../augment/add-relationship-array-filters"; import { addDirectedArgument, addDirectedArgument2 } from "../directed-argument"; +import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; +import { augmentConnectInputTypeWithConnectFieldInput } from "../generation/connect-input"; +import { + augmentCreateInputTypeWithRelationshipsInput, + withConnectOrCreateInputType, + withRelationInputType, + withSourceWhereInputType, +} from "../generation/create-input"; +import { augmentDeleteInputTypeWithDeleteFieldInput } from "../generation/delete-input"; +import { augmentDisconnectInputTypeWithDisconnectFieldInput } from "../generation/disconnect-input"; +import { augmentUpdateInputTypeWithUpdateFieldInput } from "../generation/update-input"; import type { ObjectFields } from "../get-obj-field-meta"; import { graphqlDirectivesToCompose } from "../to-compose"; -import { createAggregationInputFields, createAggregationInputFields2 } from "./create-aggregation-input-fields"; -import { createConnectOrCreateField, createConnectOrCreateField2 } from "./create-connect-or-create-field"; +import { createAggregationInputFields } from "./create-aggregation-input-fields"; +import { createConnectOrCreateField } from "./create-connect-or-create-field"; import { createRelationshipInterfaceFields, createRelationshipInterfaceFields2, } from "./create-relationship-interface-fields"; import { createRelationshipUnionFields, createRelationshipUnionFields2 } from "./create-relationship-union-fields"; -import { - createTopLevelConnectOrCreateInput, - createTopLevelConnectOrCreateInput2, -} from "./create-top-level-connect-or-create-input"; +import { createTopLevelConnectOrCreateInput } from "./create-top-level-connect-or-create-input"; import { overwrite } from "./fields/overwrite"; import { inspectObjectFields } from "./inspect-object-fields"; @@ -499,12 +507,6 @@ function nodeHasRelationshipWithNestedOperation( ): boolean { return node.relationFields.some((relationField) => relationField.nestedOperations.includes(nestedOperation)); } -function relationshipTargetHasRelationshipWithNestedOperation( - target: ConcreteEntityAdapter | InterfaceEntityAdapter, - nestedOperation: RelationshipNestedOperationsOption -): boolean { - return Array.from(target.relationships.values()).some((rel) => rel.nestedOperations.includes(nestedOperation)); -} export default createRelationshipFields; @@ -529,51 +531,33 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } entityAdapter.relationships.forEach((relationshipAdapter) => { - const relFields = relationshipAdapter.attributes; - const sourceName = entityAdapter.name; - if (!relationshipAdapter) { return; } + const relationshipTarget = relationshipAdapter.target; - // const relFields = relationshipPropertyFields.get(rel.properties || ""); - - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - const hasNonNullNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.some((attribute) => - attribute.isRequired() - ); - - if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + if (relationshipTarget instanceof InterfaceEntityAdapter) { createRelationshipInterfaceFields2({ relationship: relationshipAdapter, composeNode, schemaComposer, - hasNonGeneratedProperties, userDefinedFieldDirectives, }); return; } - if (relationshipAdapter.target instanceof UnionEntityAdapter) { + if (relationshipTarget instanceof UnionEntityAdapter) { createRelationshipUnionFields2({ relationship: relationshipAdapter, composeNode, schemaComposer, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, userDefinedFieldDirectives, }); return; } - // // If the related type is not in the schema, don't generate the relationship field - // const relationshipAdapter.target = nodes.find((x) => x.name === relationshipAdapter.target.name); - // if (!relationshipAdapter.target) { - // return; - // } - const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(relationshipAdapter.name); let deprecatedDirectives: Directive[] = []; if (userDefinedDirectivesOnField) { @@ -582,154 +566,24 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ ); } - const nestedOperations = new Set(relationshipAdapter.nestedOperations); - - // Don't generate empty input type - let nodeFieldInput: InputTypeComposer | undefined; - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || - // The connectOrCreate field is not generated if the related type does not have a unique field - (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - relationshipAdapter.target.uniqueFields.length) - ) { - nodeFieldInput = schemaComposer.getOrCreateITC(relationshipAdapter.operations.fieldInputTypeName); - } - // Don't generate an empty input type - let nodeFieldUpdateInput: InputTypeComposer | undefined; - // If the only nestedOperation is connectOrCreate, it won't be generated if there are no unique fields on the related type - const onlyConnectOrCreateAndNoUniqueFields = - nestedOperations.size === 1 && - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - !relationshipAdapter.target.uniqueFields.length; - - if (nestedOperations.size !== 0 && !onlyConnectOrCreateAndNoUniqueFields) { - nodeFieldUpdateInput = schemaComposer.getOrCreateITC( - relationshipAdapter.operations.updateFieldInputTypeName - ); - // Add where fields - nodeFieldUpdateInput.addFields({ - where: relationshipAdapter.operations.connectionWhereTypename, - }); - } - - const nodeWhereAggregationInput = createAggregationInputFields2( - relationshipAdapter.target, - relationshipAdapter, - schemaComposer - ); - const edgeWhereAggregationInput = - relFields && createAggregationInputFields2(relationshipAdapter, relationshipAdapter, schemaComposer); - - const whereAggregateInput = schemaComposer.getOrCreateITC( - relationshipAdapter.operations.aggregateInputTypeName, - (tc) => { - tc.addFields({ - count: "Int", - count_LT: "Int", - count_LTE: "Int", - count_GT: "Int", - count_GTE: "Int", - AND: `[${relationshipAdapter.operations.aggregateInputTypeName}!]`, - OR: `[${relationshipAdapter.operations.aggregateInputTypeName}!]`, - NOT: relationshipAdapter.operations.aggregateInputTypeName, - }); - - if (nodeWhereAggregationInput) { - tc.addFields({ - node: nodeWhereAggregationInput, - }); - } - - if (edgeWhereAggregationInput) { - tc.addFields({ - edge: edgeWhereAggregationInput, - }); - } - } - ); - - // TODO: attempt at this first--------------------------------------------------- - const whereInput = schemaComposer.getITC(entityAdapter.operations.whereInputTypeName); - - if (relationshipAdapter.isFilterableByValue()) { - whereInput.addFields({ - [relationshipAdapter.name]: { - type: `${relationshipAdapter.target.name}Where`, - }, - [`${relationshipAdapter.name}_NOT`]: { - type: `${relationshipAdapter.target.name}Where`, - }, - }); - } - - if (relationshipAdapter.isFilterableByAggregate()) { - whereInput.addFields({ - [`${relationshipAdapter.name}Aggregate`]: { - type: whereAggregateInput, - directives: deprecatedDirectives, - }, - }); - } - - // n..m Relationships - - if (relationshipAdapter.isList && relationshipAdapter.isFilterableByValue()) { - addRelationshipArrayFilters({ - whereInput, - fieldName: relationshipAdapter.name, - sourceName: entityAdapter.name, - relatedType: relationshipAdapter.target.name, - whereType: `${relationshipAdapter.target.name}Where`, - directives: deprecatedDirectives, - }); - } - // TODO: up to here------------------------------------------------------------ - - const relationshipField: { type: string; description?: string; directives: Directive[]; args?: any } = { - type: relationshipAdapter.getTargetTypePrettyName(), - description: relationshipAdapter.description, - directives: graphqlDirectivesToCompose(userDefinedFieldDirectives.get(relationshipAdapter.name) || []), - }; - - let generateRelFieldArgs = true; - - // Subgraph schemas do not support arguments on relationship fields (singular) - if (subgraph) { - if (!relationshipAdapter.isList) { - generateRelFieldArgs = false; - } - } - - if (generateRelFieldArgs) { - const nodeFieldsBaseArgs = { - where: `${relationshipAdapter.target.name}Where`, - options: `${relationshipAdapter.target.name}Options`, - }; - const nodeFieldsArgs = addDirectedArgument2(nodeFieldsBaseArgs, relationshipAdapter); - relationshipField.args = nodeFieldsArgs; - } - - if (relationshipAdapter.isReadable()) { - composeNode.addFields({ - [relationshipAdapter.name]: relationshipField, - }); - } + // ======== only on relationships to concrete: + withSourceWhereInputType(relationshipAdapter, schemaComposer, deprecatedDirectives); + // TODO: new way if (composeNode instanceof ObjectTypeComposer) { const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject2(relationshipAdapter); const aggregationFieldsBaseArgs = { - where: `${relationshipAdapter.target.name}Where`, + where: relationshipTarget.operations.whereInputTypeName, }; const aggregationFieldsArgs = addDirectedArgument2(aggregationFieldsBaseArgs, relationshipAdapter); if (relationshipAdapter.aggregate) { composeNode.addFields({ - [`${relationshipAdapter.name}Aggregate`]: { + [relationshipAdapter.operations.aggregateTypeName]: { type: aggregationTypeObject, args: aggregationFieldsArgs, directives: deprecatedDirectives, @@ -738,234 +592,47 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } } - const nodeCreateInput = schemaComposer.getITC(entityAdapter.operations.createInputTypeName); - if (relationshipAdapter.isCreatable()) { - // Interface CreateInput does not require relationship input fields - // These are specified on the concrete nodes. - if (!(composeNode instanceof InterfaceTypeComposer) && nodeFieldInput) { - nodeCreateInput.addFields({ - [relationshipAdapter.name]: { - type: nodeFieldInput, - directives: deprecatedDirectives, - }, - }); - } - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - (nodeFieldInput || nodeFieldUpdateInput) - ) { - // createConnectOrCreateField return undefined if the node has no uniqueFields - const connectOrCreate = createConnectOrCreateField2({ - relationshipAdapter, - schemaComposer, - userDefinedFieldDirectives, - targetEntityAdapter: relationshipAdapter.target, - }); - - if (connectOrCreate) { - if (nodeFieldUpdateInput) { - nodeFieldUpdateInput.addFields({ - connectOrCreate, - }); - } - - if (nodeFieldInput) { - nodeFieldInput.addFields({ - connectOrCreate, - }); - } + // ======== only on relationships to concrete | unions: + // TODO: refactor + withConnectOrCreateInputType(relationshipAdapter, schemaComposer, userDefinedFieldDirectives); - createTopLevelConnectOrCreateInput2({ - schemaComposer, - sourceName: entityAdapter.name, - relationshipAdapter, - }); - } - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) && - (nodeFieldInput || nodeFieldUpdateInput) - ) { - const createName = relationshipAdapter.operations.createFieldInputTypeName; - const create = relationshipAdapter.isList ? `[${createName}!]` : createName; - schemaComposer.getOrCreateITC(createName, (tc) => { - tc.addFields({ node: `${relationshipAdapter.target.name}CreateInput!` }); - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationshipAdapter.operations.edgeCreateInputTypeName, - }); - } - }); - - if (nodeFieldUpdateInput) { - nodeFieldUpdateInput.addFields({ - create, - }); - } - - if (nodeFieldInput) { - nodeFieldInput.addFields({ - create, - }); - } - - const nodeRelationInput = schemaComposer.getOrCreateITC(entityAdapter.operations.relationInputTypeName); - nodeRelationInput.addFields({ - [relationshipAdapter.name]: { - type: create, - directives: deprecatedDirectives, - }, - }); - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) && - (nodeFieldInput || nodeFieldUpdateInput) - ) { - const connectName = relationshipAdapter.operations.connectFieldInputTypeName; - const connect = relationshipAdapter.isList ? `[${connectName}!]` : connectName; - const connectWhereName = `${relationshipAdapter.target.name}ConnectWhere`; - - schemaComposer.getOrCreateITC(connectWhereName, (tc) => { - tc.addFields({ node: `${relationshipAdapter.target.name}Where!` }); - }); - - schemaComposer.getOrCreateITC(connectName, (tc) => { - tc.addFields({ where: connectWhereName }); - - if ( - relationshipTargetHasRelationshipWithNestedOperation( - relationshipAdapter.target as ConcreteEntityAdapter | InterfaceEntityAdapter, - RelationshipNestedOperationsOption.CONNECT - ) - ) { - tc.addFields({ - connect: relationshipAdapter.isList - ? `[${relationshipAdapter.target.name}ConnectInput!]` - : `${relationshipAdapter.target.name}ConnectInput`, - }); - } - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationshipAdapter.operations.edgeCreateInputTypeName, - }); - } - - tc.addFields({ overwrite }); - tc.makeFieldNonNull("overwrite"); - }); - - if (nodeFieldUpdateInput) { - nodeFieldUpdateInput.addFields({ connect }); - } - - if (nodeFieldInput) { - nodeFieldInput.addFields({ connect }); - } - - const nodeConnectInput = schemaComposer.getOrCreateITC(entityAdapter.operations.connectInputTypeName); - nodeConnectInput.addFields({ - [relationshipAdapter.name]: { - type: connect, - directives: deprecatedDirectives, - }, - }); - } - - const nodeUpdateInput = schemaComposer.getITC(entityAdapter.operations.updateInputTypeName); - if (relationshipAdapter.isUpdatable() && nodeFieldUpdateInput) { - const connectionUpdateInputName = relationshipAdapter.operations.updateConnectionInputTypename; - - nodeUpdateInput.addFields({ - [relationshipAdapter.name]: { - type: relationshipAdapter.isList - ? `[${nodeFieldUpdateInput.getTypeName()}!]` - : nodeFieldUpdateInput.getTypeName(), - directives: deprecatedDirectives, - }, - }); - - schemaComposer.getOrCreateITC(connectionUpdateInputName, (tc) => { - tc.addFields({ node: `${relationshipAdapter.target.name}UpdateInput` }); - - if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationshipAdapter.operations.edgeUpdateInputTypeName }); - } - }); - - if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - nodeFieldUpdateInput.addFields({ update: connectionUpdateInputName }); - } - } - - if (nestedOperations.has(RelationshipNestedOperationsOption.DELETE) && nodeFieldUpdateInput) { - const nodeFieldDeleteInputName = relationshipAdapter.operations.deleteFieldInputTypeName; - - nodeFieldUpdateInput.addFields({ - delete: relationshipAdapter.isList ? `[${nodeFieldDeleteInputName}!]` : nodeFieldDeleteInputName, - }); + // ======== all relationships: + composeNode.addFields( + augmentObjectOrInterfaceTypeWithRelationshipField(relationshipAdapter, userDefinedFieldDirectives, subgraph) + ); - if (!schemaComposer.has(nodeFieldDeleteInputName)) { - schemaComposer.getOrCreateITC(nodeFieldDeleteInputName, (tc) => { - tc.addFields({ where: relationshipAdapter.operations.connectionWhereTypename }); - - if ( - relationshipTargetHasRelationshipWithNestedOperation( - relationshipAdapter.target as ConcreteEntityAdapter | InterfaceEntityAdapter, - RelationshipNestedOperationsOption.DELETE - ) - ) { - tc.addFields({ delete: `${relationshipAdapter.target.name}DeleteInput` }); - } - }); - } + withRelationInputType(relationshipAdapter, schemaComposer, deprecatedDirectives, userDefinedFieldDirectives); - const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceName}DeleteInput`); - nodeDeleteInput.addFields({ - [relationshipAdapter.name]: { - type: relationshipAdapter.isList ? `[${nodeFieldDeleteInputName}!]` : nodeFieldDeleteInputName, - directives: deprecatedDirectives, - }, - }); - } + augmentCreateInputTypeWithRelationshipsInput({ + relationshipAdapter, + composer: schemaComposer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); - if (nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT) && nodeFieldUpdateInput) { - const nodeFieldDisconnectInputName = relationshipAdapter.operations.disconnectFieldInputTypeName; + augmentConnectInputTypeWithConnectFieldInput({ + relationshipAdapter, + composer: schemaComposer, + deprecatedDirectives, + }); - if (!schemaComposer.has(nodeFieldDisconnectInputName)) { - schemaComposer.getOrCreateITC(nodeFieldDisconnectInputName, (tc) => { - tc.addFields({ where: relationshipAdapter.operations.connectionWhereTypename }); - - if ( - relationshipTargetHasRelationshipWithNestedOperation( - relationshipAdapter.target as ConcreteEntityAdapter | InterfaceEntityAdapter, - RelationshipNestedOperationsOption.DISCONNECT - ) - ) { - tc.addFields({ disconnect: `${relationshipAdapter.target.name}DisconnectInput` }); - } - }); - } + augmentUpdateInputTypeWithUpdateFieldInput({ + relationshipAdapter, + composer: schemaComposer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); - nodeFieldUpdateInput.addFields({ - disconnect: relationshipAdapter.isList - ? `[${nodeFieldDisconnectInputName}!]` - : nodeFieldDisconnectInputName, - }); + augmentDeleteInputTypeWithDeleteFieldInput({ + relationshipAdapter, + composer: schemaComposer, + deprecatedDirectives, + }); - const nodeDisconnectInput = schemaComposer.getOrCreateITC(entityAdapter.operations.disconnectInputTypeName); - nodeDisconnectInput.addFields({ - [relationshipAdapter.name]: { - type: relationshipAdapter.isList - ? `[${nodeFieldDisconnectInputName}!]` - : nodeFieldDisconnectInputName, - directives: deprecatedDirectives, - }, - }); - } + augmentDisconnectInputTypeWithDisconnectFieldInput({ + relationshipAdapter, + composer: schemaComposer, + deprecatedDirectives, + }); }); } diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts index fd056d9f60..55cfbba8e7 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts @@ -22,11 +22,19 @@ import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import { InterfaceTypeComposer, upperFirst } from "graphql-compose"; import type { Node } from "../../classes"; import { RelationshipNestedOperationsOption } from "../../constants"; -import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationField } from "../../types"; -import { addDirectedArgument, addDirectedArgument2 } from "../directed-argument"; +import { addDirectedArgument } from "../directed-argument"; +import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; +import { augmentConnectInputTypeWithConnectFieldInput } from "../generation/connect-input"; +import { + augmentCreateInputTypeWithRelationshipsInput, + withFieldInputType, + withRelationInputType, +} from "../generation/create-input"; +import { augmentDeleteInputTypeWithDeleteFieldInput } from "../generation/delete-input"; +import { augmentDisconnectInputTypeWithDisconnectFieldInput } from "../generation/disconnect-input"; +import { augmentUpdateInputTypeWithUpdateFieldInput } from "../generation/update-input"; import { graphqlDirectivesToCompose } from "../to-compose"; export function createRelationshipInterfaceFields({ @@ -236,193 +244,53 @@ export function createRelationshipInterfaceFields2({ relationship, composeNode, schemaComposer, - hasNonGeneratedProperties, userDefinedFieldDirectives, }: { relationship: RelationshipAdapter; composeNode: ObjectTypeComposer | InterfaceTypeComposer; schemaComposer: SchemaComposer; - hasNonGeneratedProperties: boolean; userDefinedFieldDirectives: Map; }) { - const refNodes = (relationship.target as InterfaceEntityAdapter).concreteEntities; - - // TODO: We need to add operations to InterfaceEntityAdapter - const sourceAdapter = relationship.source as ConcreteEntityAdapter | InterfaceEntityAdapter; - const nestedOperations = new Set(relationship.nestedOperations); - const sourceCreateInput = schemaComposer.getITC(`${sourceAdapter.name}CreateInput`); - const sourceUpdateInput = schemaComposer.getITC(`${sourceAdapter.name}UpdateInput`); - - const connectWhere = schemaComposer.getOrCreateITC(`${relationship.target.name}ConnectWhere`, (tc) => { - tc.addFields({ - node: `${relationship.target.name}Where!`, - }); + // ======== all relationships but DEPENDENCY ALERT: + // this has to happen for InterfaceRelationships (Interfaces that are target of relationships) before it happens for ConcreteEntity targets + // it has sth to do with fieldInputPrefixForTypename vs prefixForTypename + // requires investigation + withFieldInputType(relationship, schemaComposer, userDefinedFieldDirectives); + + // ======== all relationships: + composeNode.addFields(augmentObjectOrInterfaceTypeWithRelationshipField(relationship, userDefinedFieldDirectives)); + + withRelationInputType(relationship, schemaComposer, [], userDefinedFieldDirectives); + + augmentCreateInputTypeWithRelationshipsInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], + userDefinedFieldDirectives, }); - const connectFieldInput = schemaComposer.getOrCreateITC(relationship.operations.connectFieldInputTypeName, (tc) => { - if (schemaComposer.has(`${relationship.target.name}ConnectInput`)) { - tc.addFields({ connect: `${relationship.target.name}ConnectInput` }); - } - - if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationship.operations.edgeCreateInputTypeName }); - } - - tc.addFields({ where: connectWhere }); + augmentConnectInputTypeWithConnectFieldInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], }); - const deleteFieldInput = schemaComposer.getOrCreateITC(relationship.operations.deleteFieldInputTypeName, (tc) => { - if (schemaComposer.has(`${relationship.target.name}DeleteInput`)) { - tc.addFields({ delete: `${relationship.target.name}DeleteInput` }); - } - - tc.addFields({ where: relationship.operations.connectionWhereTypename }); + augmentDeleteInputTypeWithDeleteFieldInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], }); - const disconnectFieldInput = schemaComposer.getOrCreateITC( - relationship.operations.disconnectFieldInputTypeName, - (tc) => { - if (schemaComposer.has(`${relationship.target.name}DisconnectInput`)) { - tc.addFields({ disconnect: `${relationship.target.name}DisconnectInput` }); - } - - tc.addFields({ where: relationship.operations.connectionWhereTypename }); - } - ); - - const createFieldInput = schemaComposer.getOrCreateITC(relationship.operations.createFieldInputTypeName, (tc) => { - tc.addFields({ - node: `${relationship.target.name}CreateInput!`, - }); - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationship.operations.edgeCreateInputTypeName, - }); - } + augmentDisconnectInputTypeWithDisconnectFieldInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], }); - const updateConnectionFieldInput = schemaComposer.getOrCreateITC( - relationship.operations.updateConnectionInputTypename, - (tc) => { - if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationship.operations.edgeUpdateInputTypeName }); - } - tc.addFields({ node: `${relationship.target.name}UpdateInput` }); - } - ); - - if ( - nestedOperations.size !== 0 && - !(nestedOperations.size === 1 && nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) - ) { - const updateFieldInput = schemaComposer.getOrCreateITC(relationship.operations.updateFieldInputTypeName); - - if (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { - const nodeConnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}ConnectInput`); - nodeConnectInput.addFields({ - [relationship.name]: relationship.isList ? connectFieldInput.NonNull.List : connectFieldInput, - }); - updateFieldInput.addFields({ - connect: relationship.isList ? connectFieldInput.NonNull.List : connectFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { - const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}DeleteInput`); - nodeDeleteInput.addFields({ - [relationship.name]: relationship.isList ? deleteFieldInput.NonNull.List : deleteFieldInput, - }); - updateFieldInput.addFields({ - delete: relationship.isList ? deleteFieldInput.NonNull.List : deleteFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { - const nodeDisconnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}DisconnectInput`); - nodeDisconnectInput.addFields({ - [relationship.name]: relationship.isList ? disconnectFieldInput.NonNull.List : disconnectFieldInput, - }); - updateFieldInput.addFields({ - disconnect: relationship.isList ? disconnectFieldInput.NonNull.List : disconnectFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - const nodeRelationInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}RelationInput`); - nodeRelationInput.addFields({ - [relationship.name]: relationship.isList ? createFieldInput.NonNull.List : createFieldInput, - }); - updateFieldInput.addFields({ - create: relationship.isList ? createFieldInput.NonNull.List : createFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - updateFieldInput.addFields({ - update: updateConnectionFieldInput, - }); - } - - updateFieldInput.addFields({ - where: relationship.operations.connectionWhereTypename, - }); - - if (relationship.isUpdatable()) { - sourceUpdateInput.addFields({ - [relationship.name]: relationship.isList ? updateFieldInput.NonNull.List : updateFieldInput, - }); - } - } - - if (relationship.isReadable()) { - const baseNodeFieldArgs = { - options: `${relationship.target.name}Options`, - where: `${relationship.target.name}Where`, - }; - const nodeFieldArgs = addDirectedArgument2(baseNodeFieldArgs, relationship); - - composeNode.addFields({ - [relationship.name]: { - type: relationship.getTargetTypePrettyName(), - args: nodeFieldArgs, - description: relationship.description, - directives: graphqlDirectivesToCompose(userDefinedFieldDirectives.get(relationship.name) ?? []), - }, - }); - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) - ) { - const nodeFieldInput = schemaComposer.getOrCreateITC(relationship.operations.fieldInputTypeName, (tc) => { - if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - tc.addFields({ - create: relationship.isList ? createFieldInput.NonNull.List : createFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { - tc.addFields({ - connect: relationship.isList ? connectFieldInput.NonNull.List : connectFieldInput, - }); - } - }); - - refNodes.forEach((n) => { - if (!schemaComposer.has(relationship.operations.createFieldInputTypeName)) { - schemaComposer.getOrCreateITC(relationship.operations.createFieldInputTypeName, (tc) => { - tc.addFields({ node: `${n.name}CreateInput!` }); - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationship.operations.edgeCreateInputTypeName, - }); - } - }); - } - }); - // Interface CreateInput does not require relationship input fields - // These are specified on the concrete nodes. - if (relationship.isCreatable() && !(composeNode instanceof InterfaceTypeComposer)) { - sourceCreateInput.addFields({ - [relationship.name]: nodeFieldInput, - }); - } - } + augmentUpdateInputTypeWithUpdateFieldInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], + userDefinedFieldDirectives, + }); } diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts index d0de5431ec..aa87b608aa 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts @@ -22,15 +22,22 @@ import type { InputTypeComposer, ObjectTypeComposer, SchemaComposer } from "grap import { InterfaceTypeComposer, upperFirst } from "graphql-compose"; import type { Node } from "../../classes"; import { RelationshipNestedOperationsOption } from "../../constants"; -import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; -import type { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationField } from "../../types"; import { DEPRECATE_NOT } from "../constants"; -import { addDirectedArgument, addDirectedArgument2 } from "../directed-argument"; +import { addDirectedArgument } from "../directed-argument"; +import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; +import { augmentConnectInputTypeWithUnionConnectFieldInput } from "../generation/connect-input"; +import { + augmentCreateInputTypeWithRelationshipsInput, + withConnectOrCreateInputTypeU, + withUnionRelationInputType, +} from "../generation/create-input"; +import { augmentDeleteInputTypeWithUnionDeleteFieldInput } from "../generation/delete-input"; +import { augmentDisconnectInputTypeWithUnionConnectFieldInput } from "../generation/disconnect-input"; +import { augmentUpdateInputTypeWithUnionUpdateFieldInput } from "../generation/update-input"; import { graphqlDirectivesToCompose } from "../to-compose"; -import { createConnectOrCreateField, createConnectOrCreateField2 } from "./create-connect-or-create-field"; +import { createConnectOrCreateField } from "./create-connect-or-create-field"; export function createRelationshipUnionFields({ nodes, @@ -434,404 +441,54 @@ export function createRelationshipUnionFields2({ relationship, composeNode, schemaComposer, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, userDefinedFieldDirectives, }: { relationship: RelationshipAdapter; composeNode: ObjectTypeComposer | InterfaceTypeComposer; schemaComposer: SchemaComposer; - hasNonGeneratedProperties: boolean; - hasNonNullNonGeneratedProperties: boolean; userDefinedFieldDirectives: Map; }) { - const refNodes = (relationship.target as UnionEntityAdapter).concreteEntities; - - const sourceAdapter = relationship.source as ConcreteEntityAdapter | InterfaceEntityAdapter; - const nestedOperations = new Set(relationship.nestedOperations); - const nodeCreateInput = schemaComposer.getITC(`${sourceAdapter.name}CreateInput`); - // const refNodes = nodes.filter((x) => rel.union?.nodes?.includes(x.name));fNodes.find((n) => n.uniqueFields.length); - - const onlyConnectOrCreateAndNoUniqueFieldsInAllRefTypes = - nestedOperations.size === 1 && - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - !refNodes.find((n) => n.uniqueFields.length); - - if (relationship.isReadable()) { - const baseNodeFieldArgs = { - options: "QueryOptions", - where: `${relationship.target.name}Where`, - }; - const nodeFieldArgs = addDirectedArgument2(baseNodeFieldArgs, relationship); - - composeNode.addFields({ - [relationship.name]: { - type: relationship.getTargetTypePrettyName(), - args: nodeFieldArgs, - description: relationship.description, - directives: graphqlDirectivesToCompose(userDefinedFieldDirectives.get(relationship.name) ?? []), - }, - }); - } - - const upperFieldName = upperFirst(relationship.name); - const upperNodeName = upperFirst(sourceAdapter.name); - const typePrefix = `${upperNodeName}${upperFieldName}`; - - const unionConnectInput = nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) - ? schemaComposer.createInputTC({ - name: `${typePrefix}ConnectInput`, - fields: {}, - }) - : undefined; - const unionDeleteInput = nestedOperations.has(RelationshipNestedOperationsOption.DELETE) - ? schemaComposer.createInputTC({ - name: `${typePrefix}DeleteInput`, - fields: {}, - }) - : undefined; - const unionDisconnectInput = nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT) - ? schemaComposer.createInputTC({ - name: `${typePrefix}DisconnectInput`, - fields: {}, - }) - : undefined; - let unionCreateInput: InputTypeComposer | undefined; + // ======== only on relationships to concrete | unions: + withConnectOrCreateInputTypeU(relationship, schemaComposer, userDefinedFieldDirectives); - const connectOrCreateAndUniqueFieldsInRefTypes = - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - refNodes.find((n) => n.uniqueFields.length); + // ======== all relationships: + composeNode.addFields(augmentObjectOrInterfaceTypeWithRelationshipField(relationship, userDefinedFieldDirectives)); - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - connectOrCreateAndUniqueFieldsInRefTypes - ) { - unionCreateInput = schemaComposer.createInputTC({ - name: `${typePrefix}CreateInput`, - fields: {}, - }); - } - - const unionUpdateInput = schemaComposer.createInputTC({ - name: `${typePrefix}UpdateInput`, - fields: {}, + withUnionRelationInputType({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], }); - const unionCreateFieldInput = schemaComposer.createInputTC({ - name: `${typePrefix}CreateFieldInput`, - fields: {}, + augmentCreateInputTypeWithRelationshipsInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], + userDefinedFieldDirectives, }); - refNodes.forEach((unionMemberEntity) => { - const unionPrefix = `${sourceAdapter.name}${upperFieldName}${unionMemberEntity.name}`; - const updateField = `${unionMemberEntity.name}UpdateInput`; - const nodeFieldInputName = `${unionPrefix}FieldInput`; - const whereName = `${unionPrefix}ConnectionWhere`; - - const deleteName = `${unionPrefix}DeleteFieldInput`; - const deleteField = relationship.isList ? `[${deleteName}!]` : `${deleteName}`; - - const disconnectName = `${unionPrefix}DisconnectFieldInput`; - const disconnect = relationship.isList ? `[${disconnectName}!]` : `${disconnectName}`; - - const connectionUpdateInputName = `${unionPrefix}UpdateConnectionInput`; - - const connectAndCreateAndUniqueFields = - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - unionMemberEntity.uniqueFields.length; - const onlyConnectOrCreateAndNoUniqueFields = - nestedOperations.size === 1 && - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - !unionMemberEntity.uniqueFields.length; - - let updateFields: Record | undefined; - if (nestedOperations.size !== 0 && !onlyConnectOrCreateAndNoUniqueFields) { - updateFields = { - where: whereName, - }; - } - - let fieldInputFields: Record | undefined; - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || - connectAndCreateAndUniqueFields - ) { - // Created as {} because the connect/create fields are added later - fieldInputFields = {}; - } - - const createName = `${sourceAdapter.name}${upperFirst(relationship.name)}${ - unionMemberEntity.name - }CreateFieldInput`; - if (!schemaComposer.has(createName)) { - schemaComposer.getOrCreateITC(createName, (tc) => { - tc.addFields({ node: `${unionMemberEntity.name}CreateInput!` }); - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${relationship.propertiesTypeName}CreateInput${ - hasNonNullNonGeneratedProperties ? `!` : "" - }`, - }); - } - }); - - if ( - unionCreateInput && - (nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - connectAndCreateAndUniqueFields) - ) { - unionCreateInput.addFields({ - [unionMemberEntity.name]: nodeFieldInputName, - }); - } - - unionCreateFieldInput.addFields({ - [unionMemberEntity.name]: relationship.isList ? `[${createName}!]` : createName, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE) && (updateFields || fieldInputFields)) { - const create = relationship.isList ? `[${createName}!]` : createName; - if (updateFields) { - updateFields.create = create; - } - if (fieldInputFields) { - fieldInputFields.create = create; - } - } - - if (unionConnectInput && (updateFields || fieldInputFields)) { - const connectWhereName = `${unionMemberEntity.name}ConnectWhere`; - if (!schemaComposer.has(connectWhereName)) { - schemaComposer.createInputTC({ - name: connectWhereName, - fields: { - node: `${unionMemberEntity.name}Where!`, - }, - }); - } - - const connectName = `${unionPrefix}ConnectFieldInput`; - const connect = relationship.isList ? `[${connectName}!]` : `${connectName}`; - if (!schemaComposer.has(connectName)) { - schemaComposer.getOrCreateITC(connectName, (tc) => { - tc.addFields({ where: connectWhereName }); - - if (unionMemberEntity.relationships.size) { - tc.addFields({ - connect: relationship.isList - ? `[${unionMemberEntity.name}ConnectInput!]` - : `${unionMemberEntity.name}ConnectInput`, - }); - } - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${relationship.propertiesTypeName}CreateInput${ - hasNonNullNonGeneratedProperties ? `!` : "" - }`, - }); - } - }); - - unionConnectInput.addFields({ - [unionMemberEntity.name]: connect, - }); - - if (updateFields) { - updateFields.connect = connect; - } - if (fieldInputFields) { - fieldInputFields.connect = connect; - } - } - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - (updateFields || fieldInputFields) - ) { - const connectOrCreate = createConnectOrCreateField2({ - relationshipAdapter: relationship, - targetEntityAdapter: unionMemberEntity, - schemaComposer, - userDefinedFieldDirectives, - }); - - if (connectOrCreate) { - if (updateFields) { - updateFields.connectOrCreate = connectOrCreate; - } - if (fieldInputFields) { - fieldInputFields.connectOrCreate = connectOrCreate; - } - } - } - - if (unionDeleteInput && updateFields) { - if (!schemaComposer.has(deleteName)) { - schemaComposer.getOrCreateITC(deleteName, (tc) => { - tc.addFields({ where: whereName }); - - if (unionMemberEntity.relationships.size) { - tc.addFields({ - delete: `${unionMemberEntity.name}DeleteInput`, - }); - } - }); - - unionDeleteInput.addFields({ - [unionMemberEntity.name]: deleteField, - }); - } - - updateFields.delete = relationship.isList ? `[${deleteName}!]` : deleteName; - } - - if (unionDisconnectInput && updateFields) { - if (!schemaComposer.has(disconnectName)) { - schemaComposer.getOrCreateITC(disconnectName, (tc) => { - tc.addFields({ where: whereName }); - - if (unionMemberEntity.relationships.size) { - tc.addFields({ - disconnect: `${unionMemberEntity.name}DisconnectInput`, - }); - } - }); - - unionDisconnectInput.addFields({ - [unionMemberEntity.name]: disconnect, - }); - - updateFields.disconnect = relationship.isList ? `[${disconnectName}!]` : disconnectName; - } - } - - if (updateFields) { - const updateName = `${unionPrefix}UpdateFieldInput`; - const update = relationship.isList ? `[${updateName}!]` : updateName; - if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - updateFields.update = connectionUpdateInputName; - } - if (!schemaComposer.has(updateName)) { - schemaComposer.createInputTC({ - name: updateName, - fields: updateFields, - }); - - unionUpdateInput.addFields({ - [unionMemberEntity.name]: update, - }); - } - - schemaComposer.getOrCreateITC(connectionUpdateInputName, (tc) => { - tc.addFields({ node: updateField }); - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${relationship.propertiesTypeName}UpdateInput`, - }); - } - }); - } - - if (fieldInputFields) { - schemaComposer.createInputTC({ - name: nodeFieldInputName, - fields: fieldInputFields, - }); - } - - schemaComposer.getOrCreateITC(whereName, (tc) => { - tc.addFields({ - node: `${unionMemberEntity.name}Where`, - node_NOT: { - type: `${unionMemberEntity.name}Where`, - directives: [DEPRECATE_NOT], - }, - AND: `[${whereName}!]`, - OR: `[${whereName}!]`, - NOT: whereName, - }); - - if (relationship.propertiesTypeName) { - tc.addFields({ - edge: `${relationship.propertiesTypeName}Where`, - edge_NOT: { - type: `${relationship.propertiesTypeName}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - }); - - if (connectAndCreateAndUniqueFields) { - // TODO: merge with createTopLevelConnectOrCreateInput - const nodeConnectOrCreateInput: InputTypeComposer = schemaComposer.getOrCreateITC( - `${sourceAdapter.name}ConnectOrCreateInput` - ); - - const nodeRelationConnectOrCreateInput: InputTypeComposer = schemaComposer.getOrCreateITC( - `${sourceAdapter.name}${upperFirst(relationship.name)}ConnectOrCreateInput` - ); - - nodeConnectOrCreateInput.addFields({ - [relationship.name]: nodeRelationConnectOrCreateInput, - }); + augmentUpdateInputTypeWithUnionUpdateFieldInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], + userDefinedFieldDirectives, + }); - const nodeFieldConnectOrCreateInputName = `${sourceAdapter.name}${upperFirst(relationship.name)}${ - unionMemberEntity.name - }ConnectOrCreateFieldInput`; + augmentConnectInputTypeWithUnionConnectFieldInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], + }); - nodeRelationConnectOrCreateInput.addFields({ - [unionMemberEntity.name]: relationship.isList - ? `[${nodeFieldConnectOrCreateInputName}!]` - : nodeFieldConnectOrCreateInputName, - }); - } + augmentDeleteInputTypeWithUnionDeleteFieldInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], }); - if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - const nodeRelationInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}RelationInput`); - nodeRelationInput.addFields({ - [relationship.name]: unionCreateFieldInput, - }); - } - if (relationship.isCreatable() && !(composeNode instanceof InterfaceTypeComposer) && unionCreateInput) { - nodeCreateInput.addFields({ - [relationship.name]: unionCreateInput, - }); - } - if ( - relationship.isUpdatable() && - nestedOperations.size !== 0 && - !onlyConnectOrCreateAndNoUniqueFieldsInAllRefTypes - ) { - const nodeUpdateInput = schemaComposer.getITC(`${sourceAdapter.name}UpdateInput`); - nodeUpdateInput.addFields({ - [relationship.name]: unionUpdateInput, - }); - } - if (unionConnectInput) { - const nodeConnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}ConnectInput`); - nodeConnectInput.addFields({ - [relationship.name]: unionConnectInput, - }); - } - if (unionDeleteInput) { - const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}DeleteInput`); - nodeDeleteInput.addFields({ - [relationship.name]: unionDeleteInput, - }); - } - if (unionDisconnectInput) { - const nodeDisconnectInput = schemaComposer.getOrCreateITC(`${sourceAdapter.name}DisconnectInput`); - nodeDisconnectInput.addFields({ - [relationship.name]: unionDisconnectInput, - }); - } + augmentDisconnectInputTypeWithUnionConnectFieldInput({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], + }); } diff --git a/packages/graphql/src/schema/generation/aggregate-types.ts b/packages/graphql/src/schema/generation/aggregate-types.ts index 17fb441952..6833216841 100644 --- a/packages/graphql/src/schema/generation/aggregate-types.ts +++ b/packages/graphql/src/schema/generation/aggregate-types.ts @@ -1,8 +1,19 @@ -import type { DirectiveNode } from "graphql"; +import { access } from "fs"; +import { DirectiveNode, GraphQLFloat, GraphQLID, GraphQLString } from "graphql"; import { GraphQLInt, GraphQLNonNull } from "graphql"; -import type { ObjectTypeComposer, ObjectTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; -import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { + InputTypeComposer, + InputTypeComposerFieldConfigMapDefinition, + ObjectTypeComposer, + ObjectTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; +import { AGGREGATION_COMPARISON_OPERATORS } from "../../constants"; +import { AttributeAdapter } from "../../schema-model/attribute/model-adapters/AttributeAdapter"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { AggregationTypesMapper } from "../aggregations/aggregation-types-mapper"; +import { DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS, DEPRECATE_INVALID_AGGREGATION_FILTERS } from "../constants"; import { numericalResolver } from "../resolvers/field/numerical"; import { graphqlDirectivesToCompose } from "../to-compose"; @@ -52,3 +63,144 @@ function makeAggregableFields({ } return aggregableFields; } + +// TODO: fix args +export function withAggregateInputType({ + relationshipAdapter, + entityAdapter, // TODO: this is relationshipAdapter.target but from the context above it is known to be ConcreteEntity and we don't know this yet!!! + composer, +}: { + relationshipAdapter: RelationshipAdapter; + entityAdapter: ConcreteEntityAdapter; + composer: SchemaComposer; +}): InputTypeComposer { + const aggregateSelection = composer.getOrCreateITC(relationshipAdapter.operations.aggregateInputTypeName, (tc) => { + tc.addFields({ + count: GraphQLInt, + count_LT: GraphQLInt, + count_LTE: GraphQLInt, + count_GT: GraphQLInt, + count_GTE: GraphQLInt, + AND: `[${relationshipAdapter.operations.aggregateInputTypeName}!]`, + OR: `[${relationshipAdapter.operations.aggregateInputTypeName}!]`, + NOT: relationshipAdapter.operations.aggregateInputTypeName, + }); + }); + const nodeWhereInputType = withAggregationWhereInputType({ + relationshipAdapter, + entityAdapter, + composer, + }); + if (nodeWhereInputType) { + aggregateSelection.addFields({ node: nodeWhereInputType }); + } + const edgeWhereInputType = withAggregationWhereInputType({ + relationshipAdapter, + entityAdapter: relationshipAdapter, + composer, + }); + if (edgeWhereInputType) { + aggregateSelection.addFields({ edge: edgeWhereInputType }); + } + return aggregateSelection; +} + +function withAggregationWhereInputType({ + relationshipAdapter, + entityAdapter, + composer, +}: { + relationshipAdapter: RelationshipAdapter; + entityAdapter: ConcreteEntityAdapter | RelationshipAdapter; + composer: SchemaComposer; +}): InputTypeComposer | undefined { + const aggregationFields = entityAdapter.aggregationWhereFields; + if (!aggregationFields.length) { + return; + } + const aggregationInputName = relationshipAdapter.operations.getAggregationWhereInputTypeName( + entityAdapter instanceof ConcreteEntityAdapter ? `Node` : `Edge` + ); + const aggregationInput = composer.createInputTC({ + name: aggregationInputName, + fields: { + AND: `[${aggregationInputName}!]`, + OR: `[${aggregationInputName}!]`, + NOT: aggregationInputName, + }, + }); + aggregationInput.addFields(makeAggregationFields(aggregationFields)); + return aggregationInput; +} + +function makeAggregationFields(attributes: AttributeAdapter[]): InputTypeComposerFieldConfigMapDefinition { + const aggregationFields = attributes + .map((attribute) => getAggregationFieldsByType(attribute)) + .reduce((acc, el) => ({ ...acc, ...el }), {}); + return aggregationFields; +} + +// TODO: refactor this ALE +function getAggregationFieldsByType(attribute: AttributeAdapter): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + if (attribute.isID()) { + fields[`${attribute.name}_EQUAL`] = { + type: GraphQLID, + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }; + return fields; + } + if (attribute.isString()) { + for (const operator of AGGREGATION_COMPARISON_OPERATORS) { + fields[`${attribute.name}_${operator}`] = { + type: `${operator === "EQUAL" ? GraphQLString : GraphQLInt}`, + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }; + fields[`${attribute.name}_AVERAGE_${operator}`] = { + type: GraphQLFloat, + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }; + fields[`${attribute.name}_LONGEST_${operator}`] = { + type: GraphQLInt, + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }; + fields[`${attribute.name}_SHORTEST_${operator}`] = { + type: GraphQLInt, + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }; + fields[`${attribute.name}_AVERAGE_LENGTH_${operator}`] = GraphQLFloat; + fields[`${attribute.name}_LONGEST_LENGTH_${operator}`] = GraphQLInt; + fields[`${attribute.name}_SHORTEST_LENGTH_${operator}`] = GraphQLInt; + } + return fields; + } + if (attribute.isNumeric() || attribute.isDuration()) { + // Types that you can average + // https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-avg + // https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-avg-duration + // String uses avg(size()) + for (const operator of AGGREGATION_COMPARISON_OPERATORS) { + fields[`${attribute.name}_${operator}`] = { + type: attribute.getTypeName(), + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }; + fields[`${attribute.name}_MIN_${operator}`] = attribute.getTypeName(); + fields[`${attribute.name}_MAX_${operator}`] = attribute.getTypeName(); + if (attribute.getTypeName() !== "Duration") { + fields[`${attribute.name}_SUM_${operator}`] = attribute.getTypeName(); + } + const averageType = attribute.isBigInt() ? "BigInt" : attribute.isDuration() ? "Duration" : GraphQLFloat; + fields[`${attribute.name}_AVERAGE_${operator}`] = averageType; + } + return fields; + } + for (const operator of AGGREGATION_COMPARISON_OPERATORS) { + fields[`${attribute.name}_${operator}`] = { + type: attribute.getTypeName(), + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }; + fields[`${attribute.name}_MIN_${operator}`] = attribute.getTypeName(); + fields[`${attribute.name}_MAX_${operator}`] = attribute.getTypeName(); + } + return fields; +} diff --git a/packages/graphql/src/schema/generation/augment-object-or-interface.ts b/packages/graphql/src/schema/generation/augment-object-or-interface.ts new file mode 100644 index 0000000000..a79bdf3a88 --- /dev/null +++ b/packages/graphql/src/schema/generation/augment-object-or-interface.ts @@ -0,0 +1,54 @@ +import type { DirectiveNode } from "graphql"; +import type { Directive } from "graphql-compose"; +import type { Subgraph } from "../../classes/Subgraph"; +import { QueryOptions } from "../../graphql/input-objects/QueryOptions"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { getDirectedArgument2 } from "../directed-argument"; +import { graphqlDirectivesToCompose } from "../to-compose"; + +export function augmentObjectOrInterfaceTypeWithRelationshipField( + relationshipAdapter: RelationshipAdapter, + userDefinedFieldDirectives: Map, + subgraph?: Subgraph | undefined +): Record { + const fields = {}; + const relationshipField: { type: string; description?: string; directives: Directive[]; args?: any } = { + type: relationshipAdapter.getTargetTypePrettyName(), + description: relationshipAdapter.description, + directives: graphqlDirectivesToCompose(userDefinedFieldDirectives.get(relationshipAdapter.name) || []), + }; + + let generateRelFieldArgs = true; + + // Subgraph schemas do not support arguments on relationship fields (singular) + if (subgraph) { + if (!relationshipAdapter.isList) { + generateRelFieldArgs = false; + } + } + + if (generateRelFieldArgs) { + // TODO: replace name reference with getType method + const optionsTypeName = + relationshipAdapter.target instanceof UnionEntityAdapter + ? QueryOptions + : relationshipAdapter.target.operations.optionsInputTypeName; + const whereTypeName = relationshipAdapter.target.operations.whereInputTypeName; + const nodeFieldsArgs = { + where: whereTypeName, + options: optionsTypeName, + }; + const directedArg = getDirectedArgument2(relationshipAdapter); + if (directedArg) { + nodeFieldsArgs["directed"] = directedArg; + } + relationshipField.args = nodeFieldsArgs; + } + + if (relationshipAdapter.isReadable()) { + fields[relationshipAdapter.name] = relationshipField; + } + return fields; +} diff --git a/packages/graphql/src/schema/generation/augment-where-input.ts b/packages/graphql/src/schema/generation/augment-where-input.ts new file mode 100644 index 0000000000..3c4c2c586f --- /dev/null +++ b/packages/graphql/src/schema/generation/augment-where-input.ts @@ -0,0 +1,71 @@ +import type { Directive, InputTypeComposer, InputTypeComposerFieldConfigMapDefinition } from "graphql-compose"; +import pluralize from "pluralize"; +import { DEPRECATED } from "../../constants"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; + +// TODO: refactor ALE +export function augmentWhereInputTypeWithRelationshipFields( + entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter, + relationshipAdapter: RelationshipAdapter, + deprecatedDirectives: Directive[] +): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + if (relationshipAdapter.isFilterableByValue()) { + fields[relationshipAdapter.name] = { + type: relationshipAdapter.target.operations.whereInputTypeName, + }; + fields[`${relationshipAdapter.name}_NOT`] = { + type: relationshipAdapter.target.operations.whereInputTypeName, + }; + } + if (relationshipAdapter.isList && relationshipAdapter.isFilterableByValue()) { + for (const filter of ["ALL", "NONE", "SINGLE", "SOME"] as const) { + fields[`${relationshipAdapter.name}_${filter}`] = { + type: relationshipAdapter.target.operations.whereInputTypeName, + directives: deprecatedDirectives, + // e.g. "Return Movies where all of the related Actors match this filter" + description: `Return ${pluralize(entityAdapter.name)} where ${ + filter !== "SINGLE" ? filter.toLowerCase() : "one" + } of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }; + // TODO: are these deprecations still relevant? + // only adding these for the deprecation message. If no deprecation anymore, delete them. + fields[relationshipAdapter.name] = { + type: relationshipAdapter.target.operations.whereInputTypeName, + directives: [ + { + name: DEPRECATED, + args: { reason: `Use \`${relationshipAdapter.name}_SOME\` instead.` }, + }, + ], + }; + fields[`${relationshipAdapter.name}_NOT`] = { + type: relationshipAdapter.target.operations.whereInputTypeName, + directives: [ + { + name: DEPRECATED, + args: { reason: `Use \`${relationshipAdapter.name}_NONE\` instead.` }, + }, + ], + }; + } + } + return fields; +} +// export function augmentWhereInputTypeWithRelationshipAggregateFields( +// relationshipAdapter: RelationshipAdapter, +// whereAggregateInput: InputTypeComposer, +// deprecatedDirectives: Directive[] +// ): InputTypeComposerFieldConfigMapDefinition { +// if (relationshipAdapter.isFilterableByAggregate()) { +// return { +// [`${relationshipAdapter.name}Aggregate`]: { +// type: whereAggregateInput, +// directives: deprecatedDirectives, +// }, +// }; +// } +// return {}; +// } diff --git a/packages/graphql/src/schema/generation/connect-input.ts b/packages/graphql/src/schema/generation/connect-input.ts index e447872085..dc2f72cef8 100644 --- a/packages/graphql/src/schema/generation/connect-input.ts +++ b/packages/graphql/src/schema/generation/connect-input.ts @@ -1,16 +1,24 @@ -import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; -import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compose"; +import { RelationshipNestedOperationsOption } from "../../constants"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { withConnectFieldInputType, withConnectFieldInputTypeI, withConnectFieldInputTypeU } from "./create-input"; import { makeImplementationsConnectInput } from "./implementation-inputs"; export function withConnectInputType({ - interfaceEntityAdapter, + entityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; + entityAdapter: InterfaceEntityAdapter | ConcreteEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { + if (entityAdapter instanceof ConcreteEntityAdapter) { + return composer.getOrCreateITC(entityAdapter.operations.connectInputTypeName); + } const implementationsConnectInputType = makeImplementationsConnectInput({ - interfaceEntityAdapter, + interfaceEntityAdapter: entityAdapter, composer, }); @@ -18,9 +26,107 @@ export function withConnectInputType({ return undefined; } - const connectInputType = composer.getOrCreateITC( - interfaceEntityAdapter.operations.updateMutationArgumentNames.connect - ); + const connectInputType = composer.getOrCreateITC(entityAdapter.operations.connectInputTypeName); connectInputType.setField("_on", implementationsConnectInputType); return connectInputType; } + +export function augmentConnectInputTypeWithConnectFieldInput({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}) { + let connectFieldInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + connectFieldInput = withConnectFieldInputType(relationshipAdapter, composer); + } else if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + connectFieldInput = withConnectFieldInputTypeI(relationshipAdapter, composer); + } + if (!connectFieldInput) { + return; + } + + const connectInput = withConnectInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + composer, + }); + if (!connectInput) { + return; + } + + connectInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.isList ? connectFieldInput.NonNull.List : connectFieldInput, + directives: deprecatedDirectives, + }, + }); +} + +export function augmentConnectInputTypeWithUnionConnectFieldInput({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}) { + let connectFieldInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + connectFieldInput = withUnionConnectInputType({ relationshipAdapter, composer, deprecatedDirectives }); + } + if (!connectFieldInput) { + return; + } + + const connectInput = withConnectInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + composer, + }); + if (!connectInput) { + return; + } + + connectInput.addFields({ + [relationshipAdapter.name]: { + type: connectFieldInput, + directives: deprecatedDirectives, + }, + }); +} + +export function withUnionConnectInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { + return; + } + const connectInput = composer.getOrCreateITC(relationshipAdapter.operations.unionConnectInputTypeName); + + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withConnectFieldInputTypeU(relationshipAdapter, memberEntity, composer); + if (fieldInput) { + connectInput.addFields({ + [memberEntity.name]: { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }, + }); + } + } + + return connectInput; +} diff --git a/packages/graphql/src/schema/generation/create-input.ts b/packages/graphql/src/schema/generation/create-input.ts index 7a13e7fbf4..dceedb5dd1 100644 --- a/packages/graphql/src/schema/generation/create-input.ts +++ b/packages/graphql/src/schema/generation/create-input.ts @@ -1,9 +1,25 @@ import type { DirectiveNode } from "graphql"; -import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; +import { RelationshipNestedOperationsOption } from "../../constants"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { createOnCreateITC2 } from "../create-relationship-fields/create-connect-or-create-field"; +import { overwrite } from "../create-relationship-fields/fields/overwrite"; import { concreteEntityToCreateInputFields } from "../to-compose"; +import { withAggregateInputType } from "./aggregate-types"; +import { augmentWhereInputTypeWithRelationshipFields } from "./augment-where-input"; +import { withConnectInputType } from "./connect-input"; +import { withDeleteInputType } from "./delete-input"; +import { withDisconnectInputType } from "./disconnect-input"; +import { withUpdateInputType } from "./update-input"; +import { makeConnectionWhereInputType } from "./where-input"; export function withCreateInputType({ entityAdapter, @@ -14,6 +30,9 @@ export function withCreateInputType({ userDefinedFieldDirectives: Map; composer: SchemaComposer; }): InputTypeComposer { + if (composer.has(entityAdapter.operations.createInputTypeName)) { + return composer.getITC(entityAdapter.operations.createInputTypeName); + } const createInputType = composer.createInputTC({ name: entityAdapter.operations.createInputTypeName, fields: {}, @@ -42,3 +61,1290 @@ function makeCreateInputFields( } return fields; } + +export function augmentCreateInputTypeWithRelationshipsInput({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + deprecatedDirectives: Directive[]; +}) { + if (!relationshipAdapter.isCreatable()) { + return; + } + if (relationshipAdapter.source instanceof InterfaceEntityAdapter) { + // Interface CreateInput does not require relationship input fields + // These are specified on the concrete nodes. + return; + } + + let relationshipsInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + relationshipsInput = withUnionCreateInputType({ relationshipAdapter, composer, deprecatedDirectives }); + } else { + relationshipsInput = withFieldInputType(relationshipAdapter, composer, userDefinedFieldDirectives); + } + if (!relationshipsInput) { + return; + } + const createInput = withCreateInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter, + userDefinedFieldDirectives, + composer, + }); + + if (!createInput) { + return; + } + createInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipsInput, + directives: deprecatedDirectives, + }, + }); +} + +export function withUnionCreateInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + // if (!relationshipAdapter.shouldGenerateFieldInputType()) { + // return; + // } + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withUnionFieldInputType( + relationshipAdapter, + memberEntity, + composer, + new Map() + ); + if (fieldInput) { + fields[memberEntity.name] = { + type: fieldInput, + directives: deprecatedDirectives, + }; + } + } + if (!Object.keys(fields).length) { + return; + } + const createInput = composer.getOrCreateITC(relationshipAdapter.operations.unionCreateInputTypeName); + createInput.addFields(fields); + return createInput; +} + +export function withUnionCreateFieldInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withCreateFieldInputTypeU( + relationshipAdapter, + memberEntity, + composer, + new Map() + ); + if (fieldInput) { + fields[memberEntity.name] = { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }; + } + } + if (!Object.keys(fields).length) { + return; + } + const createInput = composer.getOrCreateITC(relationshipAdapter.operations.unionCreateFieldInputTypeName); + createInput.addFields(fields); + return createInput; +} + +// ------------------- CONNECT OR CREATE --------------- +// TODO: refactor this +export function withConnectOrCreateFieldInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map, + ifUnionMemberEntity?: ConcreteEntityAdapter +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) { + return; + } + + let targetEntity: ConcreteEntityAdapter | undefined; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + if (!ifUnionMemberEntity) { + throw new Error("Expected member entity."); + } + targetEntity = ifUnionMemberEntity; + } else { + if (!(relationshipAdapter.target instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + targetEntity = relationshipAdapter.target; + } + if ( + !relationshipAdapter.shouldGenerateFieldInputType(ifUnionMemberEntity) && + !relationshipAdapter.shouldGenerateUpdateFieldInputType(ifUnionMemberEntity) + ) { + return; + } + + const hasUniqueFields = targetEntity.uniqueFields.length > 0; + if (hasUniqueFields !== true) { + return; + } + + createOnCreateITC2({ + schemaComposer: composer, + relationshipAdapter, + targetEntityAdapter: targetEntity, + userDefinedFieldDirectives, + }); + + composer.getOrCreateITC(targetEntity.operations.connectOrCreateWhereInputTypeName, (tc) => { + tc.addFields((targetEntity as ConcreteEntityAdapter).operations.connectOrCreateWhereInputFieldNames); + }); + + const connectOrCreateName = relationshipAdapter.operations.getConnectOrCreateFieldInputTypeName(targetEntity); + const connectOrCreateFieldInput = composer.getOrCreateITC(connectOrCreateName, (tc) => { + tc.addFields( + relationshipAdapter.operations.getConnectOrCreateInputFields(targetEntity as ConcreteEntityAdapter) || {} + ); + }); + return connectOrCreateFieldInput; +} +export function withConnectOrCreateInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (relationshipAdapter.source instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + + const fieldInput = withConnectOrCreateFieldInputType(relationshipAdapter, composer, userDefinedFieldDirectives); + if (!fieldInput) { + return; + } + + const connectOrCreateInput = composer.getOrCreateITC( + relationshipAdapter.source.operations.connectOrCreateInputTypeName + ); + connectOrCreateInput.addFields({ + [relationshipAdapter.name]: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + }); + return connectOrCreateInput; +} +export function withConnectOrCreateInputTypeU( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (relationshipAdapter.source instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + + const fieldInput = withRelationshipConnectOrCreateInputType( + relationshipAdapter, + composer, + userDefinedFieldDirectives + ); + if (!fieldInput) { + return; + } + + const connectOrCreateInput = composer.getOrCreateITC( + relationshipAdapter.source.operations.connectOrCreateInputTypeName + ); + connectOrCreateInput.addFields({ + [relationshipAdapter.name]: fieldInput, + }); + return connectOrCreateInput; +} +export function withRelationshipConnectOrCreateInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withConnectOrCreateFieldInputType( + relationshipAdapter, + composer, + userDefinedFieldDirectives, + memberEntity + ); + if (fieldInput) { + fields[memberEntity.name] = relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput; + } + } + + if (!Object.keys(fields).length) { + return; + } + + const connectOrCreateInput = composer.getOrCreateITC( + relationshipAdapter.operations.getConnectOrCreateInputTypeName() + ); + connectOrCreateInput.addFields(fields); + return connectOrCreateInput; +} + +// ------------------- CREATE -------------------------- +export function withCreateFieldInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { + return; + } + if ( + !relationshipAdapter.shouldGenerateFieldInputType() && + !relationshipAdapter.shouldGenerateUpdateFieldInputType() + ) { + return; + } + if (!(relationshipAdapter.target instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const createName = relationshipAdapter.operations.getCreateFieldInputTypeName(); + const createFieldInput = composer.getOrCreateITC(createName, (tc) => { + tc.addFields({ + node: `${(relationshipAdapter.target as ConcreteEntityAdapter).operations.createInputTypeName}!`, + }); + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationshipAdapter.operations.edgeCreateInputTypeName, + }); + } + }); + return createFieldInput; +} +export function withCreateFieldInputTypeU( + relationshipAdapter: RelationshipAdapter, + memberEntity: ConcreteEntityAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { + return; + } + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + const createName = relationshipAdapter.operations.getCreateFieldInputTypeName(memberEntity); + const createFieldInput = composer.getOrCreateITC(createName, (tc) => { + const createInputType = withCreateInputType({ + entityAdapter: memberEntity, + userDefinedFieldDirectives, + composer, + }); + tc.addFields({ + node: createInputType.NonNull, + }); + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationshipAdapter.operations.edgeCreateInputTypeName, + }); + } + }); + return createFieldInput; +} +export function withCreateFieldInputTypeI( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { + return; + } + if (!(relationshipAdapter.target instanceof InterfaceEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const createName = relationshipAdapter.operations.getCreateFieldInputTypeName(); + const createFieldInput = composer.getOrCreateITC(createName, (tc) => { + const createInputType = withCreateInputType({ + entityAdapter: relationshipAdapter.target as InterfaceEntityAdapter, + userDefinedFieldDirectives, + composer, + }); + tc.addFields({ + node: createInputType.NonNull, + }); + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationshipAdapter.operations.edgeCreateInputTypeName, + }); + } + }); + return createFieldInput; +} + +// ------------------- CONNECT -------------------------- +export function withConnectFieldInputTypeI( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { + throw new Error("Unexpected"); + } + const connectFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getConnectFieldInputTypeName(), + (tc) => { + tc.addFields({ + where: withConnectWhereFieldInputType(relationshipTarget, composer), + }); + const connectInputType = withConnectInputType({ entityAdapter: relationshipTarget, composer }); + if (connectInputType) { + tc.addFields({ + connect: connectInputType, + }); + } + + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationshipAdapter.operations.edgeCreateInputTypeName, + }); + } + } + ); + return connectFieldInput; +} +export function withConnectFieldInputTypeU( + relationshipAdapter: RelationshipAdapter, + memberEntity: ConcreteEntityAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof UnionEntityAdapter)) { + throw new Error("Unexpected"); + } + const connectFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getConnectFieldInputTypeName(memberEntity), + (tc) => { + tc.addFields({ + where: withConnectWhereFieldInputType(memberEntity, composer), + }); + if (memberEntity.relationships.size) { + const connectInputType = withConnectInputType({ entityAdapter: memberEntity, composer }); + if (connectInputType) { + tc.addFields({ + connect: relationshipAdapter.isList ? connectInputType.NonNull.List : connectInputType, + }); + } + } + + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationshipAdapter.operations.edgeCreateInputTypeName, + }); + } + } + ); + return connectFieldInput; +} +export function withConnectFieldInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { + return; + } + if ( + !relationshipAdapter.shouldGenerateFieldInputType() && + !relationshipAdapter.shouldGenerateUpdateFieldInputType() + ) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (relationshipTarget instanceof UnionEntityAdapter) { + throw new Error("Unexpected"); + } + const connectFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getConnectFieldInputTypeName(), + (tc) => { + tc.addFields({ + where: withConnectWhereFieldInputType(relationshipTarget, composer), + }); + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipTarget, + RelationshipNestedOperationsOption.CONNECT + ) + ) { + tc.addFields({ + connect: relationshipAdapter.isList + ? `[${relationshipTarget.operations.connectInputTypeName}!]` + : relationshipTarget.operations.connectInputTypeName, + }); + } + + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ + edge: relationshipAdapter.operations.edgeCreateInputTypeName, + }); + } + + tc.addFields({ overwrite }); + tc.makeFieldNonNull("overwrite"); + } + ); + return connectFieldInput; +} + +function withConnectWhereFieldInputType( + relationshipTarget: ConcreteEntityAdapter | InterfaceEntityAdapter, + composer: SchemaComposer +): InputTypeComposer { + const connectWhereName = relationshipTarget.operations.connectWhereInputTypeName; + if (composer.has(connectWhereName)) { + return composer.getITC(connectWhereName); + } + const connectWhereType = composer.getOrCreateITC(connectWhereName, (tc) => { + tc.addFields({ node: `${relationshipTarget.operations.whereInputTypeName}!` }); + }); + return connectWhereType; +} + +function relationshipTargetHasRelationshipWithNestedOperation( + target: ConcreteEntityAdapter | InterfaceEntityAdapter, + nestedOperation: RelationshipNestedOperationsOption +): boolean { + return Array.from(target.relationships.values()).some((rel) => rel.nestedOperations.has(nestedOperation)); +} + +// ------------------- DISCONNECT -------------------------- +export function withDisconnectFieldInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { + return; + } + if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const disconnectFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getDisconnectFieldInputTypeName(), + (tc) => { + tc.addFields({ + where: relationshipAdapter.operations.getConnectionWhereTypename(), + }); + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipTarget, + RelationshipNestedOperationsOption.DISCONNECT + ) + ) { + tc.addFields({ + disconnect: relationshipTarget.operations.disconnectInputTypeName, + }); + } + } + ); + return disconnectFieldInput; +} +export function withDisconnectFieldInputTypeU( + relationshipAdapter: RelationshipAdapter, + memberEntity: ConcreteEntityAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + const disconnectFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getDisconnectFieldInputTypeName(memberEntity), + (tc) => { + tc.addFields({ + where: makeConnectionWhereInputType({ relationshipAdapter, memberEntity, composer }), + }); + if (memberEntity.relationships.size) { + const disconnectInputType = withDisconnectInputType({ + entityAdapter: memberEntity, + composer, + }); + if (disconnectInputType) { + tc.addFields({ + disconnect: memberEntity.operations.disconnectInputTypeName, + }); + } + } + } + ); + return disconnectFieldInput; +} +export function withDisconnectFieldInputTypeI( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { + throw new Error("Expected interface target"); + } + const disconnectFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getDisconnectFieldInputTypeName(), + (tc) => { + tc.addFields({ + where: relationshipAdapter.operations.getConnectionWhereTypename(), + }); + const disconnectInputType = withDisconnectInputType({ + entityAdapter: relationshipTarget, + composer, + }); + if (disconnectInputType) { + tc.addFields({ + disconnect: relationshipTarget.operations.disconnectInputTypeName, + }); + } + } + ); + return disconnectFieldInput; +} + +// ------------------- DELETE -------------------------- +export function withDeleteFieldInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { + return; + } + if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const deleteFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getDeleteFieldInputTypeName(), + (tc) => { + tc.addFields({ + where: relationshipAdapter.operations.getConnectionWhereTypename(), + }); + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipTarget, + RelationshipNestedOperationsOption.DELETE + ) + ) { + tc.addFields({ + delete: relationshipTarget.operations.deleteInputTypeName, + }); + } + } + ); + return deleteFieldInput; +} +export function withDeleteFieldInputTypeU( + relationshipAdapter: RelationshipAdapter, + memberEntity: ConcreteEntityAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + const deleteFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getDeleteFieldInputTypeName(memberEntity), + (tc) => { + tc.addFields({ + where: makeConnectionWhereInputType({ relationshipAdapter, memberEntity, composer }), + }); + if (memberEntity.relationships.size) { + const deleteInputType = withDeleteInputType({ entityAdapter: memberEntity, composer }); + if (deleteInputType) { + tc.addFields({ + delete: memberEntity.operations.deleteInputTypeName, + }); + } + } + } + ); + return deleteFieldInput; +} +export function withDeleteFieldInputTypeI( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { + throw new Error("Expected interface target"); + } + const deleteFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getDeleteFieldInputTypeName(), + (tc) => { + tc.addFields({ + where: relationshipAdapter.operations.getConnectionWhereTypename(), + }); + const deleteInputType = withDeleteInputType({ entityAdapter: relationshipTarget, composer }); + if (deleteInputType) { + tc.addFields({ + delete: relationshipTarget.operations.deleteInputTypeName, + }); + } + } + ); + return deleteFieldInput; +} + +// ------------------- UPDATE -------------------------- +export function withUpdateConnectionFieldInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer +): InputTypeComposer | undefined { + if (!relationshipAdapter.isUpdatable()) { + return; + } + if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const updateFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getUpdateConnectionInputTypename(), + (tc) => { + tc.addFields({ + node: relationshipTarget.operations.updateInputTypeName, + }); + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ edge: relationshipAdapter.operations.edgeUpdateInputTypeName }); + } + } + ); + return updateFieldInput; +} +export function withUpdateConnectionFieldInputTypeU( + relationshipAdapter: RelationshipAdapter, + memberEntity: ConcreteEntityAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + // TODO: should this be checked in withUpdateFieldInputTypeU update instead? + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { + return; + } + + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + const updateFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getUpdateConnectionInputTypename(memberEntity), + (tc) => { + const updateInputType = withUpdateInputType({ + entityAdapter: memberEntity, + userDefinedFieldDirectives, + composer, + }); + tc.addFields({ + node: updateInputType, + }); + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ edge: relationshipAdapter.operations.edgeUpdateInputTypeName }); + } + } + ); + return updateFieldInput; +} +export function withUpdateConnectionFieldInputTypeI( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { + return; + } + + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const updateFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getUpdateConnectionInputTypename(), + (tc) => { + const updateInputType = withUpdateInputType({ + entityAdapter: relationshipAdapter.target as InterfaceEntityAdapter, + userDefinedFieldDirectives, + composer, + }); + tc.addFields({ + node: updateInputType, + }); + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + tc.addFields({ edge: relationshipAdapter.operations.edgeUpdateInputTypeName }); + } + } + ); + return updateFieldInput; +} + +export function withUpdateFieldInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { + return; + } + if (!relationshipAdapter.isUpdatable()) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const updateFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getUpdateFieldInputTypeName(), + (tc) => { + const connectFieldInputType = withConnectFieldInputType(relationshipAdapter, composer); + if (connectFieldInputType) { + tc.addFields({ + connect: { + type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, + directives: [], + }, + }); + } + const deleteFieldInputType = withDeleteFieldInputType(relationshipAdapter, composer); + if (deleteFieldInputType) { + tc.addFields({ + delete: { + type: relationshipAdapter.isList ? deleteFieldInputType.NonNull.List : deleteFieldInputType, + directives: [], + }, + }); + } + const disconnectFieldInputType = withDisconnectFieldInputType(relationshipAdapter, composer); + if (disconnectFieldInputType) { + tc.addFields({ + disconnect: { + type: relationshipAdapter.isList + ? disconnectFieldInputType.NonNull.List + : disconnectFieldInputType, + directives: [], + }, + }); + } + const createFieldInputType = withCreateFieldInputType(relationshipAdapter, composer); + if (createFieldInputType) { + tc.addFields({ + create: { + type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, + directives: [], + }, + }); + } + if (relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { + const updateFieldInputType = withUpdateConnectionFieldInputType(relationshipAdapter, composer); + if (updateFieldInputType) { + tc.addFields({ + update: { + type: updateFieldInputType, + directives: [], + }, + }); + } + } + + // TODO: where is this coming from? + tc.addFields({ + where: relationshipAdapter.operations.getConnectionWhereTypename(), + }); + const connectOrCreateFieldInputType = withConnectOrCreateFieldInputType( + relationshipAdapter, + composer, + userDefinedFieldDirectives + ); + if (connectOrCreateFieldInputType) { + tc.addFields({ + connectOrCreate: { + type: relationshipAdapter.isList + ? connectOrCreateFieldInputType.NonNull.List + : connectOrCreateFieldInputType, + directives: [], + }, + }); + } + } + ); + return updateFieldInput; +} +export function withUpdateFieldInputTypeU( + relationshipAdapter: RelationshipAdapter, + memberEntity: ConcreteEntityAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (!relationshipAdapter.shouldGenerateUpdateFieldInputType(memberEntity)) { + return; + } + if (!relationshipAdapter.isUpdatable()) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + const updateFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getUpdateFieldInputTypeName(memberEntity), + (tc) => { + const connectFieldInputType = withConnectFieldInputTypeU(relationshipAdapter, memberEntity, composer); + if (connectFieldInputType) { + tc.addFields({ + connect: { + type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, + directives: [], + }, + }); + } + const deleteFieldInputType = withDeleteFieldInputTypeU(relationshipAdapter, memberEntity, composer); + if (deleteFieldInputType) { + tc.addFields({ + delete: { + type: relationshipAdapter.isList ? deleteFieldInputType.NonNull.List : deleteFieldInputType, + directives: [], + }, + }); + } + const disconnectFieldInputType = withDisconnectFieldInputTypeU(relationshipAdapter, memberEntity, composer); + if (disconnectFieldInputType) { + tc.addFields({ + disconnect: { + type: relationshipAdapter.isList + ? disconnectFieldInputType.NonNull.List + : disconnectFieldInputType, + directives: [], + }, + }); + } + const createFieldInputType = withCreateFieldInputTypeU( + relationshipAdapter, + memberEntity, + composer, + userDefinedFieldDirectives + ); + if (createFieldInputType) { + tc.addFields({ + create: { + type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, + directives: [], + }, + }); + } + const connectOrCreateFieldInputType = withConnectOrCreateFieldInputType( + relationshipAdapter, + composer, + userDefinedFieldDirectives, + memberEntity + ); + if (connectOrCreateFieldInputType) { + tc.addFields({ + connectOrCreate: { + type: relationshipAdapter.isList + ? connectOrCreateFieldInputType.NonNull.List + : connectOrCreateFieldInputType, + directives: [], + }, + }); + } + const updateFieldInputType = withUpdateConnectionFieldInputTypeU( + relationshipAdapter, + memberEntity, + composer, + userDefinedFieldDirectives + ); + if (updateFieldInputType) { + tc.addFields({ + update: { + type: updateFieldInputType, + directives: [], + }, + }); + } + tc.addFields({ + where: makeConnectionWhereInputType({ relationshipAdapter, memberEntity, composer }), + }); + } + ); + return updateFieldInput; +} +export function withUpdateFieldInputTypeI( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + // TODO: make these fit somehow + // if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { + // return; + // } + if ( + relationshipAdapter.nestedOperations.size === 0 || + (relationshipAdapter.nestedOperations.size === 1 && + relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) + ) { + return; + } + if (!relationshipAdapter.isUpdatable()) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const updateFieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getUpdateFieldInputTypeName(), + (tc) => { + const connectFieldInputType = withConnectFieldInputTypeI(relationshipAdapter, composer); + if (connectFieldInputType) { + tc.addFields({ + connect: { + type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, + directives: [], + }, + }); + } + const deleteFieldInputType = withDeleteFieldInputTypeI(relationshipAdapter, composer); + if (deleteFieldInputType) { + tc.addFields({ + delete: { + type: relationshipAdapter.isList ? deleteFieldInputType.NonNull.List : deleteFieldInputType, + directives: [], + }, + }); + } + const disconnectFieldInputType = withDisconnectFieldInputTypeI(relationshipAdapter, composer); + if (disconnectFieldInputType) { + tc.addFields({ + disconnect: { + type: relationshipAdapter.isList + ? disconnectFieldInputType.NonNull.List + : disconnectFieldInputType, + directives: [], + }, + }); + } + const createFieldInputType = withCreateFieldInputTypeI( + relationshipAdapter, + composer, + userDefinedFieldDirectives + ); + if (createFieldInputType) { + tc.addFields({ + create: { + type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, + directives: [], + }, + }); + } + const updateFieldInputType = withUpdateConnectionFieldInputTypeI( + relationshipAdapter, + composer, + userDefinedFieldDirectives + ); + if (updateFieldInputType) { + tc.addFields({ + update: { + type: updateFieldInputType, + directives: [], + }, + }); + } + // TODO: where is this coming from? + tc.addFields({ + where: relationshipAdapter.operations.getConnectionWhereTypename(), + }); + } + ); + return updateFieldInput; +} + +// -------------------- FIELD INPUT ------------------------ +export function withFieldInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (composer.has(relationshipAdapter.operations.getFieldInputTypeName())) { + return composer.getITC(relationshipAdapter.operations.getFieldInputTypeName()); + } + if (!relationshipAdapter.shouldGenerateFieldInputType()) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (relationshipTarget instanceof UnionEntityAdapter) { + throw new Error("Unexpected union target"); + } + const fields = makeFieldInputTypeFields(relationshipAdapter, composer, userDefinedFieldDirectives); + if (!Object.keys(fields).length) { + return; + } + const fieldInput = composer.getOrCreateITC(relationshipAdapter.operations.getFieldInputTypeName(), (tc) => { + tc.addFields(fields); + }); + return fieldInput; +} + +export function withUnionFieldInputType( + relationshipAdapter: RelationshipAdapter, + memberEntity: ConcreteEntityAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + if (composer.has(relationshipAdapter.operations.getFieldInputTypeName(memberEntity))) { + return composer.getITC(relationshipAdapter.operations.getFieldInputTypeName(memberEntity)); + } + if (!relationshipAdapter.shouldGenerateFieldInputType(memberEntity)) { + return; + } + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + const fields = makeFieldInputTypeFields(relationshipAdapter, composer, userDefinedFieldDirectives, memberEntity); + if (!Object.keys(fields).length) { + return; + } + const fieldInput = composer.getOrCreateITC( + relationshipAdapter.operations.getFieldInputTypeName(memberEntity), + (tc) => { + tc.addFields(fields); + } + ); + return fieldInput; +} + +export function makeFieldInputTypeFields( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + userDefinedFieldDirectives: Map, + ifUnionMemberEntity?: ConcreteEntityAdapter +): InputTypeComposerFieldConfigMapDefinition { + const fields = {}; + let connectFieldInputType: InputTypeComposer | undefined; + let createFieldInputType: InputTypeComposer | undefined; + let connectOrCreateFieldInputType: InputTypeComposer | undefined; + const relationshipTarget = relationshipAdapter.target; + if (relationshipTarget instanceof ConcreteEntityAdapter) { + connectFieldInputType = withConnectFieldInputType(relationshipAdapter, composer); + createFieldInputType = withCreateFieldInputType(relationshipAdapter, composer); + connectOrCreateFieldInputType = withConnectOrCreateFieldInputType( + relationshipAdapter, + composer, + userDefinedFieldDirectives + ); + } else if (relationshipTarget instanceof InterfaceEntityAdapter) { + connectFieldInputType = withConnectFieldInputTypeI(relationshipAdapter, composer); + createFieldInputType = withCreateFieldInputTypeI(relationshipAdapter, composer, userDefinedFieldDirectives); + } else { + if (!ifUnionMemberEntity) { + throw new Error("Member Entity required."); + } + connectFieldInputType = withConnectFieldInputTypeU(relationshipAdapter, ifUnionMemberEntity, composer); + createFieldInputType = withCreateFieldInputTypeU( + relationshipAdapter, + ifUnionMemberEntity, + composer, + userDefinedFieldDirectives + ); + connectOrCreateFieldInputType = withConnectOrCreateFieldInputType( + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity + ); + } + if (connectFieldInputType) { + fields["connect"] = { + type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, + directives: [], + }; + } + if (createFieldInputType) { + fields["create"] = { + type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, + directives: [], + }; + } + if (connectOrCreateFieldInputType) { + fields["connectOrCreate"] = { + type: relationshipAdapter.isList + ? connectOrCreateFieldInputType.NonNull.List + : connectOrCreateFieldInputType, + directives: [], + }; + } + return fields; +} + +// -------------------- RELATION INPUT ------------------------ +export function withRelationInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + deprecatedDirectives: Directive[], + userDefinedFieldDirectives: Map +): InputTypeComposer | undefined { + const relationshipSource = relationshipAdapter.source; + if (relationshipSource instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + let createFieldInputType: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + createFieldInputType = withCreateFieldInputType(relationshipAdapter, composer); + } else if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + createFieldInputType = withCreateFieldInputTypeI(relationshipAdapter, composer, userDefinedFieldDirectives); + } + if (!createFieldInputType) { + return; + } + + const relationInput = composer.getOrCreateITC(relationshipSource.operations.relationInputTypeName); + if (createFieldInputType) { + relationInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, + directives: deprecatedDirectives, + }, + }); + } + + return relationInput; +} + +export function withUnionRelationInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { + return; + } + const relationshipSource = relationshipAdapter.source; + if (relationshipSource instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + let createFieldInputType: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + createFieldInputType = withUnionCreateFieldInputType({ relationshipAdapter, composer, deprecatedDirectives }); + } + if (!createFieldInputType) { + return; + } + + const relationInput = composer.getOrCreateITC(relationshipSource.operations.relationInputTypeName); + if (createFieldInputType) { + relationInput.addFields({ + [relationshipAdapter.name]: { + type: createFieldInputType, + directives: deprecatedDirectives, + }, + }); + } + + return relationInput; +} + +// -------------------- WHERE INPUT ------------------------ +export function withSourceWhereInputType( + relationshipAdapter: RelationshipAdapter, + composer: SchemaComposer, + deprecatedDirectives: Directive[] +): InputTypeComposer | undefined { + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const relationshipSource = relationshipAdapter.source; + if (relationshipSource instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + const whereInput = composer.getITC(relationshipSource.operations.whereInputTypeName); + const fields = augmentWhereInputTypeWithRelationshipFields( + relationshipSource, + relationshipAdapter, + deprecatedDirectives + ); + whereInput.addFields(fields); + + const whereAggregateInput = withAggregateInputType({ + relationshipAdapter, + entityAdapter: relationshipTarget, + composer: composer, + }); + if (relationshipAdapter.isFilterableByAggregate()) { + whereInput.addFields({ + [relationshipAdapter.operations.aggregateTypeName]: { + type: whereAggregateInput, + directives: deprecatedDirectives, + }, + }); + } + + return whereInput; +} diff --git a/packages/graphql/src/schema/generation/delete-input.ts b/packages/graphql/src/schema/generation/delete-input.ts index e5ed2296c8..c730f14ab6 100644 --- a/packages/graphql/src/schema/generation/delete-input.ts +++ b/packages/graphql/src/schema/generation/delete-input.ts @@ -1,23 +1,132 @@ -import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compose"; +import { RelationshipNestedOperationsOption } from "../../constants"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { withDeleteFieldInputType, withDeleteFieldInputTypeI, withDeleteFieldInputTypeU } from "./create-input"; import { makeImplementationsDeleteInput } from "./implementation-inputs"; export function withDeleteInputType({ - interfaceEntityAdapter, + entityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; + entityAdapter: InterfaceEntityAdapter | ConcreteEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { - const implementationsUpdateInputType = makeImplementationsDeleteInput({ interfaceEntityAdapter, composer }); + if (entityAdapter instanceof ConcreteEntityAdapter) { + return composer.getOrCreateITC(entityAdapter.operations.updateMutationArgumentNames.delete); + } + const implementationsUpdateInputType = makeImplementationsDeleteInput({ + interfaceEntityAdapter: entityAdapter, + composer, + }); if (!implementationsUpdateInputType) { return undefined; } - const deleteInputType = composer.getOrCreateITC( - interfaceEntityAdapter.operations.updateMutationArgumentNames.delete - ); + const deleteInputType = composer.getOrCreateITC(entityAdapter.operations.updateMutationArgumentNames.delete); deleteInputType.setField("_on", implementationsUpdateInputType); return deleteInputType; } + +export function augmentDeleteInputTypeWithDeleteFieldInput({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}) { + let deleteFieldInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + deleteFieldInput = withDeleteFieldInputType(relationshipAdapter, composer); + } else { + deleteFieldInput = withDeleteFieldInputTypeI(relationshipAdapter, composer); + } + if (!deleteFieldInput) { + return; + } + + const deleteInput = withDeleteInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + composer, + }); + if (!deleteInput) { + return; + } + + deleteInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.isList ? deleteFieldInput.NonNull.List : deleteFieldInput, + directives: deprecatedDirectives, + }, + }); +} + +export function augmentDeleteInputTypeWithUnionDeleteFieldInput({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}) { + let deleteFieldInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + deleteFieldInput = withUnionDeleteInputType({ relationshipAdapter, composer, deprecatedDirectives }); + } + if (!deleteFieldInput) { + return; + } + + const deleteInput = withDeleteInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + composer, + }); + if (!deleteInput) { + return; + } + + deleteInput.addFields({ + [relationshipAdapter.name]: { + type: deleteFieldInput, + directives: deprecatedDirectives, + }, + }); +} + +export function withUnionDeleteInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { + return; + } + const deleteInput = composer.getOrCreateITC(relationshipAdapter.operations.unionDeleteInputTypeName); + + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withDeleteFieldInputTypeU(relationshipAdapter, memberEntity, composer); + if (fieldInput) { + deleteInput.addFields({ + [memberEntity.name]: { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }, + }); + } + } + + return deleteInput; +} diff --git a/packages/graphql/src/schema/generation/disconnect-input.ts b/packages/graphql/src/schema/generation/disconnect-input.ts index 6255322484..199f266534 100644 --- a/packages/graphql/src/schema/generation/disconnect-input.ts +++ b/packages/graphql/src/schema/generation/disconnect-input.ts @@ -1,16 +1,28 @@ -import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compose"; +import { RelationshipNestedOperationsOption } from "../../constants"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { + withDisconnectFieldInputType, + withDisconnectFieldInputTypeI, + withDisconnectFieldInputTypeU, +} from "./create-input"; import { makeImplementationsDisconnectInput } from "./implementation-inputs"; export function withDisconnectInputType({ - interfaceEntityAdapter, + entityAdapter, composer, }: { - interfaceEntityAdapter: InterfaceEntityAdapter; + entityAdapter: InterfaceEntityAdapter | ConcreteEntityAdapter; composer: SchemaComposer; }): InputTypeComposer | undefined { + if (entityAdapter instanceof ConcreteEntityAdapter) { + return composer.getOrCreateITC(entityAdapter.operations.updateMutationArgumentNames.disconnect); + } const implementationsDisconnectInputType = makeImplementationsDisconnectInput({ - interfaceEntityAdapter, + interfaceEntityAdapter: entityAdapter, composer, }); @@ -19,8 +31,108 @@ export function withDisconnectInputType({ } const disconnectInputType = composer.getOrCreateITC( - interfaceEntityAdapter.operations.updateMutationArgumentNames.disconnect + entityAdapter.operations.updateMutationArgumentNames.disconnect ); disconnectInputType.setField("_on", implementationsDisconnectInputType); return disconnectInputType; } + +export function augmentDisconnectInputTypeWithDisconnectFieldInput({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}) { + let disconnectFieldInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + disconnectFieldInput = withDisconnectFieldInputType(relationshipAdapter, composer); + } else { + disconnectFieldInput = withDisconnectFieldInputTypeI(relationshipAdapter, composer); + } + if (!disconnectFieldInput) { + return; + } + + const disconnectInput = withDisconnectInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + composer, + }); + if (!disconnectInput) { + return; + } + + disconnectInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.isList ? disconnectFieldInput.NonNull.List : disconnectFieldInput, + directives: deprecatedDirectives, + }, + }); +} + +export function augmentDisconnectInputTypeWithUnionConnectFieldInput({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}) { + let disconnectFieldInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + disconnectFieldInput = withUnionDisonnectInputType({ relationshipAdapter, composer, deprecatedDirectives }); + } + if (!disconnectFieldInput) { + return; + } + + const disconnectInput = withDisconnectInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + composer, + }); + if (!disconnectInput) { + return; + } + + disconnectInput.addFields({ + [relationshipAdapter.name]: { + type: disconnectFieldInput, + directives: deprecatedDirectives, + }, + }); +} + +export function withUnionDisonnectInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { + return; + } + const disconnectInput = composer.getOrCreateITC(relationshipAdapter.operations.unionDisconnectInputTypeName); + + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withDisconnectFieldInputTypeU(relationshipAdapter, memberEntity, composer); + if (fieldInput) { + disconnectInput.addFields({ + [memberEntity.name]: { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }, + }); + } + } + + return disconnectInput; +} diff --git a/packages/graphql/src/schema/generation/implementation-inputs.ts b/packages/graphql/src/schema/generation/implementation-inputs.ts index a481433604..c47e950ee3 100644 --- a/packages/graphql/src/schema/generation/implementation-inputs.ts +++ b/packages/graphql/src/schema/generation/implementation-inputs.ts @@ -1,6 +1,7 @@ import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { ensureNonEmptyInput } from "../ensure-non-empty-input"; +import { withWhereInputType } from "./where-input"; export function makeImplementationsDisconnectInput({ interfaceEntityAdapter, @@ -38,6 +39,7 @@ export function makeImplementationsConnectInput({ }): InputTypeComposer | undefined { const fields: InputTypeComposerFieldConfigMapDefinition = {}; for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { + // if (entityAdapter.relationships.size && composer.has(entityAdapter.operations.connectInputTypeName)) { if (entityAdapter.relationships.size) { fields[entityAdapter.name] = { type: `[${entityAdapter.operations.connectInputTypeName}!]`, diff --git a/packages/graphql/src/schema/generation/update-input.ts b/packages/graphql/src/schema/generation/update-input.ts index c647a68fae..46d0b0b064 100644 --- a/packages/graphql/src/schema/generation/update-input.ts +++ b/packages/graphql/src/schema/generation/update-input.ts @@ -1,9 +1,17 @@ import type { DirectiveNode } from "graphql"; -import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMap, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import { concreteEntityToUpdateInputFields, withArrayOperators, withMathOperators } from "../to-compose"; +import { withUpdateFieldInputType, withUpdateFieldInputTypeI, withUpdateFieldInputTypeU } from "./create-input"; import { makeImplementationsUpdateInput } from "./implementation-inputs"; export function withUpdateInputType({ @@ -18,7 +26,11 @@ export function withUpdateInputType({ const inputTypeName = entityAdapter instanceof RelationshipAdapter ? entityAdapter.operations.edgeUpdateInputTypeName - : entityAdapter.operations.updateMutationArgumentNames.update; + : // : entityAdapter.operations.updateMutationArgumentNames.update; TODO + entityAdapter.operations.updateInputTypeName; + if (composer.has(inputTypeName)) { + return composer.getITC(inputTypeName); + } const updateInputType = composer.createInputTC({ name: inputTypeName, fields: {}, @@ -47,3 +59,110 @@ export function withUpdateInputType({ // ensureNonEmptyInput(composer, updateInputType); - not for relationshipAdapter return updateInputType; } + +export function augmentUpdateInputTypeWithUpdateFieldInput({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + deprecatedDirectives: Directive[]; +}) { + const updateInput = withUpdateInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + userDefinedFieldDirectives, + composer, + }); + if (!updateInput) { + return; + } + let updateFieldInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + updateFieldInput = withUpdateFieldInputType(relationshipAdapter, composer, userDefinedFieldDirectives); + } else { + updateFieldInput = withUpdateFieldInputTypeI(relationshipAdapter, composer, userDefinedFieldDirectives); + } + if (!updateFieldInput) { + return; + } + updateInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.isList ? updateFieldInput.NonNull.List : updateFieldInput, + directives: deprecatedDirectives, + }, + }); +} + +export function augmentUpdateInputTypeWithUnionUpdateFieldInput({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; +}) { + let updateFieldInput: InputTypeComposer | undefined; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + updateFieldInput = withUnionUpdateInputType({ relationshipAdapter, composer, deprecatedDirectives }); + } + if (!updateFieldInput) { + return; + } + + const updateInput = withUpdateInputType({ + entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + composer, + userDefinedFieldDirectives, + }); + if (!updateInput) { + return; + } + + updateInput.addFields({ + [relationshipAdapter.name]: { + type: updateFieldInput, + directives: deprecatedDirectives, + }, + }); +} + +export function withUnionUpdateInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withUpdateFieldInputTypeU( + relationshipAdapter, + memberEntity, + composer, + new Map() + ); + if (fieldInput) { + fields[memberEntity.name] = { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }; + } + } + if (!Object.keys(fields).length) { + return; + } + const updateInput = composer.getOrCreateITC(relationshipAdapter.operations.unionUpdateInputTypeName); + updateInput.addFields(fields); + return updateInput; +} diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index 823d01d33d..4d1e5339b7 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -6,6 +6,7 @@ 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 { Neo4jFeaturesSettings } from "../../types"; +import { DEPRECATE_NOT } from "../constants"; import { getWhereFieldsForAttributes } from "../get-where-fields"; import { makeImplementationsWhereInput } from "./implementation-inputs"; @@ -38,22 +39,25 @@ export function withWhereInputType({ features: Neo4jFeaturesSettings | undefined; composer: SchemaComposer; }): InputTypeComposer { + if (composer.has(entityAdapter.operations.whereInputTypeName)) { + return composer.getITC(entityAdapter.operations.whereInputTypeName); + } const whereInputType = makeWhereInput({ entityAdapter, userDefinedFieldDirectives, features, composer }); if (entityAdapter instanceof ConcreteEntityAdapter) { whereInputType.addFields({ - OR: `[${entityAdapter.operations.whereInputTypeName}!]`, - AND: `[${entityAdapter.operations.whereInputTypeName}!]`, - NOT: entityAdapter.operations.whereInputTypeName, + OR: whereInputType.NonNull.List, + AND: whereInputType.NonNull.List, + NOT: whereInputType, }); if (entityAdapter.isGlobalNode()) { whereInputType.addFields({ id: GraphQLID }); } } else if (entityAdapter instanceof RelationshipAdapter) { whereInputType.addFields({ - OR: `[${entityAdapter.operations.whereInputTypeName}!]`, - AND: `[${entityAdapter.operations.whereInputTypeName}!]`, - NOT: entityAdapter.operations.whereInputTypeName, + OR: whereInputType.NonNull.List, + AND: whereInputType.NonNull.List, + NOT: whereInputType, }); } else if (entityAdapter instanceof InterfaceEntityAdapter) { const implementationsWhereInputType = makeImplementationsWhereInput({ @@ -107,3 +111,43 @@ function makeWhereFields({ features, }); } + +// TODO: make another one of these for non-union ConnectionWhereInputType +export function makeConnectionWhereInputType({ + relationshipAdapter, + memberEntity, + composer, +}: { + relationshipAdapter: RelationshipAdapter; + memberEntity: ConcreteEntityAdapter; + composer: SchemaComposer; +}): InputTypeComposer { + if (composer.has(relationshipAdapter.operations.getConnectionWhereTypename(memberEntity))) { + return composer.getITC(relationshipAdapter.operations.getConnectionWhereTypename(memberEntity)); + } + const connectionWhereInputType = composer.createInputTC({ + name: relationshipAdapter.operations.getConnectionWhereTypename(memberEntity), + fields: { + node: memberEntity.operations.whereInputTypeName, + node_NOT: { + type: memberEntity.operations.whereInputTypeName, + directives: [DEPRECATE_NOT], + }, + }, + }); + connectionWhereInputType.addFields({ + AND: connectionWhereInputType.NonNull.List, + OR: connectionWhereInputType.NonNull.List, + NOT: connectionWhereInputType, + }); + if (relationshipAdapter.propertiesTypeName) { + connectionWhereInputType.addFields({ + edge: relationshipAdapter.operations.whereInputTypeName, + edge_NOT: { + type: relationshipAdapter.operations.whereInputTypeName, + directives: [DEPRECATE_NOT], + }, + }); + } + return connectionWhereInputType; +} diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index abf236acdf..8d7470cae3 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -1131,12 +1131,12 @@ function doForInterfacesThatAreTargetOfARelationship({ }), ]; - withDeleteInputType({ interfaceEntityAdapter, composer }); - withConnectInputType({ interfaceEntityAdapter, composer }); - withDisconnectInputType({ interfaceEntityAdapter, composer }); + // withDeleteInputType({ interfaceEntityAdapter, composer }); + // withConnectInputType({ interfaceEntityAdapter, composer }); + // withDisconnectInputType({ interfaceEntityAdapter, composer }); - ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); - ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); + // ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}CreateInput`); + // ensureNonEmptyInput(composer, `${interfaceEntityAdapter.name}UpdateInput`); return relationships; } From 1441efed47dd3424ab3357aea2c2abaea959c890 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 22 Sep 2023 14:54:22 +0100 Subject: [PATCH 120/162] refactor functions to merge I+U+C into one single function --- .../model-adapters/RelationshipAdapter.ts | 24 +- .../create-relationship-fields.ts | 26 +- .../create-relationship-interface-fields.ts | 16 +- .../create-relationship-union-fields.ts | 34 +- .../fields/overwrite.ts | 7 +- .../schema/generation/augment-where-input.ts | 17 +- .../src/schema/generation/connect-input.ts | 198 +- .../generation/connect-or-create-input.ts | 219 + .../src/schema/generation/create-input.ts | 1292 +- .../src/schema/generation/delete-input.ts | 197 +- .../src/schema/generation/disconnect-input.ts | 204 +- .../generation/implementation-inputs.ts | 1 - .../src/schema/generation/relation-input.ts | 258 + .../src/schema/generation/update-input.ts | 335 +- .../graphql/src/schema/generation/utils.ts | 10 + .../src/schema/generation/where-input.ts | 98 +- .../tests/schema/subscriptions.test.ts | 12987 ++++++++-------- 17 files changed, 7983 insertions(+), 7940 deletions(-) create mode 100644 packages/graphql/src/schema/generation/connect-or-create-input.ts create mode 100644 packages/graphql/src/schema/generation/relation-input.ts create mode 100644 packages/graphql/src/schema/generation/utils.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 ab472ee06f..0bcd5f4333 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -246,18 +246,22 @@ export class RelationshipAdapter { } shouldGenerateUpdateFieldInputType(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): boolean { - let relationshipTarget = this.target; - if (ifUnionRelationshipTargetEntity) { - relationshipTarget = ifUnionRelationshipTargetEntity; + const onlyConnectOrCreate = + this.nestedOperations.size === 1 && + this.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE); + + if (this.target instanceof InterfaceEntityAdapter) { + return this.nestedOperations.size > 0 && !onlyConnectOrCreate; } - if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { - throw new Error("Expected target to be concrete."); + if (this.target instanceof UnionEntityAdapter) { + if (!ifUnionRelationshipTargetEntity) { + throw new Error("Expected member entity"); + } + const onlyConnectOrCreateAndNoUniqueFields = + onlyConnectOrCreate && !ifUnionRelationshipTargetEntity.uniqueFields.length; + return this.nestedOperations.size > 0 && !onlyConnectOrCreateAndNoUniqueFields; } - // If the only nestedOperation is connectOrCreate, it won't be generated if there are no unique fields on the related type - const onlyConnectOrCreateAndNoUniqueFields = - this.nestedOperations.size === 1 && - this.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - !relationshipTarget.uniqueFields.length; + const onlyConnectOrCreateAndNoUniqueFields = onlyConnectOrCreate && !this.target.uniqueFields.length; return this.nestedOperations.size > 0 && !onlyConnectOrCreateAndNoUniqueFields; } 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 420588a125..ecdee5f843 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 @@ -33,15 +33,13 @@ import { addRelationshipArrayFilters } from "../augment/add-relationship-array-f import { addDirectedArgument, addDirectedArgument2 } from "../directed-argument"; import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; import { augmentConnectInputTypeWithConnectFieldInput } from "../generation/connect-input"; -import { - augmentCreateInputTypeWithRelationshipsInput, - withConnectOrCreateInputType, - withRelationInputType, - withSourceWhereInputType, -} from "../generation/create-input"; +import { withConnectOrCreateInputType } from "../generation/connect-or-create-input"; +import { augmentCreateInputTypeWithRelationshipsInput } from "../generation/create-input"; import { augmentDeleteInputTypeWithDeleteFieldInput } from "../generation/delete-input"; import { augmentDisconnectInputTypeWithDisconnectFieldInput } from "../generation/disconnect-input"; +import { withRelationInputType } from "../generation/relation-input"; import { augmentUpdateInputTypeWithUpdateFieldInput } from "../generation/update-input"; +import { withSourceWhereInputType } from "../generation/where-input"; import type { ObjectFields } from "../get-obj-field-meta"; import { graphqlDirectivesToCompose } from "../to-compose"; import { createAggregationInputFields } from "./create-aggregation-input-fields"; @@ -567,7 +565,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } // ======== only on relationships to concrete: - withSourceWhereInputType(relationshipAdapter, schemaComposer, deprecatedDirectives); + withSourceWhereInputType({ relationshipAdapter, composer: schemaComposer, deprecatedDirectives }); // TODO: new way if (composeNode instanceof ObjectTypeComposer) { @@ -594,14 +592,24 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ // ======== only on relationships to concrete | unions: // TODO: refactor - withConnectOrCreateInputType(relationshipAdapter, schemaComposer, userDefinedFieldDirectives); + withConnectOrCreateInputType({ + relationshipAdapter, + composer: schemaComposer, + userDefinedFieldDirectives, + deprecatedDirectives, + }); // ======== all relationships: composeNode.addFields( augmentObjectOrInterfaceTypeWithRelationshipField(relationshipAdapter, userDefinedFieldDirectives, subgraph) ); - withRelationInputType(relationshipAdapter, schemaComposer, deprecatedDirectives, userDefinedFieldDirectives); + withRelationInputType({ + relationshipAdapter, + composer: schemaComposer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); augmentCreateInputTypeWithRelationshipsInput({ relationshipAdapter, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts index 55cfbba8e7..063b4a382b 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts @@ -27,13 +27,10 @@ import type { RelationField } from "../../types"; import { addDirectedArgument } from "../directed-argument"; import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; import { augmentConnectInputTypeWithConnectFieldInput } from "../generation/connect-input"; -import { - augmentCreateInputTypeWithRelationshipsInput, - withFieldInputType, - withRelationInputType, -} from "../generation/create-input"; +import { augmentCreateInputTypeWithRelationshipsInput, withFieldInputType } from "../generation/create-input"; import { augmentDeleteInputTypeWithDeleteFieldInput } from "../generation/delete-input"; import { augmentDisconnectInputTypeWithDisconnectFieldInput } from "../generation/disconnect-input"; +import { withRelationInputType } from "../generation/relation-input"; import { augmentUpdateInputTypeWithUpdateFieldInput } from "../generation/update-input"; import { graphqlDirectivesToCompose } from "../to-compose"; @@ -255,12 +252,17 @@ export function createRelationshipInterfaceFields2({ // this has to happen for InterfaceRelationships (Interfaces that are target of relationships) before it happens for ConcreteEntity targets // it has sth to do with fieldInputPrefixForTypename vs prefixForTypename // requires investigation - withFieldInputType(relationship, schemaComposer, userDefinedFieldDirectives); + withFieldInputType({ relationshipAdapter: relationship, composer: schemaComposer, userDefinedFieldDirectives }); // ======== all relationships: composeNode.addFields(augmentObjectOrInterfaceTypeWithRelationshipField(relationship, userDefinedFieldDirectives)); - withRelationInputType(relationship, schemaComposer, [], userDefinedFieldDirectives); + withRelationInputType({ + relationshipAdapter: relationship, + composer: schemaComposer, + deprecatedDirectives: [], + userDefinedFieldDirectives, + }); augmentCreateInputTypeWithRelationshipsInput({ relationshipAdapter: relationship, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts index aa87b608aa..ad2b2eac64 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts @@ -27,15 +27,13 @@ import type { RelationField } from "../../types"; import { DEPRECATE_NOT } from "../constants"; import { addDirectedArgument } from "../directed-argument"; import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; -import { augmentConnectInputTypeWithUnionConnectFieldInput } from "../generation/connect-input"; -import { - augmentCreateInputTypeWithRelationshipsInput, - withConnectOrCreateInputTypeU, - withUnionRelationInputType, -} from "../generation/create-input"; -import { augmentDeleteInputTypeWithUnionDeleteFieldInput } from "../generation/delete-input"; -import { augmentDisconnectInputTypeWithUnionConnectFieldInput } from "../generation/disconnect-input"; -import { augmentUpdateInputTypeWithUnionUpdateFieldInput } from "../generation/update-input"; +import { augmentConnectInputTypeWithConnectFieldInput } from "../generation/connect-input"; +import { withConnectOrCreateInputType } from "../generation/connect-or-create-input"; +import { augmentCreateInputTypeWithRelationshipsInput } from "../generation/create-input"; +import { augmentDeleteInputTypeWithDeleteFieldInput } from "../generation/delete-input"; +import { augmentDisconnectInputTypeWithDisconnectFieldInput } from "../generation/disconnect-input"; +import { withRelationInputType } from "../generation/relation-input"; +import { augmentUpdateInputTypeWithUpdateFieldInput } from "../generation/update-input"; import { graphqlDirectivesToCompose } from "../to-compose"; import { createConnectOrCreateField } from "./create-connect-or-create-field"; @@ -449,15 +447,21 @@ export function createRelationshipUnionFields2({ userDefinedFieldDirectives: Map; }) { // ======== only on relationships to concrete | unions: - withConnectOrCreateInputTypeU(relationship, schemaComposer, userDefinedFieldDirectives); + withConnectOrCreateInputType({ + relationshipAdapter: relationship, + composer: schemaComposer, + userDefinedFieldDirectives, + deprecatedDirectives: [], + }); // ======== all relationships: composeNode.addFields(augmentObjectOrInterfaceTypeWithRelationshipField(relationship, userDefinedFieldDirectives)); - withUnionRelationInputType({ + withRelationInputType({ relationshipAdapter: relationship, composer: schemaComposer, deprecatedDirectives: [], + userDefinedFieldDirectives, }); augmentCreateInputTypeWithRelationshipsInput({ @@ -467,26 +471,26 @@ export function createRelationshipUnionFields2({ userDefinedFieldDirectives, }); - augmentUpdateInputTypeWithUnionUpdateFieldInput({ + augmentUpdateInputTypeWithUpdateFieldInput({ relationshipAdapter: relationship, composer: schemaComposer, deprecatedDirectives: [], userDefinedFieldDirectives, }); - augmentConnectInputTypeWithUnionConnectFieldInput({ + augmentConnectInputTypeWithConnectFieldInput({ relationshipAdapter: relationship, composer: schemaComposer, deprecatedDirectives: [], }); - augmentDeleteInputTypeWithUnionDeleteFieldInput({ + augmentDeleteInputTypeWithDeleteFieldInput({ relationshipAdapter: relationship, composer: schemaComposer, deprecatedDirectives: [], }); - augmentDisconnectInputTypeWithUnionConnectFieldInput({ + augmentDisconnectInputTypeWithDisconnectFieldInput({ relationshipAdapter: relationship, composer: schemaComposer, deprecatedDirectives: [], diff --git a/packages/graphql/src/schema/create-relationship-fields/fields/overwrite.ts b/packages/graphql/src/schema/create-relationship-fields/fields/overwrite.ts index a4fa7383cc..3876446e06 100644 --- a/packages/graphql/src/schema/create-relationship-fields/fields/overwrite.ts +++ b/packages/graphql/src/schema/create-relationship-fields/fields/overwrite.ts @@ -17,10 +17,11 @@ * limitations under the License. */ -import { GraphQLBoolean } from "graphql"; +import { GraphQLBoolean, GraphQLNonNull } from "graphql"; +import type { InputTypeComposerFieldConfigDefinition } from "graphql-compose"; -export const overwrite = { - type: GraphQLBoolean, +export const overwrite: InputTypeComposerFieldConfigDefinition = { + type: new GraphQLNonNull(GraphQLBoolean), description: "Whether or not to overwrite any matching relationship with the new properties.", defaultValue: true, }; diff --git a/packages/graphql/src/schema/generation/augment-where-input.ts b/packages/graphql/src/schema/generation/augment-where-input.ts index 3c4c2c586f..fd5a8bc734 100644 --- a/packages/graphql/src/schema/generation/augment-where-input.ts +++ b/packages/graphql/src/schema/generation/augment-where-input.ts @@ -1,4 +1,4 @@ -import type { Directive, InputTypeComposer, InputTypeComposerFieldConfigMapDefinition } from "graphql-compose"; +import type { Directive, InputTypeComposerFieldConfigMapDefinition } from "graphql-compose"; import pluralize from "pluralize"; import { DEPRECATED } from "../../constants"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; @@ -54,18 +54,3 @@ export function augmentWhereInputTypeWithRelationshipFields( } return fields; } -// export function augmentWhereInputTypeWithRelationshipAggregateFields( -// relationshipAdapter: RelationshipAdapter, -// whereAggregateInput: InputTypeComposer, -// deprecatedDirectives: Directive[] -// ): InputTypeComposerFieldConfigMapDefinition { -// if (relationshipAdapter.isFilterableByAggregate()) { -// return { -// [`${relationshipAdapter.name}Aggregate`]: { -// type: whereAggregateInput, -// directives: deprecatedDirectives, -// }, -// }; -// } -// return {}; -// } diff --git a/packages/graphql/src/schema/generation/connect-input.ts b/packages/graphql/src/schema/generation/connect-input.ts index dc2f72cef8..07dce1ef3e 100644 --- a/packages/graphql/src/schema/generation/connect-input.ts +++ b/packages/graphql/src/schema/generation/connect-input.ts @@ -1,11 +1,19 @@ -import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMap, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; import { RelationshipNestedOperationsOption } from "../../constants"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; -import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { withConnectFieldInputType, withConnectFieldInputTypeI, withConnectFieldInputTypeU } from "./create-input"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { overwrite } from "../create-relationship-fields/fields/overwrite"; import { makeImplementationsConnectInput } from "./implementation-inputs"; +import { relationshipTargetHasRelationshipWithNestedOperation } from "./utils"; +import { withConnectWhereFieldInputType } from "./where-input"; export function withConnectInputType({ entityAdapter, @@ -40,33 +48,33 @@ export function augmentConnectInputTypeWithConnectFieldInput({ composer: SchemaComposer; deprecatedDirectives: Directive[]; }) { - let connectFieldInput: InputTypeComposer | undefined; - if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { - connectFieldInput = withConnectFieldInputType(relationshipAdapter, composer); - } else if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { - connectFieldInput = withConnectFieldInputTypeI(relationshipAdapter, composer); + if (relationshipAdapter.source instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); } + const connectFieldInput = makeConnectInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + }); if (!connectFieldInput) { return; } - const connectInput = withConnectInputType({ - entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + entityAdapter: relationshipAdapter.source, composer, }); if (!connectInput) { return; } - - connectInput.addFields({ - [relationshipAdapter.name]: { - type: relationshipAdapter.isList ? connectFieldInput.NonNull.List : connectFieldInput, - directives: deprecatedDirectives, - }, + const relationshipField = makeConnectInputTypeRelationshipField({ + relationshipAdapter, + connectFieldInput, + deprecatedDirectives, }); + connectInput.addFields(relationshipField); } -export function augmentConnectInputTypeWithUnionConnectFieldInput({ +function makeConnectInputType({ relationshipAdapter, composer, deprecatedDirectives, @@ -74,32 +82,38 @@ export function augmentConnectInputTypeWithUnionConnectFieldInput({ relationshipAdapter: RelationshipAdapter; composer: SchemaComposer; deprecatedDirectives: Directive[]; -}) { - let connectFieldInput: InputTypeComposer | undefined; +}): InputTypeComposer | undefined { if (relationshipAdapter.target instanceof UnionEntityAdapter) { - connectFieldInput = withUnionConnectInputType({ relationshipAdapter, composer, deprecatedDirectives }); + return withUnionConnectInputType({ relationshipAdapter, composer, deprecatedDirectives }); } - if (!connectFieldInput) { - return; - } - - const connectInput = withConnectInputType({ - entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, - composer, - }); - if (!connectInput) { - return; + return withConnectFieldInputType({ relationshipAdapter, composer }); +} +function makeConnectInputTypeRelationshipField({ + relationshipAdapter, + connectFieldInput, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + connectFieldInput: InputTypeComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMap { + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return { + [relationshipAdapter.name]: { + type: connectFieldInput, + directives: deprecatedDirectives, + }, + }; } - - connectInput.addFields({ + return { [relationshipAdapter.name]: { - type: connectFieldInput, + type: relationshipAdapter.isList ? connectFieldInput.NonNull.List : connectFieldInput, directives: deprecatedDirectives, }, - }); + }; } -export function withUnionConnectInputType({ +function withUnionConnectInputType({ relationshipAdapter, composer, deprecatedDirectives, @@ -108,25 +122,121 @@ export function withUnionConnectInputType({ composer: SchemaComposer; deprecatedDirectives: Directive[]; }): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.unionConnectInputTypeName; if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { return; } - const connectInput = composer.getOrCreateITC(relationshipAdapter.operations.unionConnectInputTypeName); + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const fields = makeUnionConnectInputTypeFields({ relationshipAdapter, composer, deprecatedDirectives }); + if (!Object.keys(fields).length) { + return; + } + const connectInput = composer.createInputTC({ + name: typeName, + fields, + }); + return connectInput; +} +function makeUnionConnectInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { throw new Error("Expected union target"); } for (const memberEntity of relationshipAdapter.target.concreteEntities) { - const fieldInput = withConnectFieldInputTypeU(relationshipAdapter, memberEntity, composer); + const fieldInput = withConnectFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity: memberEntity, + composer, + }); if (fieldInput) { - connectInput.addFields({ - [memberEntity.name]: { - type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, - directives: deprecatedDirectives, - }, - }); + fields[memberEntity.name] = { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }; } } + return fields; +} - return connectInput; +export function withConnectFieldInputType({ + relationshipAdapter, + composer, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.getConnectFieldInputTypeName(ifUnionMemberEntity); + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { + return; + } + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const connectFieldInput = composer.createInputTC({ + name: typeName, + fields: makeConnectFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity }), + }); + return connectFieldInput; +} +function makeConnectFieldInputTypeFields({ + relationshipAdapter, + composer, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposerFieldConfigMapDefinition { + const fields = {}; + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + fields["edge"] = relationshipAdapter.operations.edgeCreateInputTypeName; + } + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + fields["where"] = withConnectWhereFieldInputType(relationshipAdapter.target, composer); + fields["overwrite"] = overwrite; + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipAdapter.target, + RelationshipNestedOperationsOption.CONNECT + ) + ) { + const connectInput = withConnectInputType({ entityAdapter: relationshipAdapter.target, composer }); + if (connectInput) { + fields["connect"] = relationshipAdapter.isList ? connectInput.NonNull.List : connectInput; + } + } + } else if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + fields["where"] = withConnectWhereFieldInputType(relationshipAdapter.target, composer); + const connectInputType = withConnectInputType({ entityAdapter: relationshipAdapter.target, composer }); + if (connectInputType) { + fields["connect"] = connectInputType; + } + } else { + if (!ifUnionMemberEntity) { + throw new Error("Member Entity required."); + } + fields["where"] = withConnectWhereFieldInputType(ifUnionMemberEntity, composer); + if (ifUnionMemberEntity.relationships.size) { + const connectInputType = withConnectInputType({ entityAdapter: ifUnionMemberEntity, composer }); + if (connectInputType) { + fields["connect"] = relationshipAdapter.isList ? connectInputType.NonNull.List : connectInputType; + } + } + } + + return fields; } diff --git a/packages/graphql/src/schema/generation/connect-or-create-input.ts b/packages/graphql/src/schema/generation/connect-or-create-input.ts new file mode 100644 index 0000000000..9c4a352efa --- /dev/null +++ b/packages/graphql/src/schema/generation/connect-or-create-input.ts @@ -0,0 +1,219 @@ +import type { DirectiveNode } from "graphql"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMap, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; +import { RelationshipNestedOperationsOption } from "../../constants"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { createOnCreateITC2 } from "../create-relationship-fields/create-connect-or-create-field"; + +// TODO: refactor this +export function withConnectOrCreateFieldInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposer | undefined { + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) { + return; + } + + let targetEntity: ConcreteEntityAdapter | undefined; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + if (!ifUnionMemberEntity) { + throw new Error("Expected member entity."); + } + targetEntity = ifUnionMemberEntity; + } else { + if (!(relationshipAdapter.target instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + targetEntity = relationshipAdapter.target; + } + if ( + !relationshipAdapter.shouldGenerateFieldInputType(ifUnionMemberEntity) && + !relationshipAdapter.shouldGenerateUpdateFieldInputType(ifUnionMemberEntity) + ) { + return; + } + + const hasUniqueFields = targetEntity.uniqueFields.length > 0; + if (hasUniqueFields !== true) { + return; + } + + createOnCreateITC2({ + schemaComposer: composer, + relationshipAdapter, + targetEntityAdapter: targetEntity, + userDefinedFieldDirectives, + }); + + // TODO: this should live in the where-fields.ts + composer.getOrCreateITC(targetEntity.operations.connectOrCreateWhereInputTypeName, (tc) => { + tc.addFields((targetEntity as ConcreteEntityAdapter).operations.connectOrCreateWhereInputFieldNames); + }); + + const connectOrCreateName = relationshipAdapter.operations.getConnectOrCreateFieldInputTypeName(targetEntity); + const connectOrCreateFieldInput = composer.getOrCreateITC(connectOrCreateName, (tc) => { + tc.addFields( + relationshipAdapter.operations.getConnectOrCreateInputFields(targetEntity as ConcreteEntityAdapter) || {} + ); + }); + return connectOrCreateFieldInput; +} + +export function withConnectOrCreateInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (relationshipAdapter.source instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + const typeName = relationshipAdapter.source.operations.connectOrCreateInputTypeName; + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + + const fieldInput = makeConnectOrCreateInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + deprecatedDirectives, + }); + if (!fieldInput) { + return; + } + + const fields = makeConnectOrCreateInputTypeRelationshipField({ + relationshipAdapter, + fieldInput, + deprecatedDirectives, + }); + const connectOrCreateInput = composer.createInputTC({ name: typeName, fields }); + return connectOrCreateInput; +} +function makeConnectOrCreateInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return withRelationshipConnectOrCreateInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); + } + return withConnectOrCreateFieldInputType({ relationshipAdapter, composer, userDefinedFieldDirectives }); +} +function makeConnectOrCreateInputTypeRelationshipField({ + relationshipAdapter, + fieldInput, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + fieldInput: InputTypeComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMap { + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return { + [relationshipAdapter.name]: { + type: fieldInput, + directives: deprecatedDirectives, + }, + }; + } + return { + [relationshipAdapter.name]: { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }, + }; +} + +function withRelationshipConnectOrCreateInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.getConnectOrCreateInputTypeName(); + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const fields = makeUnionConnectOrCreateInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); + if (!Object.keys(fields).length) { + return; + } + const connectOrCreateInput = composer.createInputTC({ name: typeName, fields }); + return connectOrCreateInput; +} +function makeUnionConnectOrCreateInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withConnectOrCreateFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity: memberEntity, + composer, + userDefinedFieldDirectives, + }); + if (fieldInput) { + fields[memberEntity.name] = { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }; + } + } + return fields; +} diff --git a/packages/graphql/src/schema/generation/create-input.ts b/packages/graphql/src/schema/generation/create-input.ts index dceedb5dd1..70150297d7 100644 --- a/packages/graphql/src/schema/generation/create-input.ts +++ b/packages/graphql/src/schema/generation/create-input.ts @@ -5,21 +5,14 @@ import type { InputTypeComposerFieldConfigMapDefinition, SchemaComposer, } from "graphql-compose"; -import { RelationshipNestedOperationsOption } from "../../constants"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { createOnCreateITC2 } from "../create-relationship-fields/create-connect-or-create-field"; -import { overwrite } from "../create-relationship-fields/fields/overwrite"; import { concreteEntityToCreateInputFields } from "../to-compose"; -import { withAggregateInputType } from "./aggregate-types"; -import { augmentWhereInputTypeWithRelationshipFields } from "./augment-where-input"; -import { withConnectInputType } from "./connect-input"; -import { withDeleteInputType } from "./delete-input"; -import { withDisconnectInputType } from "./disconnect-input"; -import { withUpdateInputType } from "./update-input"; -import { makeConnectionWhereInputType } from "./where-input"; +import { withConnectFieldInputType } from "./connect-input"; +import { withConnectOrCreateFieldInputType } from "./connect-or-create-input"; +import { withCreateFieldInputType } from "./relation-input"; export function withCreateInputType({ entityAdapter, @@ -62,6 +55,7 @@ function makeCreateInputFields( return fields; } +// -------------------- FIELD INPUT ------------------------ export function augmentCreateInputTypeWithRelationshipsInput({ relationshipAdapter, composer, @@ -82,12 +76,12 @@ export function augmentCreateInputTypeWithRelationshipsInput({ return; } - let relationshipsInput: InputTypeComposer | undefined; - if (relationshipAdapter.target instanceof UnionEntityAdapter) { - relationshipsInput = withUnionCreateInputType({ relationshipAdapter, composer, deprecatedDirectives }); - } else { - relationshipsInput = withFieldInputType(relationshipAdapter, composer, userDefinedFieldDirectives); - } + const relationshipsInput = makeRelationshipsInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); if (!relationshipsInput) { return; } @@ -108,1243 +102,179 @@ export function augmentCreateInputTypeWithRelationshipsInput({ }); } -export function withUnionCreateInputType({ +function makeRelationshipsInputType({ relationshipAdapter, composer, + userDefinedFieldDirectives, deprecatedDirectives, }: { relationshipAdapter: RelationshipAdapter; composer: SchemaComposer; + userDefinedFieldDirectives: Map; deprecatedDirectives: Directive[]; }): InputTypeComposer | undefined { - if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { - throw new Error("Expected union target"); - } - // if (!relationshipAdapter.shouldGenerateFieldInputType()) { - // return; - // } - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const memberEntity of relationshipAdapter.target.concreteEntities) { - const fieldInput = withUnionFieldInputType( + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return withUnionCreateInputType({ relationshipAdapter, - memberEntity, composer, - new Map() - ); - if (fieldInput) { - fields[memberEntity.name] = { - type: fieldInput, - directives: deprecatedDirectives, - }; - } - } - if (!Object.keys(fields).length) { - return; + deprecatedDirectives, + userDefinedFieldDirectives, + }); + } else { + return withFieldInputType({ relationshipAdapter, composer, userDefinedFieldDirectives }); } - const createInput = composer.getOrCreateITC(relationshipAdapter.operations.unionCreateInputTypeName); - createInput.addFields(fields); - return createInput; } -export function withUnionCreateFieldInputType({ +function withUnionCreateInputType({ relationshipAdapter, composer, deprecatedDirectives, + userDefinedFieldDirectives, }: { relationshipAdapter: RelationshipAdapter; composer: SchemaComposer; deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; }): InputTypeComposer | undefined { - if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { - throw new Error("Expected union target"); - } - const fields: InputTypeComposerFieldConfigMapDefinition = {}; - for (const memberEntity of relationshipAdapter.target.concreteEntities) { - const fieldInput = withCreateFieldInputTypeU( - relationshipAdapter, - memberEntity, - composer, - new Map() - ); - if (fieldInput) { - fields[memberEntity.name] = { - type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, - directives: deprecatedDirectives, - }; - } - } - if (!Object.keys(fields).length) { - return; - } - const createInput = composer.getOrCreateITC(relationshipAdapter.operations.unionCreateFieldInputTypeName); - createInput.addFields(fields); - return createInput; -} - -// ------------------- CONNECT OR CREATE --------------- -// TODO: refactor this -export function withConnectOrCreateFieldInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map, - ifUnionMemberEntity?: ConcreteEntityAdapter -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) { - return; + const typeName = relationshipAdapter.operations.unionCreateInputTypeName; + if (composer.has(typeName)) { + return composer.getITC(typeName); } - - let targetEntity: ConcreteEntityAdapter | undefined; - if (relationshipAdapter.target instanceof UnionEntityAdapter) { - if (!ifUnionMemberEntity) { - throw new Error("Expected member entity."); - } - targetEntity = ifUnionMemberEntity; - } else { - if (!(relationshipAdapter.target instanceof ConcreteEntityAdapter)) { - throw new Error("Expected concrete target"); - } - targetEntity = relationshipAdapter.target; - } - if ( - !relationshipAdapter.shouldGenerateFieldInputType(ifUnionMemberEntity) && - !relationshipAdapter.shouldGenerateUpdateFieldInputType(ifUnionMemberEntity) - ) { - return; - } - - const hasUniqueFields = targetEntity.uniqueFields.length > 0; - if (hasUniqueFields !== true) { - return; - } - - createOnCreateITC2({ - schemaComposer: composer, + const fields = makeUnionCreateInputTypeFields({ relationshipAdapter, - targetEntityAdapter: targetEntity, + composer, + deprecatedDirectives, userDefinedFieldDirectives, }); - - composer.getOrCreateITC(targetEntity.operations.connectOrCreateWhereInputTypeName, (tc) => { - tc.addFields((targetEntity as ConcreteEntityAdapter).operations.connectOrCreateWhereInputFieldNames); - }); - - const connectOrCreateName = relationshipAdapter.operations.getConnectOrCreateFieldInputTypeName(targetEntity); - const connectOrCreateFieldInput = composer.getOrCreateITC(connectOrCreateName, (tc) => { - tc.addFields( - relationshipAdapter.operations.getConnectOrCreateInputFields(targetEntity as ConcreteEntityAdapter) || {} - ); - }); - return connectOrCreateFieldInput; -} -export function withConnectOrCreateInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (relationshipAdapter.source instanceof UnionEntityAdapter) { - throw new Error("Unexpected union source"); - } - - const fieldInput = withConnectOrCreateFieldInputType(relationshipAdapter, composer, userDefinedFieldDirectives); - if (!fieldInput) { - return; - } - - const connectOrCreateInput = composer.getOrCreateITC( - relationshipAdapter.source.operations.connectOrCreateInputTypeName - ); - connectOrCreateInput.addFields({ - [relationshipAdapter.name]: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, - }); - return connectOrCreateInput; -} -export function withConnectOrCreateInputTypeU( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (relationshipAdapter.source instanceof UnionEntityAdapter) { - throw new Error("Unexpected union source"); - } - - const fieldInput = withRelationshipConnectOrCreateInputType( - relationshipAdapter, - composer, - userDefinedFieldDirectives - ); - if (!fieldInput) { + if (!Object.keys(fields).length) { return; } - - const connectOrCreateInput = composer.getOrCreateITC( - relationshipAdapter.source.operations.connectOrCreateInputTypeName - ); - connectOrCreateInput.addFields({ - [relationshipAdapter.name]: fieldInput, + const createInput = composer.createInputTC({ + name: typeName, + fields, }); - return connectOrCreateInput; + return createInput; } -export function withRelationshipConnectOrCreateInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { +function makeUnionCreateInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { throw new Error("Expected union target"); } - - const fields: InputTypeComposerFieldConfigMapDefinition = {}; for (const memberEntity of relationshipAdapter.target.concreteEntities) { - const fieldInput = withConnectOrCreateFieldInputType( + const fieldInput = withFieldInputType({ relationshipAdapter, + ifUnionMemberEntity: memberEntity, composer, userDefinedFieldDirectives, - memberEntity - ); - if (fieldInput) { - fields[memberEntity.name] = relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput; - } - } - - if (!Object.keys(fields).length) { - return; - } - - const connectOrCreateInput = composer.getOrCreateITC( - relationshipAdapter.operations.getConnectOrCreateInputTypeName() - ); - connectOrCreateInput.addFields(fields); - return connectOrCreateInput; -} - -// ------------------- CREATE -------------------------- -export function withCreateFieldInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - return; - } - if ( - !relationshipAdapter.shouldGenerateFieldInputType() && - !relationshipAdapter.shouldGenerateUpdateFieldInputType() - ) { - return; - } - if (!(relationshipAdapter.target instanceof ConcreteEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const createName = relationshipAdapter.operations.getCreateFieldInputTypeName(); - const createFieldInput = composer.getOrCreateITC(createName, (tc) => { - tc.addFields({ - node: `${(relationshipAdapter.target as ConcreteEntityAdapter).operations.createInputTypeName}!`, - }); - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationshipAdapter.operations.edgeCreateInputTypeName, - }); - } - }); - return createFieldInput; -} -export function withCreateFieldInputTypeU( - relationshipAdapter: RelationshipAdapter, - memberEntity: ConcreteEntityAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - return; - } - if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { - throw new Error("Expected union target"); - } - const createName = relationshipAdapter.operations.getCreateFieldInputTypeName(memberEntity); - const createFieldInput = composer.getOrCreateITC(createName, (tc) => { - const createInputType = withCreateInputType({ - entityAdapter: memberEntity, - userDefinedFieldDirectives, - composer, - }); - tc.addFields({ - node: createInputType.NonNull, - }); - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationshipAdapter.operations.edgeCreateInputTypeName, - }); - } - }); - return createFieldInput; -} -export function withCreateFieldInputTypeI( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - return; - } - if (!(relationshipAdapter.target instanceof InterfaceEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const createName = relationshipAdapter.operations.getCreateFieldInputTypeName(); - const createFieldInput = composer.getOrCreateITC(createName, (tc) => { - const createInputType = withCreateInputType({ - entityAdapter: relationshipAdapter.target as InterfaceEntityAdapter, - userDefinedFieldDirectives, - composer, }); - tc.addFields({ - node: createInputType.NonNull, - }); - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationshipAdapter.operations.edgeCreateInputTypeName, - }); - } - }); - return createFieldInput; -} - -// ------------------- CONNECT -------------------------- -export function withConnectFieldInputTypeI( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { - throw new Error("Unexpected"); - } - const connectFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getConnectFieldInputTypeName(), - (tc) => { - tc.addFields({ - where: withConnectWhereFieldInputType(relationshipTarget, composer), - }); - const connectInputType = withConnectInputType({ entityAdapter: relationshipTarget, composer }); - if (connectInputType) { - tc.addFields({ - connect: connectInputType, - }); - } - - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationshipAdapter.operations.edgeCreateInputTypeName, - }); - } + if (fieldInput) { + fields[memberEntity.name] = { + type: fieldInput, + directives: deprecatedDirectives, + }; } - ); - return connectFieldInput; -} -export function withConnectFieldInputTypeU( - relationshipAdapter: RelationshipAdapter, - memberEntity: ConcreteEntityAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof UnionEntityAdapter)) { - throw new Error("Unexpected"); } - const connectFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getConnectFieldInputTypeName(memberEntity), - (tc) => { - tc.addFields({ - where: withConnectWhereFieldInputType(memberEntity, composer), - }); - if (memberEntity.relationships.size) { - const connectInputType = withConnectInputType({ entityAdapter: memberEntity, composer }); - if (connectInputType) { - tc.addFields({ - connect: relationshipAdapter.isList ? connectInputType.NonNull.List : connectInputType, - }); - } - } - - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationshipAdapter.operations.edgeCreateInputTypeName, - }); - } - } - ); - return connectFieldInput; + return fields; } -export function withConnectFieldInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { - return; +export function withFieldInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.getFieldInputTypeName(ifUnionMemberEntity); + if (composer.has(typeName)) { + return composer.getITC(typeName); } - if ( - !relationshipAdapter.shouldGenerateFieldInputType() && - !relationshipAdapter.shouldGenerateUpdateFieldInputType() - ) { + if (!relationshipAdapter.shouldGenerateFieldInputType(ifUnionMemberEntity)) { return; } - const relationshipTarget = relationshipAdapter.target; - if (relationshipTarget instanceof UnionEntityAdapter) { - throw new Error("Unexpected"); - } - const connectFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getConnectFieldInputTypeName(), - (tc) => { - tc.addFields({ - where: withConnectWhereFieldInputType(relationshipTarget, composer), - }); - if ( - relationshipTargetHasRelationshipWithNestedOperation( - relationshipTarget, - RelationshipNestedOperationsOption.CONNECT - ) - ) { - tc.addFields({ - connect: relationshipAdapter.isList - ? `[${relationshipTarget.operations.connectInputTypeName}!]` - : relationshipTarget.operations.connectInputTypeName, - }); - } - - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: relationshipAdapter.operations.edgeCreateInputTypeName, - }); - } - - tc.addFields({ overwrite }); - tc.makeFieldNonNull("overwrite"); - } - ); - return connectFieldInput; -} - -function withConnectWhereFieldInputType( - relationshipTarget: ConcreteEntityAdapter | InterfaceEntityAdapter, - composer: SchemaComposer -): InputTypeComposer { - const connectWhereName = relationshipTarget.operations.connectWhereInputTypeName; - if (composer.has(connectWhereName)) { - return composer.getITC(connectWhereName); - } - const connectWhereType = composer.getOrCreateITC(connectWhereName, (tc) => { - tc.addFields({ node: `${relationshipTarget.operations.whereInputTypeName}!` }); + const fields = makeFieldInputTypeFields({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, }); - return connectWhereType; -} - -function relationshipTargetHasRelationshipWithNestedOperation( - target: ConcreteEntityAdapter | InterfaceEntityAdapter, - nestedOperation: RelationshipNestedOperationsOption -): boolean { - return Array.from(target.relationships.values()).some((rel) => rel.nestedOperations.has(nestedOperation)); -} - -// ------------------- DISCONNECT -------------------------- -export function withDisconnectFieldInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { - return; - } - if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const disconnectFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getDisconnectFieldInputTypeName(), - (tc) => { - tc.addFields({ - where: relationshipAdapter.operations.getConnectionWhereTypename(), - }); - if ( - relationshipTargetHasRelationshipWithNestedOperation( - relationshipTarget, - RelationshipNestedOperationsOption.DISCONNECT - ) - ) { - tc.addFields({ - disconnect: relationshipTarget.operations.disconnectInputTypeName, - }); - } - } - ); - return disconnectFieldInput; -} -export function withDisconnectFieldInputTypeU( - relationshipAdapter: RelationshipAdapter, - memberEntity: ConcreteEntityAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof UnionEntityAdapter)) { - throw new Error("Expected union target"); - } - const disconnectFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getDisconnectFieldInputTypeName(memberEntity), - (tc) => { - tc.addFields({ - where: makeConnectionWhereInputType({ relationshipAdapter, memberEntity, composer }), - }); - if (memberEntity.relationships.size) { - const disconnectInputType = withDisconnectInputType({ - entityAdapter: memberEntity, - composer, - }); - if (disconnectInputType) { - tc.addFields({ - disconnect: memberEntity.operations.disconnectInputTypeName, - }); - } - } - } - ); - return disconnectFieldInput; -} -export function withDisconnectFieldInputTypeI( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { - throw new Error("Expected interface target"); - } - const disconnectFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getDisconnectFieldInputTypeName(), - (tc) => { - tc.addFields({ - where: relationshipAdapter.operations.getConnectionWhereTypename(), - }); - const disconnectInputType = withDisconnectInputType({ - entityAdapter: relationshipTarget, - composer, - }); - if (disconnectInputType) { - tc.addFields({ - disconnect: relationshipTarget.operations.disconnectInputTypeName, - }); - } - } - ); - return disconnectFieldInput; -} - -// ------------------- DELETE -------------------------- -export function withDeleteFieldInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { - return; - } - if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const deleteFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getDeleteFieldInputTypeName(), - (tc) => { - tc.addFields({ - where: relationshipAdapter.operations.getConnectionWhereTypename(), - }); - if ( - relationshipTargetHasRelationshipWithNestedOperation( - relationshipTarget, - RelationshipNestedOperationsOption.DELETE - ) - ) { - tc.addFields({ - delete: relationshipTarget.operations.deleteInputTypeName, - }); - } - } - ); - return deleteFieldInput; -} -export function withDeleteFieldInputTypeU( - relationshipAdapter: RelationshipAdapter, - memberEntity: ConcreteEntityAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof UnionEntityAdapter)) { - throw new Error("Expected union target"); - } - const deleteFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getDeleteFieldInputTypeName(memberEntity), - (tc) => { - tc.addFields({ - where: makeConnectionWhereInputType({ relationshipAdapter, memberEntity, composer }), - }); - if (memberEntity.relationships.size) { - const deleteInputType = withDeleteInputType({ entityAdapter: memberEntity, composer }); - if (deleteInputType) { - tc.addFields({ - delete: memberEntity.operations.deleteInputTypeName, - }); - } - } - } - ); - return deleteFieldInput; -} -export function withDeleteFieldInputTypeI( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { - throw new Error("Expected interface target"); - } - const deleteFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getDeleteFieldInputTypeName(), - (tc) => { - tc.addFields({ - where: relationshipAdapter.operations.getConnectionWhereTypename(), - }); - const deleteInputType = withDeleteInputType({ entityAdapter: relationshipTarget, composer }); - if (deleteInputType) { - tc.addFields({ - delete: relationshipTarget.operations.deleteInputTypeName, - }); - } - } - ); - return deleteFieldInput; -} - -// ------------------- UPDATE -------------------------- -export function withUpdateConnectionFieldInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer -): InputTypeComposer | undefined { - if (!relationshipAdapter.isUpdatable()) { - return; - } - if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const updateFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getUpdateConnectionInputTypename(), - (tc) => { - tc.addFields({ - node: relationshipTarget.operations.updateInputTypeName, - }); - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationshipAdapter.operations.edgeUpdateInputTypeName }); - } - } - ); - return updateFieldInput; -} -export function withUpdateConnectionFieldInputTypeU( - relationshipAdapter: RelationshipAdapter, - memberEntity: ConcreteEntityAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - // TODO: should this be checked in withUpdateFieldInputTypeU update instead? - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - return; - } - - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof UnionEntityAdapter)) { - throw new Error("Expected union target"); - } - const updateFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getUpdateConnectionInputTypename(memberEntity), - (tc) => { - const updateInputType = withUpdateInputType({ - entityAdapter: memberEntity, - userDefinedFieldDirectives, - composer, - }); - tc.addFields({ - node: updateInputType, - }); - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationshipAdapter.operations.edgeUpdateInputTypeName }); - } - } - ); - return updateFieldInput; -} -export function withUpdateConnectionFieldInputTypeI( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - return; - } - - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const updateFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getUpdateConnectionInputTypename(), - (tc) => { - const updateInputType = withUpdateInputType({ - entityAdapter: relationshipAdapter.target as InterfaceEntityAdapter, - userDefinedFieldDirectives, - composer, - }); - tc.addFields({ - node: updateInputType, - }); - const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - if (hasNonGeneratedProperties) { - tc.addFields({ edge: relationshipAdapter.operations.edgeUpdateInputTypeName }); - } - } - ); - return updateFieldInput; -} - -export function withUpdateFieldInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { - return; - } - if (!relationshipAdapter.isUpdatable()) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const updateFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getUpdateFieldInputTypeName(), - (tc) => { - const connectFieldInputType = withConnectFieldInputType(relationshipAdapter, composer); - if (connectFieldInputType) { - tc.addFields({ - connect: { - type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, - directives: [], - }, - }); - } - const deleteFieldInputType = withDeleteFieldInputType(relationshipAdapter, composer); - if (deleteFieldInputType) { - tc.addFields({ - delete: { - type: relationshipAdapter.isList ? deleteFieldInputType.NonNull.List : deleteFieldInputType, - directives: [], - }, - }); - } - const disconnectFieldInputType = withDisconnectFieldInputType(relationshipAdapter, composer); - if (disconnectFieldInputType) { - tc.addFields({ - disconnect: { - type: relationshipAdapter.isList - ? disconnectFieldInputType.NonNull.List - : disconnectFieldInputType, - directives: [], - }, - }); - } - const createFieldInputType = withCreateFieldInputType(relationshipAdapter, composer); - if (createFieldInputType) { - tc.addFields({ - create: { - type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, - directives: [], - }, - }); - } - if (relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - const updateFieldInputType = withUpdateConnectionFieldInputType(relationshipAdapter, composer); - if (updateFieldInputType) { - tc.addFields({ - update: { - type: updateFieldInputType, - directives: [], - }, - }); - } - } - - // TODO: where is this coming from? - tc.addFields({ - where: relationshipAdapter.operations.getConnectionWhereTypename(), - }); - const connectOrCreateFieldInputType = withConnectOrCreateFieldInputType( - relationshipAdapter, - composer, - userDefinedFieldDirectives - ); - if (connectOrCreateFieldInputType) { - tc.addFields({ - connectOrCreate: { - type: relationshipAdapter.isList - ? connectOrCreateFieldInputType.NonNull.List - : connectOrCreateFieldInputType, - directives: [], - }, - }); - } - } - ); - return updateFieldInput; -} -export function withUpdateFieldInputTypeU( - relationshipAdapter: RelationshipAdapter, - memberEntity: ConcreteEntityAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (!relationshipAdapter.shouldGenerateUpdateFieldInputType(memberEntity)) { - return; - } - if (!relationshipAdapter.isUpdatable()) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof UnionEntityAdapter)) { - throw new Error("Expected union target"); - } - const updateFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getUpdateFieldInputTypeName(memberEntity), - (tc) => { - const connectFieldInputType = withConnectFieldInputTypeU(relationshipAdapter, memberEntity, composer); - if (connectFieldInputType) { - tc.addFields({ - connect: { - type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, - directives: [], - }, - }); - } - const deleteFieldInputType = withDeleteFieldInputTypeU(relationshipAdapter, memberEntity, composer); - if (deleteFieldInputType) { - tc.addFields({ - delete: { - type: relationshipAdapter.isList ? deleteFieldInputType.NonNull.List : deleteFieldInputType, - directives: [], - }, - }); - } - const disconnectFieldInputType = withDisconnectFieldInputTypeU(relationshipAdapter, memberEntity, composer); - if (disconnectFieldInputType) { - tc.addFields({ - disconnect: { - type: relationshipAdapter.isList - ? disconnectFieldInputType.NonNull.List - : disconnectFieldInputType, - directives: [], - }, - }); - } - const createFieldInputType = withCreateFieldInputTypeU( - relationshipAdapter, - memberEntity, - composer, - userDefinedFieldDirectives - ); - if (createFieldInputType) { - tc.addFields({ - create: { - type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, - directives: [], - }, - }); - } - const connectOrCreateFieldInputType = withConnectOrCreateFieldInputType( - relationshipAdapter, - composer, - userDefinedFieldDirectives, - memberEntity - ); - if (connectOrCreateFieldInputType) { - tc.addFields({ - connectOrCreate: { - type: relationshipAdapter.isList - ? connectOrCreateFieldInputType.NonNull.List - : connectOrCreateFieldInputType, - directives: [], - }, - }); - } - const updateFieldInputType = withUpdateConnectionFieldInputTypeU( - relationshipAdapter, - memberEntity, - composer, - userDefinedFieldDirectives - ); - if (updateFieldInputType) { - tc.addFields({ - update: { - type: updateFieldInputType, - directives: [], - }, - }); - } - tc.addFields({ - where: makeConnectionWhereInputType({ relationshipAdapter, memberEntity, composer }), - }); - } - ); - return updateFieldInput; -} -export function withUpdateFieldInputTypeI( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - // TODO: make these fit somehow - // if (!relationshipAdapter.shouldGenerateUpdateFieldInputType()) { - // return; - // } - if ( - relationshipAdapter.nestedOperations.size === 0 || - (relationshipAdapter.nestedOperations.size === 1 && - relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) - ) { - return; - } - if (!relationshipAdapter.isUpdatable()) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof InterfaceEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const updateFieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getUpdateFieldInputTypeName(), - (tc) => { - const connectFieldInputType = withConnectFieldInputTypeI(relationshipAdapter, composer); - if (connectFieldInputType) { - tc.addFields({ - connect: { - type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, - directives: [], - }, - }); - } - const deleteFieldInputType = withDeleteFieldInputTypeI(relationshipAdapter, composer); - if (deleteFieldInputType) { - tc.addFields({ - delete: { - type: relationshipAdapter.isList ? deleteFieldInputType.NonNull.List : deleteFieldInputType, - directives: [], - }, - }); - } - const disconnectFieldInputType = withDisconnectFieldInputTypeI(relationshipAdapter, composer); - if (disconnectFieldInputType) { - tc.addFields({ - disconnect: { - type: relationshipAdapter.isList - ? disconnectFieldInputType.NonNull.List - : disconnectFieldInputType, - directives: [], - }, - }); - } - const createFieldInputType = withCreateFieldInputTypeI( - relationshipAdapter, - composer, - userDefinedFieldDirectives - ); - if (createFieldInputType) { - tc.addFields({ - create: { - type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, - directives: [], - }, - }); - } - const updateFieldInputType = withUpdateConnectionFieldInputTypeI( - relationshipAdapter, - composer, - userDefinedFieldDirectives - ); - if (updateFieldInputType) { - tc.addFields({ - update: { - type: updateFieldInputType, - directives: [], - }, - }); - } - // TODO: where is this coming from? - tc.addFields({ - where: relationshipAdapter.operations.getConnectionWhereTypename(), - }); - } - ); - return updateFieldInput; -} - -// -------------------- FIELD INPUT ------------------------ -export function withFieldInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (composer.has(relationshipAdapter.operations.getFieldInputTypeName())) { - return composer.getITC(relationshipAdapter.operations.getFieldInputTypeName()); - } - if (!relationshipAdapter.shouldGenerateFieldInputType()) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (relationshipTarget instanceof UnionEntityAdapter) { - throw new Error("Unexpected union target"); - } - const fields = makeFieldInputTypeFields(relationshipAdapter, composer, userDefinedFieldDirectives); if (!Object.keys(fields).length) { return; } - const fieldInput = composer.getOrCreateITC(relationshipAdapter.operations.getFieldInputTypeName(), (tc) => { - tc.addFields(fields); + const fieldInput = composer.createInputTC({ + name: typeName, + fields, }); return fieldInput; } - -export function withUnionFieldInputType( - relationshipAdapter: RelationshipAdapter, - memberEntity: ConcreteEntityAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - if (composer.has(relationshipAdapter.operations.getFieldInputTypeName(memberEntity))) { - return composer.getITC(relationshipAdapter.operations.getFieldInputTypeName(memberEntity)); - } - if (!relationshipAdapter.shouldGenerateFieldInputType(memberEntity)) { - return; - } - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof UnionEntityAdapter)) { - throw new Error("Expected union target"); - } - const fields = makeFieldInputTypeFields(relationshipAdapter, composer, userDefinedFieldDirectives, memberEntity); - if (!Object.keys(fields).length) { - return; - } - const fieldInput = composer.getOrCreateITC( - relationshipAdapter.operations.getFieldInputTypeName(memberEntity), - (tc) => { - tc.addFields(fields); - } - ); - return fieldInput; -} - -export function makeFieldInputTypeFields( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - userDefinedFieldDirectives: Map, - ifUnionMemberEntity?: ConcreteEntityAdapter -): InputTypeComposerFieldConfigMapDefinition { +function makeFieldInputTypeFields({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposerFieldConfigMapDefinition { const fields = {}; - let connectFieldInputType: InputTypeComposer | undefined; - let createFieldInputType: InputTypeComposer | undefined; let connectOrCreateFieldInputType: InputTypeComposer | undefined; - const relationshipTarget = relationshipAdapter.target; - if (relationshipTarget instanceof ConcreteEntityAdapter) { - connectFieldInputType = withConnectFieldInputType(relationshipAdapter, composer); - createFieldInputType = withCreateFieldInputType(relationshipAdapter, composer); - connectOrCreateFieldInputType = withConnectOrCreateFieldInputType( + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + connectOrCreateFieldInputType = withConnectOrCreateFieldInputType({ relationshipAdapter, composer, - userDefinedFieldDirectives - ); - } else if (relationshipTarget instanceof InterfaceEntityAdapter) { - connectFieldInputType = withConnectFieldInputTypeI(relationshipAdapter, composer); - createFieldInputType = withCreateFieldInputTypeI(relationshipAdapter, composer, userDefinedFieldDirectives); - } else { + userDefinedFieldDirectives, + }); + } else if (relationshipAdapter.target instanceof UnionEntityAdapter) { if (!ifUnionMemberEntity) { throw new Error("Member Entity required."); } - connectFieldInputType = withConnectFieldInputTypeU(relationshipAdapter, ifUnionMemberEntity, composer); - createFieldInputType = withCreateFieldInputTypeU( - relationshipAdapter, - ifUnionMemberEntity, - composer, - userDefinedFieldDirectives - ); - connectOrCreateFieldInputType = withConnectOrCreateFieldInputType( + connectOrCreateFieldInputType = withConnectOrCreateFieldInputType({ relationshipAdapter, composer, userDefinedFieldDirectives, - ifUnionMemberEntity - ); + ifUnionMemberEntity, + }); + } + if (connectOrCreateFieldInputType) { + fields["connectOrCreate"] = { + type: relationshipAdapter.isList + ? connectOrCreateFieldInputType.NonNull.List + : connectOrCreateFieldInputType, + directives: [], + }; } + const connectFieldInputType = withConnectFieldInputType({ relationshipAdapter, ifUnionMemberEntity, composer }); if (connectFieldInputType) { fields["connect"] = { type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, directives: [], }; } + const createFieldInputType = withCreateFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity, + composer, + userDefinedFieldDirectives, + }); if (createFieldInputType) { fields["create"] = { type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, directives: [], }; } - if (connectOrCreateFieldInputType) { - fields["connectOrCreate"] = { - type: relationshipAdapter.isList - ? connectOrCreateFieldInputType.NonNull.List - : connectOrCreateFieldInputType, - directives: [], - }; - } return fields; } - -// -------------------- RELATION INPUT ------------------------ -export function withRelationInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - deprecatedDirectives: Directive[], - userDefinedFieldDirectives: Map -): InputTypeComposer | undefined { - const relationshipSource = relationshipAdapter.source; - if (relationshipSource instanceof UnionEntityAdapter) { - throw new Error("Unexpected union source"); - } - let createFieldInputType: InputTypeComposer | undefined; - if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { - createFieldInputType = withCreateFieldInputType(relationshipAdapter, composer); - } else if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { - createFieldInputType = withCreateFieldInputTypeI(relationshipAdapter, composer, userDefinedFieldDirectives); - } - if (!createFieldInputType) { - return; - } - - const relationInput = composer.getOrCreateITC(relationshipSource.operations.relationInputTypeName); - if (createFieldInputType) { - relationInput.addFields({ - [relationshipAdapter.name]: { - type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, - directives: deprecatedDirectives, - }, - }); - } - - return relationInput; -} - -export function withUnionRelationInputType({ - relationshipAdapter, - composer, - deprecatedDirectives, -}: { - relationshipAdapter: RelationshipAdapter; - composer: SchemaComposer; - deprecatedDirectives: Directive[]; -}): InputTypeComposer | undefined { - if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - return; - } - const relationshipSource = relationshipAdapter.source; - if (relationshipSource instanceof UnionEntityAdapter) { - throw new Error("Unexpected union source"); - } - let createFieldInputType: InputTypeComposer | undefined; - if (relationshipAdapter.target instanceof UnionEntityAdapter) { - createFieldInputType = withUnionCreateFieldInputType({ relationshipAdapter, composer, deprecatedDirectives }); - } - if (!createFieldInputType) { - return; - } - - const relationInput = composer.getOrCreateITC(relationshipSource.operations.relationInputTypeName); - if (createFieldInputType) { - relationInput.addFields({ - [relationshipAdapter.name]: { - type: createFieldInputType, - directives: deprecatedDirectives, - }, - }); - } - - return relationInput; -} - -// -------------------- WHERE INPUT ------------------------ -export function withSourceWhereInputType( - relationshipAdapter: RelationshipAdapter, - composer: SchemaComposer, - deprecatedDirectives: Directive[] -): InputTypeComposer | undefined { - const relationshipTarget = relationshipAdapter.target; - if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { - throw new Error("Expected concrete target"); - } - const relationshipSource = relationshipAdapter.source; - if (relationshipSource instanceof UnionEntityAdapter) { - throw new Error("Unexpected union source"); - } - const whereInput = composer.getITC(relationshipSource.operations.whereInputTypeName); - const fields = augmentWhereInputTypeWithRelationshipFields( - relationshipSource, - relationshipAdapter, - deprecatedDirectives - ); - whereInput.addFields(fields); - - const whereAggregateInput = withAggregateInputType({ - relationshipAdapter, - entityAdapter: relationshipTarget, - composer: composer, - }); - if (relationshipAdapter.isFilterableByAggregate()) { - whereInput.addFields({ - [relationshipAdapter.operations.aggregateTypeName]: { - type: whereAggregateInput, - directives: deprecatedDirectives, - }, - }); - } - - return whereInput; -} diff --git a/packages/graphql/src/schema/generation/delete-input.ts b/packages/graphql/src/schema/generation/delete-input.ts index c730f14ab6..e7dbdc9b48 100644 --- a/packages/graphql/src/schema/generation/delete-input.ts +++ b/packages/graphql/src/schema/generation/delete-input.ts @@ -1,11 +1,18 @@ -import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMap, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; import { RelationshipNestedOperationsOption } from "../../constants"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; -import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { withDeleteFieldInputType, withDeleteFieldInputTypeI, withDeleteFieldInputTypeU } from "./create-input"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { relationshipTargetHasRelationshipWithNestedOperation } from "./utils"; import { makeImplementationsDeleteInput } from "./implementation-inputs"; +import { makeConnectionWhereInputType } from "./where-input"; export function withDeleteInputType({ entityAdapter, @@ -40,33 +47,32 @@ export function augmentDeleteInputTypeWithDeleteFieldInput({ composer: SchemaComposer; deprecatedDirectives: Directive[]; }) { - let deleteFieldInput: InputTypeComposer | undefined; - if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { - deleteFieldInput = withDeleteFieldInputType(relationshipAdapter, composer); - } else { - deleteFieldInput = withDeleteFieldInputTypeI(relationshipAdapter, composer); + if (relationshipAdapter.source instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); } + const deleteFieldInput = makeDeleteInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + }); if (!deleteFieldInput) { return; } - const deleteInput = withDeleteInputType({ - entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + entityAdapter: relationshipAdapter.source, composer, }); if (!deleteInput) { return; } - - deleteInput.addFields({ - [relationshipAdapter.name]: { - type: relationshipAdapter.isList ? deleteFieldInput.NonNull.List : deleteFieldInput, - directives: deprecatedDirectives, - }, + const relationshipField = makeDeleteInputTypeRelationshipField({ + relationshipAdapter, + deleteFieldInput, + deprecatedDirectives, }); + deleteInput.addFields(relationshipField); } - -export function augmentDeleteInputTypeWithUnionDeleteFieldInput({ +function makeDeleteInputType({ relationshipAdapter, composer, deprecatedDirectives, @@ -74,29 +80,35 @@ export function augmentDeleteInputTypeWithUnionDeleteFieldInput({ relationshipAdapter: RelationshipAdapter; composer: SchemaComposer; deprecatedDirectives: Directive[]; -}) { - let deleteFieldInput: InputTypeComposer | undefined; +}): InputTypeComposer | undefined { if (relationshipAdapter.target instanceof UnionEntityAdapter) { - deleteFieldInput = withUnionDeleteInputType({ relationshipAdapter, composer, deprecatedDirectives }); + return withUnionDeleteInputType({ relationshipAdapter, composer, deprecatedDirectives }); } - if (!deleteFieldInput) { - return; - } - - const deleteInput = withDeleteInputType({ - entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, - composer, - }); - if (!deleteInput) { - return; + return withDeleteFieldInputType({ relationshipAdapter, composer }); +} +function makeDeleteInputTypeRelationshipField({ + relationshipAdapter, + deleteFieldInput, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + deleteFieldInput: InputTypeComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMap { + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return { + [relationshipAdapter.name]: { + type: deleteFieldInput, + directives: deprecatedDirectives, + }, + }; } - - deleteInput.addFields({ + return { [relationshipAdapter.name]: { - type: deleteFieldInput, + type: relationshipAdapter.isList ? deleteFieldInput.NonNull.List : deleteFieldInput, directives: deprecatedDirectives, }, - }); + }; } export function withUnionDeleteInputType({ @@ -108,25 +120,120 @@ export function withUnionDeleteInputType({ composer: SchemaComposer; deprecatedDirectives: Directive[]; }): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.unionDeleteInputTypeName; if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { return; } - const deleteInput = composer.getOrCreateITC(relationshipAdapter.operations.unionDeleteInputTypeName); + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const fields = makeUnionDeleteInputTypeFields({ relationshipAdapter, composer, deprecatedDirectives }); + if (!Object.keys(fields).length) { + return; + } + const deleteInput = composer.createInputTC({ + name: typeName, + fields, + }); + return deleteInput; +} +function makeUnionDeleteInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { throw new Error("Expected union target"); } for (const memberEntity of relationshipAdapter.target.concreteEntities) { - const fieldInput = withDeleteFieldInputTypeU(relationshipAdapter, memberEntity, composer); + const fieldInput = withDeleteFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity: memberEntity, + composer, + }); if (fieldInput) { - deleteInput.addFields({ - [memberEntity.name]: { - type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, - directives: deprecatedDirectives, - }, - }); + fields[memberEntity.name] = { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }; } } + return fields; +} - return deleteInput; +export function withDeleteFieldInputType({ + relationshipAdapter, + composer, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.getDeleteFieldInputTypeName(ifUnionMemberEntity); + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { + return; + } + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const disconnectFieldInput = composer.createInputTC({ + name: typeName, + fields: makeDeleteFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity }), + }); + return disconnectFieldInput; +} +function makeDeleteFieldInputTypeFields({ + relationshipAdapter, + composer, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposerFieldConfigMapDefinition { + const fields = {}; + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + fields["where"] = relationshipAdapter.operations.getConnectionWhereTypename(); + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipAdapter.target, + RelationshipNestedOperationsOption.DELETE + ) + ) { + const deleteInput = withDeleteInputType({ entityAdapter: relationshipAdapter.target, composer }); + if (deleteInput) { + fields["delete"] = deleteInput; + } + } + } else if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + fields["where"] = relationshipAdapter.operations.getConnectionWhereTypename(); + const deleteInput = withDeleteInputType({ entityAdapter: relationshipAdapter.target, composer }); + if (deleteInput) { + fields["delete"] = deleteInput; + } + } else { + if (!ifUnionMemberEntity) { + throw new Error("Member Entity required."); + } + fields["where"] = makeConnectionWhereInputType({ + relationshipAdapter, + memberEntity: ifUnionMemberEntity, + composer, + }); + if (ifUnionMemberEntity.relationships.size) { + const deleteInput = withDeleteInputType({ entityAdapter: ifUnionMemberEntity, composer }); + if (deleteInput) { + fields["delete"] = deleteInput; + } + } + } + + return fields; } diff --git a/packages/graphql/src/schema/generation/disconnect-input.ts b/packages/graphql/src/schema/generation/disconnect-input.ts index 199f266534..8c6284fb9c 100644 --- a/packages/graphql/src/schema/generation/disconnect-input.ts +++ b/packages/graphql/src/schema/generation/disconnect-input.ts @@ -1,15 +1,18 @@ -import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMap, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; import { RelationshipNestedOperationsOption } from "../../constants"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; -import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { - withDisconnectFieldInputType, - withDisconnectFieldInputTypeI, - withDisconnectFieldInputTypeU, -} from "./create-input"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { relationshipTargetHasRelationshipWithNestedOperation } from "./utils"; import { makeImplementationsDisconnectInput } from "./implementation-inputs"; +import { makeConnectionWhereInputType } from "./where-input"; export function withDisconnectInputType({ entityAdapter, @@ -36,7 +39,6 @@ export function withDisconnectInputType({ disconnectInputType.setField("_on", implementationsDisconnectInputType); return disconnectInputType; } - export function augmentDisconnectInputTypeWithDisconnectFieldInput({ relationshipAdapter, composer, @@ -46,33 +48,33 @@ export function augmentDisconnectInputTypeWithDisconnectFieldInput({ composer: SchemaComposer; deprecatedDirectives: Directive[]; }) { - let disconnectFieldInput: InputTypeComposer | undefined; - if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { - disconnectFieldInput = withDisconnectFieldInputType(relationshipAdapter, composer); - } else { - disconnectFieldInput = withDisconnectFieldInputTypeI(relationshipAdapter, composer); + if (relationshipAdapter.source instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); } + const disconnectFieldInput = makeDisconnectInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + }); if (!disconnectFieldInput) { return; } - const disconnectInput = withDisconnectInputType({ - entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, + entityAdapter: relationshipAdapter.source, composer, }); if (!disconnectInput) { return; } - - disconnectInput.addFields({ - [relationshipAdapter.name]: { - type: relationshipAdapter.isList ? disconnectFieldInput.NonNull.List : disconnectFieldInput, - directives: deprecatedDirectives, - }, + const relationshipField = makeDisconnectInputTypeRelationshipField({ + relationshipAdapter, + disconnectFieldInput, + deprecatedDirectives, }); + disconnectInput.addFields(relationshipField); } -export function augmentDisconnectInputTypeWithUnionConnectFieldInput({ +function makeDisconnectInputType({ relationshipAdapter, composer, deprecatedDirectives, @@ -80,32 +82,38 @@ export function augmentDisconnectInputTypeWithUnionConnectFieldInput({ relationshipAdapter: RelationshipAdapter; composer: SchemaComposer; deprecatedDirectives: Directive[]; -}) { - let disconnectFieldInput: InputTypeComposer | undefined; +}): InputTypeComposer | undefined { if (relationshipAdapter.target instanceof UnionEntityAdapter) { - disconnectFieldInput = withUnionDisonnectInputType({ relationshipAdapter, composer, deprecatedDirectives }); + return withUnionDisconnectInputType({ relationshipAdapter, composer, deprecatedDirectives }); } - if (!disconnectFieldInput) { - return; - } - - const disconnectInput = withDisconnectInputType({ - entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, - composer, - }); - if (!disconnectInput) { - return; + return withDisconnectFieldInputType({ relationshipAdapter, composer }); +} +function makeDisconnectInputTypeRelationshipField({ + relationshipAdapter, + disconnectFieldInput, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + disconnectFieldInput: InputTypeComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMap { + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return { + [relationshipAdapter.name]: { + type: disconnectFieldInput, + directives: deprecatedDirectives, + }, + }; } - - disconnectInput.addFields({ + return { [relationshipAdapter.name]: { - type: disconnectFieldInput, + type: relationshipAdapter.isList ? disconnectFieldInput.NonNull.List : disconnectFieldInput, directives: deprecatedDirectives, }, - }); + }; } -export function withUnionDisonnectInputType({ +function withUnionDisconnectInputType({ relationshipAdapter, composer, deprecatedDirectives, @@ -114,25 +122,121 @@ export function withUnionDisonnectInputType({ composer: SchemaComposer; deprecatedDirectives: Directive[]; }): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.unionDisconnectInputTypeName; if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { return; } - const disconnectInput = composer.getOrCreateITC(relationshipAdapter.operations.unionDisconnectInputTypeName); + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const fields = makeUnionDisconnectInputTypeFields({ relationshipAdapter, composer, deprecatedDirectives }); + if (!Object.keys(fields).length) { + return; + } + const disconnectInput = composer.createInputTC({ + name: typeName, + fields, + }); + return disconnectInput; +} +function makeUnionDisconnectInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { throw new Error("Expected union target"); } for (const memberEntity of relationshipAdapter.target.concreteEntities) { - const fieldInput = withDisconnectFieldInputTypeU(relationshipAdapter, memberEntity, composer); + const fieldInput = withDisconnectFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity: memberEntity, + composer, + }); if (fieldInput) { - disconnectInput.addFields({ - [memberEntity.name]: { - type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, - directives: deprecatedDirectives, - }, - }); + fields[memberEntity.name] = { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }; } } + return fields; +} - return disconnectInput; +export function withDisconnectFieldInputType({ + relationshipAdapter, + composer, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.getDisconnectFieldInputTypeName(ifUnionMemberEntity); + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { + return; + } + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const disconnectFieldInput = composer.createInputTC({ + name: typeName, + fields: makeDisconnectFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity }), + }); + return disconnectFieldInput; +} +function makeDisconnectFieldInputTypeFields({ + relationshipAdapter, + composer, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposerFieldConfigMapDefinition { + const fields = {}; + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + fields["where"] = relationshipAdapter.operations.getConnectionWhereTypename(); + if ( + relationshipTargetHasRelationshipWithNestedOperation( + relationshipAdapter.target, + RelationshipNestedOperationsOption.DISCONNECT + ) + ) { + const disconnectInput = withDisconnectInputType({ entityAdapter: relationshipAdapter.target, composer }); + if (disconnectInput) { + fields["disconnect"] = disconnectInput; + } + } + } else if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + fields["where"] = relationshipAdapter.operations.getConnectionWhereTypename(); + const disconnectInput = withDisconnectInputType({ entityAdapter: relationshipAdapter.target, composer }); + if (disconnectInput) { + fields["disconnect"] = disconnectInput; + } + } else { + if (!ifUnionMemberEntity) { + throw new Error("Member Entity required."); + } + fields["where"] = makeConnectionWhereInputType({ + relationshipAdapter, + memberEntity: ifUnionMemberEntity, + composer, + }); + + if (ifUnionMemberEntity.relationships.size) { + const disconnectInput = withDisconnectInputType({ entityAdapter: ifUnionMemberEntity, composer }); + if (disconnectInput) { + fields["disconnect"] = disconnectInput; + } + } + } + + return fields; } diff --git a/packages/graphql/src/schema/generation/implementation-inputs.ts b/packages/graphql/src/schema/generation/implementation-inputs.ts index c47e950ee3..9d01d54062 100644 --- a/packages/graphql/src/schema/generation/implementation-inputs.ts +++ b/packages/graphql/src/schema/generation/implementation-inputs.ts @@ -1,7 +1,6 @@ import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { ensureNonEmptyInput } from "../ensure-non-empty-input"; -import { withWhereInputType } from "./where-input"; export function makeImplementationsDisconnectInput({ interfaceEntityAdapter, diff --git a/packages/graphql/src/schema/generation/relation-input.ts b/packages/graphql/src/schema/generation/relation-input.ts new file mode 100644 index 0000000000..ca5d0ebb47 --- /dev/null +++ b/packages/graphql/src/schema/generation/relation-input.ts @@ -0,0 +1,258 @@ +/* + * 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 { DirectiveNode } from "graphql"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMap, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; +import { RelationshipNestedOperationsOption } from "../../constants"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { withCreateInputType } from "./create-input"; + +export function withRelationInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; +}): InputTypeComposer | undefined { + const relationshipSource = relationshipAdapter.source; + if (relationshipSource instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + const createFieldInputType = makeRelationFieldInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + deprecatedDirectives, + }); + if (!createFieldInputType) { + return; + } + + const relationInput = composer.getOrCreateITC(relationshipSource.operations.relationInputTypeName); + const relationshipField = makeRelationInputTypeRelationshipField({ + relationshipAdapter, + createFieldInputType, + deprecatedDirectives, + }); + relationInput.addFields(relationshipField); + + return relationInput; +} + +function makeRelationFieldInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; +}): InputTypeComposer | undefined { + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + return withCreateFieldInputType({ relationshipAdapter, composer, userDefinedFieldDirectives }); + } + if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + return withCreateFieldInputType({ relationshipAdapter, composer, userDefinedFieldDirectives }); + } + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return withUnionCreateFieldInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); + } +} +function makeRelationInputTypeRelationshipField({ + relationshipAdapter, + createFieldInputType, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + createFieldInputType: InputTypeComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMap { + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return { + [relationshipAdapter.name]: { + type: createFieldInputType, + directives: deprecatedDirectives, + }, + }; + } + return { + [relationshipAdapter.name]: { + type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, + directives: deprecatedDirectives, + }, + }; +} + +function withUnionCreateFieldInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; +}): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.unionCreateFieldInputTypeName; + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const fields: InputTypeComposerFieldConfigMapDefinition = makeUnionCreateFieldInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); + if (!Object.keys(fields).length) { + return; + } + const createInput = composer.createInputTC({ + name: typeName, + fields, + }); + return createInput; +} +function makeUnionCreateFieldInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { + throw new Error("Expected union target"); + } + for (const memberEntity of relationshipAdapter.target.concreteEntities) { + const fieldInput = withCreateFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity: memberEntity, + composer, + userDefinedFieldDirectives, + }); + if (fieldInput) { + fields[memberEntity.name] = { + type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, + directives: deprecatedDirectives, + }; + } + } + return fields; +} + +export function withCreateFieldInputType({ + relationshipAdapter, + composer, + ifUnionMemberEntity, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + ifUnionMemberEntity?: ConcreteEntityAdapter; + userDefinedFieldDirectives: Map; +}): InputTypeComposer | undefined { + const createName = relationshipAdapter.operations.getCreateFieldInputTypeName(ifUnionMemberEntity); + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { + return; + } + if (composer.has(createName)) { + return composer.getITC(createName); + } + const createFieldInput = composer.createInputTC({ + name: createName, + fields: makeCreateFieldInputTypeFields({ + relationshipAdapter, + composer, + ifUnionMemberEntity, + userDefinedFieldDirectives, + }), + }); + return createFieldInput; +} +function makeCreateFieldInputTypeFields({ + relationshipAdapter, + composer, + ifUnionMemberEntity, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + ifUnionMemberEntity?: ConcreteEntityAdapter; + userDefinedFieldDirectives: Map; +}): InputTypeComposerFieldConfigMapDefinition { + const fields = {}; + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + fields["edge"] = relationshipAdapter.operations.edgeCreateInputTypeName; + } + if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { + // tODO: fix deprecatedDirectives and use the reference here instead of string + fields["node"] = `${relationshipAdapter.target.operations.createInputTypeName}!`; + } else if (relationshipAdapter.target instanceof InterfaceEntityAdapter) { + const createInput = withCreateInputType({ + entityAdapter: relationshipAdapter.target, + userDefinedFieldDirectives, + composer, + }); + if (createInput) { + fields["node"] = createInput.NonNull; + } + } else { + if (!ifUnionMemberEntity) { + throw new Error("Member Entity required."); + } + const createInput = withCreateInputType({ + entityAdapter: ifUnionMemberEntity, + userDefinedFieldDirectives, + composer, + }); + if (createInput) { + fields["node"] = createInput.NonNull; + } + } + + return fields; +} diff --git a/packages/graphql/src/schema/generation/update-input.ts b/packages/graphql/src/schema/generation/update-input.ts index 46d0b0b064..6a8b3c7c85 100644 --- a/packages/graphql/src/schema/generation/update-input.ts +++ b/packages/graphql/src/schema/generation/update-input.ts @@ -6,13 +6,19 @@ import type { InputTypeComposerFieldConfigMapDefinition, SchemaComposer, } from "graphql-compose"; +import { RelationshipNestedOperationsOption } from "../../constants"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import { concreteEntityToUpdateInputFields, withArrayOperators, withMathOperators } from "../to-compose"; -import { withUpdateFieldInputType, withUpdateFieldInputTypeI, withUpdateFieldInputTypeU } from "./create-input"; +import { withConnectFieldInputType } from "./connect-input"; +import { withDisconnectFieldInputType } from "./disconnect-input"; +import { withDeleteFieldInputType } from "./delete-input"; import { makeImplementationsUpdateInput } from "./implementation-inputs"; +import { makeConnectionWhereInputType } from "./where-input"; +import { withConnectOrCreateFieldInputType } from "./connect-or-create-input"; +import { withCreateFieldInputType } from "./relation-input"; export function withUpdateInputType({ entityAdapter, @@ -71,87 +77,268 @@ export function augmentUpdateInputTypeWithUpdateFieldInput({ userDefinedFieldDirectives: Map; deprecatedDirectives: Directive[]; }) { - const updateInput = withUpdateInputType({ - entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, - userDefinedFieldDirectives, + if (relationshipAdapter.source instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + const updateFieldInput = makeUpdateInputType({ + relationshipAdapter, composer, + deprecatedDirectives, + userDefinedFieldDirectives, }); - if (!updateInput) { + if (!updateFieldInput) { return; } - let updateFieldInput: InputTypeComposer | undefined; - if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { - updateFieldInput = withUpdateFieldInputType(relationshipAdapter, composer, userDefinedFieldDirectives); - } else { - updateFieldInput = withUpdateFieldInputTypeI(relationshipAdapter, composer, userDefinedFieldDirectives); + const updateInput = withUpdateInputType({ + entityAdapter: relationshipAdapter.source, + userDefinedFieldDirectives, + composer, + }); + const relationshipField = makeUpdateInputTypeRelationshipField({ + relationshipAdapter, + updateFieldInput, + deprecatedDirectives, + }); + updateInput.addFields(relationshipField); +} + +function makeUpdateInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return withUnionUpdateInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); } - if (!updateFieldInput) { - return; + return withUpdateFieldInputType({ relationshipAdapter, composer, userDefinedFieldDirectives }); +} +function makeUpdateInputTypeRelationshipField({ + relationshipAdapter, + updateFieldInput, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + updateFieldInput: InputTypeComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMap { + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + return { + [relationshipAdapter.name]: { + type: updateFieldInput, + directives: deprecatedDirectives, + }, + }; } - updateInput.addFields({ + return { [relationshipAdapter.name]: { type: relationshipAdapter.isList ? updateFieldInput.NonNull.List : updateFieldInput, directives: deprecatedDirectives, }, - }); + }; } -export function augmentUpdateInputTypeWithUnionUpdateFieldInput({ +function withUpdateFieldInputType({ relationshipAdapter, composer, - deprecatedDirectives, userDefinedFieldDirectives, + ifUnionMemberEntity, }: { relationshipAdapter: RelationshipAdapter; composer: SchemaComposer; - deprecatedDirectives: Directive[]; userDefinedFieldDirectives: Map; -}) { - let updateFieldInput: InputTypeComposer | undefined; - if (relationshipAdapter.target instanceof UnionEntityAdapter) { - updateFieldInput = withUnionUpdateInputType({ relationshipAdapter, composer, deprecatedDirectives }); + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.getUpdateFieldInputTypeName(ifUnionMemberEntity); + if (!relationshipAdapter.shouldGenerateUpdateFieldInputType(ifUnionMemberEntity)) { + return; } - if (!updateFieldInput) { + if (!relationshipAdapter.isUpdatable()) { return; } + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const updateFieldInput = composer.createInputTC({ + name: typeName, + fields: makeUpdateFieldInputTypeFields({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, + }), + }); + return updateFieldInput; +} - const updateInput = withUpdateInputType({ - entityAdapter: relationshipAdapter.source as ConcreteEntityAdapter | InterfaceEntityAdapter, +function makeUpdateFieldInputTypeFields({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposerFieldConfigMapDefinition { + const fields = {}; + let connectOrCreateFieldInputType: InputTypeComposer | undefined; + let connectionWhereInputType: InputTypeComposer | string | undefined; + const relationshipTarget = relationshipAdapter.target; + if (relationshipTarget instanceof ConcreteEntityAdapter) { + connectionWhereInputType = relationshipAdapter.operations.getConnectionWhereTypename(); + connectOrCreateFieldInputType = withConnectOrCreateFieldInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + }); + } else if (relationshipTarget instanceof InterfaceEntityAdapter) { + connectionWhereInputType = relationshipAdapter.operations.getConnectionWhereTypename(); + } else { + if (!ifUnionMemberEntity) { + throw new Error("Member Entity required."); + } + connectionWhereInputType = makeConnectionWhereInputType({ + relationshipAdapter, + memberEntity: ifUnionMemberEntity, + composer, + }); + connectOrCreateFieldInputType = withConnectOrCreateFieldInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, + }); + } + if (connectionWhereInputType) { + fields["where"] = { + type: connectionWhereInputType, + directives: [], + }; + } + if (connectOrCreateFieldInputType) { + fields["connectOrCreate"] = { + type: relationshipAdapter.isList + ? connectOrCreateFieldInputType.NonNull.List + : connectOrCreateFieldInputType, + directives: [], + }; + } + const connectFieldInputType = withConnectFieldInputType({ relationshipAdapter, ifUnionMemberEntity, composer }); + if (connectFieldInputType) { + fields["connect"] = { + type: relationshipAdapter.isList ? connectFieldInputType.NonNull.List : connectFieldInputType, + directives: [], + }; + } + const disconnectFieldInputType = withDisconnectFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity, + composer, + }); + if (disconnectFieldInputType) { + fields["disconnect"] = { + type: relationshipAdapter.isList ? disconnectFieldInputType.NonNull.List : disconnectFieldInputType, + directives: [], + }; + } + const createFieldInputType = withCreateFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity, composer, userDefinedFieldDirectives, }); - if (!updateInput) { - return; + if (createFieldInputType) { + fields["create"] = { + type: relationshipAdapter.isList ? createFieldInputType.NonNull.List : createFieldInputType, + directives: [], + }; } - - updateInput.addFields({ - [relationshipAdapter.name]: { - type: updateFieldInput, - directives: deprecatedDirectives, - }, + const updateFieldInputType = withUpdateConnectionFieldInputType({ + relationshipAdapter, + ifUnionMemberEntity, + composer, + userDefinedFieldDirectives, }); + if (updateFieldInputType) { + fields["update"] = { + type: updateFieldInputType, + directives: [], + }; + } + const deleteFieldInputType = withDeleteFieldInputType({ relationshipAdapter, ifUnionMemberEntity, composer }); + if (deleteFieldInputType) { + fields["delete"] = { + type: relationshipAdapter.isList ? deleteFieldInputType.NonNull.List : deleteFieldInputType, + directives: [], + }; + } + return fields; } -export function withUnionUpdateInputType({ +function withUnionUpdateInputType({ relationshipAdapter, composer, deprecatedDirectives, + userDefinedFieldDirectives, }: { relationshipAdapter: RelationshipAdapter; composer: SchemaComposer; deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; }): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.unionUpdateInputTypeName; + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const fields = makeUnionUpdateInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, + }); + if (!Object.keys(fields).length) { + return; + } + const updateInput = composer.createInputTC({ + name: typeName, + fields, + }); + return updateInput; +} +function makeUnionUpdateInputTypeFields({ + relationshipAdapter, + composer, + deprecatedDirectives, + userDefinedFieldDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; + userDefinedFieldDirectives: Map; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { throw new Error("Expected union target"); } - const fields: InputTypeComposerFieldConfigMapDefinition = {}; for (const memberEntity of relationshipAdapter.target.concreteEntities) { - const fieldInput = withUpdateFieldInputTypeU( + const fieldInput = withUpdateFieldInputType({ relationshipAdapter, - memberEntity, + ifUnionMemberEntity: memberEntity, composer, - new Map() - ); + userDefinedFieldDirectives, + }); if (fieldInput) { fields[memberEntity.name] = { type: relationshipAdapter.isList ? fieldInput.NonNull.List : fieldInput, @@ -159,10 +346,72 @@ export function withUnionUpdateInputType({ }; } } - if (!Object.keys(fields).length) { + return fields; +} + +function withUpdateConnectionFieldInputType({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposer | undefined { + const typeName = relationshipAdapter.operations.getUpdateConnectionInputTypename(ifUnionMemberEntity); + if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { return; } - const updateInput = composer.getOrCreateITC(relationshipAdapter.operations.unionUpdateInputTypeName); - updateInput.addFields(fields); - return updateInput; + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const fields = makeUpdateConnectionFieldInputTypeFields({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, + }); + + const updateFieldInput = composer.createInputTC({ name: typeName, fields }); + return updateFieldInput; +} +function makeUpdateConnectionFieldInputTypeFields({ + relationshipAdapter, + composer, + userDefinedFieldDirectives, + ifUnionMemberEntity, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + userDefinedFieldDirectives: Map; + ifUnionMemberEntity?: ConcreteEntityAdapter; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + if (relationshipAdapter.target instanceof UnionEntityAdapter) { + if (!ifUnionMemberEntity) { + throw new Error("Expected member entity"); + } + const updateInputType = withUpdateInputType({ + entityAdapter: ifUnionMemberEntity, + userDefinedFieldDirectives, + composer, + }); + fields["node"] = updateInputType; + } else { + // TODO: we need to fix deprecatedDirectives before we can use the reference + // const updateInputType = withUpdateInputType({ + // entityAdapter: relationshipAdapter.target, + // userDefinedFieldDirectives, + // composer, + // }); + // fields["node"] = updateInputType; + fields["node"] = relationshipAdapter.target.operations.updateInputTypeName; + } + const hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; + if (hasNonGeneratedProperties) { + fields["edge"] = relationshipAdapter.operations.edgeUpdateInputTypeName; + } + return fields; } diff --git a/packages/graphql/src/schema/generation/utils.ts b/packages/graphql/src/schema/generation/utils.ts new file mode 100644 index 0000000000..93c298fcb0 --- /dev/null +++ b/packages/graphql/src/schema/generation/utils.ts @@ -0,0 +1,10 @@ +import type { RelationshipNestedOperationsOption } from "../../constants"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; + +export function relationshipTargetHasRelationshipWithNestedOperation( + target: ConcreteEntityAdapter | InterfaceEntityAdapter, + nestedOperation: RelationshipNestedOperationsOption +): boolean { + return Array.from(target.relationships.values()).some((rel) => rel.nestedOperations.has(nestedOperation)); +} diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index 4d1e5339b7..0a425393cc 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -1,6 +1,11 @@ import type { DirectiveNode } from "graphql"; import { GraphQLID } from "graphql"; -import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; @@ -8,6 +13,8 @@ import { RelationshipAdapter } from "../../schema-model/relationship/model-adapt import type { Neo4jFeaturesSettings } from "../../types"; import { DEPRECATE_NOT } from "../constants"; import { getWhereFieldsForAttributes } from "../get-where-fields"; +import { withAggregateInputType } from "./aggregate-types"; +import { augmentWhereInputTypeWithRelationshipFields } from "./augment-where-input"; import { makeImplementationsWhereInput } from "./implementation-inputs"; export function withUniqueWhereInputType({ @@ -42,7 +49,11 @@ export function withWhereInputType({ if (composer.has(entityAdapter.operations.whereInputTypeName)) { return composer.getITC(entityAdapter.operations.whereInputTypeName); } - const whereInputType = makeWhereInput({ entityAdapter, userDefinedFieldDirectives, features, composer }); + const whereFields = makeWhereFields({ entityAdapter, userDefinedFieldDirectives, features }); + const whereInputType = composer.createInputTC({ + name: entityAdapter.operations.whereInputTypeName, + fields: whereFields, + }); if (entityAdapter instanceof ConcreteEntityAdapter) { whereInputType.addFields({ @@ -69,25 +80,6 @@ export function withWhereInputType({ return whereInputType; } -function makeWhereInput({ - entityAdapter, - userDefinedFieldDirectives, - features, - composer, -}: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter | RelationshipAdapter; - userDefinedFieldDirectives: Map; - features: Neo4jFeaturesSettings | undefined; - composer: SchemaComposer; -}): InputTypeComposer { - const whereFields = makeWhereFields({ entityAdapter, userDefinedFieldDirectives, features }); - const whereInputType = composer.createInputTC({ - name: entityAdapter.operations.whereInputTypeName, - fields: whereFields, - }); - return whereInputType; -} - function makeWhereFields({ entityAdapter, userDefinedFieldDirectives, @@ -112,6 +104,49 @@ function makeWhereFields({ }); } +export function withSourceWhereInputType({ + relationshipAdapter, + composer, + deprecatedDirectives, +}: { + relationshipAdapter: RelationshipAdapter; + composer: SchemaComposer; + deprecatedDirectives: Directive[]; +}): InputTypeComposer | undefined { + const relationshipTarget = relationshipAdapter.target; + if (!(relationshipTarget instanceof ConcreteEntityAdapter)) { + throw new Error("Expected concrete target"); + } + const relationshipSource = relationshipAdapter.source; + if (relationshipSource instanceof UnionEntityAdapter) { + throw new Error("Unexpected union source"); + } + const typeName = relationshipSource.operations.whereInputTypeName; + const whereInput = composer.getITC(typeName); + const fields = augmentWhereInputTypeWithRelationshipFields( + relationshipSource, + relationshipAdapter, + deprecatedDirectives + ); + whereInput.addFields(fields); + + const whereAggregateInput = withAggregateInputType({ + relationshipAdapter, + entityAdapter: relationshipTarget, + composer: composer, + }); + if (relationshipAdapter.isFilterableByAggregate()) { + whereInput.addFields({ + [relationshipAdapter.operations.aggregateTypeName]: { + type: whereAggregateInput, + directives: deprecatedDirectives, + }, + }); + } + + return whereInput; +} + // TODO: make another one of these for non-union ConnectionWhereInputType export function makeConnectionWhereInputType({ relationshipAdapter, @@ -122,11 +157,12 @@ export function makeConnectionWhereInputType({ memberEntity: ConcreteEntityAdapter; composer: SchemaComposer; }): InputTypeComposer { - if (composer.has(relationshipAdapter.operations.getConnectionWhereTypename(memberEntity))) { - return composer.getITC(relationshipAdapter.operations.getConnectionWhereTypename(memberEntity)); + const typeName = relationshipAdapter.operations.getConnectionWhereTypename(memberEntity); + if (composer.has(typeName)) { + return composer.getITC(typeName); } const connectionWhereInputType = composer.createInputTC({ - name: relationshipAdapter.operations.getConnectionWhereTypename(memberEntity), + name: typeName, fields: { node: memberEntity.operations.whereInputTypeName, node_NOT: { @@ -151,3 +187,17 @@ export function makeConnectionWhereInputType({ } return connectionWhereInputType; } + +export function withConnectWhereFieldInputType( + relationshipTarget: ConcreteEntityAdapter | InterfaceEntityAdapter, + composer: SchemaComposer +): InputTypeComposer { + const connectWhereName = relationshipTarget.operations.connectWhereInputTypeName; + if (composer.has(connectWhereName)) { + return composer.getITC(connectWhereName); + } + const connectWhereType = composer.getOrCreateITC(connectWhereName, (tc) => { + tc.addFields({ node: `${relationshipTarget.operations.whereInputTypeName}!` }); + }); + return connectWhereType; +} diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 0da4b1592e..04eee436ed 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -53,4496 +53,617 @@ describe("Subscriptions", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - name: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - name: String! -} - -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 ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input ActorUpdateInput { - name: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - node: ActorEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actorCount: Int - actors: MovieActorsFieldInput - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - - test("Empty EventPayload type", async () => { - const typeDefs = gql` - type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + "schema { + query: Query + mutation: Mutation + subscription: Subscription } type Actor { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + name: String! } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + input ActorConnectWhere { + node: ActorWhere! + } - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! -} - -type ActorAggregateSelection { - count: Int! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput -} - -type ActorCreatedEvent { - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - delete: [ActorMoviesDeleteFieldInput!] - disconnect: [ActorMoviesDisconnectFieldInput!] - update: ActorMoviesUpdateConnectionInput - where: ActorMoviesConnectionWhere -} - -input ActorOptions { - limit: Int - offset: Int -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - createdRelationship: ActorConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - deletedRelationship: ActorConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] -} - -type ActorUpdatedEvent { - event: EventType! - timestamp: Float! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorActorsAggregationSelection { - count: Int! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - actorCount: Int - actors: MovieActorsFieldInput - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - movie: MovieSubscriptionWhere -} - -\\"\\"\\" -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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type Subscription { - actorCreated: ActorCreatedEvent! - actorDeleted: ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated: ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + input ActorCreateInput { + name: String! + } - test("Empty EventPayload type on Union type", async () => { - const typeDefs = gql` - type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! } - union Actor = Star | Person + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } - type Star { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + type ActorEdge { + cursor: String! + node: Actor! } - type Person { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + + type ActorEventPayload { + name: String! } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); + 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!] + } - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + \\"\\"\\" + 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 + } - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -union Actor = Person | Star - -input ActorWhere { - Person: PersonWhere - Star: StarWhere -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -type CreateStarsMutationResponse { - info: CreateInfo! - stars: [Star!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -input MovieActorsConnectInput { - Person: [MovieActorsPersonConnectFieldInput!] - Star: [MovieActorsStarConnectFieldInput!] -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Person: MovieActorsPersonConnectionWhere - Star: MovieActorsStarConnectionWhere -} - -input MovieActorsCreateFieldInput { - Person: [MovieActorsPersonCreateFieldInput!] - Star: [MovieActorsStarCreateFieldInput!] -} - -input MovieActorsCreateInput { - Person: MovieActorsPersonFieldInput - Star: MovieActorsStarFieldInput -} - -input MovieActorsDeleteInput { - Person: [MovieActorsPersonDeleteFieldInput!] - Star: [MovieActorsStarDeleteFieldInput!] -} - -input MovieActorsDisconnectInput { - Person: [MovieActorsPersonDisconnectFieldInput!] - Star: [MovieActorsStarDisconnectFieldInput!] -} - -input MovieActorsPersonConnectFieldInput { - connect: [PersonConnectInput!] - where: PersonConnectWhere -} - -input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsPersonDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] -} - -input MovieActorsPersonUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsPersonUpdateFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - delete: [MovieActorsPersonDeleteFieldInput!] - disconnect: [MovieActorsPersonDisconnectFieldInput!] - update: MovieActorsPersonUpdateConnectionInput - where: MovieActorsPersonConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsStarConnectFieldInput { - connect: [StarConnectInput!] - where: StarConnectWhere -} - -input MovieActorsStarConnectionWhere { - AND: [MovieActorsStarConnectionWhere!] - NOT: MovieActorsStarConnectionWhere - OR: [MovieActorsStarConnectionWhere!] - node: StarWhere - node_NOT: StarWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsStarCreateFieldInput { - node: StarCreateInput! -} - -input MovieActorsStarDeleteFieldInput { - delete: StarDeleteInput - where: MovieActorsStarConnectionWhere -} - -input MovieActorsStarDisconnectFieldInput { - disconnect: StarDisconnectInput - where: MovieActorsStarConnectionWhere -} - -input MovieActorsStarFieldInput { - connect: [MovieActorsStarConnectFieldInput!] - create: [MovieActorsStarCreateFieldInput!] -} - -input MovieActorsStarUpdateConnectionInput { - node: StarUpdateInput -} - -input MovieActorsStarUpdateFieldInput { - connect: [MovieActorsStarConnectFieldInput!] - create: [MovieActorsStarCreateFieldInput!] - delete: [MovieActorsStarDeleteFieldInput!] - disconnect: [MovieActorsStarDisconnectFieldInput!] - update: MovieActorsStarUpdateConnectionInput - where: MovieActorsStarConnectionWhere -} - -input MovieActorsUpdateInput { - Person: [MovieActorsPersonUpdateFieldInput!] - Star: [MovieActorsStarUpdateFieldInput!] -} - -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - actorCount: Int - actors: MovieActorsCreateInput - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean -} - -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!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -type MovieRelationshipCreatedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - movie: MovieSubscriptionWhere -} - -\\"\\"\\" -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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: MovieActorsUpdateInput - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - createStars(input: [StarCreateInput!]!): CreateStarsMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - deleteStars(delete: StarDeleteInput, where: StarWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - updateStars(connect: StarConnectInput, create: StarRelationInput, delete: StarDeleteInput, disconnect: StarDisconnectInput, update: StarUpdateInput, where: StarWhere): UpdateStarsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! -} - -type PersonAggregateSelection { - count: Int! -} - -input PersonConnectInput { - movies: [PersonMoviesConnectFieldInput!] -} - -input PersonConnectWhere { - node: PersonWhere! -} - -type PersonConnectedRelationships { - movies: PersonMoviesConnectedRelationship -} - -input PersonCreateInput { - movies: PersonMoviesFieldInput -} - -type PersonCreatedEvent { - event: EventType! - timestamp: Float! -} - -input PersonDeleteInput { - movies: [PersonMoviesDeleteFieldInput!] -} - -type PersonDeletedEvent { - event: EventType! - timestamp: Float! -} - -input PersonDisconnectInput { - movies: [PersonMoviesDisconnectFieldInput!] -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonMovieMoviesAggregationSelection { - count: Int! - node: PersonMovieMoviesNodeAggregateSelection -} - -type PersonMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input PersonMoviesAggregateInput { - AND: [PersonMoviesAggregateInput!] - NOT: PersonMoviesAggregateInput - OR: [PersonMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PersonMoviesNodeAggregationWhereInput -} - -input PersonMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type PersonMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type PersonMoviesConnection { - edges: [PersonMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonMoviesConnectionSort { - node: MovieSort -} - -input PersonMoviesConnectionWhere { - AND: [PersonMoviesConnectionWhere!] - NOT: PersonMoviesConnectionWhere - OR: [PersonMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PersonMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input PersonMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: PersonMoviesConnectionWhere -} - -input PersonMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: PersonMoviesConnectionWhere -} - -input PersonMoviesFieldInput { - connect: [PersonMoviesConnectFieldInput!] - create: [PersonMoviesCreateFieldInput!] -} - -input PersonMoviesNodeAggregationWhereInput { - AND: [PersonMoviesNodeAggregationWhereInput!] - NOT: PersonMoviesNodeAggregationWhereInput - OR: [PersonMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type PersonMoviesRelationship { - cursor: String! - node: Movie! -} - -input PersonMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input PersonMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input PersonMoviesUpdateFieldInput { - connect: [PersonMoviesConnectFieldInput!] - create: [PersonMoviesCreateFieldInput!] - delete: [PersonMoviesDeleteFieldInput!] - disconnect: [PersonMoviesDisconnectFieldInput!] - update: PersonMoviesUpdateConnectionInput - where: PersonMoviesConnectionWhere -} - -input PersonOptions { - limit: Int - offset: Int -} - -input PersonRelationInput { - movies: [PersonMoviesCreateFieldInput!] -} - -type PersonRelationshipCreatedEvent { - createdRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input PersonRelationshipCreatedSubscriptionWhere { - AND: [PersonRelationshipCreatedSubscriptionWhere!] - NOT: PersonRelationshipCreatedSubscriptionWhere - OR: [PersonRelationshipCreatedSubscriptionWhere!] - createdRelationship: PersonRelationshipsSubscriptionWhere -} - -type PersonRelationshipDeletedEvent { - deletedRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input PersonRelationshipDeletedSubscriptionWhere { - AND: [PersonRelationshipDeletedSubscriptionWhere!] - NOT: PersonRelationshipDeletedSubscriptionWhere - OR: [PersonRelationshipDeletedSubscriptionWhere!] - deletedRelationship: PersonRelationshipsSubscriptionWhere -} - -input PersonRelationshipsSubscriptionWhere { - movies: PersonMoviesRelationshipSubscriptionWhere -} - -input PersonUpdateInput { - movies: [PersonMoviesUpdateFieldInput!] -} - -type PersonUpdatedEvent { - event: EventType! - timestamp: Float! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: PersonMoviesAggregateInput - moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return People where all of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere - \\"\\"\\" - Return People where none of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere - moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return People where one of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere - \\"\\"\\" - Return People where some of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere - \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - stars(options: StarOptions, where: StarWhere): [Star!]! - starsAggregate(where: StarWhere): StarAggregateSelection! - starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type Star { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! -} - -type StarAggregateSelection { - count: Int! -} - -input StarConnectInput { - movies: [StarMoviesConnectFieldInput!] -} - -input StarConnectWhere { - node: StarWhere! -} - -type StarConnectedRelationships { - movies: StarMoviesConnectedRelationship -} - -input StarCreateInput { - movies: StarMoviesFieldInput -} - -type StarCreatedEvent { - event: EventType! - timestamp: Float! -} - -input StarDeleteInput { - movies: [StarMoviesDeleteFieldInput!] -} - -type StarDeletedEvent { - event: EventType! - timestamp: Float! -} - -input StarDisconnectInput { - movies: [StarMoviesDisconnectFieldInput!] -} - -type StarEdge { - cursor: String! - node: Star! -} - -type StarMovieMoviesAggregationSelection { - count: Int! - node: StarMovieMoviesNodeAggregateSelection -} - -type StarMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input StarMoviesAggregateInput { - AND: [StarMoviesAggregateInput!] - NOT: StarMoviesAggregateInput - OR: [StarMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: StarMoviesNodeAggregationWhereInput -} - -input StarMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type StarMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type StarMoviesConnection { - edges: [StarMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input StarMoviesConnectionSort { - node: MovieSort -} - -input StarMoviesConnectionWhere { - AND: [StarMoviesConnectionWhere!] - NOT: StarMoviesConnectionWhere - OR: [StarMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input StarMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input StarMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: StarMoviesConnectionWhere -} - -input StarMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: StarMoviesConnectionWhere -} - -input StarMoviesFieldInput { - connect: [StarMoviesConnectFieldInput!] - create: [StarMoviesCreateFieldInput!] -} - -input StarMoviesNodeAggregationWhereInput { - AND: [StarMoviesNodeAggregationWhereInput!] - NOT: StarMoviesNodeAggregationWhereInput - OR: [StarMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type StarMoviesRelationship { - cursor: String! - node: Movie! -} - -input StarMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input StarMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input StarMoviesUpdateFieldInput { - connect: [StarMoviesConnectFieldInput!] - create: [StarMoviesCreateFieldInput!] - delete: [StarMoviesDeleteFieldInput!] - disconnect: [StarMoviesDisconnectFieldInput!] - update: StarMoviesUpdateConnectionInput - where: StarMoviesConnectionWhere -} - -input StarOptions { - limit: Int - offset: Int -} - -input StarRelationInput { - movies: [StarMoviesCreateFieldInput!] -} - -type StarRelationshipCreatedEvent { - createdRelationship: StarConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input StarRelationshipCreatedSubscriptionWhere { - AND: [StarRelationshipCreatedSubscriptionWhere!] - NOT: StarRelationshipCreatedSubscriptionWhere - OR: [StarRelationshipCreatedSubscriptionWhere!] - createdRelationship: StarRelationshipsSubscriptionWhere -} - -type StarRelationshipDeletedEvent { - deletedRelationship: StarConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input StarRelationshipDeletedSubscriptionWhere { - AND: [StarRelationshipDeletedSubscriptionWhere!] - NOT: StarRelationshipDeletedSubscriptionWhere - OR: [StarRelationshipDeletedSubscriptionWhere!] - deletedRelationship: StarRelationshipsSubscriptionWhere -} - -input StarRelationshipsSubscriptionWhere { - movies: StarMoviesRelationshipSubscriptionWhere -} - -input StarUpdateInput { - movies: [StarMoviesUpdateFieldInput!] -} - -type StarUpdatedEvent { - event: EventType! - timestamp: Float! -} - -input StarWhere { - AND: [StarWhere!] - NOT: StarWhere - OR: [StarWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: StarMoviesAggregateInput - moviesConnection: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Stars where all of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: StarMoviesConnectionWhere - \\"\\"\\" - Return Stars where none of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: StarMoviesConnectionWhere - moviesConnection_NOT: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Stars where one of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: StarMoviesConnectionWhere - \\"\\"\\" - Return Stars where some of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: StarMoviesConnectionWhere - \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere -} - -type StarsConnection { - edges: [StarEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Subscription { - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - personCreated: PersonCreatedEvent! - personDeleted: PersonDeletedEvent! - personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! - personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! - personUpdated: PersonUpdatedEvent! - starCreated: StarCreatedEvent! - starDeleted: StarDeletedEvent! - starRelationshipCreated(where: StarRelationshipCreatedSubscriptionWhere): StarRelationshipCreatedEvent! - starRelationshipDeleted(where: StarRelationshipDeletedSubscriptionWhere): StarRelationshipDeletedEvent! - starUpdated: StarUpdatedEvent! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -} - -type UpdateStarsMutationResponse { - info: UpdateInfo! - stars: [Star!]! -}" -`); - }); + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input ActorUpdateInput { + name: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } - test("Empty EventPayload type, but @relationshipProperty exists", async () => { - const typeDefs = gql` type Movie { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + actorCount: Int + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean } - interface ActedIn @relationshipProperties { - screenTime: Int! + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection } - type Actor { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -interface ActedIn { - screenTime: Int! -} - -input ActedInCreateInput { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInSubscriptionWhere { - AND: [ActedInSubscriptionWhere!] - NOT: ActedInSubscriptionWhere - OR: [ActedInSubscriptionWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! -} - -type ActorAggregateSelection { - count: Int! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput -} - -type ActorCreatedEvent { - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - delete: [ActorMoviesDeleteFieldInput!] - disconnect: [ActorMoviesDisconnectFieldInput!] - update: ActorMoviesUpdateConnectionInput - where: ActorMoviesConnectionWhere -} - -input ActorOptions { - limit: Int - offset: Int -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - createdRelationship: ActorConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - deletedRelationship: ActorConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] -} - -type ActorUpdatedEvent { - event: EventType! - timestamp: Float! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection -} - -type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - screenTime: Int! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - edge: ActedInSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - screenTime: Int! -} - -input MovieActorsRelationshipSubscriptionWhere { - edge: ActedInSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actorCount: Int - actors: MovieActorsFieldInput - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type Subscription { - actorCreated: ActorCreatedEvent! - actorDeleted: ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated: ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + type MovieActorsConnectedRelationship { + node: ActorEventPayload! + } - test("Subscriptions excluded", async () => { - const typeDefs = gql` - type Movie @subscription(events: []) { - id: ID - actorCount: Int - averageRating: Float - isActive: Boolean - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! } - type Actor { - name: String! + input MovieActorsConnectionSort { + node: ActorSort } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - name: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - name: String! -} - -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 ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input ActorUpdateInput { - name: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieCreateInput { - actorCount: Int - actors: MovieActorsFieldInput - averageRating: Float - id: ID - isActive: Boolean -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } - test("Type with relationship to a subscriptions excluded type", async () => { - const typeDefs = gql` - type User @mutation(operations: []) @subscription(events: []) { - username: String! - name: String + input MovieActorsCreateFieldInput { + node: ActorCreateInput! } - type Agreement { - id: Int! - name: String - owner: User @relationship(type: "OWNED_BY", direction: OUT) + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Agreement { - id: Int! - name: String - owner(directed: Boolean = true, options: UserOptions, where: UserWhere): User - ownerAggregate(directed: Boolean = true, where: UserWhere): AgreementUserOwnerAggregationSelection - ownerConnection(after: String, directed: Boolean = true, first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! -} - -type AgreementAggregateSelection { - count: Int! - id: IntAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! -} - -input AgreementConnectInput { - owner: AgreementOwnerConnectFieldInput -} - -type AgreementConnectedRelationships { - owner: AgreementOwnerConnectedRelationship -} - -input AgreementCreateInput { - id: Int! - name: String - owner: AgreementOwnerFieldInput -} - -type AgreementCreatedEvent { - createdAgreement: AgreementEventPayload! - event: EventType! - timestamp: Float! -} - -input AgreementDeleteInput { - owner: AgreementOwnerDeleteFieldInput -} - -type AgreementDeletedEvent { - deletedAgreement: AgreementEventPayload! - event: EventType! - timestamp: Float! -} - -input AgreementDisconnectInput { - owner: AgreementOwnerDisconnectFieldInput -} - -type AgreementEdge { - cursor: String! - node: Agreement! -} - -type AgreementEventPayload { - id: Int! - name: String -} - -input AgreementOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AgreementSort objects to sort Agreements by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AgreementSort!] -} - -input AgreementOwnerAggregateInput { - AND: [AgreementOwnerAggregateInput!] - NOT: AgreementOwnerAggregateInput - OR: [AgreementOwnerAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AgreementOwnerNodeAggregationWhereInput -} - -input AgreementOwnerConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type AgreementOwnerConnectedRelationship { - node: UserEventPayload! -} - -type AgreementOwnerConnection { - edges: [AgreementOwnerRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input AgreementOwnerConnectionSort { - node: UserSort -} - -input AgreementOwnerConnectionWhere { - AND: [AgreementOwnerConnectionWhere!] - NOT: AgreementOwnerConnectionWhere - OR: [AgreementOwnerConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input AgreementOwnerCreateFieldInput { - node: UserCreateInput! -} - -input AgreementOwnerDeleteFieldInput { - where: AgreementOwnerConnectionWhere -} - -input AgreementOwnerDisconnectFieldInput { - where: AgreementOwnerConnectionWhere -} - -input AgreementOwnerFieldInput { - connect: AgreementOwnerConnectFieldInput - create: AgreementOwnerCreateFieldInput -} - -input AgreementOwnerNodeAggregationWhereInput { - AND: [AgreementOwnerNodeAggregationWhereInput!] - NOT: AgreementOwnerNodeAggregationWhereInput - OR: [AgreementOwnerNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type AgreementOwnerRelationship { - cursor: String! - node: User! -} - -input AgreementOwnerRelationshipSubscriptionWhere { - node: UserSubscriptionWhere -} - -input AgreementOwnerUpdateConnectionInput { - node: UserUpdateInput -} - -input AgreementOwnerUpdateFieldInput { - connect: AgreementOwnerConnectFieldInput - create: AgreementOwnerCreateFieldInput - delete: AgreementOwnerDeleteFieldInput - disconnect: AgreementOwnerDisconnectFieldInput - update: AgreementOwnerUpdateConnectionInput - where: AgreementOwnerConnectionWhere -} - -input AgreementRelationInput { - owner: AgreementOwnerCreateFieldInput -} - -type AgreementRelationshipCreatedEvent { - agreement: AgreementEventPayload! - createdRelationship: AgreementConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input AgreementRelationshipCreatedSubscriptionWhere { - AND: [AgreementRelationshipCreatedSubscriptionWhere!] - NOT: AgreementRelationshipCreatedSubscriptionWhere - OR: [AgreementRelationshipCreatedSubscriptionWhere!] - agreement: AgreementSubscriptionWhere - createdRelationship: AgreementRelationshipsSubscriptionWhere -} - -type AgreementRelationshipDeletedEvent { - agreement: AgreementEventPayload! - deletedRelationship: AgreementConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input AgreementRelationshipDeletedSubscriptionWhere { - AND: [AgreementRelationshipDeletedSubscriptionWhere!] - NOT: AgreementRelationshipDeletedSubscriptionWhere - OR: [AgreementRelationshipDeletedSubscriptionWhere!] - agreement: AgreementSubscriptionWhere - deletedRelationship: AgreementRelationshipsSubscriptionWhere -} - -input AgreementRelationshipsSubscriptionWhere { - owner: AgreementOwnerRelationshipSubscriptionWhere -} - -\\"\\"\\" -Fields to sort Agreements by. The order in which sorts are applied is not guaranteed when specifying many fields in one AgreementSort object. -\\"\\"\\" -input AgreementSort { - id: SortDirection - name: SortDirection -} - -input AgreementSubscriptionWhere { - AND: [AgreementSubscriptionWhere!] - NOT: AgreementSubscriptionWhere - OR: [AgreementSubscriptionWhere!] - id: Int - id_GT: Int - id_GTE: Int - id_IN: [Int] - id_LT: Int - id_LTE: Int - id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input AgreementUpdateInput { - id: Int - id_DECREMENT: Int - id_INCREMENT: Int - name: String - owner: AgreementOwnerUpdateFieldInput -} - -type AgreementUpdatedEvent { - event: EventType! - previousState: AgreementEventPayload! - timestamp: Float! - updatedAgreement: AgreementEventPayload! -} - -type AgreementUserOwnerAggregationSelection { - count: Int! - node: AgreementUserOwnerNodeAggregateSelection -} - -type AgreementUserOwnerNodeAggregateSelection { - name: StringAggregateSelectionNullable! - username: StringAggregateSelectionNonNullable! -} - -input AgreementWhere { - AND: [AgreementWhere!] - NOT: AgreementWhere - OR: [AgreementWhere!] - id: Int - id_GT: Int - id_GTE: Int - id_IN: [Int!] - id_LT: Int - id_LTE: Int - id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - owner: UserWhere - ownerAggregate: AgreementOwnerAggregateInput - ownerConnection: AgreementOwnerConnectionWhere - ownerConnection_NOT: AgreementOwnerConnectionWhere - owner_NOT: UserWhere -} - -type AgreementsConnection { - edges: [AgreementEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateAgreementsMutationResponse { - agreements: [Agreement!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Mutation { - createAgreements(input: [AgreementCreateInput!]!): CreateAgreementsMutationResponse! - deleteAgreements(delete: AgreementDeleteInput, where: AgreementWhere): DeleteInfo! - updateAgreements(connect: AgreementConnectInput, create: AgreementRelationInput, delete: AgreementDeleteInput, disconnect: AgreementDisconnectInput, update: AgreementUpdateInput, where: AgreementWhere): UpdateAgreementsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - agreements(options: AgreementOptions, where: AgreementWhere): [Agreement!]! - agreementsAggregate(where: AgreementWhere): AgreementAggregateSelection! - agreementsConnection(after: String, first: Int, sort: [AgreementSort], where: AgreementWhere): AgreementsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - agreementCreated(where: AgreementSubscriptionWhere): AgreementCreatedEvent! - agreementDeleted(where: AgreementSubscriptionWhere): AgreementDeletedEvent! - agreementRelationshipCreated(where: AgreementRelationshipCreatedSubscriptionWhere): AgreementRelationshipCreatedEvent! - agreementRelationshipDeleted(where: AgreementRelationshipDeletedSubscriptionWhere): AgreementRelationshipDeletedEvent! - agreementUpdated(where: AgreementSubscriptionWhere): AgreementUpdatedEvent! -} - -type UpdateAgreementsMutationResponse { - agreements: [Agreement!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type User { - name: String - username: String! -} - -type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - username: StringAggregateSelectionNonNullable! -} - -input UserConnectWhere { - node: UserWhere! -} - -input UserCreateInput { - name: String - username: String! -} - -type UserEdge { - cursor: String! - node: User! -} - -type UserEventPayload { - name: String - username: String! -} - -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 - username: SortDirection -} - -input UserSubscriptionWhere { - AND: [UserSubscriptionWhere!] - NOT: UserSubscriptionWhere - OR: [UserSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input UserUpdateInput { - name: String - username: String -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actorCount: Int + actors: MovieActorsFieldInput + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); - test("Type with relationship to a subscriptions excluded type + Union type", async () => { + test("Empty EventPayload type", async () => { const typeDefs = gql` type Movie { id: ID @@ -4552,12 +673,7 @@ type UsersConnection { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - union Actor = Star | Person - - type Star @subscription(events: []) { - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) - } - type Person { + type Actor { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } `; @@ -4572,2052 +688,5939 @@ type UsersConnection { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -union Actor = Person | Star - -input ActorWhere { - Person: PersonWhere - Star: StarWhere -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -type CreateStarsMutationResponse { - info: CreateInfo! - stars: [Star!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - actorCount: Int - actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float - id: ID - isActive: Boolean -} - -input MovieActorsConnectInput { - Person: [MovieActorsPersonConnectFieldInput!] - Star: [MovieActorsStarConnectFieldInput!] -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Person: MovieActorsPersonConnectionWhere - Star: MovieActorsStarConnectionWhere -} - -input MovieActorsCreateFieldInput { - Person: [MovieActorsPersonCreateFieldInput!] - Star: [MovieActorsStarCreateFieldInput!] -} - -input MovieActorsCreateInput { - Person: MovieActorsPersonFieldInput - Star: MovieActorsStarFieldInput -} - -input MovieActorsDeleteInput { - Person: [MovieActorsPersonDeleteFieldInput!] - Star: [MovieActorsStarDeleteFieldInput!] -} - -input MovieActorsDisconnectInput { - Person: [MovieActorsPersonDisconnectFieldInput!] - Star: [MovieActorsStarDisconnectFieldInput!] -} - -input MovieActorsPersonConnectFieldInput { - connect: [PersonConnectInput!] - where: PersonConnectWhere -} - -input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsPersonDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] -} - -input MovieActorsPersonUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsPersonUpdateFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - delete: [MovieActorsPersonDeleteFieldInput!] - disconnect: [MovieActorsPersonDisconnectFieldInput!] - update: MovieActorsPersonUpdateConnectionInput - where: MovieActorsPersonConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsStarConnectFieldInput { - connect: [StarConnectInput!] - where: StarConnectWhere -} - -input MovieActorsStarConnectionWhere { - AND: [MovieActorsStarConnectionWhere!] - NOT: MovieActorsStarConnectionWhere - OR: [MovieActorsStarConnectionWhere!] - node: StarWhere - node_NOT: StarWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsStarCreateFieldInput { - node: StarCreateInput! -} - -input MovieActorsStarDeleteFieldInput { - delete: StarDeleteInput - where: MovieActorsStarConnectionWhere -} - -input MovieActorsStarDisconnectFieldInput { - disconnect: StarDisconnectInput - where: MovieActorsStarConnectionWhere -} - -input MovieActorsStarFieldInput { - connect: [MovieActorsStarConnectFieldInput!] - create: [MovieActorsStarCreateFieldInput!] -} - -input MovieActorsStarUpdateConnectionInput { - node: StarUpdateInput -} - -input MovieActorsStarUpdateFieldInput { - connect: [MovieActorsStarConnectFieldInput!] - create: [MovieActorsStarCreateFieldInput!] - delete: [MovieActorsStarDeleteFieldInput!] - disconnect: [MovieActorsStarDisconnectFieldInput!] - update: MovieActorsStarUpdateConnectionInput - where: MovieActorsStarConnectionWhere -} - -input MovieActorsUpdateInput { - Person: [MovieActorsPersonUpdateFieldInput!] - Star: [MovieActorsStarUpdateFieldInput!] -} - -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - actorCount: Int - actors: MovieActorsCreateInput - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean -} - -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!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -type MovieRelationshipCreatedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - movie: MovieSubscriptionWhere -} - -\\"\\"\\" -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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actors: MovieActorsUpdateInput - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - createStars(input: [StarCreateInput!]!): CreateStarsMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - deleteStars(delete: StarDeleteInput, where: StarWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - updateStars(connect: StarConnectInput, create: StarRelationInput, delete: StarDeleteInput, disconnect: StarDisconnectInput, update: StarUpdateInput, where: StarWhere): UpdateStarsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! -} - -type PersonAggregateSelection { - count: Int! -} - -input PersonConnectInput { - movies: [PersonMoviesConnectFieldInput!] -} - -input PersonConnectWhere { - node: PersonWhere! -} - -type PersonConnectedRelationships { - movies: PersonMoviesConnectedRelationship -} - -input PersonCreateInput { - movies: PersonMoviesFieldInput -} - -type PersonCreatedEvent { - event: EventType! - timestamp: Float! -} - -input PersonDeleteInput { - movies: [PersonMoviesDeleteFieldInput!] -} - -type PersonDeletedEvent { - event: EventType! - timestamp: Float! -} - -input PersonDisconnectInput { - movies: [PersonMoviesDisconnectFieldInput!] -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonMovieMoviesAggregationSelection { - count: Int! - node: PersonMovieMoviesNodeAggregateSelection -} - -type PersonMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input PersonMoviesAggregateInput { - AND: [PersonMoviesAggregateInput!] - NOT: PersonMoviesAggregateInput - OR: [PersonMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PersonMoviesNodeAggregationWhereInput -} - -input PersonMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type PersonMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type PersonMoviesConnection { - edges: [PersonMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonMoviesConnectionSort { - node: MovieSort -} - -input PersonMoviesConnectionWhere { - AND: [PersonMoviesConnectionWhere!] - NOT: PersonMoviesConnectionWhere - OR: [PersonMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PersonMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input PersonMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: PersonMoviesConnectionWhere -} - -input PersonMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: PersonMoviesConnectionWhere -} - -input PersonMoviesFieldInput { - connect: [PersonMoviesConnectFieldInput!] - create: [PersonMoviesCreateFieldInput!] -} - -input PersonMoviesNodeAggregationWhereInput { - AND: [PersonMoviesNodeAggregationWhereInput!] - NOT: PersonMoviesNodeAggregationWhereInput - OR: [PersonMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type PersonMoviesRelationship { - cursor: String! - node: Movie! -} - -input PersonMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input PersonMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input PersonMoviesUpdateFieldInput { - connect: [PersonMoviesConnectFieldInput!] - create: [PersonMoviesCreateFieldInput!] - delete: [PersonMoviesDeleteFieldInput!] - disconnect: [PersonMoviesDisconnectFieldInput!] - update: PersonMoviesUpdateConnectionInput - where: PersonMoviesConnectionWhere -} - -input PersonOptions { - limit: Int - offset: Int -} - -input PersonRelationInput { - movies: [PersonMoviesCreateFieldInput!] -} - -type PersonRelationshipCreatedEvent { - createdRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input PersonRelationshipCreatedSubscriptionWhere { - AND: [PersonRelationshipCreatedSubscriptionWhere!] - NOT: PersonRelationshipCreatedSubscriptionWhere - OR: [PersonRelationshipCreatedSubscriptionWhere!] - createdRelationship: PersonRelationshipsSubscriptionWhere -} - -type PersonRelationshipDeletedEvent { - deletedRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input PersonRelationshipDeletedSubscriptionWhere { - AND: [PersonRelationshipDeletedSubscriptionWhere!] - NOT: PersonRelationshipDeletedSubscriptionWhere - OR: [PersonRelationshipDeletedSubscriptionWhere!] - deletedRelationship: PersonRelationshipsSubscriptionWhere -} - -input PersonRelationshipsSubscriptionWhere { - movies: PersonMoviesRelationshipSubscriptionWhere -} - -input PersonUpdateInput { - movies: [PersonMoviesUpdateFieldInput!] -} - -type PersonUpdatedEvent { - event: EventType! - timestamp: Float! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: PersonMoviesAggregateInput - moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return People where all of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere - \\"\\"\\" - Return People where none of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere - moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return People where one of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere - \\"\\"\\" - Return People where some of the related PersonMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere - \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - stars(options: StarOptions, where: StarWhere): [Star!]! - starsAggregate(where: StarWhere): StarAggregateSelection! - starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type Star { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! -} - -type StarAggregateSelection { - count: Int! -} - -input StarConnectInput { - movies: [StarMoviesConnectFieldInput!] -} - -input StarConnectWhere { - node: StarWhere! -} - -input StarCreateInput { - movies: StarMoviesFieldInput -} - -input StarDeleteInput { - movies: [StarMoviesDeleteFieldInput!] -} - -input StarDisconnectInput { - movies: [StarMoviesDisconnectFieldInput!] -} - -type StarEdge { - cursor: String! - node: Star! -} - -type StarMovieMoviesAggregationSelection { - count: Int! - node: StarMovieMoviesNodeAggregateSelection -} - -type StarMovieMoviesNodeAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input StarMoviesAggregateInput { - AND: [StarMoviesAggregateInput!] - NOT: StarMoviesAggregateInput - OR: [StarMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: StarMoviesNodeAggregationWhereInput -} - -input StarMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type StarMoviesConnection { - edges: [StarMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input StarMoviesConnectionSort { - node: MovieSort -} - -input StarMoviesConnectionWhere { - AND: [StarMoviesConnectionWhere!] - NOT: StarMoviesConnectionWhere - OR: [StarMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input StarMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input StarMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: StarMoviesConnectionWhere -} - -input StarMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: StarMoviesConnectionWhere -} - -input StarMoviesFieldInput { - connect: [StarMoviesConnectFieldInput!] - create: [StarMoviesCreateFieldInput!] -} - -input StarMoviesNodeAggregationWhereInput { - AND: [StarMoviesNodeAggregationWhereInput!] - NOT: StarMoviesNodeAggregationWhereInput - OR: [StarMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type StarMoviesRelationship { - cursor: String! - node: Movie! -} - -input StarMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input StarMoviesUpdateFieldInput { - connect: [StarMoviesConnectFieldInput!] - create: [StarMoviesCreateFieldInput!] - delete: [StarMoviesDeleteFieldInput!] - disconnect: [StarMoviesDisconnectFieldInput!] - update: StarMoviesUpdateConnectionInput - where: StarMoviesConnectionWhere -} - -input StarOptions { - limit: Int - offset: Int -} - -input StarRelationInput { - movies: [StarMoviesCreateFieldInput!] -} - -input StarUpdateInput { - movies: [StarMoviesUpdateFieldInput!] -} - -input StarWhere { - AND: [StarWhere!] - NOT: StarWhere - OR: [StarWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: StarMoviesAggregateInput - moviesConnection: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Stars where all of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: StarMoviesConnectionWhere - \\"\\"\\" - Return Stars where none of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: StarMoviesConnectionWhere - moviesConnection_NOT: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Stars where one of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: StarMoviesConnectionWhere - \\"\\"\\" - Return Stars where some of the related StarMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: StarMoviesConnectionWhere - \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere -} - -type StarsConnection { - edges: [StarEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Subscription { - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - personCreated: PersonCreatedEvent! - personDeleted: PersonDeletedEvent! - personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! - personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! - personUpdated: PersonUpdatedEvent! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -} - -type UpdateStarsMutationResponse { - info: UpdateInfo! - stars: [Star!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } - test("Type with relationship to a subscriptions excluded type + Interface type", async () => { - const typeDefs = gql` - type Movie implements Production @subscription(events: []) { - title: String! - id: ID @unique - director: Creature! + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } - type Series implements Production { - title: String! - episode: Int! - id: ID @unique - director: Creature! + type ActorAggregateSelection { + count: Int! } - interface Production { - id: ID - director: Creature! @relationship(type: "DIRECTED", direction: IN) + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] } - type Person implements Creature { - movies: Production! + input ActorConnectWhere { + node: ActorWhere! } - interface Creature { - movies: Production! @relationship(type: "DIRECTED", direction: OUT) + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); + input ActorCreateInput { + movies: ActorMoviesFieldInput + } - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + type ActorCreatedEvent { + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + delete: [ActorMoviesDeleteFieldInput!] + disconnect: [ActorMoviesDisconnectFieldInput!] + update: ActorMoviesUpdateConnectionInput + where: ActorMoviesConnectionWhere + } + + input ActorOptions { + limit: Int + offset: Int + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + createdRelationship: ActorConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + deletedRelationship: ActorConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + } + + type ActorUpdatedEvent { + event: EventType! + timestamp: Float! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + actorCount: Int + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieActorActorsAggregationSelection { + count: Int! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actorCount: Int + actors: MovieActorsFieldInput + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + movie: MovieSubscriptionWhere + } + + \\"\\"\\" + 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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type Subscription { + actorCreated: ActorCreatedEvent! + actorDeleted: ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated: ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("Empty EventPayload type on Union type", async () => { + const typeDefs = gql` + type Movie { + id: ID + actorCount: Int + averageRating: Float + isActive: Boolean + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + union Actor = Star | Person + + type Star { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + type Person { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -interface Creature { - movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! -} - -input CreatureConnectInput { - _on: CreatureImplementationsConnectInput - movies: CreatureMoviesConnectFieldInput -} - -input CreatureConnectWhere { - node: CreatureWhere! -} - -input CreatureCreateInput { - Person: PersonCreateInput -} - -input CreatureDeleteInput { - _on: CreatureImplementationsDeleteInput - movies: CreatureMoviesDeleteFieldInput -} - -input CreatureDisconnectInput { - _on: CreatureImplementationsDisconnectInput - movies: CreatureMoviesDisconnectFieldInput -} - -input CreatureImplementationsConnectInput { - Person: [PersonConnectInput!] -} - -input CreatureImplementationsDeleteInput { - Person: [PersonDeleteInput!] -} - -input CreatureImplementationsDisconnectInput { - Person: [PersonDisconnectInput!] -} - -input CreatureImplementationsUpdateInput { - Person: PersonUpdateInput -} - -input CreatureImplementationsWhere { - Person: PersonWhere -} - -input CreatureMoviesConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere -} - -type CreatureMoviesConnection { - edges: [CreatureMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input CreatureMoviesConnectionSort { - node: ProductionSort -} - -input CreatureMoviesConnectionWhere { - AND: [CreatureMoviesConnectionWhere!] - NOT: CreatureMoviesConnectionWhere - OR: [CreatureMoviesConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input CreatureMoviesCreateFieldInput { - node: ProductionCreateInput! -} - -input CreatureMoviesDeleteFieldInput { - delete: ProductionDeleteInput - where: CreatureMoviesConnectionWhere -} - -input CreatureMoviesDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: CreatureMoviesConnectionWhere -} - -input CreatureMoviesFieldInput { - connect: CreatureMoviesConnectFieldInput - create: CreatureMoviesCreateFieldInput -} - -type CreatureMoviesRelationship { - cursor: String! - node: Production! -} - -input CreatureMoviesUpdateConnectionInput { - node: ProductionUpdateInput -} - -input CreatureMoviesUpdateFieldInput { - connect: CreatureMoviesConnectFieldInput - create: CreatureMoviesCreateFieldInput - delete: CreatureMoviesDeleteFieldInput - disconnect: CreatureMoviesDisconnectFieldInput - update: CreatureMoviesUpdateConnectionInput - where: CreatureMoviesConnectionWhere -} - -input CreatureOptions { - limit: Int - offset: Int -} - -input CreatureUpdateInput { - _on: CreatureImplementationsUpdateInput - movies: CreatureMoviesUpdateFieldInput -} - -input CreatureWhere { - _on: CreatureImplementationsWhere - moviesConnection: CreatureMoviesConnectionWhere - moviesConnection_NOT: CreatureMoviesConnectionWhere -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie implements Production { - director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! - directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! - id: ID - title: String! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - director: MovieDirectorConnectFieldInput -} - -input MovieCreateInput { - director: ProductionDirectorFieldInput - id: ID - title: String! -} - -input MovieDeleteInput { - director: MovieDirectorDeleteFieldInput -} - -input MovieDirectorConnectFieldInput { - connect: CreatureConnectInput - where: CreatureConnectWhere -} - -input MovieDirectorCreateFieldInput { - node: CreatureCreateInput! -} - -input MovieDirectorDeleteFieldInput { - delete: CreatureDeleteInput - where: ProductionDirectorConnectionWhere -} - -input MovieDirectorDisconnectFieldInput { - disconnect: CreatureDisconnectInput - where: ProductionDirectorConnectionWhere -} - -input MovieDirectorUpdateConnectionInput { - node: CreatureUpdateInput -} - -input MovieDirectorUpdateFieldInput { - connect: MovieDirectorConnectFieldInput - create: MovieDirectorCreateFieldInput - delete: MovieDirectorDeleteFieldInput - disconnect: MovieDirectorDisconnectFieldInput - update: MovieDirectorUpdateConnectionInput - where: ProductionDirectorConnectionWhere -} - -input MovieDisconnectInput { - director: MovieDirectorDisconnectFieldInput -} - -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!] -} - -input MovieRelationInput { - director: MovieDirectorCreateFieldInput -} - -\\"\\"\\" -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 - title: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - director: MovieDirectorUpdateFieldInput - id: ID - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - directorConnection: ProductionDirectorConnectionWhere - directorConnection_NOT: ProductionDirectorConnectionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person implements Creature { - movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! -} - -type PersonAggregateSelection { - count: Int! -} - -input PersonConnectInput { - movies: PersonMoviesConnectFieldInput -} - -type PersonConnectedRelationships { - movies: PersonMoviesConnectedRelationship -} - -input PersonCreateInput { - movies: CreatureMoviesFieldInput -} - -type PersonCreatedEvent { - event: EventType! - timestamp: Float! -} - -input PersonDeleteInput { - movies: PersonMoviesDeleteFieldInput -} - -type PersonDeletedEvent { - event: EventType! - timestamp: Float! -} - -input PersonDisconnectInput { - movies: PersonMoviesDisconnectFieldInput -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonMoviesConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere -} - -type PersonMoviesConnectedRelationship { - node: ProductionEventPayload! -} - -input PersonMoviesCreateFieldInput { - node: ProductionCreateInput! -} - -input PersonMoviesDeleteFieldInput { - delete: ProductionDeleteInput - where: CreatureMoviesConnectionWhere -} - -input PersonMoviesDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: CreatureMoviesConnectionWhere -} - -input PersonMoviesRelationshipSubscriptionWhere { - node: ProductionSubscriptionWhere -} - -input PersonMoviesUpdateConnectionInput { - node: ProductionUpdateInput -} - -input PersonMoviesUpdateFieldInput { - connect: PersonMoviesConnectFieldInput - create: PersonMoviesCreateFieldInput - delete: PersonMoviesDeleteFieldInput - disconnect: PersonMoviesDisconnectFieldInput - update: PersonMoviesUpdateConnectionInput - where: CreatureMoviesConnectionWhere -} - -input PersonOptions { - limit: Int - offset: Int -} - -input PersonRelationInput { - movies: PersonMoviesCreateFieldInput -} - -type PersonRelationshipCreatedEvent { - createdRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input PersonRelationshipCreatedSubscriptionWhere { - AND: [PersonRelationshipCreatedSubscriptionWhere!] - NOT: PersonRelationshipCreatedSubscriptionWhere - OR: [PersonRelationshipCreatedSubscriptionWhere!] - createdRelationship: PersonRelationshipsSubscriptionWhere -} - -type PersonRelationshipDeletedEvent { - deletedRelationship: PersonConnectedRelationships! - event: EventType! - timestamp: Float! -} - -input PersonRelationshipDeletedSubscriptionWhere { - AND: [PersonRelationshipDeletedSubscriptionWhere!] - NOT: PersonRelationshipDeletedSubscriptionWhere - OR: [PersonRelationshipDeletedSubscriptionWhere!] - deletedRelationship: PersonRelationshipsSubscriptionWhere -} - -input PersonRelationshipsSubscriptionWhere { - movies: PersonMoviesRelationshipSubscriptionWhere -} - -input PersonUpdateInput { - movies: PersonMoviesUpdateFieldInput -} - -type PersonUpdatedEvent { - event: EventType! - timestamp: Float! -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - moviesConnection: CreatureMoviesConnectionWhere - moviesConnection_NOT: CreatureMoviesConnectionWhere -} - -interface Production { - director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! - directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! - id: ID -} - -input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - director: ProductionDirectorConnectFieldInput -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - director: ProductionDirectorDeleteFieldInput -} - -input ProductionDirectorConnectFieldInput { - where: CreatureConnectWhere -} - -type ProductionDirectorConnection { - edges: [ProductionDirectorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ProductionDirectorConnectionWhere { - AND: [ProductionDirectorConnectionWhere!] - NOT: ProductionDirectorConnectionWhere - OR: [ProductionDirectorConnectionWhere!] - node: CreatureWhere - node_NOT: CreatureWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ProductionDirectorCreateFieldInput { - node: CreatureCreateInput! -} - -input ProductionDirectorDeleteFieldInput { - where: ProductionDirectorConnectionWhere -} - -input ProductionDirectorDisconnectFieldInput { - where: ProductionDirectorConnectionWhere -} - -input ProductionDirectorFieldInput { - connect: ProductionDirectorConnectFieldInput - create: ProductionDirectorCreateFieldInput -} - -type ProductionDirectorRelationship { - cursor: String! - node: Creature! -} - -input ProductionDirectorUpdateConnectionInput { - node: CreatureUpdateInput -} - -input ProductionDirectorUpdateFieldInput { - connect: ProductionDirectorConnectFieldInput - create: ProductionDirectorCreateFieldInput - delete: ProductionDirectorDeleteFieldInput - disconnect: ProductionDirectorDisconnectFieldInput - update: ProductionDirectorUpdateConnectionInput - where: ProductionDirectorConnectionWhere -} - -input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - director: ProductionDirectorDisconnectFieldInput -} - -interface ProductionEventPayload { - id: ID -} - -input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] -} - -input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] -} - -input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] -} - -input ProductionImplementationsSubscriptionWhere { - Movie: MovieSubscriptionWhere - Series: SeriesSubscriptionWhere -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 { - id: SortDirection -} - -input ProductionSubscriptionWhere { - AND: [ProductionSubscriptionWhere!] - NOT: ProductionSubscriptionWhere - OR: [ProductionSubscriptionWhere!] - _on: ProductionImplementationsSubscriptionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - director: ProductionDirectorUpdateFieldInput - id: ID -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - directorConnection: ProductionDirectorConnectionWhere - directorConnection_NOT: ProductionDirectorConnectionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! - directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! - episode: Int! - id: ID - title: String! -} - -type SeriesAggregateSelection { - count: Int! - episode: IntAggregateSelectionNonNullable! - id: IDAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input SeriesConnectInput { - director: SeriesDirectorConnectFieldInput -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - director: ProductionDirectorFieldInput - episode: Int! - id: ID - title: String! -} - -type SeriesCreatedEvent { - createdSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! -} - -input SeriesDeleteInput { - director: SeriesDirectorDeleteFieldInput -} - -type SeriesDeletedEvent { - deletedSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! -} - -input SeriesDirectorConnectFieldInput { - connect: CreatureConnectInput - where: CreatureConnectWhere -} - -input SeriesDirectorCreateFieldInput { - node: CreatureCreateInput! -} - -input SeriesDirectorDeleteFieldInput { - delete: CreatureDeleteInput - where: ProductionDirectorConnectionWhere -} - -input SeriesDirectorDisconnectFieldInput { - disconnect: CreatureDisconnectInput - where: ProductionDirectorConnectionWhere -} - -input SeriesDirectorUpdateConnectionInput { - node: CreatureUpdateInput -} - -input SeriesDirectorUpdateFieldInput { - connect: SeriesDirectorConnectFieldInput - create: SeriesDirectorCreateFieldInput - delete: SeriesDirectorDeleteFieldInput - disconnect: SeriesDirectorDisconnectFieldInput - update: SeriesDirectorUpdateConnectionInput - where: ProductionDirectorConnectionWhere -} - -input SeriesDisconnectInput { - director: SeriesDirectorDisconnectFieldInput -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -type SeriesEventPayload implements ProductionEventPayload { - director: Creature! - directorConnection: ProductionDirectorConnection! - episode: Int! - id: ID - title: String! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -input SeriesRelationInput { - director: SeriesDirectorCreateFieldInput -} - -type SeriesRelationshipCreatedEvent { - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! -} - -input SeriesRelationshipCreatedSubscriptionWhere { - AND: [SeriesRelationshipCreatedSubscriptionWhere!] - NOT: SeriesRelationshipCreatedSubscriptionWhere - OR: [SeriesRelationshipCreatedSubscriptionWhere!] - series: SeriesSubscriptionWhere -} - -type SeriesRelationshipDeletedEvent { - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! -} - -input SeriesRelationshipDeletedSubscriptionWhere { - AND: [SeriesRelationshipDeletedSubscriptionWhere!] - NOT: SeriesRelationshipDeletedSubscriptionWhere - OR: [SeriesRelationshipDeletedSubscriptionWhere!] - series: SeriesSubscriptionWhere -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - episode: SortDirection - id: SortDirection - title: SortDirection -} - -input SeriesSubscriptionWhere { - AND: [SeriesSubscriptionWhere!] - NOT: SeriesSubscriptionWhere - OR: [SeriesSubscriptionWhere!] - episode: Int - episode_GT: Int - episode_GTE: Int - episode_IN: [Int] - episode_LT: Int - episode_LTE: Int - episode_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episode_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input SeriesUpdateInput { - director: SeriesDirectorUpdateFieldInput - episode: Int - episode_DECREMENT: Int - episode_INCREMENT: Int - id: ID - title: String -} - -type SeriesUpdatedEvent { - event: EventType! - previousState: SeriesEventPayload! - timestamp: Float! - updatedSeries: SeriesEventPayload! -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - directorConnection: ProductionDirectorConnectionWhere - directorConnection_NOT: ProductionDirectorConnectionWhere - episode: Int - episode_GT: Int - episode_GTE: Int - episode_IN: [Int!] - episode_LT: Int - episode_LTE: Int - episode_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episode_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type Subscription { - personCreated: PersonCreatedEvent! - personDeleted: PersonDeletedEvent! - personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! - personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! - personUpdated: PersonUpdatedEvent! - seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! - seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! - seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! - seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! - seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + union Actor = Person | Star + + input ActorWhere { + Person: PersonWhere + Star: StarWhere + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + type CreateStarsMutationResponse { + info: CreateInfo! + stars: [Star!]! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + actorCount: Int + actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean + } + + input MovieActorsConnectInput { + Person: [MovieActorsPersonConnectFieldInput!] + Star: [MovieActorsStarConnectFieldInput!] + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + Person: MovieActorsPersonConnectionWhere + Star: MovieActorsStarConnectionWhere + } + + input MovieActorsCreateFieldInput { + Person: [MovieActorsPersonCreateFieldInput!] + Star: [MovieActorsStarCreateFieldInput!] + } + + input MovieActorsCreateInput { + Person: MovieActorsPersonFieldInput + Star: MovieActorsStarFieldInput + } + + input MovieActorsDeleteInput { + Person: [MovieActorsPersonDeleteFieldInput!] + Star: [MovieActorsStarDeleteFieldInput!] + } + + input MovieActorsDisconnectInput { + Person: [MovieActorsPersonDisconnectFieldInput!] + Star: [MovieActorsStarDisconnectFieldInput!] + } + + input MovieActorsPersonConnectFieldInput { + connect: [PersonConnectInput!] + where: PersonConnectWhere + } + + input MovieActorsPersonConnectionWhere { + AND: [MovieActorsPersonConnectionWhere!] + NOT: MovieActorsPersonConnectionWhere + OR: [MovieActorsPersonConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsPersonDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsPersonConnectionWhere + } + + input MovieActorsPersonDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsPersonConnectionWhere + } + + input MovieActorsPersonFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + } + + input MovieActorsPersonUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsPersonUpdateFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + delete: [MovieActorsPersonDeleteFieldInput!] + disconnect: [MovieActorsPersonDisconnectFieldInput!] + update: MovieActorsPersonUpdateConnectionInput + where: MovieActorsPersonConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsStarConnectFieldInput { + connect: [StarConnectInput!] + where: StarConnectWhere + } + + input MovieActorsStarConnectionWhere { + AND: [MovieActorsStarConnectionWhere!] + NOT: MovieActorsStarConnectionWhere + OR: [MovieActorsStarConnectionWhere!] + node: StarWhere + node_NOT: StarWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsStarCreateFieldInput { + node: StarCreateInput! + } + + input MovieActorsStarDeleteFieldInput { + delete: StarDeleteInput + where: MovieActorsStarConnectionWhere + } + + input MovieActorsStarDisconnectFieldInput { + disconnect: StarDisconnectInput + where: MovieActorsStarConnectionWhere + } + + input MovieActorsStarFieldInput { + connect: [MovieActorsStarConnectFieldInput!] + create: [MovieActorsStarCreateFieldInput!] + } + + input MovieActorsStarUpdateConnectionInput { + node: StarUpdateInput + } + + input MovieActorsStarUpdateFieldInput { + connect: [MovieActorsStarConnectFieldInput!] + create: [MovieActorsStarCreateFieldInput!] + delete: [MovieActorsStarDeleteFieldInput!] + disconnect: [MovieActorsStarDisconnectFieldInput!] + update: MovieActorsStarUpdateConnectionInput + where: MovieActorsStarConnectionWhere + } + + input MovieActorsUpdateInput { + Person: [MovieActorsPersonUpdateFieldInput!] + Star: [MovieActorsStarUpdateFieldInput!] + } + + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: MovieActorsConnectInput + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actorCount: Int + actors: MovieActorsCreateInput + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: MovieActorsDeleteInput + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean + } + + 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!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + type MovieRelationshipCreatedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + movie: MovieSubscriptionWhere + } + + \\"\\"\\" + 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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: MovieActorsUpdateInput + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + createStars(input: [StarCreateInput!]!): CreateStarsMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + deleteStars(delete: StarDeleteInput, where: StarWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + updateStars(connect: StarConnectInput, create: StarRelationInput, delete: StarDeleteInput, disconnect: StarDisconnectInput, update: StarUpdateInput, where: StarWhere): UpdateStarsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! + } + + type PersonAggregateSelection { + count: Int! + } + + input PersonConnectInput { + movies: [PersonMoviesConnectFieldInput!] + } + + input PersonConnectWhere { + node: PersonWhere! + } + + type PersonConnectedRelationships { + movies: PersonMoviesConnectedRelationship + } + + input PersonCreateInput { + movies: PersonMoviesFieldInput + } + + type PersonCreatedEvent { + event: EventType! + timestamp: Float! + } + + input PersonDeleteInput { + movies: [PersonMoviesDeleteFieldInput!] + } + + type PersonDeletedEvent { + event: EventType! + timestamp: Float! + } + + input PersonDisconnectInput { + movies: [PersonMoviesDisconnectFieldInput!] + } + + type PersonEdge { + cursor: String! + node: Person! + } + + type PersonMovieMoviesAggregationSelection { + count: Int! + node: PersonMovieMoviesNodeAggregateSelection + } + + type PersonMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input PersonMoviesAggregateInput { + AND: [PersonMoviesAggregateInput!] + NOT: PersonMoviesAggregateInput + OR: [PersonMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PersonMoviesNodeAggregationWhereInput + } + + input PersonMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type PersonMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type PersonMoviesConnection { + edges: [PersonMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonMoviesConnectionSort { + node: MovieSort + } + + input PersonMoviesConnectionWhere { + AND: [PersonMoviesConnectionWhere!] + NOT: PersonMoviesConnectionWhere + OR: [PersonMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PersonMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input PersonMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: PersonMoviesConnectionWhere + } + + input PersonMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: PersonMoviesConnectionWhere + } + + input PersonMoviesFieldInput { + connect: [PersonMoviesConnectFieldInput!] + create: [PersonMoviesCreateFieldInput!] + } + + input PersonMoviesNodeAggregationWhereInput { + AND: [PersonMoviesNodeAggregationWhereInput!] + NOT: PersonMoviesNodeAggregationWhereInput + OR: [PersonMoviesNodeAggregationWhereInput!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type PersonMoviesRelationship { + cursor: String! + node: Movie! + } + + input PersonMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input PersonMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input PersonMoviesUpdateFieldInput { + connect: [PersonMoviesConnectFieldInput!] + create: [PersonMoviesCreateFieldInput!] + delete: [PersonMoviesDeleteFieldInput!] + disconnect: [PersonMoviesDisconnectFieldInput!] + update: PersonMoviesUpdateConnectionInput + where: PersonMoviesConnectionWhere + } + + input PersonOptions { + limit: Int + offset: Int + } + + input PersonRelationInput { + movies: [PersonMoviesCreateFieldInput!] + } + + type PersonRelationshipCreatedEvent { + createdRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input PersonRelationshipCreatedSubscriptionWhere { + AND: [PersonRelationshipCreatedSubscriptionWhere!] + NOT: PersonRelationshipCreatedSubscriptionWhere + OR: [PersonRelationshipCreatedSubscriptionWhere!] + createdRelationship: PersonRelationshipsSubscriptionWhere + } + + type PersonRelationshipDeletedEvent { + deletedRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input PersonRelationshipDeletedSubscriptionWhere { + AND: [PersonRelationshipDeletedSubscriptionWhere!] + NOT: PersonRelationshipDeletedSubscriptionWhere + OR: [PersonRelationshipDeletedSubscriptionWhere!] + deletedRelationship: PersonRelationshipsSubscriptionWhere + } + + input PersonRelationshipsSubscriptionWhere { + movies: PersonMoviesRelationshipSubscriptionWhere + } + + input PersonUpdateInput { + movies: [PersonMoviesUpdateFieldInput!] + } + + type PersonUpdatedEvent { + event: EventType! + timestamp: Float! + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: PersonMoviesConnectionWhere + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! + stars(options: StarOptions, where: StarWhere): [Star!]! + starsAggregate(where: StarWhere): StarAggregateSelection! + starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type Star { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! + } + + type StarAggregateSelection { + count: Int! + } + + input StarConnectInput { + movies: [StarMoviesConnectFieldInput!] + } + + input StarConnectWhere { + node: StarWhere! + } + + type StarConnectedRelationships { + movies: StarMoviesConnectedRelationship + } + + input StarCreateInput { + movies: StarMoviesFieldInput + } + + type StarCreatedEvent { + event: EventType! + timestamp: Float! + } + + input StarDeleteInput { + movies: [StarMoviesDeleteFieldInput!] + } + + type StarDeletedEvent { + event: EventType! + timestamp: Float! + } + + input StarDisconnectInput { + movies: [StarMoviesDisconnectFieldInput!] + } + + type StarEdge { + cursor: String! + node: Star! + } + + type StarMovieMoviesAggregationSelection { + count: Int! + node: StarMovieMoviesNodeAggregateSelection + } + + type StarMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input StarMoviesAggregateInput { + AND: [StarMoviesAggregateInput!] + NOT: StarMoviesAggregateInput + OR: [StarMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: StarMoviesNodeAggregationWhereInput + } + + input StarMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type StarMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type StarMoviesConnection { + edges: [StarMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input StarMoviesConnectionSort { + node: MovieSort + } + + input StarMoviesConnectionWhere { + AND: [StarMoviesConnectionWhere!] + NOT: StarMoviesConnectionWhere + OR: [StarMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input StarMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input StarMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: StarMoviesConnectionWhere + } + + input StarMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: StarMoviesConnectionWhere + } + + input StarMoviesFieldInput { + connect: [StarMoviesConnectFieldInput!] + create: [StarMoviesCreateFieldInput!] + } + + input StarMoviesNodeAggregationWhereInput { + AND: [StarMoviesNodeAggregationWhereInput!] + NOT: StarMoviesNodeAggregationWhereInput + OR: [StarMoviesNodeAggregationWhereInput!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type StarMoviesRelationship { + cursor: String! + node: Movie! + } + + input StarMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input StarMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input StarMoviesUpdateFieldInput { + connect: [StarMoviesConnectFieldInput!] + create: [StarMoviesCreateFieldInput!] + delete: [StarMoviesDeleteFieldInput!] + disconnect: [StarMoviesDisconnectFieldInput!] + update: StarMoviesUpdateConnectionInput + where: StarMoviesConnectionWhere + } + + input StarOptions { + limit: Int + offset: Int + } + + input StarRelationInput { + movies: [StarMoviesCreateFieldInput!] + } + + type StarRelationshipCreatedEvent { + createdRelationship: StarConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input StarRelationshipCreatedSubscriptionWhere { + AND: [StarRelationshipCreatedSubscriptionWhere!] + NOT: StarRelationshipCreatedSubscriptionWhere + OR: [StarRelationshipCreatedSubscriptionWhere!] + createdRelationship: StarRelationshipsSubscriptionWhere + } + + type StarRelationshipDeletedEvent { + deletedRelationship: StarConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input StarRelationshipDeletedSubscriptionWhere { + AND: [StarRelationshipDeletedSubscriptionWhere!] + NOT: StarRelationshipDeletedSubscriptionWhere + OR: [StarRelationshipDeletedSubscriptionWhere!] + deletedRelationship: StarRelationshipsSubscriptionWhere + } + + input StarRelationshipsSubscriptionWhere { + movies: StarMoviesRelationshipSubscriptionWhere + } + + input StarUpdateInput { + movies: [StarMoviesUpdateFieldInput!] + } + + type StarUpdatedEvent { + event: EventType! + timestamp: Float! + } + + input StarWhere { + AND: [StarWhere!] + NOT: StarWhere + OR: [StarWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: StarMoviesAggregateInput + moviesConnection: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Stars where all of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where none of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: StarMoviesConnectionWhere + moviesConnection_NOT: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Stars where one of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where some of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: StarMoviesConnectionWhere + \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + } + + type StarsConnection { + edges: [StarEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Subscription { + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + personCreated: PersonCreatedEvent! + personDeleted: PersonDeletedEvent! + personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! + personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! + personUpdated: PersonUpdatedEvent! + starCreated: StarCreatedEvent! + starDeleted: StarDeletedEvent! + starRelationshipCreated(where: StarRelationshipCreatedSubscriptionWhere): StarRelationshipCreatedEvent! + starRelationshipDeleted(where: StarRelationshipDeletedSubscriptionWhere): StarRelationshipDeletedEvent! + starUpdated: StarUpdatedEvent! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + } + + type UpdateStarsMutationResponse { + info: UpdateInfo! + stars: [Star!]! + }" + `); + }); + + test("Empty EventPayload type, but @relationshipProperty exists", async () => { + const typeDefs = gql` + type Movie { + id: ID + actorCount: Int + averageRating: Float + isActive: Boolean + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + } + + interface ActedIn @relationshipProperties { + screenTime: Int! + } + + type Actor { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + interface ActedIn { + screenTime: Int! + } + + input ActedInCreateInput { + screenTime: Int! + } + + input ActedInSort { + screenTime: SortDirection + } + + input ActedInSubscriptionWhere { + AND: [ActedInSubscriptionWhere!] + NOT: ActedInSubscriptionWhere + OR: [ActedInSubscriptionWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + } + + type ActorAggregateSelection { + count: Int! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + } + + type ActorCreatedEvent { + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + delete: [ActorMoviesDeleteFieldInput!] + disconnect: [ActorMoviesDisconnectFieldInput!] + update: ActorMoviesUpdateConnectionInput + where: ActorMoviesConnectionWhere + } + + input ActorOptions { + limit: Int + offset: Int + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + createdRelationship: ActorConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + deletedRelationship: ActorConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + } + + type ActorUpdatedEvent { + event: EventType! + timestamp: Float! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + actorCount: Int + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnectedRelationship { + screenTime: Int! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + edge: ActedInSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + screenTime: Int! + } + + input MovieActorsRelationshipSubscriptionWhere { + edge: ActedInSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actorCount: Int + actors: MovieActorsFieldInput + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type Subscription { + actorCreated: ActorCreatedEvent! + actorDeleted: ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated: ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("Subscriptions excluded", async () => { + const typeDefs = gql` + type Movie @subscription(events: []) { + id: ID + actorCount: Int + averageRating: Float + isActive: Boolean + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type Actor { + name: String! + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + name: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + name: String! + } + + 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 ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input ActorUpdateInput { + name: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + actorCount: Int + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieCreateInput { + actorCount: Int + actors: MovieActorsFieldInput + averageRating: Float + id: ID + isActive: Boolean + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection + } + + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("Type with relationship to a subscriptions excluded type", async () => { + const typeDefs = gql` + type User @mutation(operations: []) @subscription(events: []) { + username: String! + name: String + } + type Agreement { + id: Int! + name: String + owner: User @relationship(type: "OWNED_BY", direction: OUT) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Agreement { + id: Int! + name: String + owner(directed: Boolean = true, options: UserOptions, where: UserWhere): User + ownerAggregate(directed: Boolean = true, where: UserWhere): AgreementUserOwnerAggregationSelection + ownerConnection(after: String, directed: Boolean = true, first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! + } + + type AgreementAggregateSelection { + count: Int! + id: IntAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + } + + input AgreementConnectInput { + owner: AgreementOwnerConnectFieldInput + } + + type AgreementConnectedRelationships { + owner: AgreementOwnerConnectedRelationship + } + + input AgreementCreateInput { + id: Int! + name: String + owner: AgreementOwnerFieldInput + } + + type AgreementCreatedEvent { + createdAgreement: AgreementEventPayload! + event: EventType! + timestamp: Float! + } + + input AgreementDeleteInput { + owner: AgreementOwnerDeleteFieldInput + } + + type AgreementDeletedEvent { + deletedAgreement: AgreementEventPayload! + event: EventType! + timestamp: Float! + } + + input AgreementDisconnectInput { + owner: AgreementOwnerDisconnectFieldInput + } + + type AgreementEdge { + cursor: String! + node: Agreement! + } + + type AgreementEventPayload { + id: Int! + name: String + } + + input AgreementOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AgreementSort objects to sort Agreements by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AgreementSort!] + } + + input AgreementOwnerAggregateInput { + AND: [AgreementOwnerAggregateInput!] + NOT: AgreementOwnerAggregateInput + OR: [AgreementOwnerAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: AgreementOwnerNodeAggregationWhereInput + } + + input AgreementOwnerConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type AgreementOwnerConnectedRelationship { + node: UserEventPayload! + } + + type AgreementOwnerConnection { + edges: [AgreementOwnerRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input AgreementOwnerConnectionSort { + node: UserSort + } + + input AgreementOwnerConnectionWhere { + AND: [AgreementOwnerConnectionWhere!] + NOT: AgreementOwnerConnectionWhere + OR: [AgreementOwnerConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input AgreementOwnerCreateFieldInput { + node: UserCreateInput! + } + + input AgreementOwnerDeleteFieldInput { + where: AgreementOwnerConnectionWhere + } + + input AgreementOwnerDisconnectFieldInput { + where: AgreementOwnerConnectionWhere + } + + input AgreementOwnerFieldInput { + connect: AgreementOwnerConnectFieldInput + create: AgreementOwnerCreateFieldInput + } + + input AgreementOwnerNodeAggregationWhereInput { + AND: [AgreementOwnerNodeAggregationWhereInput!] + NOT: AgreementOwnerNodeAggregationWhereInput + OR: [AgreementOwnerNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type AgreementOwnerRelationship { + cursor: String! + node: User! + } + + input AgreementOwnerRelationshipSubscriptionWhere { + node: UserSubscriptionWhere + } + + input AgreementOwnerUpdateConnectionInput { + node: UserUpdateInput + } + + input AgreementOwnerUpdateFieldInput { + connect: AgreementOwnerConnectFieldInput + create: AgreementOwnerCreateFieldInput + delete: AgreementOwnerDeleteFieldInput + disconnect: AgreementOwnerDisconnectFieldInput + update: AgreementOwnerUpdateConnectionInput + where: AgreementOwnerConnectionWhere + } + + input AgreementRelationInput { + owner: AgreementOwnerCreateFieldInput + } + + type AgreementRelationshipCreatedEvent { + agreement: AgreementEventPayload! + createdRelationship: AgreementConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input AgreementRelationshipCreatedSubscriptionWhere { + AND: [AgreementRelationshipCreatedSubscriptionWhere!] + NOT: AgreementRelationshipCreatedSubscriptionWhere + OR: [AgreementRelationshipCreatedSubscriptionWhere!] + agreement: AgreementSubscriptionWhere + createdRelationship: AgreementRelationshipsSubscriptionWhere + } + + type AgreementRelationshipDeletedEvent { + agreement: AgreementEventPayload! + deletedRelationship: AgreementConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input AgreementRelationshipDeletedSubscriptionWhere { + AND: [AgreementRelationshipDeletedSubscriptionWhere!] + NOT: AgreementRelationshipDeletedSubscriptionWhere + OR: [AgreementRelationshipDeletedSubscriptionWhere!] + agreement: AgreementSubscriptionWhere + deletedRelationship: AgreementRelationshipsSubscriptionWhere + } + + input AgreementRelationshipsSubscriptionWhere { + owner: AgreementOwnerRelationshipSubscriptionWhere + } + + \\"\\"\\" + Fields to sort Agreements by. The order in which sorts are applied is not guaranteed when specifying many fields in one AgreementSort object. + \\"\\"\\" + input AgreementSort { + id: SortDirection + name: SortDirection + } + + input AgreementSubscriptionWhere { + AND: [AgreementSubscriptionWhere!] + NOT: AgreementSubscriptionWhere + OR: [AgreementSubscriptionWhere!] + id: Int + id_GT: Int + id_GTE: Int + id_IN: [Int] + id_LT: Int + id_LTE: Int + id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input AgreementUpdateInput { + id: Int + id_DECREMENT: Int + id_INCREMENT: Int + name: String + owner: AgreementOwnerUpdateFieldInput + } + + type AgreementUpdatedEvent { + event: EventType! + previousState: AgreementEventPayload! + timestamp: Float! + updatedAgreement: AgreementEventPayload! + } + + type AgreementUserOwnerAggregationSelection { + count: Int! + node: AgreementUserOwnerNodeAggregateSelection + } + + type AgreementUserOwnerNodeAggregateSelection { + name: StringAggregateSelectionNullable! + username: StringAggregateSelectionNonNullable! + } + + input AgreementWhere { + AND: [AgreementWhere!] + NOT: AgreementWhere + OR: [AgreementWhere!] + id: Int + id_GT: Int + id_GTE: Int + id_IN: [Int!] + id_LT: Int + id_LTE: Int + id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + owner: UserWhere + ownerAggregate: AgreementOwnerAggregateInput + ownerConnection: AgreementOwnerConnectionWhere + ownerConnection_NOT: AgreementOwnerConnectionWhere + owner_NOT: UserWhere + } + + type AgreementsConnection { + edges: [AgreementEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateAgreementsMutationResponse { + agreements: [Agreement!]! + info: CreateInfo! + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Mutation { + createAgreements(input: [AgreementCreateInput!]!): CreateAgreementsMutationResponse! + deleteAgreements(delete: AgreementDeleteInput, where: AgreementWhere): DeleteInfo! + updateAgreements(connect: AgreementConnectInput, create: AgreementRelationInput, delete: AgreementDeleteInput, disconnect: AgreementDisconnectInput, update: AgreementUpdateInput, where: AgreementWhere): UpdateAgreementsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + agreements(options: AgreementOptions, where: AgreementWhere): [Agreement!]! + agreementsAggregate(where: AgreementWhere): AgreementAggregateSelection! + agreementsConnection(after: String, first: Int, sort: [AgreementSort], where: AgreementWhere): AgreementsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + agreementCreated(where: AgreementSubscriptionWhere): AgreementCreatedEvent! + agreementDeleted(where: AgreementSubscriptionWhere): AgreementDeletedEvent! + agreementRelationshipCreated(where: AgreementRelationshipCreatedSubscriptionWhere): AgreementRelationshipCreatedEvent! + agreementRelationshipDeleted(where: AgreementRelationshipDeletedSubscriptionWhere): AgreementRelationshipDeletedEvent! + agreementUpdated(where: AgreementSubscriptionWhere): AgreementUpdatedEvent! + } + + type UpdateAgreementsMutationResponse { + agreements: [Agreement!]! + info: UpdateInfo! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type User { + name: String + username: String! + } + + type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + username: StringAggregateSelectionNonNullable! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + name: String + username: String! + } + + type UserEdge { + cursor: String! + node: User! + } + + type UserEventPayload { + name: String + username: String! + } + + 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 + username: SortDirection + } + + input UserSubscriptionWhere { + AND: [UserSubscriptionWhere!] + NOT: UserSubscriptionWhere + OR: [UserSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input UserUpdateInput { + name: String + username: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); + }); + + test("Type with relationship to a subscriptions excluded type + Union type", async () => { + const typeDefs = gql` + type Movie { + id: ID + actorCount: Int + averageRating: Float + isActive: Boolean + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + union Actor = Star | Person + + type Star @subscription(events: []) { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + type Person { + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + union Actor = Person | Star + + input ActorWhere { + Person: PersonWhere + Star: StarWhere + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + type CreateStarsMutationResponse { + info: CreateInfo! + stars: [Star!]! + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + actorCount: Int + actors(directed: Boolean = true, options: QueryOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float + id: ID + isActive: Boolean + } + + input MovieActorsConnectInput { + Person: [MovieActorsPersonConnectFieldInput!] + Star: [MovieActorsStarConnectFieldInput!] + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + Person: MovieActorsPersonConnectionWhere + Star: MovieActorsStarConnectionWhere + } + + input MovieActorsCreateFieldInput { + Person: [MovieActorsPersonCreateFieldInput!] + Star: [MovieActorsStarCreateFieldInput!] + } + + input MovieActorsCreateInput { + Person: MovieActorsPersonFieldInput + Star: MovieActorsStarFieldInput + } + + input MovieActorsDeleteInput { + Person: [MovieActorsPersonDeleteFieldInput!] + Star: [MovieActorsStarDeleteFieldInput!] + } + + input MovieActorsDisconnectInput { + Person: [MovieActorsPersonDisconnectFieldInput!] + Star: [MovieActorsStarDisconnectFieldInput!] + } + + input MovieActorsPersonConnectFieldInput { + connect: [PersonConnectInput!] + where: PersonConnectWhere + } + + input MovieActorsPersonConnectionWhere { + AND: [MovieActorsPersonConnectionWhere!] + NOT: MovieActorsPersonConnectionWhere + OR: [MovieActorsPersonConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsPersonDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsPersonConnectionWhere + } + + input MovieActorsPersonDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsPersonConnectionWhere + } + + input MovieActorsPersonFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + } + + input MovieActorsPersonUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsPersonUpdateFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + delete: [MovieActorsPersonDeleteFieldInput!] + disconnect: [MovieActorsPersonDisconnectFieldInput!] + update: MovieActorsPersonUpdateConnectionInput + where: MovieActorsPersonConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsStarConnectFieldInput { + connect: [StarConnectInput!] + where: StarConnectWhere + } + + input MovieActorsStarConnectionWhere { + AND: [MovieActorsStarConnectionWhere!] + NOT: MovieActorsStarConnectionWhere + OR: [MovieActorsStarConnectionWhere!] + node: StarWhere + node_NOT: StarWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsStarCreateFieldInput { + node: StarCreateInput! + } + + input MovieActorsStarDeleteFieldInput { + delete: StarDeleteInput + where: MovieActorsStarConnectionWhere + } + + input MovieActorsStarDisconnectFieldInput { + disconnect: StarDisconnectInput + where: MovieActorsStarConnectionWhere + } + + input MovieActorsStarFieldInput { + connect: [MovieActorsStarConnectFieldInput!] + create: [MovieActorsStarCreateFieldInput!] + } + + input MovieActorsStarUpdateConnectionInput { + node: StarUpdateInput + } + + input MovieActorsStarUpdateFieldInput { + connect: [MovieActorsStarConnectFieldInput!] + create: [MovieActorsStarCreateFieldInput!] + delete: [MovieActorsStarDeleteFieldInput!] + disconnect: [MovieActorsStarDisconnectFieldInput!] + update: MovieActorsStarUpdateConnectionInput + where: MovieActorsStarConnectionWhere + } + + input MovieActorsUpdateInput { + Person: [MovieActorsPersonUpdateFieldInput!] + Star: [MovieActorsStarUpdateFieldInput!] + } + + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: MovieActorsConnectInput + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actorCount: Int + actors: MovieActorsCreateInput + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: MovieActorsDeleteInput + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean + } + + 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!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + type MovieRelationshipCreatedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + movie: MovieSubscriptionWhere + } + + \\"\\"\\" + 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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actors: MovieActorsUpdateInput + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + createStars(input: [StarCreateInput!]!): CreateStarsMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + deleteStars(delete: StarDeleteInput, where: StarWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + updateStars(connect: StarConnectInput, create: StarRelationInput, delete: StarDeleteInput, disconnect: StarDisconnectInput, update: StarUpdateInput, where: StarWhere): UpdateStarsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! + } + + type PersonAggregateSelection { + count: Int! + } + + input PersonConnectInput { + movies: [PersonMoviesConnectFieldInput!] + } + + input PersonConnectWhere { + node: PersonWhere! + } + + type PersonConnectedRelationships { + movies: PersonMoviesConnectedRelationship + } + + input PersonCreateInput { + movies: PersonMoviesFieldInput + } + + type PersonCreatedEvent { + event: EventType! + timestamp: Float! + } + + input PersonDeleteInput { + movies: [PersonMoviesDeleteFieldInput!] + } + + type PersonDeletedEvent { + event: EventType! + timestamp: Float! + } + + input PersonDisconnectInput { + movies: [PersonMoviesDisconnectFieldInput!] + } + + type PersonEdge { + cursor: String! + node: Person! + } + + type PersonMovieMoviesAggregationSelection { + count: Int! + node: PersonMovieMoviesNodeAggregateSelection + } + + type PersonMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input PersonMoviesAggregateInput { + AND: [PersonMoviesAggregateInput!] + NOT: PersonMoviesAggregateInput + OR: [PersonMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PersonMoviesNodeAggregationWhereInput + } + + input PersonMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type PersonMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type PersonMoviesConnection { + edges: [PersonMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonMoviesConnectionSort { + node: MovieSort + } + + input PersonMoviesConnectionWhere { + AND: [PersonMoviesConnectionWhere!] + NOT: PersonMoviesConnectionWhere + OR: [PersonMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PersonMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input PersonMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: PersonMoviesConnectionWhere + } + + input PersonMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: PersonMoviesConnectionWhere + } + + input PersonMoviesFieldInput { + connect: [PersonMoviesConnectFieldInput!] + create: [PersonMoviesCreateFieldInput!] + } + + input PersonMoviesNodeAggregationWhereInput { + AND: [PersonMoviesNodeAggregationWhereInput!] + NOT: PersonMoviesNodeAggregationWhereInput + OR: [PersonMoviesNodeAggregationWhereInput!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type PersonMoviesRelationship { + cursor: String! + node: Movie! + } + + input PersonMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input PersonMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input PersonMoviesUpdateFieldInput { + connect: [PersonMoviesConnectFieldInput!] + create: [PersonMoviesCreateFieldInput!] + delete: [PersonMoviesDeleteFieldInput!] + disconnect: [PersonMoviesDisconnectFieldInput!] + update: PersonMoviesUpdateConnectionInput + where: PersonMoviesConnectionWhere + } + + input PersonOptions { + limit: Int + offset: Int + } + + input PersonRelationInput { + movies: [PersonMoviesCreateFieldInput!] + } + + type PersonRelationshipCreatedEvent { + createdRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input PersonRelationshipCreatedSubscriptionWhere { + AND: [PersonRelationshipCreatedSubscriptionWhere!] + NOT: PersonRelationshipCreatedSubscriptionWhere + OR: [PersonRelationshipCreatedSubscriptionWhere!] + createdRelationship: PersonRelationshipsSubscriptionWhere + } + + type PersonRelationshipDeletedEvent { + deletedRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input PersonRelationshipDeletedSubscriptionWhere { + AND: [PersonRelationshipDeletedSubscriptionWhere!] + NOT: PersonRelationshipDeletedSubscriptionWhere + OR: [PersonRelationshipDeletedSubscriptionWhere!] + deletedRelationship: PersonRelationshipsSubscriptionWhere + } + + input PersonRelationshipsSubscriptionWhere { + movies: PersonMoviesRelationshipSubscriptionWhere + } + + input PersonUpdateInput { + movies: [PersonMoviesUpdateFieldInput!] + } + + type PersonUpdatedEvent { + event: EventType! + timestamp: Float! + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: PersonMoviesConnectionWhere + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! + stars(options: StarOptions, where: StarWhere): [Star!]! + starsAggregate(where: StarWhere): StarAggregateSelection! + starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type Star { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): StarMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! + } + + type StarAggregateSelection { + count: Int! + } + + input StarConnectInput { + movies: [StarMoviesConnectFieldInput!] + } + + input StarConnectWhere { + node: StarWhere! + } + + input StarCreateInput { + movies: StarMoviesFieldInput + } + + input StarDeleteInput { + movies: [StarMoviesDeleteFieldInput!] + } + + input StarDisconnectInput { + movies: [StarMoviesDisconnectFieldInput!] + } + + type StarEdge { + cursor: String! + node: Star! + } + + type StarMovieMoviesAggregationSelection { + count: Int! + node: StarMovieMoviesNodeAggregateSelection + } + + type StarMovieMoviesNodeAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input StarMoviesAggregateInput { + AND: [StarMoviesAggregateInput!] + NOT: StarMoviesAggregateInput + OR: [StarMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: StarMoviesNodeAggregationWhereInput + } + + input StarMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type StarMoviesConnection { + edges: [StarMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input StarMoviesConnectionSort { + node: MovieSort + } + + input StarMoviesConnectionWhere { + AND: [StarMoviesConnectionWhere!] + NOT: StarMoviesConnectionWhere + OR: [StarMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input StarMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input StarMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: StarMoviesConnectionWhere + } + + input StarMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: StarMoviesConnectionWhere + } + + input StarMoviesFieldInput { + connect: [StarMoviesConnectFieldInput!] + create: [StarMoviesCreateFieldInput!] + } + + input StarMoviesNodeAggregationWhereInput { + AND: [StarMoviesNodeAggregationWhereInput!] + NOT: StarMoviesNodeAggregationWhereInput + OR: [StarMoviesNodeAggregationWhereInput!] + actorCount_AVERAGE_EQUAL: Float + actorCount_AVERAGE_GT: Float + actorCount_AVERAGE_GTE: Float + actorCount_AVERAGE_LT: Float + actorCount_AVERAGE_LTE: Float + actorCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + actorCount_MAX_EQUAL: Int + actorCount_MAX_GT: Int + actorCount_MAX_GTE: Int + actorCount_MAX_LT: Int + actorCount_MAX_LTE: Int + actorCount_MIN_EQUAL: Int + actorCount_MIN_GT: Int + actorCount_MIN_GTE: Int + actorCount_MIN_LT: Int + actorCount_MIN_LTE: Int + actorCount_SUM_EQUAL: Int + actorCount_SUM_GT: Int + actorCount_SUM_GTE: Int + actorCount_SUM_LT: Int + actorCount_SUM_LTE: Int + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type StarMoviesRelationship { + cursor: String! + node: Movie! + } + + input StarMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input StarMoviesUpdateFieldInput { + connect: [StarMoviesConnectFieldInput!] + create: [StarMoviesCreateFieldInput!] + delete: [StarMoviesDeleteFieldInput!] + disconnect: [StarMoviesDisconnectFieldInput!] + update: StarMoviesUpdateConnectionInput + where: StarMoviesConnectionWhere + } + + input StarOptions { + limit: Int + offset: Int + } + + input StarRelationInput { + movies: [StarMoviesCreateFieldInput!] + } + + input StarUpdateInput { + movies: [StarMoviesUpdateFieldInput!] + } + + input StarWhere { + AND: [StarWhere!] + NOT: StarWhere + OR: [StarWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: StarMoviesAggregateInput + moviesConnection: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Stars where all of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where none of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: StarMoviesConnectionWhere + moviesConnection_NOT: StarMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Stars where one of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where some of the related StarMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: StarMoviesConnectionWhere + \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + } + + type StarsConnection { + edges: [StarEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Subscription { + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + personCreated: PersonCreatedEvent! + personDeleted: PersonDeletedEvent! + personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! + personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! + personUpdated: PersonUpdatedEvent! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + } + + type UpdateStarsMutationResponse { + info: UpdateInfo! + stars: [Star!]! + }" + `); + }); + + test("Type with relationship to a subscriptions excluded type + Interface type", async () => { + const typeDefs = gql` + type Movie implements Production @subscription(events: []) { + title: String! + id: ID @unique + director: Creature! + } + + type Series implements Production { + title: String! + episode: Int! + id: ID @unique + director: Creature! + } + + interface Production { + id: ID + director: Creature! @relationship(type: "DIRECTED", direction: IN) + } + + type Person implements Creature { + movies: Production! + } + + interface Creature { + movies: Production! @relationship(type: "DIRECTED", direction: OUT) + } + `; + + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + \\"\\"\\"CreateInfo\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + interface Creature { + movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! + } + + input CreatureConnectInput { + _on: CreatureImplementationsConnectInput + movies: CreatureMoviesConnectFieldInput + } + + input CreatureConnectWhere { + node: CreatureWhere! + } + + input CreatureCreateInput { + Person: PersonCreateInput + } + + input CreatureDeleteInput { + _on: CreatureImplementationsDeleteInput + movies: CreatureMoviesDeleteFieldInput + } + + input CreatureDisconnectInput { + _on: CreatureImplementationsDisconnectInput + movies: CreatureMoviesDisconnectFieldInput + } + + input CreatureImplementationsConnectInput { + Person: [PersonConnectInput!] + } + + input CreatureImplementationsDeleteInput { + Person: [PersonDeleteInput!] + } + + input CreatureImplementationsDisconnectInput { + Person: [PersonDisconnectInput!] + } + + input CreatureImplementationsUpdateInput { + Person: PersonUpdateInput + } + + input CreatureImplementationsWhere { + Person: PersonWhere + } + + input CreatureMoviesConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere + } + + type CreatureMoviesConnection { + edges: [CreatureMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input CreatureMoviesConnectionSort { + node: ProductionSort + } + + input CreatureMoviesConnectionWhere { + AND: [CreatureMoviesConnectionWhere!] + NOT: CreatureMoviesConnectionWhere + OR: [CreatureMoviesConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input CreatureMoviesCreateFieldInput { + node: ProductionCreateInput! + } + + input CreatureMoviesDeleteFieldInput { + delete: ProductionDeleteInput + where: CreatureMoviesConnectionWhere + } + + input CreatureMoviesDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: CreatureMoviesConnectionWhere + } + + input CreatureMoviesFieldInput { + connect: CreatureMoviesConnectFieldInput + create: CreatureMoviesCreateFieldInput + } + + type CreatureMoviesRelationship { + cursor: String! + node: Production! + } + + input CreatureMoviesUpdateConnectionInput { + node: ProductionUpdateInput + } + + input CreatureMoviesUpdateFieldInput { + connect: CreatureMoviesConnectFieldInput + create: CreatureMoviesCreateFieldInput + delete: CreatureMoviesDeleteFieldInput + disconnect: CreatureMoviesDisconnectFieldInput + update: CreatureMoviesUpdateConnectionInput + where: CreatureMoviesConnectionWhere + } + + input CreatureOptions { + limit: Int + offset: Int + } + + input CreatureUpdateInput { + _on: CreatureImplementationsUpdateInput + movies: CreatureMoviesUpdateFieldInput + } + + input CreatureWhere { + _on: CreatureImplementationsWhere + moviesConnection: CreatureMoviesConnectionWhere + moviesConnection_NOT: CreatureMoviesConnectionWhere + } + + \\"\\"\\"DeleteInfo\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie implements Production { + director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! + directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + id: ID + title: String! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + director: MovieDirectorConnectFieldInput + } + + input MovieCreateInput { + director: ProductionDirectorFieldInput + id: ID + title: String! + } + + input MovieDeleteInput { + director: MovieDirectorDeleteFieldInput + } + + input MovieDirectorConnectFieldInput { + connect: CreatureConnectInput + where: CreatureConnectWhere + } + + input MovieDirectorCreateFieldInput { + node: CreatureCreateInput! + } + + input MovieDirectorDeleteFieldInput { + delete: CreatureDeleteInput + where: ProductionDirectorConnectionWhere + } + + input MovieDirectorDisconnectFieldInput { + disconnect: CreatureDisconnectInput + where: ProductionDirectorConnectionWhere + } + + input MovieDirectorUpdateConnectionInput { + node: CreatureUpdateInput + } + + input MovieDirectorUpdateFieldInput { + connect: MovieDirectorConnectFieldInput + create: MovieDirectorCreateFieldInput + delete: MovieDirectorDeleteFieldInput + disconnect: MovieDirectorDisconnectFieldInput + update: MovieDirectorUpdateConnectionInput + where: ProductionDirectorConnectionWhere + } + + input MovieDisconnectInput { + director: MovieDirectorDisconnectFieldInput + } + + 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!] + } + + input MovieRelationInput { + director: MovieDirectorCreateFieldInput + } + + \\"\\"\\" + 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 + title: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + director: MovieDirectorUpdateFieldInput + id: ID + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + directorConnection: ProductionDirectorConnectionWhere + directorConnection_NOT: ProductionDirectorConnectionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person implements Creature { + movies(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): Production! + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! + } + + type PersonAggregateSelection { + count: Int! + } + + input PersonConnectInput { + movies: PersonMoviesConnectFieldInput + } + + type PersonConnectedRelationships { + movies: PersonMoviesConnectedRelationship + } + + input PersonCreateInput { + movies: CreatureMoviesFieldInput + } + + type PersonCreatedEvent { + event: EventType! + timestamp: Float! + } + + input PersonDeleteInput { + movies: PersonMoviesDeleteFieldInput + } + + type PersonDeletedEvent { + event: EventType! + timestamp: Float! + } + + input PersonDisconnectInput { + movies: PersonMoviesDisconnectFieldInput + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonMoviesConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere + } + + type PersonMoviesConnectedRelationship { + node: ProductionEventPayload! + } + + input PersonMoviesCreateFieldInput { + node: ProductionCreateInput! + } + + input PersonMoviesDeleteFieldInput { + delete: ProductionDeleteInput + where: CreatureMoviesConnectionWhere + } + + input PersonMoviesDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: CreatureMoviesConnectionWhere + } + + input PersonMoviesRelationshipSubscriptionWhere { + node: ProductionSubscriptionWhere + } + + input PersonMoviesUpdateConnectionInput { + node: ProductionUpdateInput + } + + input PersonMoviesUpdateFieldInput { + connect: PersonMoviesConnectFieldInput + create: PersonMoviesCreateFieldInput + delete: PersonMoviesDeleteFieldInput + disconnect: PersonMoviesDisconnectFieldInput + update: PersonMoviesUpdateConnectionInput + where: CreatureMoviesConnectionWhere + } + + input PersonOptions { + limit: Int + offset: Int + } + + input PersonRelationInput { + movies: PersonMoviesCreateFieldInput + } + + type PersonRelationshipCreatedEvent { + createdRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input PersonRelationshipCreatedSubscriptionWhere { + AND: [PersonRelationshipCreatedSubscriptionWhere!] + NOT: PersonRelationshipCreatedSubscriptionWhere + OR: [PersonRelationshipCreatedSubscriptionWhere!] + createdRelationship: PersonRelationshipsSubscriptionWhere + } + + type PersonRelationshipDeletedEvent { + deletedRelationship: PersonConnectedRelationships! + event: EventType! + timestamp: Float! + } + + input PersonRelationshipDeletedSubscriptionWhere { + AND: [PersonRelationshipDeletedSubscriptionWhere!] + NOT: PersonRelationshipDeletedSubscriptionWhere + OR: [PersonRelationshipDeletedSubscriptionWhere!] + deletedRelationship: PersonRelationshipsSubscriptionWhere + } + + input PersonRelationshipsSubscriptionWhere { + movies: PersonMoviesRelationshipSubscriptionWhere + } + + input PersonUpdateInput { + movies: PersonMoviesUpdateFieldInput + } + + type PersonUpdatedEvent { + event: EventType! + timestamp: Float! + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + moviesConnection: CreatureMoviesConnectionWhere + moviesConnection_NOT: CreatureMoviesConnectionWhere + } + + interface Production { + director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! + directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + id: ID + } + + input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + director: ProductionDirectorConnectFieldInput + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + director: ProductionDirectorDeleteFieldInput + } + + input ProductionDirectorConnectFieldInput { + connect: CreatureConnectInput + where: CreatureConnectWhere + } + + type ProductionDirectorConnection { + edges: [ProductionDirectorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ProductionDirectorConnectionWhere { + AND: [ProductionDirectorConnectionWhere!] + NOT: ProductionDirectorConnectionWhere + OR: [ProductionDirectorConnectionWhere!] + node: CreatureWhere + node_NOT: CreatureWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ProductionDirectorCreateFieldInput { + node: CreatureCreateInput! + } + + input ProductionDirectorDeleteFieldInput { + delete: CreatureDeleteInput + where: ProductionDirectorConnectionWhere + } + + input ProductionDirectorDisconnectFieldInput { + disconnect: CreatureDisconnectInput + where: ProductionDirectorConnectionWhere + } + + input ProductionDirectorFieldInput { + connect: ProductionDirectorConnectFieldInput + create: ProductionDirectorCreateFieldInput + } + + type ProductionDirectorRelationship { + cursor: String! + node: Creature! + } + + input ProductionDirectorUpdateConnectionInput { + node: CreatureUpdateInput + } + + input ProductionDirectorUpdateFieldInput { + connect: ProductionDirectorConnectFieldInput + create: ProductionDirectorCreateFieldInput + delete: ProductionDirectorDeleteFieldInput + disconnect: ProductionDirectorDisconnectFieldInput + update: ProductionDirectorUpdateConnectionInput + where: ProductionDirectorConnectionWhere + } + + input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + director: ProductionDirectorDisconnectFieldInput + } + + interface ProductionEventPayload { + id: ID + } + + input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] + } + + input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] + } + + input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] + } + + input ProductionImplementationsSubscriptionWhere { + Movie: MovieSubscriptionWhere + Series: SeriesSubscriptionWhere + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 { + id: SortDirection + } + + input ProductionSubscriptionWhere { + AND: [ProductionSubscriptionWhere!] + NOT: ProductionSubscriptionWhere + OR: [ProductionSubscriptionWhere!] + _on: ProductionImplementationsSubscriptionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + director: ProductionDirectorUpdateFieldInput + id: ID + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + directorConnection: ProductionDirectorConnectionWhere + directorConnection_NOT: ProductionDirectorConnectionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + director(directed: Boolean = true, options: CreatureOptions, where: CreatureWhere): Creature! + directorConnection(after: String, directed: Boolean = true, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + episode: Int! + id: ID + title: String! + } + + type SeriesAggregateSelection { + count: Int! + episode: IntAggregateSelectionNonNullable! + id: IDAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input SeriesConnectInput { + director: SeriesDirectorConnectFieldInput + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + director: ProductionDirectorFieldInput + episode: Int! + id: ID + title: String! + } + + type SeriesCreatedEvent { + createdSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! + } + + input SeriesDeleteInput { + director: SeriesDirectorDeleteFieldInput + } + + type SeriesDeletedEvent { + deletedSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! + } + + input SeriesDirectorConnectFieldInput { + connect: CreatureConnectInput + where: CreatureConnectWhere + } + + input SeriesDirectorCreateFieldInput { + node: CreatureCreateInput! + } + + input SeriesDirectorDeleteFieldInput { + delete: CreatureDeleteInput + where: ProductionDirectorConnectionWhere + } + + input SeriesDirectorDisconnectFieldInput { + disconnect: CreatureDisconnectInput + where: ProductionDirectorConnectionWhere + } + + input SeriesDirectorUpdateConnectionInput { + node: CreatureUpdateInput + } + + input SeriesDirectorUpdateFieldInput { + connect: SeriesDirectorConnectFieldInput + create: SeriesDirectorCreateFieldInput + delete: SeriesDirectorDeleteFieldInput + disconnect: SeriesDirectorDisconnectFieldInput + update: SeriesDirectorUpdateConnectionInput + where: ProductionDirectorConnectionWhere + } + + input SeriesDisconnectInput { + director: SeriesDirectorDisconnectFieldInput + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + type SeriesEventPayload implements ProductionEventPayload { + director: Creature! + directorConnection: ProductionDirectorConnection! + episode: Int! + id: ID + title: String! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + input SeriesRelationInput { + director: SeriesDirectorCreateFieldInput + } + + type SeriesRelationshipCreatedEvent { + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! + } + + input SeriesRelationshipCreatedSubscriptionWhere { + AND: [SeriesRelationshipCreatedSubscriptionWhere!] + NOT: SeriesRelationshipCreatedSubscriptionWhere + OR: [SeriesRelationshipCreatedSubscriptionWhere!] + series: SeriesSubscriptionWhere + } + + type SeriesRelationshipDeletedEvent { + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! + } + + input SeriesRelationshipDeletedSubscriptionWhere { + AND: [SeriesRelationshipDeletedSubscriptionWhere!] + NOT: SeriesRelationshipDeletedSubscriptionWhere + OR: [SeriesRelationshipDeletedSubscriptionWhere!] + series: SeriesSubscriptionWhere + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + episode: SortDirection + id: SortDirection + title: SortDirection + } + + input SeriesSubscriptionWhere { + AND: [SeriesSubscriptionWhere!] + NOT: SeriesSubscriptionWhere + OR: [SeriesSubscriptionWhere!] + episode: Int + episode_GT: Int + episode_GTE: Int + episode_IN: [Int] + episode_LT: Int + episode_LTE: Int + episode_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episode_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input SeriesUpdateInput { + director: SeriesDirectorUpdateFieldInput + episode: Int + episode_DECREMENT: Int + episode_INCREMENT: Int + id: ID + title: String + } + + type SeriesUpdatedEvent { + event: EventType! + previousState: SeriesEventPayload! + timestamp: Float! + updatedSeries: SeriesEventPayload! + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + directorConnection: ProductionDirectorConnectionWhere + directorConnection_NOT: ProductionDirectorConnectionWhere + episode: Int + episode_GT: Int + episode_GTE: Int + episode_IN: [Int!] + episode_LT: Int + episode_LTE: Int + episode_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episode_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"SortDirection\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type Subscription { + personCreated: PersonCreatedEvent! + personDeleted: PersonDeletedEvent! + personRelationshipCreated(where: PersonRelationshipCreatedSubscriptionWhere): PersonRelationshipCreatedEvent! + personRelationshipDeleted(where: PersonRelationshipDeletedSubscriptionWhere): PersonRelationshipDeletedEvent! + personUpdated: PersonUpdatedEvent! + seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! + seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! + seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! + seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! + seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! + } + + \\"\\"\\"UpdateInfo\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); }); From 0b72159ed52fd4faf8aaa765310127a62f388672 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 22 Sep 2023 17:00:23 +0200 Subject: [PATCH 121/162] refactor: make nicer create-connection-fields --- .../src/schema/create-connection-fields.ts | 130 +++++++----------- 1 file changed, 51 insertions(+), 79 deletions(-) diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index 03199782fc..8ff0319b41 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -20,6 +20,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLString, type DirectiveNode, type GraphQLResolveInfo } from "graphql"; import type { InputTypeComposer, + InputTypeComposerFieldConfigMapDefinition, InterfaceTypeComposer, ObjectTypeComposer, ObjectTypeComposerArgumentConfigMapDefinition, @@ -40,83 +41,76 @@ import type { ObjectFields } from "./get-obj-field-meta"; import { connectionFieldResolver2 } from "./pagination"; import { graphqlDirectivesToCompose } from "./to-compose"; -function addConnectionRelationshipPropertyWhereFields({ - inputTypeComposer, - relationshipAdapter, -}: { - inputTypeComposer: InputTypeComposer; - relationshipAdapter: RelationshipAdapter; -}): void { - if (relationshipAdapter.propertiesTypeName) { - inputTypeComposer.addFields({ - edge: relationshipAdapter.operations.whereInputTypeName, - edge_NOT: { - type: relationshipAdapter.operations.whereInputTypeName, - directives: [DEPRECATE_NOT], - }, - }); - } -} - function addConnectionSortField({ schemaComposer, relationshipAdapter, - targetEntityAdapter, composeNodeArgs, }: { schemaComposer: SchemaComposer; relationshipAdapter: RelationshipAdapter; - targetEntityAdapter: InterfaceEntityAdapter | ConcreteEntityAdapter; composeNodeArgs: ObjectTypeComposerArgumentConfigMapDefinition; -}): void { - const connectionSortITC = schemaComposer.getOrCreateITC(relationshipAdapter.operations.connectionSortInputTypename); +}): InputTypeComposer | undefined { + // TODO: This probably just needs to be + // if (relationship.target.sortableFields.length) {} + // And not care about the type of entity + const targetIsInterfaceWithSortableFields = + relationshipAdapter.target instanceof InterfaceEntityAdapter && + schemaComposer.has(relationshipAdapter.target.operations.sortInputTypeName); - connectionSortITC.addFields({ - node: targetEntityAdapter.operations.sortInputTypeName, - }); - // TODO: check why this was in an if statement - // if (composeNodeArgs.sort) { + const targetIsConcreteWithSortableFields = + relationshipAdapter.target instanceof ConcreteEntityAdapter && relationshipAdapter.target.sortableFields.length; + + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + if (targetIsInterfaceWithSortableFields || targetIsConcreteWithSortableFields) { + fields["node"] = relationshipAdapter.target.operations.sortInputTypeName; + } + + // TODO: revert this back to commented version if we want relationship properties sortable fields to be all attributes + // if (relationship.propertiesTypeName) { + if (relationshipAdapter.sortableFields.length) { + fields["edge"] = relationshipAdapter.operations.sortInputTypeName; + } + + if (Object.keys(fields).length === 0) { + return undefined; + } + + const connectionSortITC = schemaComposer.getOrCreateITC(relationshipAdapter.operations.connectionSortInputTypename); + connectionSortITC.addFields(fields); composeNodeArgs.sort = connectionSortITC.NonNull.List; - // } + + return connectionSortITC; } -function addConnectionWhereFilterFields({ +function addConnectionWhereFields({ inputTypeComposer, - whereInputTypeName, + relationshipAdapter, + targetEntity, }: { inputTypeComposer: InputTypeComposer; - whereInputTypeName: string; + relationshipAdapter: RelationshipAdapter; + targetEntity: ConcreteEntityAdapter | InterfaceEntityAdapter; }): void { inputTypeComposer.addFields({ OR: inputTypeComposer.NonNull.List, AND: inputTypeComposer.NonNull.List, NOT: inputTypeComposer, - node: whereInputTypeName, + node: targetEntity.operations.whereInputTypeName, node_NOT: { - type: whereInputTypeName, + type: targetEntity.operations.whereInputTypeName, directives: [DEPRECATE_NOT], }, }); -} - -function addConnectionWhereFields({ - inputTypeComposer, - relationshipAdapter, - targetEntity, -}: { - inputTypeComposer: InputTypeComposer; - relationshipAdapter: RelationshipAdapter; - targetEntity: ConcreteEntityAdapter | InterfaceEntityAdapter; -}): void { - addConnectionWhereFilterFields({ - inputTypeComposer, - whereInputTypeName: targetEntity.operations.whereInputTypeName, - }); - addConnectionRelationshipPropertyWhereFields({ - inputTypeComposer, - relationshipAdapter, - }); + if (relationshipAdapter.propertiesTypeName) { + inputTypeComposer.addFields({ + edge: relationshipAdapter.operations.whereInputTypeName, + edge_NOT: { + type: relationshipAdapter.operations.whereInputTypeName, + directives: [DEPRECATE_NOT], + }, + }); + } } export function createConnectionFields({ @@ -223,35 +217,13 @@ export function createConnectionFields({ relationshipAdapter: relationship, targetEntity: relationship.target, }); - - // TODO: Check if we can combine these checks into one property - const targetIsInterfaceWithSortableFields = - relationship.target instanceof InterfaceEntityAdapter && - schemaComposer.has(relationship.target.operations.sortInputTypeName); - - const targetIsConcreteWithSortableFields = - relationship.target instanceof ConcreteEntityAdapter && relationship.target.sortableFields.length; - - if (targetIsInterfaceWithSortableFields || targetIsConcreteWithSortableFields) { - addConnectionSortField({ - schemaComposer, - relationshipAdapter: relationship, - composeNodeArgs, - targetEntityAdapter: relationship.target, - }); - } } - // TODO: revert this back to commented version if we want relationship properties sortable fields to be all attributes - // if (relationship.propertiesTypeName) { - // TODO: Feels like this could be done in addConnectionSortField too - if (relationship.propertiesTypeName && relationship.sortableFields.length) { - const connectionSort = schemaComposer.getOrCreateITC(relationship.operations.connectionSortInputTypename); - connectionSort.addFields({ - edge: relationship.operations.sortInputTypeName, - }); - composeNodeArgs.sort = connectionSort.NonNull.List; - } + addConnectionSortField({ + schemaComposer, + relationshipAdapter: relationship, + composeNodeArgs, + }); // This needs to be done after the composeNodeArgs.sort is set (through addConnectionSortField for example) if (relationship.isReadable()) { From 4fbddb73c3f6b4e91483ee824ae61a1643714c6b Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 22 Sep 2023 17:28:29 +0200 Subject: [PATCH 122/162] use name instead of toString() --- .../graphql/src/schema/new-make-augmented-schema.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index f5becfb385..b7540f8e8b 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -1010,11 +1010,11 @@ function makeAugmentedSchema( if (definition.kind === Kind.SCALAR_TYPE_DEFINITION) { if ( [ - GraphQLBoolean.toString(), - GraphQLFloat.toString(), - GraphQLID.toString(), - GraphQLInt.toString(), - GraphQLString.toString(), + GraphQLBoolean.name, + GraphQLFloat.name, + GraphQLID.name, + GraphQLInt.name, + GraphQLString.name, ].includes(definition.name.value) ) { return false; From cc74199b5e3331a43256de7dad9314a491ccdeff Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 22 Sep 2023 18:20:04 +0100 Subject: [PATCH 123/162] refactor addRelationshipArrayFilters --- .../model-adapters/AttributeAdapter.ts | 6 - .../model-adapters/ListFiltersAdapter.ts | 125 ++++++++++++++++++ .../model-adapters/RelationshipAdapter.ts | 12 ++ .../src/schema/create-connection-fields.ts | 26 +--- .../schema/generation/augment-where-input.ts | 95 +++++++++---- .../src/schema/generation/where-input.ts | 15 +-- 6 files changed, 213 insertions(+), 66 deletions(-) create mode 100644 packages/graphql/src/schema-model/attribute/model-adapters/ListFiltersAdapter.ts diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 69d5978a44..20ba069b93 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -319,9 +319,6 @@ export class AttributeAdapter { return this.isList() && !this.isUserScalar() && (this.isScalar() || this.isSpatial()); } - /** - * @throws {Error} if the attribute is not a list - */ get listModel(): ListAdapter | undefined { if (!this._listModel) { if (!this.isArrayMethodField()) { @@ -332,9 +329,6 @@ export class AttributeAdapter { return this._listModel; } - /** - * @throws {Error} if the attribute is not a scalar - */ get mathModel(): MathAdapter | undefined { if (!this._mathModel) { if (!this.isNumeric() || this.isList()) { diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/ListFiltersAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/ListFiltersAdapter.ts new file mode 100644 index 0000000000..d25d95c0eb --- /dev/null +++ b/packages/graphql/src/schema-model/attribute/model-adapters/ListFiltersAdapter.ts @@ -0,0 +1,125 @@ +/* + * 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 pluralize from "pluralize"; +import type { RelationshipAdapter } from "../../relationship/model-adapters/RelationshipAdapter"; + +export class ListFiltersAdapter { + readonly relationshipAdapter: RelationshipAdapter; + + constructor(relationshipAdapter: RelationshipAdapter) { + if (!relationshipAdapter.isList) { + throw new Error("Relationship field is not a list"); + } + this.relationshipAdapter = relationshipAdapter; + } + + getAll(): { type: string; description: string } { + return { + type: `${this.relationshipAdapter.name}_ALL`, + description: `Return ${pluralize( + this.relationshipAdapter.source.name + )} where all of the related ${pluralize(this.relationshipAdapter.target.name)} match this filter`, + }; + } + + getNone(): { type: string; description: string } { + return { + type: `${this.relationshipAdapter.name}_NONE`, + description: `Return ${pluralize( + this.relationshipAdapter.source.name + )} where none of the related ${pluralize(this.relationshipAdapter.target.name)} match this filter`, + }; + } + + getSingle(): { type: string; description: string } { + return { + type: `${this.relationshipAdapter.name}_SINGLE`, + description: `Return ${pluralize( + this.relationshipAdapter.source.name + )} where one of the related ${pluralize(this.relationshipAdapter.target.name)} match this filter`, + }; + } + + getSome(): { type: string; description: string } { + return { + type: `${this.relationshipAdapter.name}_SOME`, + description: `Return ${pluralize( + this.relationshipAdapter.source.name + )} where some of the related ${pluralize(this.relationshipAdapter.target.name)} match this filter`, + }; + } + + get filters(): { type: string; description: string }[] { + return [this.getAll(), this.getNone(), this.getSingle(), this.getSome()]; + } + + getConnectionAll(): { type: string; description: string } { + return { + type: `${this.relationshipAdapter.operations.connectionFieldName}_ALL`, + description: `Return ${pluralize( + this.relationshipAdapter.source.name + )} where all of the related ${pluralize( + this.relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }; + } + + getConnectionNone(): { type: string; description: string } { + return { + type: `${this.relationshipAdapter.operations.connectionFieldName}_NONE`, + description: `Return ${pluralize( + this.relationshipAdapter.source.name + )} where none of the related ${pluralize( + this.relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }; + } + + getConnectionSingle(): { type: string; description: string } { + return { + type: `${this.relationshipAdapter.operations.connectionFieldName}_SINGLE`, + description: `Return ${pluralize( + this.relationshipAdapter.source.name + )} where one of the related ${pluralize( + this.relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }; + } + + getConnectionSome(): { type: string; description: string } { + return { + type: `${this.relationshipAdapter.operations.connectionFieldName}_SOME`, + description: `Return ${pluralize( + this.relationshipAdapter.source.name + )} where some of the related ${pluralize( + this.relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }; + } + + get connectionFilters(): { type: string; description: string }[] { + return [ + this.getConnectionAll(), + this.getConnectionNone(), + this.getConnectionSingle(), + this.getConnectionSome(), + ]; + } +} 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 0bcd5f4333..95ebef375a 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -33,8 +33,10 @@ import type { NestedOperation, QueryDirection, Relationship, RelationshipDirecti import { RelationshipOperations } from "./RelationshipOperations"; import { plural, singular } from "../../utils/string-manipulation"; import { RelationshipNestedOperationsOption } from "../../../constants"; +import { ListFiltersAdapter } from "../../attribute/model-adapters/ListFiltersAdapter"; export class RelationshipAdapter { + private _listFiltersModel: ListFiltersAdapter | undefined; public readonly name: string; public readonly type: string; public readonly attributes: Map = new Map(); @@ -117,6 +119,16 @@ export class RelationshipAdapter { } return this._operations; } + get listFiltersModel(): ListFiltersAdapter | undefined { + if (!this._listFiltersModel) { + if (!this.isList) { + return; + } + this._listFiltersModel = new ListFiltersAdapter(this); + } + return this._listFiltersModel; + } + public get singular(): string { if (!this._singular) { this._singular = singular(this.name); diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index 31d0ef1a04..dc680f0bfa 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -34,9 +34,9 @@ import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/In import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { ConnectionQueryArgs } from "../types"; -import { addRelationshipArrayFilters } from "./augment/add-relationship-array-filters"; import { DEPRECATE_NOT } from "./constants"; import { addDirectedArgument2 } from "./directed-argument"; +import { augmentWhereInputTypeWithConnectionFields } from "./generation/augment-where-input"; import type { ObjectFields } from "./get-obj-field-meta"; import { connectionFieldResolver2 } from "./pagination"; import { graphqlDirectivesToCompose } from "./to-compose"; @@ -160,27 +160,9 @@ export function createConnectionFields({ relationshipObjectType.addFields(propertiesInterface.getFields()); } - if (relationship.isFilterableByValue()) { - const whereInputITC = schemaComposer.getITC(entityAdapter.operations.whereInputTypeName); - whereInputITC.addFields({ - [relationship.operations.connectionFieldName]: connectionWhereITC, - [`${relationship.operations.connectionFieldName}_NOT`]: { - type: connectionWhereITC, - }, - }); - - // n..m Relationships - if (relationship.isList) { - addRelationshipArrayFilters({ - whereInput: whereInputITC, - fieldName: relationship.operations.connectionFieldName, - sourceName: entityAdapter.name, - relatedType: relationship.operations.connectionFieldTypename, - whereType: connectionWhereITC, - directives: deprecatedDirectives, - }); - } - } + const fields = augmentWhereInputTypeWithConnectionFields(relationship, deprecatedDirectives); + const whereInputITC = schemaComposer.getITC(entityAdapter.operations.whereInputTypeName); + whereInputITC.addFields(fields); const composeNodeArgs = addDirectedArgument2( { diff --git a/packages/graphql/src/schema/generation/augment-where-input.ts b/packages/graphql/src/schema/generation/augment-where-input.ts index fd5a8bc734..cef4e3bcf7 100644 --- a/packages/graphql/src/schema/generation/augment-where-input.ts +++ b/packages/graphql/src/schema/generation/augment-where-input.ts @@ -1,56 +1,93 @@ import type { Directive, InputTypeComposerFieldConfigMapDefinition } from "graphql-compose"; -import pluralize from "pluralize"; import { DEPRECATED } from "../../constants"; -import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -// TODO: refactor ALE -export function augmentWhereInputTypeWithRelationshipFields( - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter, - relationshipAdapter: RelationshipAdapter, - deprecatedDirectives: Directive[] -): InputTypeComposerFieldConfigMapDefinition { +function augmentWhereInputType({ + whereType, + fieldName, + filters, + relationshipAdapter, + deprecatedDirectives, +}: { + whereType: string; + fieldName: string; + filters: + | { + type: string; + description: string; + }[] + | undefined; + relationshipAdapter: RelationshipAdapter; + deprecatedDirectives: Directive[]; +}): InputTypeComposerFieldConfigMapDefinition { const fields: InputTypeComposerFieldConfigMapDefinition = {}; - if (relationshipAdapter.isFilterableByValue()) { - fields[relationshipAdapter.name] = { - type: relationshipAdapter.target.operations.whereInputTypeName, - }; - fields[`${relationshipAdapter.name}_NOT`] = { - type: relationshipAdapter.target.operations.whereInputTypeName, - }; + if (!relationshipAdapter.isFilterableByValue()) { + return fields; } - if (relationshipAdapter.isList && relationshipAdapter.isFilterableByValue()) { - for (const filter of ["ALL", "NONE", "SINGLE", "SOME"] as const) { - fields[`${relationshipAdapter.name}_${filter}`] = { - type: relationshipAdapter.target.operations.whereInputTypeName, + + fields[fieldName] = { + type: whereType, + }; + fields[`${fieldName}_NOT`] = { + type: whereType, + }; + + if (filters) { + for (const filterField of filters) { + fields[filterField.type] = { + type: whereType, directives: deprecatedDirectives, // e.g. "Return Movies where all of the related Actors match this filter" - description: `Return ${pluralize(entityAdapter.name)} where ${ - filter !== "SINGLE" ? filter.toLowerCase() : "one" - } of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + description: filterField.description, }; // TODO: are these deprecations still relevant? // only adding these for the deprecation message. If no deprecation anymore, delete them. - fields[relationshipAdapter.name] = { - type: relationshipAdapter.target.operations.whereInputTypeName, + fields[fieldName] = { + type: whereType, directives: [ { name: DEPRECATED, - args: { reason: `Use \`${relationshipAdapter.name}_SOME\` instead.` }, + args: { reason: `Use \`${fieldName}_SOME\` instead.` }, }, ], }; - fields[`${relationshipAdapter.name}_NOT`] = { - type: relationshipAdapter.target.operations.whereInputTypeName, + fields[`${fieldName}_NOT`] = { + type: whereType, directives: [ { name: DEPRECATED, - args: { reason: `Use \`${relationshipAdapter.name}_NONE\` instead.` }, + args: { reason: `Use \`${fieldName}_NONE\` instead.` }, }, ], }; } } + return fields; } + +export function augmentWhereInputTypeWithRelationshipFields( + relationshipAdapter: RelationshipAdapter, + deprecatedDirectives: Directive[] +): InputTypeComposerFieldConfigMapDefinition { + return augmentWhereInputType({ + whereType: relationshipAdapter.target.operations.whereInputTypeName, + fieldName: relationshipAdapter.name, + filters: relationshipAdapter.listFiltersModel?.filters, + relationshipAdapter, + deprecatedDirectives, + }); +} + +export function augmentWhereInputTypeWithConnectionFields( + relationshipAdapter: RelationshipAdapter, + deprecatedDirectives: Directive[] +): InputTypeComposerFieldConfigMapDefinition { + return augmentWhereInputType({ + whereType: relationshipAdapter.operations.connectionWhereInputTypename, + fieldName: relationshipAdapter.operations.connectionFieldName, + filters: relationshipAdapter.listFiltersModel?.connectionFilters, + relationshipAdapter, + deprecatedDirectives, + }); +} diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index 0a425393cc..0788ab7e42 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -121,13 +121,8 @@ export function withSourceWhereInputType({ if (relationshipSource instanceof UnionEntityAdapter) { throw new Error("Unexpected union source"); } - const typeName = relationshipSource.operations.whereInputTypeName; - const whereInput = composer.getITC(typeName); - const fields = augmentWhereInputTypeWithRelationshipFields( - relationshipSource, - relationshipAdapter, - deprecatedDirectives - ); + const whereInput = composer.getITC(relationshipSource.operations.whereInputTypeName); + const fields = augmentWhereInputTypeWithRelationshipFields(relationshipAdapter, deprecatedDirectives); whereInput.addFields(fields); const whereAggregateInput = withAggregateInputType({ @@ -196,8 +191,10 @@ export function withConnectWhereFieldInputType( if (composer.has(connectWhereName)) { return composer.getITC(connectWhereName); } - const connectWhereType = composer.getOrCreateITC(connectWhereName, (tc) => { - tc.addFields({ node: `${relationshipTarget.operations.whereInputTypeName}!` }); + const connectWhereType = composer.createInputTC({ + name: connectWhereName, + fields: { node: `${relationshipTarget.operations.whereInputTypeName}!` }, }); + return connectWhereType; } From 0a9b3bad68ca8f29ae3b5c79c831aac5bdc9e5ef Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 25 Sep 2023 16:29:23 +0100 Subject: [PATCH 124/162] add test for interface relationship to interface connect new field --- .../tests/integration/update.int.test.ts | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/packages/graphql/tests/integration/update.int.test.ts b/packages/graphql/tests/integration/update.int.test.ts index 6cdf9496c8..a255cef6bc 100644 --- a/packages/graphql/tests/integration/update.int.test.ts +++ b/packages/graphql/tests/integration/update.int.test.ts @@ -144,6 +144,96 @@ describe("update", () => { await session.close(); } }); + test("should connect through interface relationship", async () => { + const session = await neo4j.getSession(); + + const typeDefs = gql` + type Movie implements Production @subscription(events: []) { + title: String! + id: ID @unique + director: [Creature!]! + } + + type Series implements Production { + title: String! + episode: Int! + id: ID @unique + director: [Creature!]! + } + + interface Production { + id: ID + director: [Creature!]! @relationship(type: "DIRECTED", direction: IN) + } + + type Person implements Creature { + id: ID + movies: Production! + } + + interface Creature { + id: ID + movies: Production! @relationship(type: "DIRECTED", direction: OUT) + } + `; + + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: true, + }, + }); + const query = ` + mutation { + updateMovies( + where: { id: "1" }, + connect: { director: { + where: { node: {id: "2"} }, + connect: { movies: { + where: { node: {id: "3"} }, + connect: { director: { + where: { node: {id: "4"} }, + connect: { movies: { + where: { node: { id: "5" } } + } } + } } + } } + } }) { + movies { + id + title + } + } + } + `; + + try { + await session.run( + ` + 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 graphql({ + schema: await neoSchema.getSchema(), + source: query, + contextValue: neo4j.getContextValues(), + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.updateMovies).toEqual({ movies: [{ id: "1", title: "Movie1" }] }); + } finally { + await session.close(); + } + }); test("should update a movie when matching on relationship property", async () => { const session = await neo4j.getSession(); From 979821552fca4c84bade9d2277f3f26d2a81c685 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 25 Sep 2023 17:29:32 +0200 Subject: [PATCH 125/162] feat: use all attributes on a relationship for sorting options --- .../src/schema/create-connection-fields.ts | 9 ++++--- .../generation/sort-and-options-input.ts | 27 +++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index dc680f0bfa..98d05c5dd7 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -65,9 +65,12 @@ function addConnectionSortField({ fields["node"] = relationshipAdapter.target.operations.sortInputTypeName; } - // TODO: revert this back to commented version if we want relationship properties sortable fields to be all attributes - // if (relationship.propertiesTypeName) { - if (relationshipAdapter.sortableFields.length) { + /* + We include all properties here to maintain existing behaviour. + In future sorting by arrays should become an aggregation sort because it sorts by the length of the array. + */ + if (relationshipAdapter.propertiesTypeName) { + // if (relationshipAdapter.sortableFields.length) { fields["edge"] = relationshipAdapter.operations.sortInputTypeName; } diff --git a/packages/graphql/src/schema/generation/sort-and-options-input.ts b/packages/graphql/src/schema/generation/sort-and-options-input.ts index 4d108b8e35..8ca726b8d8 100644 --- a/packages/graphql/src/schema/generation/sort-and-options-input.ts +++ b/packages/graphql/src/schema/generation/sort-and-options-input.ts @@ -42,12 +42,29 @@ export function withSortInputType({ userDefinedFieldDirectives: Map; composer: SchemaComposer; }): InputTypeComposer | undefined { - // TODO: for relationships we used to get all attributes, not just sortableFields - // Clarify if this is intended? - if (!relationshipAdapter.sortableFields.length) { - return undefined; + // TODO: Use the commented code when we want to unify the sort input type for relationships and entities + // if (!relationshipAdapter.sortableFields.length) { + // return undefined; + // } + // return makeSortInput({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); + + const sortFields: InputTypeComposerFieldConfigMapDefinition = {}; + for (const attribute of relationshipAdapter.attributes.values()) { + const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(attribute.name) || []; + const deprecatedDirective = userDefinedDirectivesOnField.filter( + (directive) => directive.name.value === DEPRECATED + ); + sortFields[attribute.name] = { + type: SortDirection, + directives: graphqlDirectivesToCompose(deprecatedDirective), + }; } - return makeSortInput({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); + const sortInput = composer.createInputTC({ + name: relationshipAdapter.operations.sortInputTypeName, + fields: sortFields, + }); + + return sortInput; } function makeSortFields({ From 0a9c277b44a6edf3a7db84065661542e1fb6aa89 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 25 Sep 2023 18:01:57 +0200 Subject: [PATCH 126/162] test: add check for cypher result --- .../graphql/tests/integration/update.int.test.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/graphql/tests/integration/update.int.test.ts b/packages/graphql/tests/integration/update.int.test.ts index a255cef6bc..a0b1c460e7 100644 --- a/packages/graphql/tests/integration/update.int.test.ts +++ b/packages/graphql/tests/integration/update.int.test.ts @@ -17,12 +17,12 @@ * limitations under the License. */ -import type { Driver } from "neo4j-driver"; import { graphql } from "graphql"; -import { generate } from "randomstring"; import { gql } from "graphql-tag"; -import Neo4j from "./neo4j"; +import type { Driver } from "neo4j-driver"; +import { generate } from "randomstring"; import { Neo4jGraphQL } from "../../src/classes"; +import Neo4j from "./neo4j"; describe("update", () => { let driver: Driver; @@ -229,6 +229,14 @@ describe("update", () => { expect(gqlResult.errors).toBeFalsy(); + const cypherResult = await session.run( + ` + MATCH (p:Person {id: "4"})-[:DIRECTED]->(m:Movie {id: "5"}) RETURN p, m + ` + ); + + expect(cypherResult.records).toHaveLength(1); + expect(gqlResult?.data?.updateMovies).toEqual({ movies: [{ id: "1", title: "Movie1" }] }); } finally { await session.close(); From d31bc318986727fb7aea8814d94e2845feb73fbd Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Mon, 25 Sep 2023 18:14:02 +0200 Subject: [PATCH 127/162] test: update inheritance test snapshot --- packages/graphql/tests/schema/inheritance.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index 5ec3587129..47c3e05a5d 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -288,6 +288,7 @@ describe("inheritance", () => { } input PersonFriendsConnectFieldInput { + connect: PersonConnectInput edge: FriendsWithCreateInput where: PersonConnectWhere } @@ -319,10 +320,12 @@ describe("inheritance", () => { } input PersonFriendsDeleteFieldInput { + delete: PersonDeleteInput where: PersonFriendsConnectionWhere } input PersonFriendsDisconnectFieldInput { + disconnect: PersonDisconnectInput where: PersonFriendsConnectionWhere } From 7c72439def7b4240604aa1983bbbaeab9e3ae00e Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 25 Sep 2023 17:50:34 +0100 Subject: [PATCH 128/162] fix attributeAdapter type helpers to correctly handle matrix types --- .../model-adapters/AttributeAdapter.ts | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 20ba069b93..85aaa2d215 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -348,9 +348,17 @@ export class AttributeAdapter { /** * Just an helper to get the wrapped type in case of a list, useful for the assertions */ + private getTypeForAssertion(includeLists: boolean) { if (includeLists) { - return this.isList() ? this.type.ofType : this.type; + if (!this.isList()) { + return this.type; + } + if (this.type.ofType instanceof ListType) { + return this.type.ofType.ofType; + } + return this.type.ofType; + // return this.isList() ? this.type.ofType : this.type; } return this.type; } @@ -525,18 +533,37 @@ export class AttributeAdapter { */ getTypePrettyName(): string { - if (this.isList()) { - return `[${this.getTypeName()}${this.isListElementRequired() ? "!" : ""}]${this.isRequired() ? "!" : ""}`; + if (!this.isList()) { + return `${this.getTypeName()}${this.isRequired() ? "!" : ""}`; + } + if (this.type.ofType instanceof ListType) { + // matrix case + return `[[${this.getTypeName()}${this.isListElementRequired() ? "!" : ""}]]${this.isRequired() ? "!" : ""}`; } - return `${this.getTypeName()}${this.isRequired() ? "!" : ""}`; + return `[${this.getTypeName()}${this.isListElementRequired() ? "!" : ""}]${this.isRequired() ? "!" : ""}`; } getTypeName(): string { - return this.isList() ? this.type.ofType.name : this.type.name; + if (!this.isList()) { + return this.type.name; + } + if (this.type.ofType instanceof ListType) { + // matrix case + return this.type.ofType.ofType.name; + } + return this.type.ofType.name; + // return this.isList() ? this.type.ofType.name : this.type.name; } getFieldTypeName(): string { - return this.isList() ? `[${this.getTypeName()}]` : this.getTypeName(); + if (!this.isList()) { + return this.getTypeName(); + } + if (this.type.ofType instanceof ListType) { + // matrix case + return `[[${this.getTypeName()}]]`; + } + return `[${this.getTypeName()}]`; } getInputTypeName(): string { From 04fca515ecff6eda7ddf4f474400effb0773c5c8 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 25 Sep 2023 17:50:50 +0100 Subject: [PATCH 129/162] refactor aggregate type creation --- .../src/schema/generation/aggregate-types.ts | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/packages/graphql/src/schema/generation/aggregate-types.ts b/packages/graphql/src/schema/generation/aggregate-types.ts index 67a4557de3..1894d76712 100644 --- a/packages/graphql/src/schema/generation/aggregate-types.ts +++ b/packages/graphql/src/schema/generation/aggregate-types.ts @@ -63,7 +63,6 @@ function makeAggregableFields({ return aggregableFields; } -// TODO: fix args export function withAggregateInputType({ relationshipAdapter, entityAdapter, // TODO: this is relationshipAdapter.target but from the context above it is known to be ConcreteEntity and we don't know this yet!!! @@ -73,18 +72,26 @@ export function withAggregateInputType({ entityAdapter: ConcreteEntityAdapter; composer: SchemaComposer; }): InputTypeComposer { - const aggregateSelection = composer.getOrCreateITC(relationshipAdapter.operations.aggregateInputTypeName, (tc) => { - tc.addFields({ + const aggregateInputTypeName = relationshipAdapter.operations.aggregateInputTypeName; + if (composer.has(aggregateInputTypeName)) { + return composer.getITC(aggregateInputTypeName); + } + const aggregateSelection = composer.createInputTC({ + name: aggregateInputTypeName, + fields: { count: GraphQLInt, count_LT: GraphQLInt, count_LTE: GraphQLInt, count_GT: GraphQLInt, count_GTE: GraphQLInt, - AND: `[${relationshipAdapter.operations.aggregateInputTypeName}!]`, - OR: `[${relationshipAdapter.operations.aggregateInputTypeName}!]`, - NOT: relationshipAdapter.operations.aggregateInputTypeName, - }); + }, + }); + aggregateSelection.addFields({ + AND: aggregateSelection.NonNull.List, + OR: aggregateSelection.NonNull.List, + NOT: aggregateSelection, }); + const nodeWhereInputType = withAggregationWhereInputType({ relationshipAdapter, entityAdapter, @@ -120,13 +127,17 @@ function withAggregationWhereInputType({ const aggregationInputName = relationshipAdapter.operations.getAggregationWhereInputTypeName( entityAdapter instanceof ConcreteEntityAdapter ? `Node` : `Edge` ); + if (composer.has(aggregationInputName)) { + return composer.getITC(aggregationInputName); + } const aggregationInput = composer.createInputTC({ name: aggregationInputName, - fields: { - AND: `[${aggregationInputName}!]`, - OR: `[${aggregationInputName}!]`, - NOT: aggregationInputName, - }, + fields: {}, + }); + aggregationInput.addFields({ + AND: aggregationInput.NonNull.List, + OR: aggregationInput.NonNull.List, + NOT: aggregationInput, }); aggregationInput.addFields(makeAggregationFields(aggregationFields)); return aggregationInput; From 3ead355f57aa79a8f8997754400a9fbb36c00c2e Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 25 Sep 2023 17:51:09 +0100 Subject: [PATCH 130/162] update tests with descriptions --- packages/graphql/tests/schema/lowercase-type-names.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index 222a5bdb89..4d4f4f7afc 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -61,6 +61,7 @@ describe("lower case type names", () => { info: CreateInfo! } + \\"\\"\\"CreateInfo\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -80,6 +81,7 @@ describe("lower case type names", () => { min: DateTime } + \\"\\"\\"DeleteInfo\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -125,6 +127,7 @@ describe("lower case type names", () => { moviesConnection(after: String, first: Int, sort: [movieSort], where: movieWhere): MoviesConnection! } + \\"\\"\\"SortDirection\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -142,6 +145,7 @@ describe("lower case type names", () => { info: UpdateInfo! } + \\"\\"\\"UpdateInfo\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From 6be6a25bc4e6da4d04eca4f3e4af2664381e607f Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 26 Sep 2023 12:02:17 +0100 Subject: [PATCH 131/162] Remove field class and replace with Attribute --- .../graphql/src/schema-model/Operation.ts | 24 ++------- .../src/schema-model/attribute/Field.ts | 52 ------------------- .../src/schema-model/generate-model.ts | 18 +++---- .../schema-model/parser/parse-attribute.ts | 13 +---- .../src/schema/new-make-augmented-schema.ts | 32 +++++------- .../translate/translate-top-level-cypher.ts | 2 +- 6 files changed, 27 insertions(+), 114 deletions(-) delete mode 100644 packages/graphql/src/schema-model/attribute/Field.ts diff --git a/packages/graphql/src/schema-model/Operation.ts b/packages/graphql/src/schema-model/Operation.ts index 48cc127077..7e95137f39 100644 --- a/packages/graphql/src/schema-model/Operation.ts +++ b/packages/graphql/src/schema-model/Operation.ts @@ -22,34 +22,25 @@ import { Neo4jGraphQLSchemaValidationError } from "../classes"; import type { Annotation, Annotations } from "./annotation/Annotation"; import { annotationToKey } from "./annotation/Annotation"; import type { Attribute } from "./attribute/Attribute"; -import type { Field } from "./attribute/Field"; +// import type { Field } from "./attribute/Field"; export class Operation { public readonly name: string; - // Currently only includes custom Cypher fields - public readonly fields: Map = new Map(); - // TODO: fields vs attributes - // TODO: custom resolvers to be modelled here or filter just for cypher fields? - // should this class only contain cypher attributes?? where to keep the rest then? + // only includes custom Cypher fields public readonly attributes: Map = new Map(); public readonly annotations: Partial = {}; constructor({ name, - fields = [], attributes = [], annotations = [], }: { name: string; - fields?: Field[]; attributes?: Attribute[]; annotations?: Annotation[]; }) { this.name = name; - for (const field of fields) { - this.addFields(field); - } for (const attribute of attributes) { this.addAttribute(attribute); } @@ -59,15 +50,8 @@ export class Operation { } } - public findFields(name: string): Field | undefined { - return this.fields.get(name); - } - - private addFields(field: Field): void { - if (this.fields.has(field.name)) { - throw new Neo4jGraphQLSchemaValidationError(`Field ${field.name} already exists in ${this.name}`); - } - this.fields.set(field.name, field); + public findAttribute(name: string): Attribute | undefined { + return this.attributes.get(name); } private addAttribute(attribute: Attribute): void { diff --git a/packages/graphql/src/schema-model/attribute/Field.ts b/packages/graphql/src/schema-model/attribute/Field.ts deleted file mode 100644 index 773bf297db..0000000000 --- a/packages/graphql/src/schema-model/attribute/Field.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 { Neo4jGraphQLSchemaValidationError } from "../../classes/Error"; -import type { Annotation, Annotations } from "../annotation/Annotation"; -import { annotationToKey } from "../annotation/Annotation"; - -export class Field { - public readonly name: string; - public readonly annotations: Partial = {}; - - constructor({ name, annotations }: { name: string; annotations: Annotation[] }) { - this.name = name; - for (const annotation of annotations) { - this.addAnnotation(annotation); - } - } - - public clone(): Field { - return new Field({ - name: this.name, - annotations: Object.values(this.annotations), - }); - } - - private addAnnotation(annotation: Annotation): void { - const annotationKey = annotationToKey(annotation); - if (this.annotations[annotationKey]) { - throw new Neo4jGraphQLSchemaValidationError(`Annotation ${annotationKey} already exists in ${this.name}`); - } - - // We cast to any because we aren't narrowing the Annotation type here. - // There's no reason to narrow either, since we care more about performance. - this.annotations[annotationKey] = annotation as any; - } -} diff --git a/packages/graphql/src/schema-model/generate-model.ts b/packages/graphql/src/schema-model/generate-model.ts index beb647523b..6812c7102b 100644 --- a/packages/graphql/src/schema-model/generate-model.ts +++ b/packages/graphql/src/schema-model/generate-model.ts @@ -41,7 +41,7 @@ import type { DefinitionCollection } from "./parser/definition-collection"; import { getDefinitionCollection } from "./parser/definition-collection"; import { parseAnnotations } from "./parser/parse-annotation"; import { parseArguments } from "./parser/parse-arguments"; -import { parseAttribute, parseAttributeArguments, parseField } from "./parser/parse-attribute"; +import { parseAttribute, parseAttributeArguments } from "./parser/parse-attribute"; import { findDirective } from "./parser/utils"; import type { NestedOperation, QueryDirection, RelationshipDirection } from "./relationship/Relationship"; import { Relationship } from "./relationship/Relationship"; @@ -197,7 +197,7 @@ function generateInterfaceEntity( return new InterfaceEntity({ ...interfaceEntity, description: definition.description?.value, - attributes: filterTruthy(fields) as Attribute[], + attributes: filterTruthy(fields), annotations, }); } @@ -360,7 +360,7 @@ function generateRelationshipField( return parseAttribute(fieldDefinition, inheritedField, definitionCollection, propertyInterface.fields); }); - attributes = filterTruthy(fields) as Attribute[]; + attributes = filterTruthy(fields); } const annotations = parseAnnotations(mergedDirectives); @@ -433,7 +433,7 @@ function generateConcreteEntity( name: definition.name.value, description: definition.description?.value, labels: getLabels(definition), - attributes: filterTruthy(fields) as Attribute[], + attributes: filterTruthy(fields), annotations, }); } @@ -476,15 +476,13 @@ function generateOperation( definition: ObjectTypeDefinitionNode, definitionCollection: DefinitionCollection ): Operation { - const fields = (definition.fields || []).map((fieldDefinition) => parseField(fieldDefinition)); - const attributes = (definition.fields || []).map((fieldDefinition) => - parseAttribute(fieldDefinition, undefined, definitionCollection) - ); + const attributes = (definition.fields || []) + .map((fieldDefinition) => parseAttribute(fieldDefinition, undefined, definitionCollection)) + .filter((attribute) => attribute.annotations.cypher); return new Operation({ name: definition.name.value, - fields: filterTruthy(fields), - attributes: filterTruthy(attributes) as Attribute[], + attributes, annotations: createEntityAnnotations(definition.directives || []), }); } diff --git a/packages/graphql/src/schema-model/parser/parse-attribute.ts b/packages/graphql/src/schema-model/parser/parse-attribute.ts index 1a72e09e01..6fe06f4669 100644 --- a/packages/graphql/src/schema-model/parser/parse-attribute.ts +++ b/packages/graphql/src/schema-model/parser/parse-attribute.ts @@ -41,7 +41,6 @@ import { UnknownType, UserScalarType, } from "../attribute/AttributeType"; -import { Field } from "../attribute/Field"; import type { DefinitionCollection } from "./definition-collection"; import { parseAnnotations } from "./parse-annotation"; import { parseArguments } from "./parse-arguments"; @@ -66,7 +65,7 @@ export function parseAttribute( inheritedField: FieldDefinitionNode[] | undefined, definitionCollection: DefinitionCollection, definitionFields?: ReadonlyArray -): Attribute | Field { +): Attribute { const name = field.name.value; const type = parseTypeNode(definitionCollection, field.type); const args = parseAttributeArguments(field.arguments || [], definitionCollection); @@ -114,16 +113,6 @@ function getDatabaseName( } } -// we may want to remove Fields from the schema model -export function parseField(field: FieldDefinitionNode): Field { - const name = field.name.value; - const annotations = parseAnnotations(field.directives || []); - return new Field({ - name, - annotations, - }); -} - function parseTypeNode( definitionCollection: DefinitionCollection, typeNode: TypeNode, diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts index b7540f8e8b..ed191011f6 100644 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ b/packages/graphql/src/schema/new-make-augmented-schema.ts @@ -900,26 +900,20 @@ function makeAugmentedSchema( callbacks, }); - // TODO: extend this loop to do the non-cypher field logic as well for (const attributeAdapter of operationAdapter.attributes.values()) { - const cypherAnnotation = attributeAdapter.annotations.cypher; - if (cypherAnnotation) { - // needed for compatibility with translation layer - const field = objectFields.cypherFields.find( - (f) => f.fieldName === attributeAdapter.name - ) as CypherField; - const customResolver = cypherResolver2({ - field, - attributeAdapter, - type: type as "Query" | "Mutation", - }); - - const composedField = attributeAdapterToComposeFields([attributeAdapter], userDefinedDirectives)[ - attributeAdapter.name - ]; - - objectComposer.addFields({ [attributeAdapter.name]: { ...composedField, ...customResolver } }); - } + // needed for compatibility with translation layer + const field = objectFields.cypherFields.find((f) => f.fieldName === attributeAdapter.name) as CypherField; + const customResolver = cypherResolver2({ + field, + attributeAdapter, + type: type as "Query" | "Mutation", + }); + + const composedField = attributeAdapterToComposeFields([attributeAdapter], userDefinedDirectives)[ + attributeAdapter.name + ]; + + objectComposer.addFields({ [attributeAdapter.name]: { ...composedField, ...customResolver } }); } }); diff --git a/packages/graphql/src/translate/translate-top-level-cypher.ts b/packages/graphql/src/translate/translate-top-level-cypher.ts index b6adbcfe36..ef519a0fc3 100644 --- a/packages/graphql/src/translate/translate-top-level-cypher.ts +++ b/packages/graphql/src/translate/translate-top-level-cypher.ts @@ -44,7 +44,7 @@ export function translateTopLevelCypher({ if (!operation) { throw new Error(`Failed to find operation ${type} in Schema Model.`); } - const operationField = operation.findFields(field.fieldName); + const operationField = operation.findAttribute(field.fieldName); if (!operationField) { throw new Error(`Failed to find field ${field.fieldName} on operation ${type}.`); } From 3ded9dace92c9e83278480f982148c01b2d2637b Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 26 Sep 2023 14:38:03 +0200 Subject: [PATCH 132/162] refactor: replace old functions with new ones --- .../field-aggregation-composer.ts | 68 +- packages/graphql/src/schema/array-methods.ts | 18 +- .../graphql/src/schema/augment/fulltext.ts | 81 +- .../src/schema/create-connection-fields.ts | 8 +- .../create-aggregation-input-fields.ts | 175 +- .../create-connect-or-create-field.ts | 129 +- .../create-relationship-fields.ts | 490 +----- .../create-relationship-interface-fields.ts | 211 +-- .../create-relationship-union-fields.ts | 408 +---- ...reate-top-level-connect-or-create-input.ts | 26 - .../src/schema/directed-argument.test.ts | 50 +- .../graphql/src/schema/directed-argument.ts | 39 +- .../generation/augment-object-or-interface.ts | 4 +- .../generation/connect-or-create-input.ts | 4 +- packages/graphql/src/schema/index.ts | 2 +- .../src/schema/make-augmented-schema.test.ts | 5 +- .../src/schema/make-augmented-schema.ts | 1459 +++++++++-------- .../src/schema/new-make-augmented-schema.ts | 1135 ------------- packages/graphql/src/schema/pagination.ts | 30 +- .../src/schema/resolvers/field/cypher.test.ts | 17 +- .../src/schema/resolvers/field/cypher.ts | 79 +- .../schema/resolvers/mutation/create.test.ts | 16 +- .../src/schema/resolvers/mutation/create.ts | 41 +- .../schema/resolvers/mutation/delete.test.ts | 14 +- .../src/schema/resolvers/mutation/delete.ts | 38 +- .../schema/resolvers/mutation/update.test.ts | 26 +- .../src/schema/resolvers/mutation/update.ts | 69 +- .../src/schema/resolvers/query/aggregate.ts | 45 +- .../src/schema/resolvers/query/fulltext.ts | 49 +- .../src/schema/resolvers/query/read.test.ts | 16 +- .../src/schema/resolvers/query/read.ts | 40 +- .../schema/resolvers/query/root-connection.ts | 107 +- .../check-authentication-selection-set.ts | 37 +- .../resolvers/subscriptions/subscribe.ts | 98 +- .../subscriptions/where/authorization.ts | 55 +- .../filters/filter-by-authorization-rules.ts | 143 +- .../where/filters/filter-by-properties.ts | 93 +- .../filter-by-relationship-properties.ts | 101 +- .../where/utils/filter-relationship-key.ts | 254 +-- .../where/utils/get-filtering-fn.ts | 17 +- .../subscriptions/where/utils/type-checks.ts | 17 +- .../subscriptions/where/where.test.ts | 107 +- .../resolvers/subscriptions/where/where.ts | 57 +- .../generate-subscription-connection-types.ts | 211 +-- .../generate-subscription-types.ts | 434 +---- .../generate-subscription-where-type.ts | 310 +--- packages/graphql/src/schema/to-compose.ts | 15 +- 47 files changed, 1111 insertions(+), 5737 deletions(-) delete mode 100644 packages/graphql/src/schema/new-make-augmented-schema.ts diff --git a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts index b7eb003df6..360f69ee0a 100644 --- a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts +++ b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts @@ -19,11 +19,9 @@ import { GraphQLInt, GraphQLNonNull } from "graphql"; import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; -import type { Node } from "../../classes"; import type { Subgraph } from "../../classes/Subgraph"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { ObjectFields } from "../get-obj-field-meta"; import { numericalResolver } from "../resolvers/field/numerical"; import { AggregationTypesMapper } from "./aggregation-types-mapper"; @@ -42,64 +40,6 @@ export class FieldAggregationComposer { this.aggregationTypesMapper = new AggregationTypesMapper(composer, subgraph); } - public createAggregationTypeObject( - baseTypeName: string, - refNode: Node, - relFields: ObjectFields | undefined - ): ObjectTypeComposer { - let aggregateSelectionEdge: ObjectTypeComposer | undefined; - - const aggregateSelectionNodeFields = this.getAggregationFields(refNode); - const aggregateSelectionNodeName = `${baseTypeName}${FieldAggregationSchemaTypes.node}`; - - const aggregateSelectionNode = this.createAggregationField( - aggregateSelectionNodeName, - aggregateSelectionNodeFields - ); - - if (relFields) { - const aggregateSelectionEdgeFields = this.getAggregationFields(relFields); - const aggregateSelectionEdgeName = `${baseTypeName}${FieldAggregationSchemaTypes.edge}`; - - aggregateSelectionEdge = this.createAggregationField( - aggregateSelectionEdgeName, - aggregateSelectionEdgeFields - ); - } - - return this.composer.createObjectTC({ - name: `${baseTypeName}${FieldAggregationSchemaTypes.field}`, - fields: { - count: { - type: "Int!", - resolve: numericalResolver, - args: {}, - }, - ...(aggregateSelectionNode ? { node: aggregateSelectionNode } : {}), - ...(aggregateSelectionEdge ? { edge: aggregateSelectionEdge } : {}), - }, - }); - } - - private getAggregationFields(relFields: ObjectFields | Node): Record { - return [...relFields.primitiveFields, ...relFields.temporalFields].reduce((res, field) => { - if (field.typeMeta.array) { - return res; - } - - const objectTypeComposer = this.aggregationTypesMapper.getAggregationType({ - fieldName: field.typeMeta.name, - nullable: !field.typeMeta.required, - }); - - if (!objectTypeComposer) return res; - - res[field.fieldName] = objectTypeComposer.NonNull; - - return res; - }, {}); - } - private createAggregationField( name: string, fields: Record @@ -115,10 +55,10 @@ export class FieldAggregationComposer { return undefined; } - public createAggregationTypeObject2(relationshipAdapter: RelationshipAdapter): ObjectTypeComposer { + public createAggregationTypeObject(relationshipAdapter: RelationshipAdapter): ObjectTypeComposer { let aggregateSelectionEdge: ObjectTypeComposer | undefined; - const aggregateSelectionNodeFields = this.getAggregationFields2( + const aggregateSelectionNodeFields = this.getAggregationFields( relationshipAdapter.target as ConcreteEntityAdapter ); // TODO: fix ts const aggregateSelectionNodeName = relationshipAdapter.getAggregationFieldTypename("node"); @@ -129,7 +69,7 @@ export class FieldAggregationComposer { ); if (relationshipAdapter.attributes.size > 0) { - const aggregateSelectionEdgeFields = this.getAggregationFields2(relationshipAdapter); + const aggregateSelectionEdgeFields = this.getAggregationFields(relationshipAdapter); const aggregateSelectionEdgeName = relationshipAdapter.getAggregationFieldTypename("edge"); aggregateSelectionEdge = this.createAggregationField( @@ -152,7 +92,7 @@ export class FieldAggregationComposer { }); } - private getAggregationFields2( + private getAggregationFields( entity: RelationshipAdapter | ConcreteEntityAdapter ): Record { return entity.aggregableFields.reduce((res, field) => { diff --git a/packages/graphql/src/schema/array-methods.ts b/packages/graphql/src/schema/array-methods.ts index 0718facc4c..0f2168e7d8 100644 --- a/packages/graphql/src/schema/array-methods.ts +++ b/packages/graphql/src/schema/array-methods.ts @@ -19,25 +19,9 @@ import { GraphQLInt } from "graphql"; import type { InputTypeComposer } from "graphql-compose"; -import { SCALAR_TYPES } from "../constants"; import type { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; -import type { BaseField } from "../types"; -export function addArrayMethodsToITC(itc: InputTypeComposer, fields: BaseField[]): void { - // Add array methods for array fields - const allowedArrayFieldTypes = [...SCALAR_TYPES, "Point", "CartesianPoint"]; - const arrayFields = fields.filter( - (field) => field.typeMeta.array && allowedArrayFieldTypes.includes(field.typeMeta.name) - ); - arrayFields.forEach((arrayField) => { - itc.addFields({ - [`${arrayField.fieldName}_POP`]: GraphQLInt, - [`${arrayField.fieldName}_PUSH`]: arrayField.typeMeta.input.update.pretty, - }); - }); -} - -export function addArrayMethodsToITC2(itc: InputTypeComposer, arrayMethodFields: AttributeAdapter[]): void { +export function addArrayMethodsToITC(itc: InputTypeComposer, arrayMethodFields: AttributeAdapter[]): void { // TODO: Did we need to consider the deprecated directives here? // It wasn't done before diff --git a/packages/graphql/src/schema/augment/fulltext.ts b/packages/graphql/src/schema/augment/fulltext.ts index 2c559a482a..ed7053b836 100644 --- a/packages/graphql/src/schema/augment/fulltext.ts +++ b/packages/graphql/src/schema/augment/fulltext.ts @@ -24,86 +24,9 @@ import { SCORE_FIELD } from "../../graphql/directives/fulltext"; import { SortDirection } from "../../graphql/enums/SortDirection"; import { FloatWhere } from "../../graphql/input-objects/FloatWhere"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import { upperFirst } from "../../utils/upper-first"; -import { fulltextResolver, fulltextResolver2 } from "../resolvers/query/fulltext"; +import { fulltextResolver } from "../resolvers/query/fulltext"; export function augmentFulltextSchema( - node: Node, - composer: SchemaComposer, - nodeWhereTypeName: string, - nodeSortTypeName: string -) { - if (node.fulltextDirective) { - const fields = node.fulltextDirective.indexes.reduce((res, index) => { - const indexName = index.indexName || index.name; - if (indexName === undefined) { - throw new Error("The name of the fulltext index should be defined using the indexName argument."); - } - return { - ...res, - [indexName]: composer.createInputTC({ - name: `${node.name}${upperFirst(indexName)}Fulltext`, - fields: { - phrase: new GraphQLNonNull(GraphQLString), - }, - }), - }; - }, {}); - - const fulltextResultDescription = `The result of a fulltext search on an index of ${node.name}`; - const fulltextWhereDescription = `The input for filtering a fulltext query on an index of ${node.name}`; - const fulltextSortDescription = `The input for sorting a fulltext query on an index of ${node.name}`; - - composer.createInputTC({ - name: `${node.name}Fulltext`, - fields, - }); - - composer.createInputTC({ - name: node.fulltextTypeNames.sort, - description: fulltextSortDescription, - fields: { - [SCORE_FIELD]: "SortDirection", - [node.singular]: nodeSortTypeName, - }, - }); - - composer.createInputTC({ - name: node.fulltextTypeNames.where, - description: fulltextWhereDescription, - fields: { - [SCORE_FIELD]: FloatWhere.name, - [node.singular]: nodeWhereTypeName, - }, - }); - - composer.createObjectTC({ - name: node.fulltextTypeNames.result, - description: fulltextResultDescription, - fields: { - [SCORE_FIELD]: new GraphQLNonNull(GraphQLFloat), - [node.singular]: `${node.name}!`, - }, - }); - - node.fulltextDirective.indexes.forEach((index) => { - // TODO: remove indexName assignment and undefined check once the name argument has been removed. - const indexName = index.indexName || index.name; - if (indexName === undefined) { - throw new Error("The name of the fulltext index should be defined using the indexName argument."); - } - let queryName = `${node.plural}Fulltext${upperFirst(indexName)}`; - if (index.queryName) { - queryName = index.queryName; - } - composer.Query.addFields({ - [queryName]: fulltextResolver({ node }, index), - }); - }); - } -} - -export function augmentFulltextSchema2( node: Node, composer: SchemaComposer, concreteEntityAdapter: ConcreteEntityAdapter @@ -194,7 +117,7 @@ export function augmentFulltextSchema2( type: fulltextResultITC.NonNull.List.NonNull, description: "Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the `fulltext` argument under other queries for this functionality.", - resolve: fulltextResolver2({ node, index: nodeIndex }), + resolve: fulltextResolver({ node, index: nodeIndex }), args: { phrase: new GraphQLNonNull(GraphQLString), where: concreteEntityAdapter.operations.fulltextTypeNames.where, diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index 98d05c5dd7..335558b213 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -35,10 +35,10 @@ import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionE import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { ConnectionQueryArgs } from "../types"; import { DEPRECATE_NOT } from "./constants"; -import { addDirectedArgument2 } from "./directed-argument"; +import { addDirectedArgument } from "./directed-argument"; import { augmentWhereInputTypeWithConnectionFields } from "./generation/augment-where-input"; import type { ObjectFields } from "./get-obj-field-meta"; -import { connectionFieldResolver2 } from "./pagination"; +import { connectionFieldResolver } from "./pagination"; import { graphqlDirectivesToCompose } from "./to-compose"; function addConnectionSortField({ @@ -167,7 +167,7 @@ export function createConnectionFields({ const whereInputITC = schemaComposer.getITC(entityAdapter.operations.whereInputTypeName); whereInputITC.addFields(fields); - const composeNodeArgs = addDirectedArgument2( + const composeNodeArgs = addDirectedArgument( { where: connectionWhereITC, first: { @@ -218,7 +218,7 @@ export function createConnectionFields({ args: composeNodeArgs, directives: deprecatedDirectives, resolve: (source, args: ConnectionQueryArgs, _ctx, info: GraphQLResolveInfo) => { - return connectionFieldResolver2({ + return connectionFieldResolver({ connectionFieldName: relationship.operations.connectionFieldName, args, info, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts index 2cb532881e..b5e56388a1 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-aggregation-input-fields.ts @@ -18,170 +18,13 @@ */ import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; -import { upperFirst } from "graphql-compose"; -import { Node } from "../../classes"; -import { AGGREGATION_COMPARISON_OPERATORS, WHERE_AGGREGATION_TYPES } from "../../constants"; +import { AGGREGATION_COMPARISON_OPERATORS } from "../../constants"; import type { AttributeAdapter } from "../../schema-model/attribute/model-adapters/AttributeAdapter"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { BaseField, RelationField } from "../../types"; import { DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS, DEPRECATE_INVALID_AGGREGATION_FILTERS } from "../constants"; -import type { ObjectFields } from "../get-obj-field-meta"; export function createAggregationInputFields( - nodeOrRelFields: Node | ObjectFields, - sourceName: string, - rel: RelationField, - schemaComposer: SchemaComposer -): InputTypeComposer | undefined { - const fields = [...nodeOrRelFields.primitiveFields, ...nodeOrRelFields.temporalFields]; - - const aggregationFields: BaseField[] = fields.filter((field) => { - return !field.typeMeta.array && WHERE_AGGREGATION_TYPES.includes(field.typeMeta.name); - }); - - if (!aggregationFields.length) { - return; - } - - const aggregationInputName = `${sourceName}${upperFirst(rel.fieldName)}${ - nodeOrRelFields instanceof Node ? `Node` : `Edge` - }AggregationWhereInput`; - - const aggregationInput = schemaComposer.createInputTC({ - name: aggregationInputName, - fields: { - AND: `[${aggregationInputName}!]`, - OR: `[${aggregationInputName}!]`, - NOT: aggregationInputName, - }, - }); - - for (const aggregationField of aggregationFields) { - if (!aggregationField.filterableOptions.byAggregate) { - continue; - } - switch (aggregationField.typeMeta.name) { - case "ID": - createIDAggregationInputFields(aggregationInput, aggregationField); - break; - - case "String": - createStringAggregationInputFields(aggregationInput, aggregationField); - break; - - // Types that you can average - // https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-avg - // https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-avg-duration - // String uses avg(size()) - case "Int": - case "Float": - case "BigInt": - case "Duration": - createAverageAggregationInputFields(aggregationInput, aggregationField); - break; - - default: - createComparisonAggregationInputFields(aggregationInput, aggregationField); - break; - } - } - - return aggregationInput; -} - -function createComparisonAggregationInputFields(aggregationInput: InputTypeComposer, field: BaseField) { - aggregationInput.addFields( - AGGREGATION_COMPARISON_OPERATORS.reduce( - (res, operator) => ({ - ...res, - [`${field.fieldName}_${operator}`]: { - type: field.typeMeta.name, - directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_MIN_${operator}`]: field.typeMeta.name, - [`${field.fieldName}_MAX_${operator}`]: field.typeMeta.name, - }), - {} - ) - ); -} - -function createAverageAggregationInputFields(aggregationInput: InputTypeComposer, field: BaseField) { - aggregationInput.addFields( - AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { - let averageType = "Float"; - - if (field.typeMeta.name === "BigInt") { - averageType = "BigInt"; - } - - if (field.typeMeta.name === "Duration") { - averageType = "Duration"; - } - - return { - ...res, - [`${field.fieldName}_${operator}`]: { - type: field.typeMeta.name, - directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_AVERAGE_${operator}`]: averageType, - [`${field.fieldName}_MIN_${operator}`]: field.typeMeta.name, - [`${field.fieldName}_MAX_${operator}`]: field.typeMeta.name, - ...(field.typeMeta.name !== "Duration" - ? { [`${field.fieldName}_SUM_${operator}`]: field.typeMeta.name } - : {}), - }; - }, {}) - ); - - return; -} - -function createStringAggregationInputFields(aggregationInput: InputTypeComposer, field: BaseField) { - aggregationInput.addFields( - AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { - return { - ...res, - [`${field.fieldName}_${operator}`]: { - type: `${operator === "EQUAL" ? "String" : "Int"}`, - directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_AVERAGE_${operator}`]: { - type: "Float", - directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_LONGEST_${operator}`]: { - type: "Int", - directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_SHORTEST_${operator}`]: { - type: "Int", - directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_AVERAGE_LENGTH_${operator}`]: "Float", - [`${field.fieldName}_LONGEST_LENGTH_${operator}`]: "Int", - [`${field.fieldName}_SHORTEST_LENGTH_${operator}`]: "Int", - }; - }, {}) - ); - - return; -} - -function createIDAggregationInputFields(aggregationInput: InputTypeComposer, field: BaseField) { - aggregationInput.addFields({ - [`${field.fieldName}_EQUAL`]: { - type: `ID`, - directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], - }, - }); - - return; -} - -export function createAggregationInputFields2( entity: ConcreteEntityAdapter | RelationshipAdapter, rel: RelationshipAdapter, schemaComposer: SchemaComposer @@ -206,11 +49,11 @@ export function createAggregationInputFields2( for (const aggregationField of aggregationFields) { switch (aggregationField.getTypeName()) { case "ID": - createIDAggregationInputFields2(aggregationInput, aggregationField); + createIDAggregationInputFields(aggregationInput, aggregationField); break; case "String": - createStringAggregationInputFields2(aggregationInput, aggregationField); + createStringAggregationInputFields(aggregationInput, aggregationField); break; // Types that you can average @@ -221,11 +64,11 @@ export function createAggregationInputFields2( case "Float": case "BigInt": case "Duration": - createAverageAggregationInputFields2(aggregationInput, aggregationField); + createAverageAggregationInputFields(aggregationInput, aggregationField); break; default: - createComparisonAggregationInputFields2(aggregationInput, aggregationField); + createComparisonAggregationInputFields(aggregationInput, aggregationField); break; } } @@ -233,7 +76,7 @@ export function createAggregationInputFields2( return aggregationInput; } -function createComparisonAggregationInputFields2(aggregationInput: InputTypeComposer, field: AttributeAdapter) { +function createComparisonAggregationInputFields(aggregationInput: InputTypeComposer, field: AttributeAdapter) { aggregationInput.addFields( AGGREGATION_COMPARISON_OPERATORS.reduce( (res, operator) => ({ @@ -250,7 +93,7 @@ function createComparisonAggregationInputFields2(aggregationInput: InputTypeComp ); } -function createAverageAggregationInputFields2(aggregationInput: InputTypeComposer, field: AttributeAdapter) { +function createAverageAggregationInputFields(aggregationInput: InputTypeComposer, field: AttributeAdapter) { aggregationInput.addFields( AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { let averageType = "Float"; @@ -282,7 +125,7 @@ function createAverageAggregationInputFields2(aggregationInput: InputTypeCompose return; } -function createStringAggregationInputFields2(aggregationInput: InputTypeComposer, field: AttributeAdapter) { +function createStringAggregationInputFields(aggregationInput: InputTypeComposer, field: AttributeAdapter) { aggregationInput.addFields( AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { return { @@ -313,7 +156,7 @@ function createStringAggregationInputFields2(aggregationInput: InputTypeComposer return; } -function createIDAggregationInputFields2(aggregationInput: InputTypeComposer, field: AttributeAdapter) { +function createIDAggregationInputFields(aggregationInput: InputTypeComposer, field: AttributeAdapter) { aggregationInput.addFields({ [`${field.name}_EQUAL`]: { type: `ID`, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts index b14ddb20b6..4c61490b66 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-connect-or-create-field.ts @@ -19,136 +19,13 @@ import type { DirectiveNode } from "graphql"; import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; -import type { Node } from "../../classes"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { RelationField } from "../../types"; -import { upperFirst } from "../../utils/upper-first"; import { ensureNonEmptyInput } from "../ensure-non-empty-input"; import { withCreateInputType } from "../generation/create-input"; -import { concreteEntityToCreateInputFields, objectFieldsToCreateInputFields } from "../to-compose"; +import { concreteEntityToCreateInputFields } from "../to-compose"; export function createConnectOrCreateField({ - node, - relationField, - schemaComposer, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, -}: { - node: Node; - relationField: RelationField; - schemaComposer: SchemaComposer; - hasNonGeneratedProperties: boolean; - hasNonNullNonGeneratedProperties: boolean; -}): string | undefined { - if (!node.uniqueFields.length) { - return undefined; - } - - const parentPrefix = `${relationField.connectionPrefix}${upperFirst(relationField.fieldName)}`; - - const connectOrCreateName = relationField.union - ? `${parentPrefix}${node.name}ConnectOrCreateFieldInput` - : `${parentPrefix}ConnectOrCreateFieldInput`; - - const onCreateITC = createOnCreateITC({ - schemaComposer, - prefix: connectOrCreateName, - node, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, - relationField, - }); - const whereITC = createWhereITC({ schemaComposer, node }); - - schemaComposer.getOrCreateITC(connectOrCreateName, (tc) => { - tc.addFields({ - where: `${whereITC.getTypeName()}!`, - onCreate: `${onCreateITC.getTypeName()}!`, - }); - }); - return relationField.typeMeta.array ? `[${connectOrCreateName}!]` : connectOrCreateName; -} - -function createOnCreateITC({ - schemaComposer, - prefix, - node, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, - relationField, -}: { - schemaComposer: SchemaComposer; - prefix: string; - node: Node; - hasNonGeneratedProperties: boolean; - hasNonNullNonGeneratedProperties: boolean; - relationField: RelationField; -}): InputTypeComposer { - const onCreateName = `${prefix}OnCreate`; - - const onCreateFields = getOnCreateFields({ - node, - hasNonGeneratedProperties, - relationField, - hasNonNullNonGeneratedProperties, - schemaComposer, - }); - - return schemaComposer.getOrCreateITC(onCreateName, (tc) => { - tc.addFields(onCreateFields); - }); -} - -function getOnCreateFields({ - node, - hasNonGeneratedProperties, - relationField, - hasNonNullNonGeneratedProperties, - schemaComposer, -}: { - node: Node; - hasNonGeneratedProperties: boolean; - relationField: RelationField; - hasNonNullNonGeneratedProperties: boolean; - schemaComposer: SchemaComposer; -}): { node: string } | { node: string; edge: string } { - const nodeCreateInput = schemaComposer.getOrCreateITC(`${node.name}OnCreateInput`, (tc) => { - const nodeFields = objectFieldsToCreateInputFields([ - ...node.primitiveFields, - ...node.scalarFields, - ...node.enumFields, - ...node.pointFields, - ...node.temporalFields, - ]); - tc.addFields(nodeFields); - ensureNonEmptyInput(schemaComposer, tc); - }); - const nodeCreateInputFieldName = `${nodeCreateInput.getTypeName()}!`; - - if (hasNonGeneratedProperties) { - const edgeField = `${relationField.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`; - return { - node: nodeCreateInputFieldName, - edge: edgeField, - }; - } - return { - node: nodeCreateInputFieldName, - }; -} - -function createWhereITC({ schemaComposer, node }: { schemaComposer: SchemaComposer; node: Node }): InputTypeComposer { - const connectOrCreateWhereName = `${node.name}ConnectOrCreateWhere`; - - return schemaComposer.getOrCreateITC(connectOrCreateWhereName, (tc) => { - tc.addFields({ - node: `${node.name}UniqueWhere!`, - }); - }); -} - -export function createConnectOrCreateField2({ relationshipAdapter, targetEntityAdapter, // TODO: take this from relationshipAdapter.target in the end, currently here bc unions call this function for reach refNode schemaComposer, @@ -167,7 +44,7 @@ export function createConnectOrCreateField2({ const connectOrCreateName = relationshipAdapter.operations.getConnectOrCreateFieldInputTypeName(targetEntityAdapter); - createOnCreateITC2({ + createOnCreateITC({ schemaComposer, relationshipAdapter, targetEntityAdapter, @@ -184,7 +61,7 @@ export function createConnectOrCreateField2({ return relationshipAdapter.isList ? `[${connectOrCreateName}!]` : connectOrCreateName; } -export function createOnCreateITC2({ +export function createOnCreateITC({ schemaComposer, relationshipAdapter, targetEntityAdapter, 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 ecdee5f843..08e9fa705c 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 @@ -18,19 +18,15 @@ */ import type { DirectiveNode } from "graphql"; -import type { Directive, InputTypeComposer, SchemaComposer } from "graphql-compose"; -import { InterfaceTypeComposer, ObjectTypeComposer } from "graphql-compose"; -import type { Node } from "../../classes"; +import type { Directive, InterfaceTypeComposer, SchemaComposer } from "graphql-compose"; +import { ObjectTypeComposer } from "graphql-compose"; import type { Subgraph } from "../../classes/Subgraph"; -import { DEPRECATED, RelationshipNestedOperationsOption } from "../../constants"; +import { DEPRECATED } from "../../constants"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; -import type { RelationField } from "../../types"; -import { upperFirst } from "../../utils/upper-first"; import { FieldAggregationComposer } from "../aggregations/field-aggregation-composer"; -import { addRelationshipArrayFilters } from "../augment/add-relationship-array-filters"; -import { addDirectedArgument, addDirectedArgument2 } from "../directed-argument"; +import { addDirectedArgument } from "../directed-argument"; import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; import { augmentConnectInputTypeWithConnectFieldInput } from "../generation/connect-input"; import { withConnectOrCreateInputType } from "../generation/connect-or-create-input"; @@ -40,475 +36,11 @@ import { augmentDisconnectInputTypeWithDisconnectFieldInput } from "../generatio import { withRelationInputType } from "../generation/relation-input"; import { augmentUpdateInputTypeWithUpdateFieldInput } from "../generation/update-input"; import { withSourceWhereInputType } from "../generation/where-input"; -import type { ObjectFields } from "../get-obj-field-meta"; import { graphqlDirectivesToCompose } from "../to-compose"; -import { createAggregationInputFields } from "./create-aggregation-input-fields"; -import { createConnectOrCreateField } from "./create-connect-or-create-field"; -import { - createRelationshipInterfaceFields, - createRelationshipInterfaceFields2, -} from "./create-relationship-interface-fields"; -import { createRelationshipUnionFields, createRelationshipUnionFields2 } from "./create-relationship-union-fields"; -import { createTopLevelConnectOrCreateInput } from "./create-top-level-connect-or-create-input"; -import { overwrite } from "./fields/overwrite"; -import { inspectObjectFields } from "./inspect-object-fields"; +import { createRelationshipInterfaceFields } from "./create-relationship-interface-fields"; +import { createRelationshipUnionFields } from "./create-relationship-union-fields"; -interface CreateRelationshipFieldsArgs { - relationshipFields: RelationField[]; - concreteEntityAdapter?: ConcreteEntityAdapter; - schemaComposer: SchemaComposer; - composeNode: ObjectTypeComposer | InterfaceTypeComposer; - sourceName: string; - nodes: Node[]; - relationshipPropertyFields: Map; - subgraph?: Subgraph; -} - -function createRelationshipFields({ - relationshipFields, - concreteEntityAdapter, - schemaComposer, - // TODO: Ideally we come up with a solution where we don't have to pass the following into these kind of functions - composeNode, - sourceName, - nodes, - relationshipPropertyFields, - subgraph, -}: CreateRelationshipFieldsArgs): void { - if (!relationshipFields.length) { - return; - } - - relationshipFields.forEach((rel) => { - const relFields = relationshipPropertyFields.get(rel.properties || ""); - let hasNonGeneratedProperties = false; - let hasNonNullNonGeneratedProperties = false; - - if (concreteEntityAdapter) { - const relationshipAdapter = concreteEntityAdapter.relationships.get(rel.fieldName); - - if (!relationshipAdapter) { - return; - } - - hasNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.length > 0; - hasNonNullNonGeneratedProperties = relationshipAdapter.nonGeneratedProperties.some((attribute) => - attribute.isRequired() - ); - } else { - const { hasNonGeneratedProperties: first, hasNonNullNonGeneratedProperties: second } = - inspectObjectFields(relFields); - hasNonGeneratedProperties = first; - hasNonNullNonGeneratedProperties = second; - } - - if (rel.interface) { - createRelationshipInterfaceFields({ - nodes, - rel, - composeNode, - schemaComposer, - sourceName, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, - }); - - return; - } - - if (rel.union) { - createRelationshipUnionFields({ - nodes, - rel, - composeNode, - sourceName, - schemaComposer, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, - }); - - return; - } - - const node = nodes.find((x) => x.name === rel.typeMeta.name); - if (!node) { - return; - } - - const deprecatedDirectives = graphqlDirectivesToCompose( - rel.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) - ); - const nestedOperations = new Set(rel.nestedOperations); - const nodeCreateInput = schemaComposer.getITC(`${sourceName}CreateInput`); - const nodeUpdateInput = schemaComposer.getITC(`${sourceName}UpdateInput`); - const upperFieldName = upperFirst(rel.fieldName); - const relationshipWhereTypeInputName = `${sourceName}${upperFieldName}AggregateInput`; - - // Don't generate empty input type - let nodeFieldInput: InputTypeComposer | undefined; - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || - // The connectOrCreate field is not generated if the related type does not have a unique field - (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && node.uniqueFields.length) - ) { - const nodeFieldInputName = `${rel.connectionPrefix}${upperFieldName}FieldInput`; - nodeFieldInput = schemaComposer.getOrCreateITC(nodeFieldInputName); - } - // Don't generate an empty input type - let nodeFieldUpdateInput: InputTypeComposer | undefined; - // If the only nestedOperation is connectOrCreate, it won't be generated if there are no unique fields on the related type - const onlyConnectOrCreateAndNoUniqueFields = - nestedOperations.size === 1 && - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - !node.uniqueFields.length; - - if (nestedOperations.size !== 0 && !onlyConnectOrCreateAndNoUniqueFields) { - const nodeFieldUpdateInputName = `${rel.connectionPrefix}${upperFieldName}UpdateFieldInput`; - nodeFieldUpdateInput = schemaComposer.getOrCreateITC(nodeFieldUpdateInputName); - // Add where fields - nodeFieldUpdateInput.addFields({ - where: `${rel.connectionPrefix}${upperFieldName}ConnectionWhere`, - }); - } - - const nodeWhereAggregationInput = createAggregationInputFields(node, sourceName, rel, schemaComposer); - const edgeWhereAggregationInput = - relFields && createAggregationInputFields(relFields, sourceName, rel, schemaComposer); - - const whereAggregateInput = schemaComposer.getOrCreateITC(relationshipWhereTypeInputName, (tc) => { - tc.addFields({ - count: "Int", - count_LT: "Int", - count_LTE: "Int", - count_GT: "Int", - count_GTE: "Int", - AND: `[${relationshipWhereTypeInputName}!]`, - OR: `[${relationshipWhereTypeInputName}!]`, - NOT: relationshipWhereTypeInputName, - }); - - if (nodeWhereAggregationInput) { - tc.addFields({ - node: nodeWhereAggregationInput, - }); - } - - if (edgeWhereAggregationInput) { - tc.addFields({ - edge: edgeWhereAggregationInput, - }); - } - }); - - const whereInput = schemaComposer.getITC(`${sourceName}Where`); - if (rel.filterableOptions.byValue) { - whereInput.addFields({ - [rel.fieldName]: { - type: `${node.name}Where`, - }, - [`${rel.fieldName}_NOT`]: { - type: `${node.name}Where`, - }, - }); - } - - if (rel.filterableOptions.byAggregate) { - whereInput.addFields({ - [`${rel.fieldName}Aggregate`]: { - type: whereAggregateInput, - directives: deprecatedDirectives, - }, - }); - } - - // n..m Relationships - if (rel.typeMeta.array && rel.filterableOptions.byValue) { - addRelationshipArrayFilters({ - whereInput, - fieldName: rel.fieldName, - sourceName, - relatedType: rel.typeMeta.name, - whereType: `${node.name}Where`, - directives: deprecatedDirectives, - }); - } - - // if (!rel.writeonly) { - const relationshipField: { type: string; description?: string; directives: Directive[]; args?: any } = { - type: rel.typeMeta.pretty, - description: rel.description, - directives: graphqlDirectivesToCompose(rel.otherDirectives), - }; - - let generateRelFieldArgs = true; - - // Subgraph schemas do not support arguments on relationship fields (singular) - if (subgraph) { - if (!rel.typeMeta.array) { - generateRelFieldArgs = false; - } - } - - if (generateRelFieldArgs) { - const nodeFieldsBaseArgs = { - where: `${rel.typeMeta.name}Where`, - options: `${rel.typeMeta.name}Options`, - }; - const nodeFieldsArgs = addDirectedArgument(nodeFieldsBaseArgs, rel); - relationshipField.args = nodeFieldsArgs; - } - - if (rel.selectableOptions.onRead) { - composeNode.addFields({ - [rel.fieldName]: relationshipField, - }); - } - - if (composeNode instanceof ObjectTypeComposer) { - const baseTypeName = `${sourceName}${node.name}${upperFieldName}`; - const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); - - const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject( - baseTypeName, - node, - relFields - ); - - const aggregationFieldsBaseArgs = { - where: `${rel.typeMeta.name}Where`, - }; - - const aggregationFieldsArgs = addDirectedArgument(aggregationFieldsBaseArgs, rel); - - if (rel.aggregate) { - composeNode.addFields({ - [`${rel.fieldName}Aggregate`]: { - type: aggregationTypeObject, - args: aggregationFieldsArgs, - directives: deprecatedDirectives, - }, - }); - } - } - // } - - if (rel.settableOptions.onCreate) { - // Interface CreateInput does not require relationship input fields - // These are specified on the concrete nodes. - if (!(composeNode instanceof InterfaceTypeComposer) && nodeFieldInput) { - nodeCreateInput.addFields({ - [rel.fieldName]: { - type: nodeFieldInput, - directives: deprecatedDirectives, - }, - }); - } - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - (nodeFieldInput || nodeFieldUpdateInput) - ) { - // createConnectOrCreateField return undefined if the node has no uniqueFields - const connectOrCreate = createConnectOrCreateField({ - relationField: rel, - node, - schemaComposer, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, - }); - - if (connectOrCreate) { - if (nodeFieldUpdateInput) { - nodeFieldUpdateInput.addFields({ - connectOrCreate, - }); - } - - if (nodeFieldInput) { - nodeFieldInput.addFields({ - connectOrCreate, - }); - } - - createTopLevelConnectOrCreateInput({ schemaComposer, sourceName, rel }); - } - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) && - (nodeFieldInput || nodeFieldUpdateInput) - ) { - const createName = `${rel.connectionPrefix}${upperFieldName}CreateFieldInput`; - const create = rel.typeMeta.array ? `[${createName}!]` : createName; - schemaComposer.getOrCreateITC(createName, (tc) => { - tc.addFields({ node: `${node.name}CreateInput!` }); - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, - }); - } - }); - - if (nodeFieldUpdateInput) { - nodeFieldUpdateInput.addFields({ - create, - }); - } - - if (nodeFieldInput) { - nodeFieldInput.addFields({ - create, - }); - } - - const nodeRelationInput = schemaComposer.getOrCreateITC(`${sourceName}RelationInput`); - nodeRelationInput.addFields({ - [rel.fieldName]: { - type: create, - directives: deprecatedDirectives, - }, - }); - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) && - (nodeFieldInput || nodeFieldUpdateInput) - ) { - const connectName = `${rel.connectionPrefix}${upperFieldName}ConnectFieldInput`; - const connect = rel.typeMeta.array ? `[${connectName}!]` : connectName; - const connectWhereName = `${node.name}ConnectWhere`; - - schemaComposer.getOrCreateITC(connectWhereName, (tc) => { - tc.addFields({ node: `${node.name}Where!` }); - }); - - schemaComposer.getOrCreateITC(connectName, (tc) => { - tc.addFields({ where: connectWhereName }); - - if (nodeHasRelationshipWithNestedOperation(node, RelationshipNestedOperationsOption.CONNECT)) { - tc.addFields({ - connect: rel.typeMeta.array ? `[${node.name}ConnectInput!]` : `${node.name}ConnectInput`, - }); - } - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, - }); - } - - tc.addFields({ overwrite }); - tc.makeFieldNonNull("overwrite"); - }); - - if (nodeFieldUpdateInput) { - nodeFieldUpdateInput.addFields({ connect }); - } - - if (nodeFieldInput) { - nodeFieldInput.addFields({ connect }); - } - - const nodeConnectInput = schemaComposer.getOrCreateITC(`${sourceName}ConnectInput`); - nodeConnectInput.addFields({ - [rel.fieldName]: { - type: connect, - directives: deprecatedDirectives, - }, - }); - } - - if (rel.settableOptions.onUpdate && nodeFieldUpdateInput) { - const connectionUpdateInputName = `${rel.connectionPrefix}${upperFieldName}UpdateConnectionInput`; - - nodeUpdateInput.addFields({ - [rel.fieldName]: { - type: rel.typeMeta.array - ? `[${nodeFieldUpdateInput.getTypeName()}!]` - : nodeFieldUpdateInput.getTypeName(), - directives: deprecatedDirectives, - }, - }); - - schemaComposer.getOrCreateITC(connectionUpdateInputName, (tc) => { - tc.addFields({ node: `${node.name}UpdateInput` }); - - if (hasNonGeneratedProperties) { - tc.addFields({ edge: `${rel.properties}UpdateInput` }); - } - }); - - if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - nodeFieldUpdateInput.addFields({ update: connectionUpdateInputName }); - } - } - - if (nestedOperations.has(RelationshipNestedOperationsOption.DELETE) && nodeFieldUpdateInput) { - const nodeFieldDeleteInputName = `${rel.connectionPrefix}${upperFieldName}DeleteFieldInput`; - - nodeFieldUpdateInput.addFields({ - delete: rel.typeMeta.array ? `[${nodeFieldDeleteInputName}!]` : nodeFieldDeleteInputName, - }); - - if (!schemaComposer.has(nodeFieldDeleteInputName)) { - schemaComposer.getOrCreateITC(nodeFieldDeleteInputName, (tc) => { - tc.addFields({ where: `${rel.connectionPrefix}${upperFieldName}ConnectionWhere` }); - - if (nodeHasRelationshipWithNestedOperation(node, RelationshipNestedOperationsOption.DELETE)) { - tc.addFields({ delete: `${node.name}DeleteInput` }); - } - }); - } - - const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceName}DeleteInput`); - nodeDeleteInput.addFields({ - [rel.fieldName]: { - type: rel.typeMeta.array ? `[${nodeFieldDeleteInputName}!]` : nodeFieldDeleteInputName, - directives: deprecatedDirectives, - }, - }); - } - - if (nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT) && nodeFieldUpdateInput) { - const nodeFieldDisconnectInputName = `${rel.connectionPrefix}${upperFieldName}DisconnectFieldInput`; - - if (!schemaComposer.has(nodeFieldDisconnectInputName)) { - schemaComposer.getOrCreateITC(nodeFieldDisconnectInputName, (tc) => { - tc.addFields({ where: `${rel.connectionPrefix}${upperFieldName}ConnectionWhere` }); - - if (nodeHasRelationshipWithNestedOperation(node, RelationshipNestedOperationsOption.DISCONNECT)) { - tc.addFields({ disconnect: `${node.name}DisconnectInput` }); - } - }); - } - - nodeFieldUpdateInput.addFields({ - disconnect: rel.typeMeta.array ? `[${nodeFieldDisconnectInputName}!]` : nodeFieldDisconnectInputName, - }); - - const nodeDisconnectInput = schemaComposer.getOrCreateITC(`${sourceName}DisconnectInput`); - nodeDisconnectInput.addFields({ - [rel.fieldName]: { - type: rel.typeMeta.array ? `[${nodeFieldDisconnectInputName}!]` : nodeFieldDisconnectInputName, - directives: deprecatedDirectives, - }, - }); - } - }); -} - -function nodeHasRelationshipWithNestedOperation( - node: Node, - nestedOperation: RelationshipNestedOperationsOption -): boolean { - return node.relationFields.some((relationField) => relationField.nestedOperations.includes(nestedOperation)); -} - -export default createRelationshipFields; - -export function createRelationshipFieldsFromConcreteEntityAdapter({ +export function createRelationshipFields({ entityAdapter, schemaComposer, // TODO: Ideally we come up with a solution where we don't have to pass the following into these kind of functions @@ -535,7 +67,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ const relationshipTarget = relationshipAdapter.target; if (relationshipTarget instanceof InterfaceEntityAdapter) { - createRelationshipInterfaceFields2({ + createRelationshipInterfaceFields({ relationship: relationshipAdapter, composeNode, schemaComposer, @@ -546,7 +78,7 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ } if (relationshipTarget instanceof UnionEntityAdapter) { - createRelationshipUnionFields2({ + createRelationshipUnionFields({ relationship: relationshipAdapter, composeNode, schemaComposer, @@ -571,13 +103,13 @@ export function createRelationshipFieldsFromConcreteEntityAdapter({ if (composeNode instanceof ObjectTypeComposer) { const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); - const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject2(relationshipAdapter); + const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject(relationshipAdapter); const aggregationFieldsBaseArgs = { where: relationshipTarget.operations.whereInputTypeName, }; - const aggregationFieldsArgs = addDirectedArgument2(aggregationFieldsBaseArgs, relationshipAdapter); + const aggregationFieldsArgs = addDirectedArgument(aggregationFieldsBaseArgs, relationshipAdapter); if (relationshipAdapter.aggregate) { composeNode.addFields({ diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts index 063b4a382b..c1045c8b71 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-interface-fields.ts @@ -18,13 +18,8 @@ */ import type { DirectiveNode } from "graphql"; -import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; -import { InterfaceTypeComposer, upperFirst } from "graphql-compose"; -import type { Node } from "../../classes"; -import { RelationshipNestedOperationsOption } from "../../constants"; +import type { ObjectTypeComposer, SchemaComposer, InterfaceTypeComposer } from "graphql-compose"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { RelationField } from "../../types"; -import { addDirectedArgument } from "../directed-argument"; import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; import { augmentConnectInputTypeWithConnectFieldInput } from "../generation/connect-input"; import { augmentCreateInputTypeWithRelationshipsInput, withFieldInputType } from "../generation/create-input"; @@ -32,212 +27,8 @@ import { augmentDeleteInputTypeWithDeleteFieldInput } from "../generation/delete import { augmentDisconnectInputTypeWithDisconnectFieldInput } from "../generation/disconnect-input"; import { withRelationInputType } from "../generation/relation-input"; import { augmentUpdateInputTypeWithUpdateFieldInput } from "../generation/update-input"; -import { graphqlDirectivesToCompose } from "../to-compose"; export function createRelationshipInterfaceFields({ - nodes, - rel, - composeNode, - schemaComposer, - sourceName, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, -}: { - nodes: Node[]; - rel: RelationField; - composeNode: ObjectTypeComposer | InterfaceTypeComposer; - schemaComposer: SchemaComposer; - sourceName: string; - hasNonGeneratedProperties: boolean; - hasNonNullNonGeneratedProperties: boolean; -}) { - const refNodes = nodes.filter((x) => rel.interface?.implementations?.includes(x.name)); - const upperFieldName = upperFirst(rel.fieldName); - const nestedOperations = new Set(rel.nestedOperations); - const nodeCreateInput = schemaComposer.getITC(`${sourceName}CreateInput`); - const nodeUpdateInput = schemaComposer.getITC(`${sourceName}UpdateInput`); - - const connectWhere = schemaComposer.getOrCreateITC(`${rel.typeMeta.name}ConnectWhere`, (tc) => { - tc.addFields({ - node: `${rel.typeMeta.name}Where!`, - }); - }); - - const connectFieldInput = schemaComposer.getOrCreateITC(`${sourceName}${upperFieldName}ConnectFieldInput`, (tc) => { - if (schemaComposer.has(`${rel.typeMeta.name}ConnectInput`)) { - tc.addFields({ connect: `${rel.typeMeta.name}ConnectInput` }); - } - - if (hasNonGeneratedProperties) { - tc.addFields({ edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}` }); - } - - tc.addFields({ where: connectWhere }); - }); - - const deleteFieldInput = schemaComposer.getOrCreateITC(`${sourceName}${upperFieldName}DeleteFieldInput`, (tc) => { - if (schemaComposer.has(`${rel.typeMeta.name}DeleteInput`)) { - tc.addFields({ delete: `${rel.typeMeta.name}DeleteInput` }); - } - - tc.addFields({ where: `${rel.connectionPrefix}${upperFieldName}ConnectionWhere` }); - }); - - const disconnectFieldInput = schemaComposer.getOrCreateITC( - `${sourceName}${upperFieldName}DisconnectFieldInput`, - (tc) => { - if (schemaComposer.has(`${rel.typeMeta.name}DisconnectInput`)) { - tc.addFields({ disconnect: `${rel.typeMeta.name}DisconnectInput` }); - } - - tc.addFields({ where: `${rel.connectionPrefix}${upperFieldName}ConnectionWhere` }); - } - ); - - const createFieldInput = schemaComposer.getOrCreateITC(`${sourceName}${upperFieldName}CreateFieldInput`, (tc) => { - tc.addFields({ - node: `${rel.typeMeta.name}CreateInput!`, - }); - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, - }); - } - }); - - const updateConnectionFieldInput = schemaComposer.getOrCreateITC( - `${sourceName}${upperFieldName}UpdateConnectionInput`, - (tc) => { - if (hasNonGeneratedProperties) { - tc.addFields({ edge: `${rel.properties}UpdateInput` }); - } - tc.addFields({ node: `${rel.typeMeta.name}UpdateInput` }); - } - ); - - if ( - nestedOperations.size !== 0 && - !(nestedOperations.size === 1 && nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE)) - ) { - const updateFieldInput = schemaComposer.getOrCreateITC(`${sourceName}${upperFieldName}UpdateFieldInput`); - - if (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { - const nodeConnectInput = schemaComposer.getOrCreateITC(`${sourceName}ConnectInput`); - nodeConnectInput.addFields({ - [rel.fieldName]: rel.typeMeta.array ? connectFieldInput.NonNull.List : connectFieldInput, - }); - updateFieldInput.addFields({ - connect: rel.typeMeta.array ? connectFieldInput.NonNull.List : connectFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { - const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceName}DeleteInput`); - nodeDeleteInput.addFields({ - [rel.fieldName]: rel.typeMeta.array ? deleteFieldInput.NonNull.List : deleteFieldInput, - }); - updateFieldInput.addFields({ - delete: rel.typeMeta.array ? deleteFieldInput.NonNull.List : deleteFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT)) { - const nodeDisconnectInput = schemaComposer.getOrCreateITC(`${sourceName}DisconnectInput`); - nodeDisconnectInput.addFields({ - [rel.fieldName]: rel.typeMeta.array ? disconnectFieldInput.NonNull.List : disconnectFieldInput, - }); - updateFieldInput.addFields({ - disconnect: rel.typeMeta.array ? disconnectFieldInput.NonNull.List : disconnectFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - const nodeRelationInput = schemaComposer.getOrCreateITC(`${sourceName}RelationInput`); - nodeRelationInput.addFields({ - [rel.fieldName]: rel.typeMeta.array ? createFieldInput.NonNull.List : createFieldInput, - }); - updateFieldInput.addFields({ - create: rel.typeMeta.array ? createFieldInput.NonNull.List : createFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - updateFieldInput.addFields({ - update: updateConnectionFieldInput, - }); - } - - updateFieldInput.addFields({ - where: `${rel.connectionPrefix}${upperFieldName}ConnectionWhere`, - }); - - if (rel.settableOptions.onUpdate) { - nodeUpdateInput.addFields({ - [rel.fieldName]: rel.typeMeta.array ? updateFieldInput.NonNull.List : updateFieldInput, - }); - } - } - - if (!rel.writeonly) { - const baseNodeFieldArgs = { - options: `${rel.typeMeta.name}Options`, - where: `${rel.typeMeta.name}Where`, - }; - const nodeFieldArgs = addDirectedArgument(baseNodeFieldArgs, rel); - - if (rel.selectableOptions.onRead) { - composeNode.addFields({ - [rel.fieldName]: { - type: rel.typeMeta.pretty, - args: nodeFieldArgs, - description: rel.description, - directives: graphqlDirectivesToCompose(rel.otherDirectives), - }, - }); - } - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) - ) { - const nodeFieldInput = schemaComposer.getOrCreateITC( - `${rel.connectionPrefix}${upperFieldName}FieldInput`, - (tc) => { - if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - tc.addFields({ - create: rel.typeMeta.array ? createFieldInput.NonNull.List : createFieldInput, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.CONNECT)) { - tc.addFields({ - connect: rel.typeMeta.array ? connectFieldInput.NonNull.List : connectFieldInput, - }); - } - } - ); - - refNodes.forEach((n) => { - const createName = `${sourceName}${upperFieldName}${n.name}CreateFieldInput`; - if (!schemaComposer.has(createName)) { - schemaComposer.getOrCreateITC(createName, (tc) => { - tc.addFields({ node: `${n.name}CreateInput!` }); - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, - }); - } - }); - } - }); - // Interface CreateInput does not require relationship input fields - // These are specified on the concrete nodes. - if (rel.settableOptions.onCreate && !(composeNode instanceof InterfaceTypeComposer)) { - nodeCreateInput.addFields({ - [rel.fieldName]: nodeFieldInput, - }); - } - } -} - -export function createRelationshipInterfaceFields2({ relationship, composeNode, schemaComposer, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts index ad2b2eac64..e98b9443bb 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-union-fields.ts @@ -18,14 +18,8 @@ */ import type { DirectiveNode } from "graphql"; -import type { InputTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; -import { InterfaceTypeComposer, upperFirst } from "graphql-compose"; -import type { Node } from "../../classes"; -import { RelationshipNestedOperationsOption } from "../../constants"; +import type { ObjectTypeComposer, SchemaComposer, InterfaceTypeComposer } from "graphql-compose"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { RelationField } from "../../types"; -import { DEPRECATE_NOT } from "../constants"; -import { addDirectedArgument } from "../directed-argument"; import { augmentObjectOrInterfaceTypeWithRelationshipField } from "../generation/augment-object-or-interface"; import { augmentConnectInputTypeWithConnectFieldInput } from "../generation/connect-input"; import { withConnectOrCreateInputType } from "../generation/connect-or-create-input"; @@ -34,408 +28,8 @@ import { augmentDeleteInputTypeWithDeleteFieldInput } from "../generation/delete import { augmentDisconnectInputTypeWithDisconnectFieldInput } from "../generation/disconnect-input"; import { withRelationInputType } from "../generation/relation-input"; import { augmentUpdateInputTypeWithUpdateFieldInput } from "../generation/update-input"; -import { graphqlDirectivesToCompose } from "../to-compose"; -import { createConnectOrCreateField } from "./create-connect-or-create-field"; export function createRelationshipUnionFields({ - nodes, - rel, - composeNode, - sourceName, - schemaComposer, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, -}: { - nodes: Node[]; - rel: RelationField; - composeNode: ObjectTypeComposer | InterfaceTypeComposer; - sourceName: string; - schemaComposer: SchemaComposer; - hasNonGeneratedProperties: boolean; - hasNonNullNonGeneratedProperties: boolean; -}) { - const nestedOperations = new Set(rel.nestedOperations); - const nodeCreateInput = schemaComposer.getITC(`${sourceName}CreateInput`); - const refNodes = nodes.filter((x) => rel.union?.nodes?.includes(x.name)); - const onlyConnectOrCreateAndNoUniqueFieldsInAllRefTypes = - nestedOperations.size === 1 && - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - !refNodes.find((n) => n.uniqueFields.length); - - if (!rel.writeonly) { - const baseNodeFieldArgs = { - options: "QueryOptions", - where: `${rel.typeMeta.name}Where`, - }; - const nodeFieldArgs = addDirectedArgument(baseNodeFieldArgs, rel); - - if (rel.selectableOptions.onRead) { - composeNode.addFields({ - [rel.fieldName]: { - type: rel.typeMeta.pretty, - args: nodeFieldArgs, - description: rel.description, - directives: graphqlDirectivesToCompose(rel.otherDirectives), - }, - }); - } - } - - const upperFieldName = upperFirst(rel.fieldName); - const upperNodeName = upperFirst(sourceName); - const typePrefix = `${upperNodeName}${upperFieldName}`; - - const unionConnectInput = nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) - ? schemaComposer.createInputTC({ - name: `${typePrefix}ConnectInput`, - fields: {}, - }) - : undefined; - const unionDeleteInput = nestedOperations.has(RelationshipNestedOperationsOption.DELETE) - ? schemaComposer.createInputTC({ - name: `${typePrefix}DeleteInput`, - fields: {}, - }) - : undefined; - const unionDisconnectInput = nestedOperations.has(RelationshipNestedOperationsOption.DISCONNECT) - ? schemaComposer.createInputTC({ - name: `${typePrefix}DisconnectInput`, - fields: {}, - }) - : undefined; - let unionCreateInput: InputTypeComposer | undefined; - - const connectOrCreateAndUniqueFieldsInRefTypes = - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - refNodes.find((n) => n.uniqueFields.length); - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - connectOrCreateAndUniqueFieldsInRefTypes - ) { - unionCreateInput = schemaComposer.createInputTC({ - name: `${typePrefix}CreateInput`, - fields: {}, - }); - } - - const unionUpdateInput = schemaComposer.createInputTC({ - name: `${typePrefix}UpdateInput`, - fields: {}, - }); - - const unionCreateFieldInput = schemaComposer.createInputTC({ - name: `${typePrefix}CreateFieldInput`, - fields: {}, - }); - - refNodes.forEach((n) => { - const unionPrefix = `${sourceName}${upperFieldName}${n.name}`; - const updateField = `${n.name}UpdateInput`; - const nodeFieldInputName = `${unionPrefix}FieldInput`; - const whereName = `${unionPrefix}ConnectionWhere`; - - const deleteName = `${unionPrefix}DeleteFieldInput`; - const deleteField = rel.typeMeta.array ? `[${deleteName}!]` : `${deleteName}`; - - const disconnectName = `${unionPrefix}DisconnectFieldInput`; - const disconnect = rel.typeMeta.array ? `[${disconnectName}!]` : `${disconnectName}`; - - const connectionUpdateInputName = `${unionPrefix}UpdateConnectionInput`; - - const connectAndCreateAndUniqueFields = - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && n.uniqueFields.length; - const onlyConnectOrCreateAndNoUniqueFields = - nestedOperations.size === 1 && - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - !n.uniqueFields.length; - - let updateFields: Record | undefined; - if (nestedOperations.size !== 0 && !onlyConnectOrCreateAndNoUniqueFields) { - updateFields = { - where: whereName, - }; - } - - let fieldInputFields: Record | undefined; - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || - connectAndCreateAndUniqueFields - ) { - // Created as {} because the connect/create fields are added later - fieldInputFields = {}; - } - - const createName = `${sourceName}${upperFirst(rel.fieldName)}${n.name}CreateFieldInput`; - if (!schemaComposer.has(createName)) { - schemaComposer.getOrCreateITC(createName, (tc) => { - tc.addFields({ node: `${n.name}CreateInput!` }); - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, - }); - } - }); - - if ( - unionCreateInput && - (nestedOperations.has(RelationshipNestedOperationsOption.CREATE) || - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT) || - connectAndCreateAndUniqueFields) - ) { - unionCreateInput.addFields({ - [n.name]: nodeFieldInputName, - }); - } - - unionCreateFieldInput.addFields({ - [n.name]: rel.typeMeta.array ? `[${createName}!]` : createName, - }); - } - if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE) && (updateFields || fieldInputFields)) { - const create = rel.typeMeta.array ? `[${createName}!]` : createName; - if (updateFields) { - updateFields.create = create; - } - if (fieldInputFields) { - fieldInputFields.create = create; - } - } - - if (unionConnectInput && (updateFields || fieldInputFields)) { - const connectWhereName = `${n.name}ConnectWhere`; - if (!schemaComposer.has(connectWhereName)) { - schemaComposer.createInputTC({ - name: connectWhereName, - fields: { - node: `${n.name}Where!`, - }, - }); - } - - const connectName = `${unionPrefix}ConnectFieldInput`; - const connect = rel.typeMeta.array ? `[${connectName}!]` : `${connectName}`; - if (!schemaComposer.has(connectName)) { - schemaComposer.getOrCreateITC(connectName, (tc) => { - tc.addFields({ where: connectWhereName }); - - if (n.relationFields.length) { - tc.addFields({ - connect: rel.typeMeta.array ? `[${n.name}ConnectInput!]` : `${n.name}ConnectInput`, - }); - } - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, - }); - } - }); - - unionConnectInput.addFields({ - [n.name]: connect, - }); - - if (updateFields) { - updateFields.connect = connect; - } - if (fieldInputFields) { - fieldInputFields.connect = connect; - } - } - } - - if ( - nestedOperations.has(RelationshipNestedOperationsOption.CONNECT_OR_CREATE) && - (updateFields || fieldInputFields) - ) { - const connectOrCreate = createConnectOrCreateField({ - relationField: rel, - node: n, - schemaComposer, - hasNonGeneratedProperties, - hasNonNullNonGeneratedProperties, - }); - - if (connectOrCreate) { - if (updateFields) { - updateFields.connectOrCreate = connectOrCreate; - } - if (fieldInputFields) { - fieldInputFields.connectOrCreate = connectOrCreate; - } - } - } - - if (unionDeleteInput && updateFields) { - if (!schemaComposer.has(deleteName)) { - schemaComposer.getOrCreateITC(deleteName, (tc) => { - tc.addFields({ where: whereName }); - - if (n.relationFields.length) { - tc.addFields({ - delete: `${n.name}DeleteInput`, - }); - } - }); - - unionDeleteInput.addFields({ - [n.name]: deleteField, - }); - } - - updateFields.delete = rel.typeMeta.array ? `[${deleteName}!]` : deleteName; - } - - if (unionDisconnectInput && updateFields) { - if (!schemaComposer.has(disconnectName)) { - schemaComposer.getOrCreateITC(disconnectName, (tc) => { - tc.addFields({ where: whereName }); - - if (n.relationFields.length) { - tc.addFields({ - disconnect: `${n.name}DisconnectInput`, - }); - } - }); - - unionDisconnectInput.addFields({ - [n.name]: disconnect, - }); - - updateFields.disconnect = rel.typeMeta.array ? `[${disconnectName}!]` : disconnectName; - } - } - - if (updateFields) { - const updateName = `${unionPrefix}UpdateFieldInput`; - const update = rel.typeMeta.array ? `[${updateName}!]` : updateName; - if (nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { - updateFields.update = connectionUpdateInputName; - } - if (!schemaComposer.has(updateName)) { - schemaComposer.createInputTC({ - name: updateName, - fields: updateFields, - }); - - unionUpdateInput.addFields({ - [n.name]: update, - }); - } - - schemaComposer.getOrCreateITC(connectionUpdateInputName, (tc) => { - tc.addFields({ node: updateField }); - - if (hasNonGeneratedProperties) { - tc.addFields({ - edge: `${rel.properties}UpdateInput`, - }); - } - }); - } - - if (fieldInputFields) { - schemaComposer.createInputTC({ - name: nodeFieldInputName, - fields: fieldInputFields, - }); - } - - schemaComposer.getOrCreateITC(whereName, (tc) => { - tc.addFields({ - node: `${n.name}Where`, - node_NOT: { - type: `${n.name}Where`, - directives: [DEPRECATE_NOT], - }, - AND: `[${whereName}!]`, - OR: `[${whereName}!]`, - NOT: whereName, - }); - - if (rel.properties) { - tc.addFields({ - edge: `${rel.properties}Where`, - edge_NOT: { - type: `${rel.properties}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - }); - - if (connectAndCreateAndUniqueFields) { - // TODO: merge with createTopLevelConnectOrCreateInput - const nodeConnectOrCreateInput: InputTypeComposer = schemaComposer.getOrCreateITC( - `${sourceName}ConnectOrCreateInput` - ); - - const nodeRelationConnectOrCreateInput: InputTypeComposer = schemaComposer.getOrCreateITC( - `${sourceName}${upperFirst(rel.fieldName)}ConnectOrCreateInput` - ); - - nodeConnectOrCreateInput.addFields({ - [rel.fieldName]: nodeRelationConnectOrCreateInput, - }); - - const nodeFieldConnectOrCreateInputName = `${sourceName}${upperFirst(rel.fieldName)}${ - n.name - }ConnectOrCreateFieldInput`; - - nodeRelationConnectOrCreateInput.addFields({ - [n.name]: rel.typeMeta.array - ? `[${nodeFieldConnectOrCreateInputName}!]` - : nodeFieldConnectOrCreateInputName, - }); - } - }); - - if (nestedOperations.has(RelationshipNestedOperationsOption.CREATE)) { - const nodeRelationInput = schemaComposer.getOrCreateITC(`${sourceName}RelationInput`); - nodeRelationInput.addFields({ - [rel.fieldName]: unionCreateFieldInput, - }); - } - if (rel.settableOptions.onCreate && !(composeNode instanceof InterfaceTypeComposer) && unionCreateInput) { - nodeCreateInput.addFields({ - [rel.fieldName]: unionCreateInput, - }); - } - if ( - rel.settableOptions.onUpdate && - nestedOperations.size !== 0 && - !onlyConnectOrCreateAndNoUniqueFieldsInAllRefTypes - ) { - const nodeUpdateInput = schemaComposer.getITC(`${sourceName}UpdateInput`); - nodeUpdateInput.addFields({ - [rel.fieldName]: unionUpdateInput, - }); - } - if (unionConnectInput) { - const nodeConnectInput = schemaComposer.getOrCreateITC(`${sourceName}ConnectInput`); - nodeConnectInput.addFields({ - [rel.fieldName]: unionConnectInput, - }); - } - if (unionDeleteInput) { - const nodeDeleteInput = schemaComposer.getOrCreateITC(`${sourceName}DeleteInput`); - nodeDeleteInput.addFields({ - [rel.fieldName]: unionDeleteInput, - }); - } - if (unionDisconnectInput) { - const nodeDisconnectInput = schemaComposer.getOrCreateITC(`${sourceName}DisconnectInput`); - nodeDisconnectInput.addFields({ - [rel.fieldName]: unionDisconnectInput, - }); - } -} - -export function createRelationshipUnionFields2({ relationship, composeNode, schemaComposer, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts b/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts index b68ec16847..7b8c2a183d 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-top-level-connect-or-create-input.ts @@ -18,35 +18,9 @@ */ import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; -import { upperFirst } from "graphql-compose"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { RelationField } from "../../types"; export function createTopLevelConnectOrCreateInput({ - schemaComposer, - sourceName, - rel, -}: { - schemaComposer: SchemaComposer; - sourceName: string; - rel: RelationField; -}): void { - const nodeConnectOrCreateInput: InputTypeComposer = schemaComposer.getOrCreateITC( - `${sourceName}ConnectOrCreateInput` - ); - - const nodeFieldConnectOrCreateInputName = `${rel.connectionPrefix}${upperFirst( - rel.fieldName - )}ConnectOrCreateFieldInput`; - - nodeConnectOrCreateInput.addFields({ - [rel.fieldName]: rel.typeMeta.array - ? `[${nodeFieldConnectOrCreateInputName}!]` - : nodeFieldConnectOrCreateInputName, - }); -} - -export function createTopLevelConnectOrCreateInput2({ schemaComposer, sourceName, relationshipAdapter, diff --git a/packages/graphql/src/schema/directed-argument.test.ts b/packages/graphql/src/schema/directed-argument.test.ts index e0afadbe53..a2d9fa0d5a 100644 --- a/packages/graphql/src/schema/directed-argument.test.ts +++ b/packages/graphql/src/schema/directed-argument.test.ts @@ -18,53 +18,55 @@ */ import { RelationshipQueryDirectionOption } from "../constants"; -import { RelationFieldBuilder } from "../../tests/utils/builders/relation-field-builder"; +import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import { addDirectedArgument, getDirectedArgument } from "./directed-argument"; describe("Directed argument", () => { describe("getDirectedArgument", () => { test("should return default true argument for DEFAULT_DIRECTED", () => { - const relationField = new RelationFieldBuilder({ - queryDirection: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, - }).instance(); - expect(getDirectedArgument(relationField)).toEqual({ + expect( + getDirectedArgument({ + queryDirection: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, + } as RelationshipAdapter) + ).toEqual({ type: "Boolean", defaultValue: true, }); }); test("should return default false argument for DEFAULT_UNDIRECTED", () => { - const relationField = new RelationFieldBuilder({ - queryDirection: RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED, - }).instance(); - expect(getDirectedArgument(relationField)).toEqual({ + expect( + getDirectedArgument({ + queryDirection: RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED, + } as RelationshipAdapter) + ).toEqual({ type: "Boolean", defaultValue: false, }); }); test("should return an undefined argument for DIRECTED_ONLY", () => { - const relationField = new RelationFieldBuilder({ - queryDirection: RelationshipQueryDirectionOption.DIRECTED_ONLY, - }).instance(); - expect(getDirectedArgument(relationField)).toBeUndefined(); + expect( + getDirectedArgument({ + queryDirection: RelationshipQueryDirectionOption.DIRECTED_ONLY, + } as RelationshipAdapter) + ).toBeUndefined(); }); test("should return an undefined argument for UNDIRECTED_ONLY", () => { - const relationField = new RelationFieldBuilder({ - queryDirection: RelationshipQueryDirectionOption.UNDIRECTED_ONLY, - }).instance(); - expect(getDirectedArgument(relationField)).toBeUndefined(); + expect( + getDirectedArgument({ + queryDirection: RelationshipQueryDirectionOption.UNDIRECTED_ONLY, + } as RelationshipAdapter) + ).toBeUndefined(); }); }); describe("addDirectedArgument", () => { test("should add directed argument if DEFAULT_DIRECTED", () => { - const relationField = new RelationFieldBuilder({ + const args = addDirectedArgument({ arg1: "dsa" }, { queryDirection: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, - }).instance(); - - const args = addDirectedArgument({ arg1: "dsa" }, relationField); + } as RelationshipAdapter); expect(args).toEqual({ arg1: "dsa", directed: { @@ -74,11 +76,9 @@ describe("Directed argument", () => { }); }); test("should not add any argument if DIRECTED_ONLY", () => { - const relationField = new RelationFieldBuilder({ + const args = addDirectedArgument({ arg1: "dsa" }, { queryDirection: RelationshipQueryDirectionOption.DIRECTED_ONLY, - }).instance(); - - const args = addDirectedArgument({ arg1: "dsa" }, relationField); + } 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 index 79157c7d57..b8dc120eff 100644 --- a/packages/graphql/src/schema/directed-argument.ts +++ b/packages/graphql/src/schema/directed-argument.ts @@ -19,46 +19,13 @@ import { RelationshipQueryDirectionOption } from "../constants"; import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { RelationField } from "../types"; export type DirectedArgument = { type: "Boolean"; defaultValue: boolean; }; -export function getDirectedArgument(relationField: RelationField): DirectedArgument | undefined { - let defaultValue: boolean; - switch (relationField.queryDirection) { - case RelationshipQueryDirectionOption.DEFAULT_DIRECTED: - defaultValue = true; - break; - case RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED: - defaultValue = false; - break; - case RelationshipQueryDirectionOption.DIRECTED_ONLY: - case RelationshipQueryDirectionOption.UNDIRECTED_ONLY: - default: - return undefined; - } - - return { - type: "Boolean", - defaultValue, - }; -} - -export function addDirectedArgument>( - args: T, - relationField: RelationField -): T & { directed?: DirectedArgument } { - const directedArg = getDirectedArgument(relationField); - if (directedArg) { - return { ...args, directed: directedArg }; - } - return { ...args }; -} - -export function getDirectedArgument2(relationshipAdapter: RelationshipAdapter): DirectedArgument | undefined { +export function getDirectedArgument(relationshipAdapter: RelationshipAdapter): DirectedArgument | undefined { let defaultValue: boolean; switch (relationshipAdapter.queryDirection) { case RelationshipQueryDirectionOption.DEFAULT_DIRECTED: @@ -79,11 +46,11 @@ export function getDirectedArgument2(relationshipAdapter: RelationshipAdapter): }; } -export function addDirectedArgument2>( +export function addDirectedArgument>( args: T, relationshipAdapter: RelationshipAdapter ): T & { directed?: DirectedArgument } { - const directedArg = getDirectedArgument2(relationshipAdapter); + const directedArg = getDirectedArgument(relationshipAdapter); if (directedArg) { return { ...args, directed: directedArg }; } 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 9821bdec09..6135e168ed 100644 --- a/packages/graphql/src/schema/generation/augment-object-or-interface.ts +++ b/packages/graphql/src/schema/generation/augment-object-or-interface.ts @@ -4,7 +4,7 @@ import type { Subgraph } from "../../classes/Subgraph"; import { QueryOptions } from "../../graphql/input-objects/QueryOptions"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { getDirectedArgument2 } from "../directed-argument"; +import { getDirectedArgument } from "../directed-argument"; import { graphqlDirectivesToCompose } from "../to-compose"; export function augmentObjectOrInterfaceTypeWithRelationshipField( @@ -39,7 +39,7 @@ export function augmentObjectOrInterfaceTypeWithRelationshipField( where: whereTypeName, options: optionsTypeName, }; - const directedArg = getDirectedArgument2(relationshipAdapter); + const directedArg = getDirectedArgument(relationshipAdapter); if (directedArg) { nodeFieldsArgs["directed"] = directedArg; } diff --git a/packages/graphql/src/schema/generation/connect-or-create-input.ts b/packages/graphql/src/schema/generation/connect-or-create-input.ts index 9c4a352efa..d345435e65 100644 --- a/packages/graphql/src/schema/generation/connect-or-create-input.ts +++ b/packages/graphql/src/schema/generation/connect-or-create-input.ts @@ -10,7 +10,7 @@ import { RelationshipNestedOperationsOption } from "../../constants"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { createOnCreateITC2 } from "../create-relationship-fields/create-connect-or-create-field"; +import { createOnCreateITC } from "../create-relationship-fields/create-connect-or-create-field"; // TODO: refactor this export function withConnectOrCreateFieldInputType({ @@ -52,7 +52,7 @@ export function withConnectOrCreateFieldInputType({ return; } - createOnCreateITC2({ + createOnCreateITC({ schemaComposer: composer, relationshipAdapter, targetEntityAdapter: targetEntity, diff --git a/packages/graphql/src/schema/index.ts b/packages/graphql/src/schema/index.ts index 573ee1aa8b..28fa6b5557 100644 --- a/packages/graphql/src/schema/index.ts +++ b/packages/graphql/src/schema/index.ts @@ -18,4 +18,4 @@ */ // export { default as makeAugmentedSchema } from "./make-augmented-schema"; -export { default as makeAugmentedSchema } from "./new-make-augmented-schema"; +export { default as makeAugmentedSchema } from "./make-augmented-schema"; diff --git a/packages/graphql/src/schema/make-augmented-schema.test.ts b/packages/graphql/src/schema/make-augmented-schema.test.ts index 920946d46d..a0c53fc3c0 100644 --- a/packages/graphql/src/schema/make-augmented-schema.test.ts +++ b/packages/graphql/src/schema/make-augmented-schema.test.ts @@ -17,6 +17,7 @@ * limitations under the License. */ +import { mergeTypeDefs } from "@graphql-tools/merge"; import camelCase from "camelcase"; import { Kind, @@ -28,11 +29,9 @@ import { } from "graphql"; import { pluralize } from "graphql-compose"; import { gql } from "graphql-tag"; -// import makeAugmentedSchema from "./make-augmented-schema"; -import { mergeTypeDefs } from "@graphql-tools/merge"; import { Node } from "../classes"; import { generateModel } from "../schema-model/generate-model"; -import makeAugmentedSchema from "./new-make-augmented-schema"; +import makeAugmentedSchema from "./make-augmented-schema"; describe("makeAugmentedSchema", () => { test("should be a function", () => { diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 0b845e057d..cd34912917 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -20,48 +20,47 @@ import type { IResolvers } from "@graphql-tools/utils"; import type { DefinitionNode, + DirectiveNode, DocumentNode, + FieldDefinitionNode, + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLInterfaceType, + GraphQLObjectType, GraphQLScalarType, + InterfaceTypeDefinitionNode, NameNode, ObjectTypeDefinitionNode, SchemaExtensionNode, } from "graphql"; -import { GraphQLID, GraphQLNonNull, Kind, parse, print } from "graphql"; -import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, ObjectTypeComposer } from "graphql-compose"; +import { GraphQLBoolean, GraphQLFloat, GraphQLID, GraphQLInt, GraphQLString, Kind, parse, print } from "graphql"; +import type { ObjectTypeComposer } from "graphql-compose"; import { SchemaComposer } from "graphql-compose"; -import pluralize from "pluralize"; import type { Node } from "../classes"; import type Relationship from "../classes/Relationship"; import * as Scalars from "../graphql/scalars"; -import { upperFirst } from "../utils/upper-first"; +import { isRootType } from "../utils/is-root-type"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; import { augmentFulltextSchema } from "./augment/fulltext"; -import createConnectionFields from "./create-connection-fields-old"; import { ensureNonEmptyInput } from "./ensure-non-empty-input"; import getCustomResolvers from "./get-custom-resolvers"; +import type { DefinitionNodes } from "./get-definition-nodes"; import { getDefinitionNodes } from "./get-definition-nodes"; import type { ObjectFields } from "./get-obj-field-meta"; import getObjFieldMeta from "./get-obj-field-meta"; -import getSortableFields from "./get-sortable-fields"; -import getUniqueFields from "./get-unique-fields"; -import getWhereFields from "./get-where-fields"; import { cypherResolver } from "./resolvers/field/cypher"; -import { numericalResolver } from "./resolvers/field/numerical"; import { createResolver } from "./resolvers/mutation/create"; import { deleteResolver } from "./resolvers/mutation/delete"; import { updateResolver } from "./resolvers/mutation/update"; import { aggregateResolver } from "./resolvers/query/aggregate"; import { findResolver } from "./resolvers/query/read"; import { rootConnectionResolver } from "./resolvers/query/root-connection"; -import { - graphqlDirectivesToCompose, - objectFieldsToComposeFields, - objectFieldsToCreateInputFields, - objectFieldsToUpdateInputFields, -} from "./to-compose"; +import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "./to-compose"; // GraphQL type imports +import type { GraphQLToolsResolveMethods } from "graphql-compose/lib/SchemaComposer"; import type { Subgraph } from "../classes/Subgraph"; +import { FIELD_DIRECTIVES, INTERFACE_DIRECTIVES, OBJECT_DIRECTIVES, PROPAGATED_DIRECTIVES } from "../constants"; import { SortDirection } from "../graphql/enums/SortDirection"; import { CartesianPointDistance } from "../graphql/input-objects/CartesianPointDistance"; import { CartesianPointInput } from "../graphql/input-objects/CartesianPointInput"; @@ -76,21 +75,386 @@ import { PageInfo } from "../graphql/objects/PageInfo"; import { Point } from "../graphql/objects/Point"; import { UpdateInfo } from "../graphql/objects/UpdateInfo"; import type { Neo4jGraphQLSchemaModel } from "../schema-model/Neo4jGraphQLSchemaModel"; -import type { BaseField, Neo4jFeaturesSettings } from "../types"; -import { addArrayMethodsToITC } from "./array-methods"; +import type { Operation } from "../schema-model/Operation"; +import { OperationAdapter } from "../schema-model/OperationAdapter"; +import { ConcreteEntity } from "../schema-model/entity/ConcreteEntity"; +import { InterfaceEntity } from "../schema-model/entity/InterfaceEntity"; +import { UnionEntity } from "../schema-model/entity/UnionEntity"; +import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { CypherField, Neo4jFeaturesSettings } from "../types"; +import { isInArray } from "../utils/is-in-array"; +import { createConnectionFields } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; -import createRelationshipFields from "./create-relationship-fields/create-relationship-fields"; +import { createRelationshipFields } from "./create-relationship-fields/create-relationship-fields"; +import { deprecationMap } from "./deprecation-map"; +import { withAggregateSelectionType } from "./generation/aggregate-types"; +import { withCreateInputType } from "./generation/create-input"; +import { withInterfaceType } from "./generation/interface-type"; +import { withObjectType } from "./generation/object-type"; +import { withMutationResponseTypes } from "./generation/response-types"; +import { withOptionsInputType, withSortInputType } from "./generation/sort-and-options-input"; +import { withUpdateInputType } from "./generation/update-input"; +import { withUniqueWhereInputType, withWhereInputType } from "./generation/where-input"; import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; -import { addMathOperatorsToITC } from "./math"; -import { getSchemaConfigurationFlags, schemaConfigurationFromSchemaExtensions } from "./schema-configuration"; import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; } +class AugmentedSchemaGenerator { + private composer: SchemaComposer; + + constructor( + private schemaModel: Neo4jGraphQLSchemaModel, + private definitionNodes: DefinitionNodes, + private rootTypesCustomResolvers: ObjectTypeDefinitionNode[] + ) { + this.composer = new SchemaComposer(); + } + + generate() { + let pointInTypeDefs = false; + let cartesianPointInTypeDefs = false; + let floatWhereInTypeDefs = false; + + for (const entity of this.schemaModel.entities.values()) { + const model = + entity instanceof ConcreteEntity + ? new ConcreteEntityAdapter(entity) + : entity instanceof InterfaceEntity + ? new InterfaceEntityAdapter(entity) + : new UnionEntityAdapter(entity as UnionEntity); // fixme + + // TODO: check if these can be created ad-hoc + if (model instanceof ConcreteEntityAdapter || model instanceof InterfaceEntityAdapter) { + for (const attribute of model.attributes.values()) { + if (attribute.isPoint()) { + pointInTypeDefs = true; + } + if (attribute.isCartesianPoint()) { + cartesianPointInTypeDefs = true; + } + } + if ("annotations" in model && model.annotations.fulltext) { + floatWhereInTypeDefs = true; + } + if (model instanceof ConcreteEntityAdapter) { + for (const relationship of model.relationships.values()) { + for (const attribute of relationship.attributes.values()) { + if (attribute.isPoint()) { + pointInTypeDefs = true; + } + if (attribute.isCartesianPoint()) { + cartesianPointInTypeDefs = true; + } + } + } + } + } + } + + // this.pipeDefs(); + this.addToComposer(this.getStaticTypes()); + this.addToComposer(this.getSpatialTypes(pointInTypeDefs, cartesianPointInTypeDefs)); + this.addToComposer(this.getTemporalTypes(floatWhereInTypeDefs)); + + // this.add(this.getEntityTypes()); + // const relationshipPropertiesTypes = this.getRelationshipProperties( + // this._definitionCollection.relationshipProperties + // ); + // this.add(relationshipPropertiesTypes); + + return this.composer; + } + + private pipeDefs() { + const pipedDefs = [ + ...this.definitionNodes.enumTypes, + ...this.definitionNodes.scalarTypes, + ...this.definitionNodes.inputObjectTypes, + ...this.definitionNodes.unionTypes, + ...this.definitionNodes.directives, + ...this.rootTypesCustomResolvers, + ].filter(Boolean); + if (pipedDefs.length) { + this.composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); + } + } + + private getStaticTypes() { + return { + objects: [CreateInfo, DeleteInfo, UpdateInfo, PageInfo], + inputs: [QueryOptions], + enums: [SortDirection], + scalars: Object.values(Scalars), + }; + } + + private getSpatialTypes( + pointInTypeDefs: boolean, + cartesianPointInTypeDefs: boolean + ): { + objects: GraphQLObjectType[]; + inputs: GraphQLInputObjectType[]; + } { + const objects: GraphQLObjectType[] = []; + const inputs: GraphQLInputObjectType[] = []; + if (pointInTypeDefs) { + objects.push(Point); + inputs.push(PointInput, PointDistance); + } + if (cartesianPointInTypeDefs) { + objects.push(CartesianPoint); + inputs.push(CartesianPointInput, CartesianPointDistance); + } + return { + objects, + inputs, + }; + } + + private getTemporalTypes(floatWhereInTypeDefs: boolean): { + inputs: GraphQLInputObjectType[]; + } { + const inputs: GraphQLInputObjectType[] = []; + if (floatWhereInTypeDefs) { + inputs.push(FloatWhere); + } + return { + inputs, + }; + } + + /* + private addGlobalNodeFields(concreteEntities: ConcreteEntity[], nodes: Node[]) { + const globalEntities = concreteEntities.filter((entity) => { + const model = new ConcreteEntityAdapter(entity); + return model.isGlobalNode(); + }); + const globalNodes = nodes.filter((n) => globalEntities.find((e) => e.name === n.name)); + + const fetchById = (id: string, context: Context, info: GraphQLResolveInfo) => { + const resolver = globalNodeResolver({ nodes: globalNodes }); + return resolver.resolve(null, { id }, context, info); + }; + + const resolveType = (obj: { [key: string]: unknown; __resolveType: string }) => obj.__resolveType; + + const { nodeInterface, nodeField } = nodeDefinitions(fetchById, resolveType); + + this._composer.createInterfaceTC(nodeInterface); + this._composer.Query.addFields({ + node: nodeField as ObjectTypeComposerFieldConfigAsObjectDefinition, + }); + } + + // TODO: alternatively, get these from Entity.Relationship + private getRelationshipProperties(relationshipPropertiesInterface: CompositeEntity) { + new ToComposer(relationshipPropertiesInterface) + .withInterfaceType() + .withSortInputType() + .withWhereInputType({ enabledFeatures }) + .withUpdateInputType({ addMathOperators: true, addArrayMethods: true }) + .withCreateInputType() + .build(this._composer); + } + + private getEntityTypes() { + // TODO: consider Factory + this.schemaModel.concreteEntities.forEach((concreteEntity) => { + new ToComposer(concreteEntity) + .withObjectType() + .withSortInputType() + .withWhereInputType({ enabledFeatures }) + .withUpdateInputType({ addMathOperators: true, addArrayMethods: true }) + .withCreateInputType() + .build(this._composer); + }); + } + +*/ + private addToComposer({ + objects = [], + inputs = [], + enums = [], + scalars = [], + interfaces = [], + }: { + objects?: GraphQLObjectType[]; + inputs?: GraphQLInputObjectType[]; + enums?: GraphQLEnumType[]; + scalars?: GraphQLScalarType[]; + interfaces?: GraphQLInterfaceType[]; + }) { + objects.forEach((x) => this.composer.createObjectTC(x)); + inputs.forEach((x) => this.composer.createInputTC(x)); + enums.forEach((x) => this.composer.createEnumTC(x)); + interfaces.forEach((x) => this.composer.createInterfaceTC(x)); + scalars.forEach((scalar) => this.composer.addTypeDefs(`scalar ${scalar.name}`)); + } +} + +// abstract ComposerBuilder +// ConcreteEntityBuilder extends ComposerBuilder +// CompositeEntityBuilder extends ComposerBuilder + +/* +class ToComposer { + _entity: ConcreteEntity | CompositeEntity; + _entityModel: ConcreteEntityAdapter | CompositeEntityAdapter; + _ts: TypeStorage; + + constructor(fromEntity: ConcreteEntity | CompositeEntity) { + this._entity = fromEntity; + this._entityModel = + this._entity instanceof ConcreteEntity + ? new ConcreteEntityAdapter(this._entity) + : new CompositeEntityAdapter(this._entity); + this._ts = new TypeStorage(); + } + + public withInterfaceType() { + // this._tempComposer.add(InterfaceTypeComposer.createTemp(this._currentType)); + this._ts.set( + this._entity.name, + InterfaceTypeComposer.createTemp({ + name: this._entity.name, + fields: ToComposer._attributesToComposeFields(Array.from(this._entityModel.attributes.values())), + }) + ); + return this; + } + + public withObjectType() { + this._ts.set( + this._entity.name, + ObjectTypeComposer.createTemp({ + name: this._entity.name, + fields: ToComposer._attributesToComposeFields(Array.from(this._entityModel.attributes.values())), + // TODO: add description field + // description: this._entity.description, + // TODO: discuss with Simone - create an AnnotationAdapter or logic straight in AttributeAdapter + // directives: graphqlDirectivesToCompose([...node.otherDirectives, ...node.propagatedDirectives]), + // TODO: discuss with Simone - add interfaces to ConcreteEntity + // interfaces: this._entity.interfaces.map((x) => x.name.value) + }) + ); + return this; + } + + public withSortInputType() { + const sortTypeName = `${this._entity.name}Sort`; + const currentType = this._ts.get(this._entity.name); + this._ts.set( + sortTypeName, + InputTypeComposer.createTemp({ + name: sortTypeName, + fields: currentType.getFieldNames().reduce((res, f) => { + return { ...res, [f]: "SortDirection" }; + }, {}), + }) + ); + return this; + } + + public withWhereInputType({ enabledFeatures }) { + const whereTypeName = `${this._entity.name}Where`; + this._ts.set( + whereTypeName, + InputTypeComposer.createTemp({ + name: whereTypeName, + fields: ToComposer._attributesToComposeFields(this._entityModel.getCreateInputTypeFields()), + // TODO: refactor getWhereFields + // getWhereFields({ typeName: relationship.name.value, fields: adapter.getWhereInputTypeFields(), enabledFeatures: features.filters }) + }) + ); + return this; + } + + public withUpdateInputType({ addMathOperators = true, addArrayMethods = true }) { + const updateTypeName = `${this._entity.name}UpdateInput`; + const updateInput = InputTypeComposer.createTemp({ + name: updateTypeName, + fields: ToComposer._attributesToComposeFields(this._entityModel.getUpdateInputTypeFields()), + }); + addMathOperators && addMathOperatorsToITC(updateInput); + addArrayMethods && addArrayMethodsToITC(updateInput, relFields.primitiveFields); + addArrayMethods && addArrayMethodsToITC(updateInput, relFields.pointFields); + this._ts.set(updateTypeName, updateInput); + + return this; + + // TODO: add these + // addMathOperatorsToITC(relationshipUpdateITC); + // addArrayMethodsToITC(relationshipUpdateITC, relFields.primitiveFields); + // addArrayMethodsToITC(relationshipUpdateITC, relFields.pointFields); + } + + public withCreateInputType() { + const createTypeName = `${this._entity.name}CreateInput`; + this._ts.set( + createTypeName, + InputTypeComposer.createTemp({ + name: createTypeName, + fields: ToComposer._attributesToComposeFields(this._entityModel.getCreateInputTypeFields()), + }) + ); + + return this; + } + + public build(_composer: SchemaComposer) { + // _composer.createInterfaceTC(x); + + this._ts.forEach((v) => { + _composer.add(v); + }); + + // _composer.merge(t); + } +} +*/ + +function getUserDefinedFieldDirectivesForDefinition( + definitionNode: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, + definitionNodes: DefinitionNodes +): Map { + const userDefinedFieldDirectives = new Map(); + + const allFields: Array = [...(definitionNode.fields || [])]; + // TODO: is it a good idea to inherit the field directives from implemented interfaces? + // makes sense for deprecated but for other user-defined directives?? + if (definitionNode.interfaces) { + for (const inheritsFrom of definitionNode.interfaces) { + const interfaceDefinition = definitionNodes.interfaceTypes.find( + (type) => type.name.value === inheritsFrom.name.value + ); + const inheritedFields = interfaceDefinition?.fields; + if (inheritedFields) { + allFields.push(...inheritedFields); + } + } + } + for (const field of allFields) { + if (!field.directives) { + return userDefinedFieldDirectives; + } + + const matched = field.directives.filter((directive) => !isInArray(FIELD_DIRECTIVES, directive.name.value)); + if (matched.length) { + userDefinedFieldDirectives.set(field.name.value, matched); + } + } + + return userDefinedFieldDirectives; +} + function makeAugmentedSchema( document: DocumentNode, { @@ -104,7 +468,6 @@ function makeAugmentedSchema( userCustomResolvers?: IResolvers | Array; subgraph?: Subgraph; } = {}, - // eslint-disable-next-line @typescript-eslint/no-unused-vars schemaModel: Neo4jGraphQLSchemaModel ): { nodes: Node[]; @@ -117,72 +480,67 @@ function makeAugmentedSchema( let relationships: Relationship[] = []; - const createInfo = composer.createObjectTC(CreateInfo); - const deleteInfo = composer.createObjectTC(DeleteInfo); - const updateInfo = composer.createObjectTC(UpdateInfo); - [createInfo, deleteInfo, updateInfo].forEach((info) => { - info.deprecateFields({ - bookmark: "This field has been deprecated because bookmarks are now handled by the driver.", - }); - }); - const pageInfo = composer.createObjectTC(PageInfo); - - if (subgraph) { - const shareable = subgraph.getFullyQualifiedDirectiveName("shareable"); - - createInfo.setDirectiveByName(shareable); - deleteInfo.setDirectiveByName(shareable); - updateInfo.setDirectiveByName(shareable); - pageInfo.setDirectiveByName(shareable); - } - - composer.createInputTC(QueryOptions); - const sortDirection = composer.createEnumTC(SortDirection); - - const aggregationTypesMapper = new AggregationTypesMapper(composer, subgraph); - - const customResolvers = getCustomResolvers(document); - const definitionNodes = getDefinitionNodes(document); - + const customResolvers = getCustomResolvers(document); const { interfaceTypes, scalarTypes, objectTypes, enumTypes, - inputObjectTypes, - directives, + // inputObjectTypes, + // directives, unionTypes, schemaExtensions, } = definitionNodes; - const globalSchemaConfiguration = schemaConfigurationFromSchemaExtensions(schemaExtensions); - - const extraDefinitions = [ - ...enumTypes, - ...scalarTypes, - ...inputObjectTypes, - ...unionTypes, - ...directives, - ...[customResolvers.customQuery, customResolvers.customMutation, customResolvers.customSubscription], - ].filter(Boolean) as DefinitionNode[]; + // TODO: use schemaModel.definitionCollection instead of definitionNodes? need to add inputObjectTypes and customResolvers + const schemaGenerator = new AugmentedSchemaGenerator( + schemaModel, + definitionNodes, + [customResolvers.customQuery, customResolvers.customMutation, customResolvers.customSubscription].filter( + (x): x is ObjectTypeDefinitionNode => Boolean(x) + ) + ); + const generatorComposer = schemaGenerator.generate(); + composer.merge(generatorComposer); + + // TODO: move these to SchemaGenerator once nodes are moved (in the meantime references to object types are causing errors because they are not present in the generated schema) + const pipedDefs = [ + ...definitionNodes.enumTypes, + ...definitionNodes.scalarTypes, + ...definitionNodes.inputObjectTypes, + ...definitionNodes.unionTypes, + ...definitionNodes.directives, + ...[customResolvers.customQuery, customResolvers.customMutation, customResolvers.customSubscription].filter( + (x): x is ObjectTypeDefinitionNode => Boolean(x) + ), + ].filter(Boolean); + if (pipedDefs.length) { + composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); + } - Object.values(Scalars).forEach((scalar: GraphQLScalarType) => composer.addTypeDefs(`scalar ${scalar.name}`)); + // Loop over all entries in the deprecation map and add field deprecations to all types in the map. + for (const [typeName, deprecatedFields] of deprecationMap) { + const typeComposer = composer.getOTC(typeName); + typeComposer.deprecateFields( + deprecatedFields.reduce((acc, { field, reason }) => ({ ...acc, [field]: reason }), {}) + ); + } - if (extraDefinitions.length) { - composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: extraDefinitions })); + // TODO: ideally move these in getSubgraphSchema() + if (subgraph) { + const shareable = subgraph.getFullyQualifiedDirectiveName("shareable"); + [CreateInfo.name, UpdateInfo.name, DeleteInfo.name, PageInfo.name].forEach((typeName) => { + const typeComposer = composer.getOTC(typeName); + typeComposer.setDirectiveByName(shareable); + }); } - const getNodesResult = getNodes(definitionNodes, { callbacks, userCustomResolvers }); + const aggregationTypesMapper = new AggregationTypesMapper(composer, subgraph); - const { nodes, relationshipPropertyInterfaceNames, interfaceRelationshipNames, floatWhereInTypeDefs } = - getNodesResult; + const getNodesResult = getNodes(definitionNodes, { callbacks, userCustomResolvers }); - // graphql-compose will break if the Point and CartesianPoint types are created but not used, - // because it will purge the unused types but leave behind orphaned field resolvers - // - // These are flags to check whether the types are used and then create them if they are - let { pointInTypeDefs, cartesianPointInTypeDefs } = getNodesResult; + const { nodes, relationshipPropertyInterfaceNames, interfaceRelationshipNames } = getNodesResult; const hasGlobalNodes = addGlobalNodeFields(nodes, composer); @@ -192,9 +550,40 @@ function makeAugmentedSchema( interfaceRelationshipNames ); - const relationshipFields = new Map(); - const interfaceCommonFields = new Map(); + // TODO: find some solution for this + // TODO: should directives be inherited?? they are user-defined after all + // TODO: other considerations might apply to PROPAGATED_DIRECTIVES: deprecated and shareable + // ATM we only test deprecated propagates + // also, should these live in the schema model?? + const userDefinedFieldDirectivesForNode = new Map>(); + const userDefinedDirectivesForNode = new Map(); + const propagatedDirectivesForNode = new Map(); + const userDefinedDirectivesForInterface = new Map(); + + for (const definitionNode of definitionNodes.objectTypes) { + const userDefinedObjectDirectives = + definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; + const propagatedDirectives = + definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || + []; + userDefinedDirectivesForNode.set(definitionNode.name.value, userDefinedObjectDirectives); + propagatedDirectivesForNode.set(definitionNode.name.value, propagatedDirectives); + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } + + for (const definitionNode of definitionNodes.interfaceTypes) { + const userDefinedInterfaceDirectives = + definitionNode.directives?.filter((directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value)) || + []; + userDefinedDirectivesForInterface.set(definitionNode.name.value, userDefinedInterfaceDirectives); + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } + // TODO: keeping this `relationshipFields` scaffold for backwards compatibility on translation layer + // actual functional logic is in schemaModel.concreteEntities.forEach + const relationshipFields = new Map(); relationshipProperties.forEach((relationship) => { const relFields = getObjFieldMeta({ enums: enumTypes, @@ -206,670 +595,302 @@ function makeAugmentedSchema( callbacks, }); - if (!pointInTypeDefs) { - pointInTypeDefs = relFields.pointFields.some((field) => field.typeMeta.name === "Point"); - } - if (!cartesianPointInTypeDefs) { - cartesianPointInTypeDefs = relFields.pointFields.some((field) => field.typeMeta.name === "CartesianPoint"); - } - relationshipFields.set(relationship.name.value, relFields); - - const baseFields: BaseField[][] = Object.values(relFields); - - const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); - - const propertiesInterface = composer.createInterfaceTC({ - name: relationship.name.value, - fields: objectComposeFields, - }); - - composer.createInputTC({ - name: `${relationship.name.value}Sort`, - fields: propertiesInterface.getFieldNames().reduce((res, f) => { - return { ...res, [f]: "SortDirection" }; - }, {}), - }); - - const relationshipUpdateITC = composer.createInputTC({ - name: `${relationship.name.value}UpdateInput`, - fields: objectFieldsToUpdateInputFields([ - ...relFields.primitiveFields.filter( - (field) => !field.autogenerate && !field.readonly && !field.callback - ), - ...relFields.scalarFields, - ...relFields.enumFields, - ...relFields.temporalFields.filter((field) => !field.timestamps), - ...relFields.pointFields, - ]), - }); - - addMathOperatorsToITC(relationshipUpdateITC); - - addArrayMethodsToITC(relationshipUpdateITC, relFields.primitiveFields); - addArrayMethodsToITC(relationshipUpdateITC, relFields.pointFields); - - const relationshipWhereFields = getWhereFields({ - typeName: relationship.name.value, - fields: { - scalarFields: relFields.scalarFields, - enumFields: relFields.enumFields, - temporalFields: relFields.temporalFields, - pointFields: relFields.pointFields, - primitiveFields: relFields.primitiveFields, - }, - features, - }); - - composer.createInputTC({ - name: `${relationship.name.value}Where`, - fields: relationshipWhereFields, - }); - - composer.createInputTC({ - name: `${relationship.name.value}CreateInput`, - fields: objectFieldsToCreateInputFields([ - ...relFields.primitiveFields.filter((field) => !field.autogenerate && !field.callback), - ...relFields.scalarFields, - ...relFields.enumFields, - ...relFields.temporalFields, - ...relFields.pointFields, - ]), - }); }); - interfaceRelationships.forEach((interfaceRelationship) => { - const implementations = objectTypes.filter((n) => - n.interfaces?.some((i) => i.name.value === interfaceRelationship.name.value) - ); - - const interfaceFields = getObjFieldMeta({ - enums: enumTypes, - interfaces: [...filteredInterfaceTypes, ...interfaceRelationships], - objects: objectTypes, - scalars: scalarTypes, - unions: unionTypes, - obj: interfaceRelationship, - callbacks, - }); - - if (!pointInTypeDefs) { - pointInTypeDefs = interfaceFields.pointFields.some((field) => field.typeMeta.name === "Point"); - } - if (!cartesianPointInTypeDefs) { - cartesianPointInTypeDefs = interfaceFields.pointFields.some( - (field) => field.typeMeta.name === "CartesianPoint" - ); - } - - const baseFields: BaseField[][] = Object.values(interfaceFields); - const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); - - const composeInterface = composer.createInterfaceTC({ - name: interfaceRelationship.name.value, - fields: objectComposeFields, - }); - - interfaceCommonFields.set(interfaceRelationship.name.value, interfaceFields); - - const interfaceOptionsInput = composer.getOrCreateITC(`${interfaceRelationship.name.value}Options`, (tc) => { - tc.addFields({ - limit: "Int", - offset: "Int", - }); - }); - - const interfaceSortableFields = getSortableFields(interfaceFields).reduce( - (res, f) => ({ - ...res, - [f.fieldName]: { - type: sortDirection.getTypeName(), - directives: graphqlDirectivesToCompose( - f.otherDirectives.filter((directive) => directive.name.value === "deprecated") - ), - }, - }), - {} - ); - - if (Object.keys(interfaceSortableFields).length) { - const interfaceSortInput = composer.getOrCreateITC(`${interfaceRelationship.name.value}Sort`, (tc) => { - tc.addFields(interfaceSortableFields); - tc.setDescription( - `Fields to sort ${pluralize( - interfaceRelationship.name.value - )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${`${interfaceRelationship.name.value}Sort`} object.` + // this is the new "functional" way for the above forEach + // helper to only create relationshipProperties Interface types once, even if multiple relationships reference it + const seenRelationshipPropertiesInterfaces = new Set(); + schemaModel.concreteEntities.forEach((concreteEntity) => { + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); + + for (const relationship of concreteEntityAdapter.relationships.values()) { + { + if ( + !relationship.propertiesTypeName || + seenRelationshipPropertiesInterfaces.has(relationship.propertiesTypeName) + ) { + continue; + } + doForRelationshipPropertiesInterface( + composer, + relationship, + definitionNodes, + userDefinedDirectivesForInterface, + features ); - }); - - interfaceOptionsInput.addFields({ - sort: { - description: `Specify one or more ${`${interfaceRelationship.name.value}Sort`} objects to sort ${pluralize( - interfaceRelationship.name.value - )} by. The sorts will be applied in the order in which they are arranged in the array.`, - type: interfaceSortInput.List, - }, - }); - } - - const interfaceWhereFields = getWhereFields({ - typeName: interfaceRelationship.name.value, - fields: { - scalarFields: interfaceFields.scalarFields, - enumFields: interfaceFields.enumFields, - temporalFields: interfaceFields.temporalFields, - pointFields: interfaceFields.pointFields, - primitiveFields: interfaceFields.primitiveFields, - }, - isInterface: true, - features, - }); - - const [ - implementationsConnectInput, - implementationsDeleteInput, - implementationsDisconnectInput, - implementationsUpdateInput, - implementationsWhereInput, - ] = ["ConnectInput", "DeleteInput", "DisconnectInput", "UpdateInput", "Where"].map((suffix) => - composer.createInputTC({ - name: `${interfaceRelationship.name.value}Implementations${suffix}`, - fields: {}, - }) - ) as [InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer, InputTypeComposer]; - - composer.createInputTC({ - name: `${interfaceRelationship.name.value}Where`, - fields: { ...interfaceWhereFields, _on: implementationsWhereInput }, - }); - - const interfaceCreateInput = composer.createInputTC(`${interfaceRelationship.name.value}CreateInput`); - - const interfaceRelationshipITC = composer.getOrCreateITC( - `${interfaceRelationship.name.value}UpdateInput`, - (tc) => { - tc.addFields({ - ...objectFieldsToUpdateInputFields([ - ...interfaceFields.primitiveFields, - ...interfaceFields.scalarFields, - ...interfaceFields.enumFields, - ...interfaceFields.temporalFields.filter((field) => !field.timestamps), - ...interfaceFields.pointFields, - ]), - _on: implementationsUpdateInput, - }); + seenRelationshipPropertiesInterfaces.add(relationship.propertiesTypeName); } - ); - - addMathOperatorsToITC(interfaceRelationshipITC); + } + }); - createRelationshipFields({ - relationshipFields: interfaceFields.relationFields, - schemaComposer: composer, - composeNode: composeInterface, - sourceName: interfaceRelationship.name.value, - nodes, - relationshipPropertyFields: relationshipFields, + // TODO: temporary helper to keep track of which interface entities were already "visited" + // say why this is happening here ALE + const seenInterfaces = new Set(); + interfaceRelationships.forEach((interfaceRelationship) => { + const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; + const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); + const updatedRelationships = doForInterfacesThatAreTargetOfARelationship({ + composer, + interfaceEntityAdapter, + definitionNodes, subgraph, + relationships, + relationshipFields, }); - - relationships = [ - ...relationships, - ...createConnectionFields({ - connectionFields: interfaceFields.connectionFields, - schemaComposer: composer, - composeNode: composeInterface, - sourceName: interfaceRelationship.name.value, - nodes, - relationshipPropertyFields: relationshipFields, - }), - ]; - - implementations.forEach((implementation) => { - const node = nodes.find((n) => n.name === implementation.name.value) as Node; - - implementationsWhereInput.addFields({ - [implementation.name.value]: { - type: `${implementation.name.value}Where`, - }, - }); - - if (node.relationFields.length) { - implementationsConnectInput.addFields({ - [implementation.name.value]: { - type: `[${implementation.name.value}ConnectInput!]`, - }, - }); - - implementationsDeleteInput.addFields({ - [implementation.name.value]: { - type: `[${implementation.name.value}DeleteInput!]`, - }, - }); - - implementationsDisconnectInput.addFields({ - [implementation.name.value]: { - type: `[${implementation.name.value}DisconnectInput!]`, - }, - }); - } - - interfaceCreateInput.addFields({ - [implementation.name.value]: { - type: `${implementation.name.value}CreateInput`, - }, - }); - - implementationsUpdateInput.addFields({ - [implementation.name.value]: { - type: `${implementation.name.value}UpdateInput`, - }, - }); - }); - - if (implementationsConnectInput.getFieldNames().length) { - const interfaceConnectInput = composer.getOrCreateITC( - `${interfaceRelationship.name.value}ConnectInput`, - (tc) => { - tc.addFields({ _on: implementationsConnectInput }); - } - ); - interfaceConnectInput.setField("_on", implementationsConnectInput); - } - - if (implementationsDeleteInput.getFieldNames().length) { - const interfaceDeleteInput = composer.getOrCreateITC( - `${interfaceRelationship.name.value}DeleteInput`, - (tc) => { - tc.addFields({ _on: implementationsDeleteInput }); - } - ); - interfaceDeleteInput.setField("_on", implementationsDeleteInput); + if (updatedRelationships) { + relationships = updatedRelationships; } - - if (implementationsDisconnectInput.getFieldNames().length) { - const interfaceDisconnectInput = composer.getOrCreateITC( - `${interfaceRelationship.name.value}DisconnectInput`, - (tc) => { - tc.addFields({ _on: implementationsDisconnectInput }); - } - ); - interfaceDisconnectInput.setField("_on", implementationsDisconnectInput); - } - - ensureNonEmptyInput(composer, `${interfaceRelationship.name.value}CreateInput`); - ensureNonEmptyInput(composer, `${interfaceRelationship.name.value}UpdateInput`); - [ - implementationsConnectInput, - implementationsDeleteInput, - implementationsDisconnectInput, - implementationsUpdateInput, - implementationsWhereInput, - ].forEach((c) => ensureNonEmptyInput(composer, c)); + seenInterfaces.add(interfaceRelationship.name.value); }); - if (pointInTypeDefs) { - // Every field (apart from CRS) in Point needs a custom resolver - // to deconstruct the point objects we fetch from the database - composer.createObjectTC(Point); - composer.createInputTC(PointInput); - composer.createInputTC(PointDistance); - } - - if (cartesianPointInTypeDefs) { - // Every field (apart from CRS) in CartesianPoint needs a custom resolver - // to deconstruct the point objects we fetch from the database - composer.createObjectTC(CartesianPoint); - composer.createInputTC(CartesianPointInput); - composer.createInputTC(CartesianPointDistance); - } - - if (floatWhereInTypeDefs) { - composer.createInputTC(FloatWhere); - } - - nodes.forEach((node) => { - const nodeFields = objectFieldsToComposeFields([ - ...node.primitiveFields, - ...node.cypherFields, - ...node.enumFields, - ...node.scalarFields, - ...node.interfaceFields, - ...node.objectFields, - ...node.unionFields, - ...node.temporalFields, - ...node.pointFields, - ...node.customResolverFields, - ]); - - const composeNode = composer.createObjectTC({ - name: node.name, - fields: nodeFields, - description: node.description, - directives: graphqlDirectivesToCompose([...node.otherDirectives, ...node.propagatedDirectives]), - interfaces: node.interfaces.map((x) => x.name.value), - }); - - if (node.isGlobalNode) { - composeNode.setField("id", { - type: new GraphQLNonNull(GraphQLID), - resolve: (src) => { - const field = node.getGlobalIdField(); - const value = src[field] as string | number; - return node.toGlobalId(value.toString()); - }, - }); - - composeNode.addInterface("Node"); + schemaModel.concreteEntities.forEach((concreteEntity) => { + // TODO: temporary for backwards compatibility for translation layer + const node = nodes.find((n) => n.name === concreteEntity.name); + if (!node) { + throw new Error(`Node not found with the name ${concreteEntity.name}`); } + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - const sortFields = getSortableFields(node).reduce( - (res: InputTypeComposerFieldConfigMapDefinition, f) => ({ - ...res, - [f.fieldName]: { - type: sortDirection.getTypeName(), - directives: graphqlDirectivesToCompose( - f.otherDirectives.filter((directive) => directive.name.value === "deprecated") - ), - }, - }), - {} - ); - - const nodeSortTypeName = `${node.name}Sort`; - if (Object.keys(sortFields).length) { - const sortInput = composer.createInputTC({ - name: nodeSortTypeName, - fields: sortFields, - description: `Fields to sort ${upperFirst( - node.plural - )} by. The order in which sorts are applied is not guaranteed when specifying many fields in one ${nodeSortTypeName} object.`, - }); - - composer.createInputTC({ - name: `${node.name}Options`, - fields: { - sort: { - description: `Specify one or more ${nodeSortTypeName} objects to sort ${upperFirst( - node.plural - )} by. The sorts will be applied in the order in which they are arranged in the array.`, - type: sortInput.NonNull.List, - }, - limit: "Int", - offset: "Int", - }, - }); - } else { - composer.createInputTC({ - name: `${node.name}Options`, - fields: { limit: "Int", offset: "Int" }, - }); + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(concreteEntityAdapter.name); + if (!userDefinedFieldDirectives) { + throw new Error(`User defined field directives not found for ${concreteEntityAdapter.name}`); } - const queryFields = getWhereFields({ - typeName: node.name, - fields: { - temporalFields: node.temporalFields, - enumFields: node.enumFields, - pointFields: node.pointFields, - primitiveFields: node.primitiveFields, - scalarFields: node.scalarFields, - }, - features, - }); - - const countField = { - type: "Int!", - resolve: numericalResolver, - args: {}, - }; - - composer.createObjectTC({ - name: node.aggregateTypeNames.selection, - fields: { - count: countField, - ...[...node.primitiveFields, ...node.temporalFields].reduce((res, field) => { - if (field.typeMeta.array) { - return res; - } - if (!field.selectableOptions.onAggregate) { - return res; - } - const objectTypeComposer = aggregationTypesMapper.getAggregationType({ - fieldName: field.typeMeta.name, - nullable: !field.typeMeta.required, - }); + const propagatedDirectives = propagatedDirectivesForNode.get(concreteEntity.name) || []; + const userDefinedObjectDirectives = (userDefinedDirectivesForNode.get(concreteEntity.name) || []).concat( + propagatedDirectives + ); - if (!objectTypeComposer) return res; + withOptionsInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - res[field.fieldName] = objectTypeComposer.NonNull; + withAggregateSelectionType({ concreteEntityAdapter, aggregationTypesMapper, propagatedDirectives, composer }); - return res; - }, {}), - }, - directives: graphqlDirectivesToCompose(node.propagatedDirectives), - }); + withWhereInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, features, composer }); - const nodeWhereTypeName = `${node.name}Where`; - composer.createInputTC({ - name: nodeWhereTypeName, - fields: node.isGlobalNode ? { id: "ID", ...queryFields } : queryFields, - }); + // TODO: new way + // TODO: Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model + augmentFulltextSchema(node, composer, concreteEntityAdapter); - augmentFulltextSchema(node, composer, nodeWhereTypeName, nodeSortTypeName); + withUniqueWhereInputType({ concreteEntityAdapter, composer }); - const uniqueFields = getUniqueFields(node); + withCreateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - composer.createInputTC({ - name: `${node.name}UniqueWhere`, - fields: uniqueFields, - }); - - composer.createInputTC({ - name: `${node.name}CreateInput`, - fields: objectFieldsToCreateInputFields([ - ...node.primitiveFields.filter((field) => !field.callback), - ...node.scalarFields, - ...node.enumFields, - ...node.temporalFields, - ...node.pointFields, - ]), - }); - - const nodeUpdateITC = composer.createInputTC({ - name: `${node.name}UpdateInput`, - fields: objectFieldsToUpdateInputFields([ - ...node.primitiveFields.filter((field) => !field.callback), - ...node.scalarFields, - ...node.enumFields, - ...node.temporalFields.filter((field) => !field.timestamps), - ...node.pointFields, - ]), - }); + withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - addMathOperatorsToITC(nodeUpdateITC); + withMutationResponseTypes({ concreteEntityAdapter, propagatedDirectives, composer }); - addArrayMethodsToITC(nodeUpdateITC, node.mutableFields); + // createRelationshipFields({ + // relationshipFields: node.relationFields, + // concreteEntityAdapter, + // schemaComposer: composer, + // composeNode, + // sourceName: concreteEntityAdapter.name, + // nodes, + // relationshipPropertyFields: relationshipFields, + // subgraph, + // }); - const mutationResponseTypeNames = node.mutationResponseTypeNames; - - composer.createObjectTC({ - name: mutationResponseTypeNames.create, - fields: { - info: `CreateInfo!`, - [node.plural]: `[${node.name}!]!`, - }, - directives: graphqlDirectivesToCompose(node.propagatedDirectives), - }); - - composer.createObjectTC({ - name: mutationResponseTypeNames.update, - fields: { - info: `UpdateInfo!`, - [node.plural]: `[${node.name}!]!`, - }, - directives: graphqlDirectivesToCompose(node.propagatedDirectives), + const composeNode = withObjectType({ + concreteEntityAdapter, + userDefinedFieldDirectives, + userDefinedObjectDirectives, + composer, }); createRelationshipFields({ - relationshipFields: node.relationFields, + entityAdapter: concreteEntityAdapter, schemaComposer: composer, composeNode, - sourceName: node.name, - nodes, - relationshipPropertyFields: relationshipFields, subgraph, + userDefinedFieldDirectives, }); + // relationships = [ + // ...relationships, + // ...createConnectionFields({ + // connectionFields: node.connectionFields, + // schemaComposer: composer, + // composeNode, + // sourceName: concreteEntityAdapter.name, + // nodes, + // relationshipPropertyFields: relationshipFields, + // }), + // ]; + relationships = [ ...relationships, ...createConnectionFields({ - connectionFields: node.connectionFields, + entityAdapter: concreteEntityAdapter, schemaComposer: composer, composeNode, - sourceName: node.name, - nodes, - relationshipPropertyFields: relationshipFields, + userDefinedFieldDirectives, + relationshipFields, }), ]; - ensureNonEmptyInput(composer, `${node.name}UpdateInput`); - ensureNonEmptyInput(composer, `${node.name}CreateInput`); - - const rootTypeFieldNames = node.rootTypeFieldNames; + ensureNonEmptyInput(composer, concreteEntityAdapter.operations.updateInputTypeName); + ensureNonEmptyInput(composer, concreteEntityAdapter.operations.createInputTypeName); - const schemaConfigurationFlags = getSchemaConfigurationFlags({ - globalSchemaConfiguration, - nodeSchemaConfiguration: node.schemaConfiguration, - excludeDirective: node.exclude, - }); - - if (schemaConfigurationFlags.read) { + if (concreteEntityAdapter.isReadable) { composer.Query.addFields({ - [rootTypeFieldNames.read]: findResolver({ node }), + [concreteEntityAdapter.operations.rootTypeFieldNames.read]: findResolver({ + node, + concreteEntityAdapter, + }), }); composer.Query.setFieldDirectives( - rootTypeFieldNames.read, - graphqlDirectivesToCompose(node.propagatedDirectives) + concreteEntityAdapter.operations.rootTypeFieldNames.read, + graphqlDirectivesToCompose(propagatedDirectives) ); composer.Query.addFields({ - [`${node.plural}Connection`]: rootConnectionResolver({ node, composer }), + [`${concreteEntityAdapter.plural}Connection`]: rootConnectionResolver({ + node, + composer, + concreteEntityAdapter, + propagatedDirectives, + }), }); composer.Query.setFieldDirectives( - `${node.plural}Connection`, - graphqlDirectivesToCompose(node.propagatedDirectives) + `${concreteEntityAdapter.plural}Connection`, + graphqlDirectivesToCompose(propagatedDirectives) ); } - if (schemaConfigurationFlags.aggregate) { + if (concreteEntityAdapter.isAggregable) { composer.Query.addFields({ - [rootTypeFieldNames.aggregate]: aggregateResolver({ node }), + [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver({ + node, + concreteEntityAdapter, + }), }); composer.Query.setFieldDirectives( - rootTypeFieldNames.aggregate, - graphqlDirectivesToCompose(node.propagatedDirectives) + concreteEntityAdapter.operations.rootTypeFieldNames.aggregate, + graphqlDirectivesToCompose(propagatedDirectives) ); } - if (schemaConfigurationFlags.create) { + if (concreteEntityAdapter.isCreatable) { composer.Mutation.addFields({ - [rootTypeFieldNames.create]: createResolver({ node }), + [concreteEntityAdapter.operations.rootTypeFieldNames.create]: createResolver({ + node, + concreteEntityAdapter, + }), }); composer.Mutation.setFieldDirectives( - rootTypeFieldNames.create, - graphqlDirectivesToCompose(node.propagatedDirectives) + concreteEntityAdapter.operations.rootTypeFieldNames.create, + graphqlDirectivesToCompose(propagatedDirectives) ); } - if (schemaConfigurationFlags.delete) { + if (concreteEntityAdapter.isDeletable) { composer.Mutation.addFields({ - [rootTypeFieldNames.delete]: deleteResolver({ node, composer }), + [concreteEntityAdapter.operations.rootTypeFieldNames.delete]: deleteResolver({ + node, + composer, + concreteEntityAdapter, + }), }); composer.Mutation.setFieldDirectives( - rootTypeFieldNames.delete, - graphqlDirectivesToCompose(node.propagatedDirectives) + concreteEntityAdapter.operations.rootTypeFieldNames.delete, + graphqlDirectivesToCompose(propagatedDirectives) ); } - if (schemaConfigurationFlags.update) { + if (concreteEntityAdapter.isUpdatable) { composer.Mutation.addFields({ - [rootTypeFieldNames.update]: updateResolver({ + [concreteEntityAdapter.operations.rootTypeFieldNames.update]: updateResolver({ node, composer, + concreteEntityAdapter, }), }); composer.Mutation.setFieldDirectives( - rootTypeFieldNames.update, - graphqlDirectivesToCompose(node.propagatedDirectives) + concreteEntityAdapter.operations.rootTypeFieldNames.update, + graphqlDirectivesToCompose(propagatedDirectives) ); } }); - unionTypes.forEach((union) => { - const fields = union.types!.reduce((f: Record, type) => { - return { ...f, [type.name.value]: `${type.name.value}Where` }; - }, {}); + schemaModel.compositeEntities.forEach((entity) => { + if (entity instanceof UnionEntity) { + withWhereInputType({ + entityAdapter: new UnionEntityAdapter(entity), + userDefinedFieldDirectives: new Map(), + features, + composer, + }); + return; + } + if (entity instanceof InterfaceEntity && !seenInterfaces.has(entity.name)) { + const definitionNode = definitionNodes.interfaceTypes.find((type) => type.name.value === entity.name); - composer.createInputTC({ - name: `${union.name.value}Where`, - fields, - }); + if (!definitionNode) { + console.error(`Definition node not found for ${entity.name}`); + return; + } + + const interfaceEntityAdapter = new InterfaceEntityAdapter(entity); + + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition( + definitionNode, + definitionNodes + ); + const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(entity.name) || []; + withInterfaceType({ + entityAdapter: interfaceEntityAdapter, + userDefinedFieldDirectives, + userDefinedInterfaceDirectives, + composer, + config: { + includeRelationships: true, + }, + }); + return; + } + return; }); if (generateSubscriptions && nodes.length) { + // generateSubscriptionTypes({ + // schemaComposer: composer, + // nodes, + // relationshipFields, + // interfaceCommonFields, + // globalSchemaConfiguration, + // }); generateSubscriptionTypes({ schemaComposer: composer, - nodes, - relationshipFields, - interfaceCommonFields, - globalSchemaConfiguration, + schemaModel, + userDefinedFieldDirectivesForNode, }); } - ["Mutation", "Query"].forEach((type) => { + // TODO: test this - toplevel cypher fields of type Point? + ["Query", "Mutation"].forEach((type) => { const objectComposer: ObjectTypeComposer = composer[type]; - const cypherType: ObjectTypeDefinitionNode = customResolvers[`customCypher${type}`]; - - if (cypherType) { - const objectFields = getObjFieldMeta({ - obj: cypherType, - scalars: scalarTypes, - enums: enumTypes, - interfaces: filteredInterfaceTypes, - unions: unionTypes, - objects: objectTypes, - callbacks, - }); - const objectComposeFields = objectFieldsToComposeFields([ - ...objectFields.enumFields, - ...objectFields.interfaceFields, - ...objectFields.primitiveFields, - ...objectFields.relationFields, - ...objectFields.scalarFields, - ...objectFields.unionFields, - ...objectFields.objectFields, - ...objectFields.temporalFields, - ]); - - objectComposer.addFields(objectComposeFields); - - objectFields.cypherFields.forEach((field) => { - const customResolver = cypherResolver({ - field, - statement: field.statement, - type: type as "Query" | "Mutation", - }); - - const composedField = objectFieldsToComposeFields([field])[field.fieldName]; - - objectComposer.addFields({ [field.fieldName]: { ...composedField, ...customResolver } }); - }); + const operation: Operation | undefined = schemaModel.operations[type]; + if (!operation) { + return; } - }); + const operationAdapter = new OperationAdapter(operation); + + const definitionNode = definitionNodes.operations.find( + (d) => d.name.value === type + ) as ObjectTypeDefinitionNode; + const userDefinedDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - filteredInterfaceTypes.forEach((inter) => { + // TODO: this check is for getObjFieldMeta + // this should technically be implied. TBD in Operations class + const hasCypherAttributes = Array.from(operationAdapter.attributes.values()).find( + (attribute) => attribute.annotations.cypher !== undefined + ); + if (!hasCypherAttributes) { + return; + } + // needed for compatibility with translation layer const objectFields = getObjFieldMeta({ - obj: inter, + obj: customResolvers[`customCypher${type}`], // Apparently this can't be undefined in getObjFieldMeta, but can be undefined from getCustomResolvers? scalars: scalarTypes, enums: enumTypes, interfaces: filteredInterfaceTypes, @@ -878,33 +899,54 @@ function makeAugmentedSchema( callbacks, }); - const baseFields: BaseField[][] = Object.values(objectFields); - const objectComposeFields = objectFieldsToComposeFields(baseFields.reduce((acc, x) => [...acc, ...x], [])); - - composer.createInterfaceTC({ - name: inter.name.value, - description: inter.description?.value, - fields: objectComposeFields, - directives: graphqlDirectivesToCompose( - (inter.directives || []).filter( - (x) => !["auth", "authorization", "authentication", "exclude"].includes(x.name.value) - ) - ), - }); + for (const attributeAdapter of operationAdapter.attributes.values()) { + // needed for compatibility with translation layer + const field = objectFields.cypherFields.find((f) => f.fieldName === attributeAdapter.name) as CypherField; + const customResolver = cypherResolver({ + field, + attributeAdapter, + type: type as "Query" | "Mutation", + }); + + const composedField = attributeAdapterToComposeFields([attributeAdapter], userDefinedDirectives)[ + attributeAdapter.name + ]; + + objectComposer.addFields({ [attributeAdapter.name]: { ...composedField, ...customResolver } }); + } }); if (!Object.values(composer.Mutation.getFields()).length) { composer.delete("Mutation"); } + // TODO: why is this now needed? + if (!Object.values(composer.Subscription.getFields()).length) { + composer.delete("Subscription"); + } const generatedTypeDefs = composer.toSDL(); let parsedDoc = parse(generatedTypeDefs); + const emptyObjectsInterfaces = parsedDoc.definitions + .filter( + (x): x is InterfaceTypeDefinitionNode | ObjectTypeDefinitionNode => + (x.kind === Kind.OBJECT_TYPE_DEFINITION && !isRootType(x)) || x.kind === Kind.INTERFACE_TYPE_DEFINITION + ) + .filter((x) => !x.fields?.length); + + if (emptyObjectsInterfaces.length) { + throw new Error( + `Objects and Interfaces must have one or more fields: ${emptyObjectsInterfaces + .map((x) => x.name.value) + .join(", ")}` + ); + } + const documentNames = new Set(parsedDoc.definitions.filter(definitionNodeHasName).map((x) => x.name.value)); const resolveMethods = getResolveAndSubscriptionMethods(composer); - const generatedResolveMethods: Record = {}; + const generatedResolveMethods: GraphQLToolsResolveMethods = {}; for (const [key, value] of Object.entries(resolveMethods)) { if (documentNames.has(key)) { @@ -959,7 +1001,15 @@ function makeAugmentedSchema( ...parsedDoc.definitions.filter((definition) => { // Filter out default scalars, they are not needed and can cause issues if (definition.kind === Kind.SCALAR_TYPE_DEFINITION) { - if (["Boolean", "Float", "ID", "Int", "String"].includes(definition.name.value)) { + if ( + [ + GraphQLBoolean.name, + GraphQLFloat.name, + GraphQLID.name, + GraphQLInt.name, + GraphQLString.name, + ].includes(definition.name.value) + ) { return false; } } @@ -991,3 +1041,94 @@ function makeAugmentedSchema( } export default makeAugmentedSchema; + +function doForRelationshipPropertiesInterface( + composer: SchemaComposer, + relationshipAdapter: RelationshipAdapter, + definitionNodes: DefinitionNodes, + userDefinedDirectivesForInterface: Map, + features?: Neo4jFeaturesSettings +) { + if (!relationshipAdapter.propertiesTypeName) { + return; + } + + const obj = definitionNodes.interfaceTypes.find((i) => i.name.value === relationshipAdapter.propertiesTypeName); + if (!obj) { + throw new Error(`Could not find interface named ${relationshipAdapter.propertiesTypeName}`); + } + + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(obj, definitionNodes); + const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(relationshipAdapter.name) || []; + withInterfaceType({ + entityAdapter: relationshipAdapter, + userDefinedFieldDirectives, + userDefinedInterfaceDirectives, + composer, + }); + withSortInputType({ relationshipAdapter, userDefinedFieldDirectives, composer }); + withUpdateInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); + withWhereInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, features, composer }); + withCreateInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); +} + +function doForInterfacesThatAreTargetOfARelationship({ + composer, + interfaceEntityAdapter, + definitionNodes, + features, + subgraph, + relationships, + relationshipFields, +}: { + composer: SchemaComposer; + interfaceEntityAdapter: InterfaceEntityAdapter; + definitionNodes: DefinitionNodes; + features?: Neo4jFeaturesSettings; + subgraph?: Subgraph; + relationships: Relationship[]; + relationshipFields: Map; +}) { + // We wanted to get the userDefinedDirectives + const definitionNode = definitionNodes.interfaceTypes.find( + (type) => type.name.value === interfaceEntityAdapter.name + ); + if (!definitionNode) { + console.error(`Definition node not found for ${interfaceEntityAdapter.name}`); + return; + } + + const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); + + withOptionsInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); + withWhereInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, features, composer }); + withCreateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); + withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); + + const composeInterface = withInterfaceType({ + entityAdapter: interfaceEntityAdapter, + userDefinedFieldDirectives, + userDefinedInterfaceDirectives: [], + composer, + }); + createRelationshipFields({ + entityAdapter: interfaceEntityAdapter, + schemaComposer: composer, + composeNode: composeInterface, + subgraph, + userDefinedFieldDirectives, + }); + + relationships = [ + ...relationships, + ...createConnectionFields({ + entityAdapter: interfaceEntityAdapter, + schemaComposer: composer, + composeNode: composeInterface, + userDefinedFieldDirectives, + relationshipFields, + }), + ]; + + return relationships; +} diff --git a/packages/graphql/src/schema/new-make-augmented-schema.ts b/packages/graphql/src/schema/new-make-augmented-schema.ts deleted file mode 100644 index ed191011f6..0000000000 --- a/packages/graphql/src/schema/new-make-augmented-schema.ts +++ /dev/null @@ -1,1135 +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 { IResolvers } from "@graphql-tools/utils"; -import type { - DefinitionNode, - DirectiveNode, - DocumentNode, - FieldDefinitionNode, - GraphQLEnumType, - GraphQLInputObjectType, - GraphQLInterfaceType, - GraphQLObjectType, - GraphQLScalarType, - InterfaceTypeDefinitionNode, - NameNode, - ObjectTypeDefinitionNode, - SchemaExtensionNode, -} from "graphql"; -import { GraphQLBoolean, GraphQLFloat, GraphQLID, GraphQLInt, GraphQLString, Kind, parse, print } from "graphql"; -import type { ObjectTypeComposer } from "graphql-compose"; -import { SchemaComposer } from "graphql-compose"; -import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; -import { augmentFulltextSchema2 } from "./augment/fulltext"; -import { cypherResolver2 } from "./resolvers/field/cypher"; -import { createResolver2 } from "./resolvers/mutation/create"; -import { deleteResolver2 } from "./resolvers/mutation/delete"; -import { updateResolver2 } from "./resolvers/mutation/update"; -import { aggregateResolver2 } from "./resolvers/query/aggregate"; -import { findResolver2 } from "./resolvers/query/read"; -import { rootConnectionResolver2 } from "./resolvers/query/root-connection"; -// import * as constants from "../constants"; -import type { Node } from "../classes"; -import type Relationship from "../classes/Relationship"; -import * as Scalars from "../graphql/scalars"; -import { isRootType } from "../utils/is-root-type"; -import { ensureNonEmptyInput } from "./ensure-non-empty-input"; -import getCustomResolvers from "./get-custom-resolvers"; -import type { DefinitionNodes } from "./get-definition-nodes"; -import { getDefinitionNodes } from "./get-definition-nodes"; -import type { ObjectFields } from "./get-obj-field-meta"; -import getObjFieldMeta from "./get-obj-field-meta"; -import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "./to-compose"; - -// GraphQL type imports -import type { GraphQLToolsResolveMethods } from "graphql-compose/lib/SchemaComposer"; -import type { Subgraph } from "../classes/Subgraph"; -import { FIELD_DIRECTIVES, INTERFACE_DIRECTIVES, OBJECT_DIRECTIVES, PROPAGATED_DIRECTIVES } from "../constants"; -import { SortDirection } from "../graphql/enums/SortDirection"; -import { CartesianPointDistance } from "../graphql/input-objects/CartesianPointDistance"; -import { CartesianPointInput } from "../graphql/input-objects/CartesianPointInput"; -import { FloatWhere } from "../graphql/input-objects/FloatWhere"; -import { PointDistance } from "../graphql/input-objects/PointDistance"; -import { PointInput } from "../graphql/input-objects/PointInput"; -import { QueryOptions } from "../graphql/input-objects/QueryOptions"; -import { CartesianPoint } from "../graphql/objects/CartesianPoint"; -import { CreateInfo } from "../graphql/objects/CreateInfo"; -import { DeleteInfo } from "../graphql/objects/DeleteInfo"; -import { PageInfo } from "../graphql/objects/PageInfo"; -import { Point } from "../graphql/objects/Point"; -import { UpdateInfo } from "../graphql/objects/UpdateInfo"; -import type { Neo4jGraphQLSchemaModel } from "../schema-model/Neo4jGraphQLSchemaModel"; -import type { Operation } from "../schema-model/Operation"; -import { OperationAdapter } from "../schema-model/OperationAdapter"; -import { ConcreteEntity } from "../schema-model/entity/ConcreteEntity"; -import { InterfaceEntity } from "../schema-model/entity/InterfaceEntity"; -import { UnionEntity } from "../schema-model/entity/UnionEntity"; -import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; -import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; -import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { CypherField, Neo4jFeaturesSettings } from "../types"; -import { isInArray } from "../utils/is-in-array"; -import { createConnectionFields } from "./create-connection-fields"; -import { addGlobalNodeFields } from "./create-global-nodes"; -import { createRelationshipFieldsFromConcreteEntityAdapter } from "./create-relationship-fields/create-relationship-fields"; -import { deprecationMap } from "./deprecation-map"; -import { withAggregateSelectionType } from "./generation/aggregate-types"; -import { withCreateInputType } from "./generation/create-input"; -import { withInterfaceType } from "./generation/interface-type"; -import { withObjectType } from "./generation/object-type"; -import { withMutationResponseTypes } from "./generation/response-types"; -import { withOptionsInputType, withSortInputType } from "./generation/sort-and-options-input"; -import { withUpdateInputType } from "./generation/update-input"; -import { withUniqueWhereInputType, withWhereInputType } from "./generation/where-input"; -import getNodes from "./get-nodes"; -import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; -import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; -import { generateSubscriptionTypes2 } from "./subscriptions/generate-subscription-types"; - -function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { - return "name" in x; -} - -class AugmentedSchemaGenerator { - private composer: SchemaComposer; - - constructor( - private schemaModel: Neo4jGraphQLSchemaModel, - private definitionNodes: DefinitionNodes, - private rootTypesCustomResolvers: ObjectTypeDefinitionNode[] - ) { - this.composer = new SchemaComposer(); - } - - generate() { - let pointInTypeDefs = false; - let cartesianPointInTypeDefs = false; - let floatWhereInTypeDefs = false; - - for (const entity of this.schemaModel.entities.values()) { - const model = - entity instanceof ConcreteEntity - ? new ConcreteEntityAdapter(entity) - : entity instanceof InterfaceEntity - ? new InterfaceEntityAdapter(entity) - : new UnionEntityAdapter(entity as UnionEntity); // fixme - - // TODO: check if these can be created ad-hoc - if (model instanceof ConcreteEntityAdapter || model instanceof InterfaceEntityAdapter) { - for (const attribute of model.attributes.values()) { - if (attribute.isPoint()) { - pointInTypeDefs = true; - } - if (attribute.isCartesianPoint()) { - cartesianPointInTypeDefs = true; - } - } - if ("annotations" in model && model.annotations.fulltext) { - floatWhereInTypeDefs = true; - } - if (model instanceof ConcreteEntityAdapter) { - for (const relationship of model.relationships.values()) { - for (const attribute of relationship.attributes.values()) { - if (attribute.isPoint()) { - pointInTypeDefs = true; - } - if (attribute.isCartesianPoint()) { - cartesianPointInTypeDefs = true; - } - } - } - } - } - } - - // this.pipeDefs(); - this.addToComposer(this.getStaticTypes()); - this.addToComposer(this.getSpatialTypes(pointInTypeDefs, cartesianPointInTypeDefs)); - this.addToComposer(this.getTemporalTypes(floatWhereInTypeDefs)); - - // this.add(this.getEntityTypes()); - // const relationshipPropertiesTypes = this.getRelationshipProperties( - // this._definitionCollection.relationshipProperties - // ); - // this.add(relationshipPropertiesTypes); - - return this.composer; - } - - private pipeDefs() { - const pipedDefs = [ - ...this.definitionNodes.enumTypes, - ...this.definitionNodes.scalarTypes, - ...this.definitionNodes.inputObjectTypes, - ...this.definitionNodes.unionTypes, - ...this.definitionNodes.directives, - ...this.rootTypesCustomResolvers, - ].filter(Boolean); - if (pipedDefs.length) { - this.composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); - } - } - - private getStaticTypes() { - return { - objects: [CreateInfo, DeleteInfo, UpdateInfo, PageInfo], - inputs: [QueryOptions], - enums: [SortDirection], - scalars: Object.values(Scalars), - }; - } - - private getSpatialTypes( - pointInTypeDefs: boolean, - cartesianPointInTypeDefs: boolean - ): { - objects: GraphQLObjectType[]; - inputs: GraphQLInputObjectType[]; - } { - const objects: GraphQLObjectType[] = []; - const inputs: GraphQLInputObjectType[] = []; - if (pointInTypeDefs) { - objects.push(Point); - inputs.push(PointInput, PointDistance); - } - if (cartesianPointInTypeDefs) { - objects.push(CartesianPoint); - inputs.push(CartesianPointInput, CartesianPointDistance); - } - return { - objects, - inputs, - }; - } - - private getTemporalTypes(floatWhereInTypeDefs: boolean): { - inputs: GraphQLInputObjectType[]; - } { - const inputs: GraphQLInputObjectType[] = []; - if (floatWhereInTypeDefs) { - inputs.push(FloatWhere); - } - return { - inputs, - }; - } - - /* - private addGlobalNodeFields(concreteEntities: ConcreteEntity[], nodes: Node[]) { - const globalEntities = concreteEntities.filter((entity) => { - const model = new ConcreteEntityAdapter(entity); - return model.isGlobalNode(); - }); - const globalNodes = nodes.filter((n) => globalEntities.find((e) => e.name === n.name)); - - const fetchById = (id: string, context: Context, info: GraphQLResolveInfo) => { - const resolver = globalNodeResolver({ nodes: globalNodes }); - return resolver.resolve(null, { id }, context, info); - }; - - const resolveType = (obj: { [key: string]: unknown; __resolveType: string }) => obj.__resolveType; - - const { nodeInterface, nodeField } = nodeDefinitions(fetchById, resolveType); - - this._composer.createInterfaceTC(nodeInterface); - this._composer.Query.addFields({ - node: nodeField as ObjectTypeComposerFieldConfigAsObjectDefinition, - }); - } - - // TODO: alternatively, get these from Entity.Relationship - private getRelationshipProperties(relationshipPropertiesInterface: CompositeEntity) { - new ToComposer(relationshipPropertiesInterface) - .withInterfaceType() - .withSortInputType() - .withWhereInputType({ enabledFeatures }) - .withUpdateInputType({ addMathOperators: true, addArrayMethods: true }) - .withCreateInputType() - .build(this._composer); - } - - private getEntityTypes() { - // TODO: consider Factory - this.schemaModel.concreteEntities.forEach((concreteEntity) => { - new ToComposer(concreteEntity) - .withObjectType() - .withSortInputType() - .withWhereInputType({ enabledFeatures }) - .withUpdateInputType({ addMathOperators: true, addArrayMethods: true }) - .withCreateInputType() - .build(this._composer); - }); - } - -*/ - private addToComposer({ - objects = [], - inputs = [], - enums = [], - scalars = [], - interfaces = [], - }: { - objects?: GraphQLObjectType[]; - inputs?: GraphQLInputObjectType[]; - enums?: GraphQLEnumType[]; - scalars?: GraphQLScalarType[]; - interfaces?: GraphQLInterfaceType[]; - }) { - objects.forEach((x) => this.composer.createObjectTC(x)); - inputs.forEach((x) => this.composer.createInputTC(x)); - enums.forEach((x) => this.composer.createEnumTC(x)); - interfaces.forEach((x) => this.composer.createInterfaceTC(x)); - scalars.forEach((scalar) => this.composer.addTypeDefs(`scalar ${scalar.name}`)); - } -} - -// abstract ComposerBuilder -// ConcreteEntityBuilder extends ComposerBuilder -// CompositeEntityBuilder extends ComposerBuilder - -/* -class ToComposer { - _entity: ConcreteEntity | CompositeEntity; - _entityModel: ConcreteEntityAdapter | CompositeEntityAdapter; - _ts: TypeStorage; - - constructor(fromEntity: ConcreteEntity | CompositeEntity) { - this._entity = fromEntity; - this._entityModel = - this._entity instanceof ConcreteEntity - ? new ConcreteEntityAdapter(this._entity) - : new CompositeEntityAdapter(this._entity); - this._ts = new TypeStorage(); - } - - public withInterfaceType() { - // this._tempComposer.add(InterfaceTypeComposer.createTemp(this._currentType)); - this._ts.set( - this._entity.name, - InterfaceTypeComposer.createTemp({ - name: this._entity.name, - fields: ToComposer._attributesToComposeFields(Array.from(this._entityModel.attributes.values())), - }) - ); - return this; - } - - public withObjectType() { - this._ts.set( - this._entity.name, - ObjectTypeComposer.createTemp({ - name: this._entity.name, - fields: ToComposer._attributesToComposeFields(Array.from(this._entityModel.attributes.values())), - // TODO: add description field - // description: this._entity.description, - // TODO: discuss with Simone - create an AnnotationAdapter or logic straight in AttributeAdapter - // directives: graphqlDirectivesToCompose([...node.otherDirectives, ...node.propagatedDirectives]), - // TODO: discuss with Simone - add interfaces to ConcreteEntity - // interfaces: this._entity.interfaces.map((x) => x.name.value) - }) - ); - return this; - } - - public withSortInputType() { - const sortTypeName = `${this._entity.name}Sort`; - const currentType = this._ts.get(this._entity.name); - this._ts.set( - sortTypeName, - InputTypeComposer.createTemp({ - name: sortTypeName, - fields: currentType.getFieldNames().reduce((res, f) => { - return { ...res, [f]: "SortDirection" }; - }, {}), - }) - ); - return this; - } - - public withWhereInputType({ enabledFeatures }) { - const whereTypeName = `${this._entity.name}Where`; - this._ts.set( - whereTypeName, - InputTypeComposer.createTemp({ - name: whereTypeName, - fields: ToComposer._attributesToComposeFields(this._entityModel.getCreateInputTypeFields()), - // TODO: refactor getWhereFields - // getWhereFields({ typeName: relationship.name.value, fields: adapter.getWhereInputTypeFields(), enabledFeatures: features.filters }) - }) - ); - return this; - } - - public withUpdateInputType({ addMathOperators = true, addArrayMethods = true }) { - const updateTypeName = `${this._entity.name}UpdateInput`; - const updateInput = InputTypeComposer.createTemp({ - name: updateTypeName, - fields: ToComposer._attributesToComposeFields(this._entityModel.getUpdateInputTypeFields()), - }); - addMathOperators && addMathOperatorsToITC(updateInput); - addArrayMethods && addArrayMethodsToITC(updateInput, relFields.primitiveFields); - addArrayMethods && addArrayMethodsToITC(updateInput, relFields.pointFields); - this._ts.set(updateTypeName, updateInput); - - return this; - - // TODO: add these - // addMathOperatorsToITC(relationshipUpdateITC); - // addArrayMethodsToITC(relationshipUpdateITC, relFields.primitiveFields); - // addArrayMethodsToITC(relationshipUpdateITC, relFields.pointFields); - } - - public withCreateInputType() { - const createTypeName = `${this._entity.name}CreateInput`; - this._ts.set( - createTypeName, - InputTypeComposer.createTemp({ - name: createTypeName, - fields: ToComposer._attributesToComposeFields(this._entityModel.getCreateInputTypeFields()), - }) - ); - - return this; - } - - public build(_composer: SchemaComposer) { - // _composer.createInterfaceTC(x); - - this._ts.forEach((v) => { - _composer.add(v); - }); - - // _composer.merge(t); - } -} -*/ - -function getUserDefinedFieldDirectivesForDefinition( - definitionNode: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, - definitionNodes: DefinitionNodes -): Map { - const userDefinedFieldDirectives = new Map(); - - const allFields: Array = [...(definitionNode.fields || [])]; - // TODO: is it a good idea to inherit the field directives from implemented interfaces? - // makes sense for deprecated but for other user-defined directives?? - if (definitionNode.interfaces) { - for (const inheritsFrom of definitionNode.interfaces) { - const interfaceDefinition = definitionNodes.interfaceTypes.find( - (type) => type.name.value === inheritsFrom.name.value - ); - const inheritedFields = interfaceDefinition?.fields; - if (inheritedFields) { - allFields.push(...inheritedFields); - } - } - } - for (const field of allFields) { - if (!field.directives) { - return userDefinedFieldDirectives; - } - - const matched = field.directives.filter((directive) => !isInArray(FIELD_DIRECTIVES, directive.name.value)); - if (matched.length) { - userDefinedFieldDirectives.set(field.name.value, matched); - } - } - - return userDefinedFieldDirectives; -} - -function makeAugmentedSchema( - document: DocumentNode, - { - features, - generateSubscriptions, - userCustomResolvers, - subgraph, - }: { - features?: Neo4jFeaturesSettings; - generateSubscriptions?: boolean; - userCustomResolvers?: IResolvers | Array; - subgraph?: Subgraph; - } = {}, - schemaModel: Neo4jGraphQLSchemaModel -): { - nodes: Node[]; - relationships: Relationship[]; - typeDefs: DocumentNode; - resolvers: IResolvers; -} { - const composer = new SchemaComposer(); - const callbacks = features?.populatedBy?.callbacks; - - let relationships: Relationship[] = []; - - const definitionNodes = getDefinitionNodes(document); - const customResolvers = getCustomResolvers(document); - const { - interfaceTypes, - scalarTypes, - objectTypes, - enumTypes, - // inputObjectTypes, - // directives, - unionTypes, - schemaExtensions, - } = definitionNodes; - - // TODO: use schemaModel.definitionCollection instead of definitionNodes? need to add inputObjectTypes and customResolvers - const schemaGenerator = new AugmentedSchemaGenerator( - schemaModel, - definitionNodes, - [customResolvers.customQuery, customResolvers.customMutation, customResolvers.customSubscription].filter( - (x): x is ObjectTypeDefinitionNode => Boolean(x) - ) - ); - const generatorComposer = schemaGenerator.generate(); - composer.merge(generatorComposer); - - // TODO: move these to SchemaGenerator once nodes are moved (in the meantime references to object types are causing errors because they are not present in the generated schema) - const pipedDefs = [ - ...definitionNodes.enumTypes, - ...definitionNodes.scalarTypes, - ...definitionNodes.inputObjectTypes, - ...definitionNodes.unionTypes, - ...definitionNodes.directives, - ...[customResolvers.customQuery, customResolvers.customMutation, customResolvers.customSubscription].filter( - (x): x is ObjectTypeDefinitionNode => Boolean(x) - ), - ].filter(Boolean); - if (pipedDefs.length) { - composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); - } - - // Loop over all entries in the deprecation map and add field deprecations to all types in the map. - for (const [typeName, deprecatedFields] of deprecationMap) { - const typeComposer = composer.getOTC(typeName); - typeComposer.deprecateFields( - deprecatedFields.reduce((acc, { field, reason }) => ({ ...acc, [field]: reason }), {}) - ); - } - - // TODO: ideally move these in getSubgraphSchema() - if (subgraph) { - const shareable = subgraph.getFullyQualifiedDirectiveName("shareable"); - [CreateInfo.name, UpdateInfo.name, DeleteInfo.name, PageInfo.name].forEach((typeName) => { - const typeComposer = composer.getOTC(typeName); - typeComposer.setDirectiveByName(shareable); - }); - } - - const aggregationTypesMapper = new AggregationTypesMapper(composer, subgraph); - - const getNodesResult = getNodes(definitionNodes, { callbacks, userCustomResolvers }); - - const { nodes, relationshipPropertyInterfaceNames, interfaceRelationshipNames } = getNodesResult; - - const hasGlobalNodes = addGlobalNodeFields(nodes, composer); - - const { relationshipProperties, interfaceRelationships, filteredInterfaceTypes } = filterInterfaceTypes( - interfaceTypes, - relationshipPropertyInterfaceNames, - interfaceRelationshipNames - ); - - // TODO: find some solution for this - // TODO: should directives be inherited?? they are user-defined after all - // TODO: other considerations might apply to PROPAGATED_DIRECTIVES: deprecated and shareable - // ATM we only test deprecated propagates - // also, should these live in the schema model?? - const userDefinedFieldDirectivesForNode = new Map>(); - const userDefinedDirectivesForNode = new Map(); - const propagatedDirectivesForNode = new Map(); - const userDefinedDirectivesForInterface = new Map(); - - for (const definitionNode of definitionNodes.objectTypes) { - const userDefinedObjectDirectives = - definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; - const propagatedDirectives = - definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || - []; - userDefinedDirectivesForNode.set(definitionNode.name.value, userDefinedObjectDirectives); - propagatedDirectivesForNode.set(definitionNode.name.value, propagatedDirectives); - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); - } - - for (const definitionNode of definitionNodes.interfaceTypes) { - const userDefinedInterfaceDirectives = - definitionNode.directives?.filter((directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value)) || - []; - userDefinedDirectivesForInterface.set(definitionNode.name.value, userDefinedInterfaceDirectives); - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); - } - - // TODO: keeping this `relationshipFields` scaffold for backwards compatibility on translation layer - // actual functional logic is in schemaModel.concreteEntities.forEach - const relationshipFields = new Map(); - relationshipProperties.forEach((relationship) => { - const relFields = getObjFieldMeta({ - enums: enumTypes, - interfaces: filteredInterfaceTypes, - objects: objectTypes, - scalars: scalarTypes, - unions: unionTypes, - obj: relationship, - callbacks, - }); - - relationshipFields.set(relationship.name.value, relFields); - }); - - // this is the new "functional" way for the above forEach - // helper to only create relationshipProperties Interface types once, even if multiple relationships reference it - const seenRelationshipPropertiesInterfaces = new Set(); - schemaModel.concreteEntities.forEach((concreteEntity) => { - const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - - for (const relationship of concreteEntityAdapter.relationships.values()) { - { - if ( - !relationship.propertiesTypeName || - seenRelationshipPropertiesInterfaces.has(relationship.propertiesTypeName) - ) { - continue; - } - doForRelationshipPropertiesInterface( - composer, - relationship, - definitionNodes, - userDefinedDirectivesForInterface, - features - ); - seenRelationshipPropertiesInterfaces.add(relationship.propertiesTypeName); - } - } - }); - - // TODO: temporary helper to keep track of which interface entities were already "visited" - // say why this is happening here ALE - const seenInterfaces = new Set(); - interfaceRelationships.forEach((interfaceRelationship) => { - const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; - const interfaceEntityAdapter = new InterfaceEntityAdapter(interfaceEntity); - const updatedRelationships = doForInterfacesThatAreTargetOfARelationship({ - composer, - interfaceEntityAdapter, - definitionNodes, - subgraph, - relationships, - relationshipFields, - }); - if (updatedRelationships) { - relationships = updatedRelationships; - } - seenInterfaces.add(interfaceRelationship.name.value); - }); - - schemaModel.concreteEntities.forEach((concreteEntity) => { - // TODO: temporary for backwards compatibility for translation layer - const node = nodes.find((n) => n.name === concreteEntity.name); - if (!node) { - throw new Error(`Node not found with the name ${concreteEntity.name}`); - } - const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - - const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(concreteEntityAdapter.name); - if (!userDefinedFieldDirectives) { - throw new Error(`User defined field directives not found for ${concreteEntityAdapter.name}`); - } - - const propagatedDirectives = propagatedDirectivesForNode.get(concreteEntity.name) || []; - const userDefinedObjectDirectives = (userDefinedDirectivesForNode.get(concreteEntity.name) || []).concat( - propagatedDirectives - ); - - withOptionsInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - - withAggregateSelectionType({ concreteEntityAdapter, aggregationTypesMapper, propagatedDirectives, composer }); - - withWhereInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, features, composer }); - - // TODO: new way - // TODO: Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model - augmentFulltextSchema2(node, composer, concreteEntityAdapter); - - withUniqueWhereInputType({ concreteEntityAdapter, composer }); - - withCreateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - - withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - - withMutationResponseTypes({ concreteEntityAdapter, propagatedDirectives, composer }); - - // createRelationshipFields({ - // relationshipFields: node.relationFields, - // concreteEntityAdapter, - // schemaComposer: composer, - // composeNode, - // sourceName: concreteEntityAdapter.name, - // nodes, - // relationshipPropertyFields: relationshipFields, - // subgraph, - // }); - - const composeNode = withObjectType({ - concreteEntityAdapter, - userDefinedFieldDirectives, - userDefinedObjectDirectives, - composer, - }); - - createRelationshipFieldsFromConcreteEntityAdapter({ - entityAdapter: concreteEntityAdapter, - schemaComposer: composer, - composeNode, - subgraph, - userDefinedFieldDirectives, - }); - - // relationships = [ - // ...relationships, - // ...createConnectionFields({ - // connectionFields: node.connectionFields, - // schemaComposer: composer, - // composeNode, - // sourceName: concreteEntityAdapter.name, - // nodes, - // relationshipPropertyFields: relationshipFields, - // }), - // ]; - - relationships = [ - ...relationships, - ...createConnectionFields({ - entityAdapter: concreteEntityAdapter, - schemaComposer: composer, - composeNode, - userDefinedFieldDirectives, - relationshipFields, - }), - ]; - - ensureNonEmptyInput(composer, concreteEntityAdapter.operations.updateInputTypeName); - ensureNonEmptyInput(composer, concreteEntityAdapter.operations.createInputTypeName); - - if (concreteEntityAdapter.isReadable) { - composer.Query.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.read]: findResolver2({ - node, - concreteEntityAdapter, - }), - }); - composer.Query.setFieldDirectives( - concreteEntityAdapter.operations.rootTypeFieldNames.read, - graphqlDirectivesToCompose(propagatedDirectives) - ); - composer.Query.addFields({ - [`${concreteEntityAdapter.plural}Connection`]: rootConnectionResolver2({ - node, - composer, - concreteEntityAdapter, - propagatedDirectives, - }), - }); - composer.Query.setFieldDirectives( - `${concreteEntityAdapter.plural}Connection`, - graphqlDirectivesToCompose(propagatedDirectives) - ); - } - if (concreteEntityAdapter.isAggregable) { - composer.Query.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver2({ - node, - concreteEntityAdapter, - }), - }); - composer.Query.setFieldDirectives( - concreteEntityAdapter.operations.rootTypeFieldNames.aggregate, - graphqlDirectivesToCompose(propagatedDirectives) - ); - } - - if (concreteEntityAdapter.isCreatable) { - composer.Mutation.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.create]: createResolver2({ - node, - concreteEntityAdapter, - }), - }); - composer.Mutation.setFieldDirectives( - concreteEntityAdapter.operations.rootTypeFieldNames.create, - graphqlDirectivesToCompose(propagatedDirectives) - ); - } - - if (concreteEntityAdapter.isDeletable) { - composer.Mutation.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.delete]: deleteResolver2({ - node, - composer, - concreteEntityAdapter, - }), - }); - composer.Mutation.setFieldDirectives( - concreteEntityAdapter.operations.rootTypeFieldNames.delete, - graphqlDirectivesToCompose(propagatedDirectives) - ); - } - - if (concreteEntityAdapter.isUpdatable) { - composer.Mutation.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.update]: updateResolver2({ - node, - composer, - concreteEntityAdapter, - }), - }); - composer.Mutation.setFieldDirectives( - concreteEntityAdapter.operations.rootTypeFieldNames.update, - graphqlDirectivesToCompose(propagatedDirectives) - ); - } - }); - - schemaModel.compositeEntities.forEach((entity) => { - if (entity instanceof UnionEntity) { - withWhereInputType({ - entityAdapter: new UnionEntityAdapter(entity), - userDefinedFieldDirectives: new Map(), - features, - composer, - }); - return; - } - if (entity instanceof InterfaceEntity && !seenInterfaces.has(entity.name)) { - const definitionNode = definitionNodes.interfaceTypes.find((type) => type.name.value === entity.name); - - if (!definitionNode) { - console.error(`Definition node not found for ${entity.name}`); - return; - } - - const interfaceEntityAdapter = new InterfaceEntityAdapter(entity); - - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition( - definitionNode, - definitionNodes - ); - const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(entity.name) || []; - withInterfaceType({ - entityAdapter: interfaceEntityAdapter, - userDefinedFieldDirectives, - userDefinedInterfaceDirectives, - composer, - config: { - includeRelationships: true, - }, - }); - return; - } - return; - }); - - if (generateSubscriptions && nodes.length) { - // generateSubscriptionTypes({ - // schemaComposer: composer, - // nodes, - // relationshipFields, - // interfaceCommonFields, - // globalSchemaConfiguration, - // }); - generateSubscriptionTypes2({ - schemaComposer: composer, - schemaModel, - userDefinedFieldDirectivesForNode, - }); - } - - // TODO: test this - toplevel cypher fields of type Point? - ["Mutation", "Query"].forEach((type) => { - const objectComposer: ObjectTypeComposer = composer[type]; - - const operation: Operation | undefined = schemaModel.operations[type]; - if (!operation) { - return; - } - const operationAdapter = new OperationAdapter(operation); - - const definitionNode = definitionNodes.operations.find( - (d) => d.name.value === type - ) as ObjectTypeDefinitionNode; - const userDefinedDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - - // TODO: this check is for getObjFieldMeta - // this should technically be implied. TBD in Operations class - const hasCypherAttributes = Array.from(operationAdapter.attributes.values()).find( - (attribute) => attribute.annotations.cypher !== undefined - ); - if (!hasCypherAttributes) { - return; - } - // needed for compatibility with translation layer - const objectFields = getObjFieldMeta({ - obj: customResolvers[`customCypher${type}`], - scalars: scalarTypes, - enums: enumTypes, - interfaces: filteredInterfaceTypes, - unions: unionTypes, - objects: objectTypes, - callbacks, - }); - - for (const attributeAdapter of operationAdapter.attributes.values()) { - // needed for compatibility with translation layer - const field = objectFields.cypherFields.find((f) => f.fieldName === attributeAdapter.name) as CypherField; - const customResolver = cypherResolver2({ - field, - attributeAdapter, - type: type as "Query" | "Mutation", - }); - - const composedField = attributeAdapterToComposeFields([attributeAdapter], userDefinedDirectives)[ - attributeAdapter.name - ]; - - objectComposer.addFields({ [attributeAdapter.name]: { ...composedField, ...customResolver } }); - } - }); - - if (!Object.values(composer.Mutation.getFields()).length) { - composer.delete("Mutation"); - } - // TODO: why is this now needed? - if (!Object.values(composer.Subscription.getFields()).length) { - composer.delete("Subscription"); - } - - const generatedTypeDefs = composer.toSDL(); - - let parsedDoc = parse(generatedTypeDefs); - - const emptyObjectsInterfaces = parsedDoc.definitions - .filter( - (x): x is InterfaceTypeDefinitionNode | ObjectTypeDefinitionNode => - (x.kind === Kind.OBJECT_TYPE_DEFINITION && !isRootType(x)) || x.kind === Kind.INTERFACE_TYPE_DEFINITION - ) - .filter((x) => !x.fields?.length); - - if (emptyObjectsInterfaces.length) { - throw new Error( - `Objects and Interfaces must have one or more fields: ${emptyObjectsInterfaces - .map((x) => x.name.value) - .join(", ")}` - ); - } - - const documentNames = new Set(parsedDoc.definitions.filter(definitionNodeHasName).map((x) => x.name.value)); - const resolveMethods = getResolveAndSubscriptionMethods(composer); - - const generatedResolveMethods: GraphQLToolsResolveMethods = {}; - - for (const [key, value] of Object.entries(resolveMethods)) { - if (documentNames.has(key)) { - generatedResolveMethods[key] = value; - } - } - - const generatedResolvers = { - ...generatedResolveMethods, - ...Object.values(Scalars).reduce((res, scalar: GraphQLScalarType) => { - if (generatedTypeDefs.includes(`scalar ${scalar.name}\n`)) { - res[scalar.name] = scalar; - } - return res; - }, {}), - ...(hasGlobalNodes ? { Node: { __resolveType: (root) => root.__resolveType } } : {}), - }; - - unionTypes.forEach((union) => { - // It is possible to make union types "writeonly". In this case adding a resolver for them breaks schema generation. - const unionTypeInSchema = parsedDoc.definitions.find((def) => { - if (def.kind === Kind.UNION_TYPE_DEFINITION && def.name.value === union.name.value) return true; - return false; - }); - if (!generatedResolvers[union.name.value] && unionTypeInSchema) { - generatedResolvers[union.name.value] = { __resolveType: (root) => root.__resolveType }; - } - }); - - interfaceRelationships.forEach((i) => { - if (!generatedResolvers[i.name.value]) { - generatedResolvers[i.name.value] = { __resolveType: (root) => root.__resolveType }; - } - }); - - // do not propagate Neo4jGraphQL directives on schema extensions - const schemaExtensionsWithoutNeo4jDirectives = schemaExtensions.map((schemaExtension): SchemaExtensionNode => { - return { - kind: schemaExtension.kind, - loc: schemaExtension.loc, - operationTypes: schemaExtension.operationTypes, - directives: schemaExtension.directives?.filter( - (schemaDirective) => - !["query", "mutation", "subscription", "authentication"].includes(schemaDirective.name.value) - ), - }; - }); - const seen = {}; - parsedDoc = { - ...parsedDoc, - definitions: [ - ...parsedDoc.definitions.filter((definition) => { - // Filter out default scalars, they are not needed and can cause issues - if (definition.kind === Kind.SCALAR_TYPE_DEFINITION) { - if ( - [ - GraphQLBoolean.name, - GraphQLFloat.name, - GraphQLID.name, - GraphQLInt.name, - GraphQLString.name, - ].includes(definition.name.value) - ) { - return false; - } - } - - if (!("name" in definition)) { - return true; - } - - const n = definition.name?.value as string; - - if (seen[n]) { - return false; - } - - seen[n] = n; - - return true; - }), - ...schemaExtensionsWithoutNeo4jDirectives, - ], - }; - - return { - nodes, - relationships, - typeDefs: parsedDoc, - resolvers: generatedResolvers, - }; -} - -export default makeAugmentedSchema; - -function doForRelationshipPropertiesInterface( - composer: SchemaComposer, - relationshipAdapter: RelationshipAdapter, - definitionNodes: DefinitionNodes, - userDefinedDirectivesForInterface: Map, - features?: Neo4jFeaturesSettings -) { - if (!relationshipAdapter.propertiesTypeName) { - return; - } - - const obj = definitionNodes.interfaceTypes.find((i) => i.name.value === relationshipAdapter.propertiesTypeName); - if (!obj) { - throw new Error(`Could not find interface named ${relationshipAdapter.propertiesTypeName}`); - } - - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(obj, definitionNodes); - const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(relationshipAdapter.name) || []; - withInterfaceType({ - entityAdapter: relationshipAdapter, - userDefinedFieldDirectives, - userDefinedInterfaceDirectives, - composer, - }); - withSortInputType({ relationshipAdapter, userDefinedFieldDirectives, composer }); - withUpdateInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); - withWhereInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, features, composer }); - withCreateInputType({ entityAdapter: relationshipAdapter, userDefinedFieldDirectives, composer }); -} - -function doForInterfacesThatAreTargetOfARelationship({ - composer, - interfaceEntityAdapter, - definitionNodes, - features, - subgraph, - relationships, - relationshipFields, -}: { - composer: SchemaComposer; - interfaceEntityAdapter: InterfaceEntityAdapter; - definitionNodes: DefinitionNodes; - features?: Neo4jFeaturesSettings; - subgraph?: Subgraph; - relationships: Relationship[]; - relationshipFields: Map; -}) { - // We wanted to get the userDefinedDirectives - const definitionNode = definitionNodes.interfaceTypes.find( - (type) => type.name.value === interfaceEntityAdapter.name - ); - if (!definitionNode) { - console.error(`Definition node not found for ${interfaceEntityAdapter.name}`); - return; - } - - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - - withOptionsInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); - withWhereInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, features, composer }); - withCreateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); - withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); - - const composeInterface = withInterfaceType({ - entityAdapter: interfaceEntityAdapter, - userDefinedFieldDirectives, - userDefinedInterfaceDirectives: [], - composer, - }); - createRelationshipFieldsFromConcreteEntityAdapter({ - entityAdapter: interfaceEntityAdapter, - schemaComposer: composer, - composeNode: composeInterface, - subgraph, - userDefinedFieldDirectives, - }); - - relationships = [ - ...relationships, - ...createConnectionFields({ - entityAdapter: interfaceEntityAdapter, - schemaComposer: composer, - composeNode: composeInterface, - userDefinedFieldDirectives, - relationshipFields, - }), - ]; - - return relationships; -} diff --git a/packages/graphql/src/schema/pagination.ts b/packages/graphql/src/schema/pagination.ts index 4e6a444d86..4f313af7dc 100644 --- a/packages/graphql/src/schema/pagination.ts +++ b/packages/graphql/src/schema/pagination.ts @@ -19,7 +19,7 @@ import { Kind, type FieldNode, type GraphQLResolveInfo, type SelectionSetNode } from "graphql"; import { getOffsetWithDefault, offsetToCursor } from "graphql-relay/connection/arrayConnection"; -import type { ConnectionField, ConnectionQueryArgs } from "../types"; +import type { ConnectionQueryArgs } from "../types"; import { isNeoInt } from "../utils/utils"; function getAliasKey({ selectionSet, key }: { selectionSet: SelectionSetNode | undefined; key: string }): string { @@ -33,34 +33,6 @@ function getAliasKey({ selectionSet, key }: { selectionSet: SelectionSetNode | u } export function connectionFieldResolver({ - connectionField, - source, - args, - info, -}: { - connectionField: ConnectionField; - source: any; - args: ConnectionQueryArgs; - info: GraphQLResolveInfo; -}) { - const firstField = info.fieldNodes[0] as FieldNode; - const { selectionSet } = firstField; - - let value = source[connectionField.fieldName]; - if (firstField.alias) { - value = source[firstField.alias.value]; - } - - const totalCountKey = getAliasKey({ selectionSet, key: "totalCount" }); - const { totalCount } = value; - - return { - [totalCountKey]: isNeoInt(totalCount) ? totalCount.toNumber() : totalCount, - ...createConnectionWithEdgeProperties({ source: value, selectionSet, args, totalCount }), - }; -} - -export function connectionFieldResolver2({ connectionFieldName, source, args, diff --git a/packages/graphql/src/schema/resolvers/field/cypher.test.ts b/packages/graphql/src/schema/resolvers/field/cypher.test.ts index 87359a0bdf..cb71a8e781 100644 --- a/packages/graphql/src/schema/resolvers/field/cypher.test.ts +++ b/packages/graphql/src/schema/resolvers/field/cypher.test.ts @@ -17,8 +17,11 @@ * limitations under the License. */ -import { cypherResolver } from "./cypher"; +import { Attribute } from "../../../schema-model/attribute/Attribute"; +import { GraphQLBuiltInScalarType, ScalarType } from "../../../schema-model/attribute/AttributeType"; +import { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { CypherField } from "../../../types"; +import { cypherResolver } from "./cypher"; describe("Cypher resolver", () => { test("should return the correct; type, args and resolve", () => { @@ -30,9 +33,15 @@ describe("Cypher resolver", () => { isEnum: false, isScalar: true, }; - - const result = cypherResolver({ field, statement: "", type: "Query" }); - expect(result.type).toEqual(field.typeMeta.pretty); + const attribute = new Attribute({ + name: "test", + annotations: [], + type: new ScalarType(GraphQLBuiltInScalarType.String, true), + args: [], + }); + const attributeAdapter = new AttributeAdapter(attribute); + const result = cypherResolver({ field, attributeAdapter, type: "Query" }); + expect(result.type).toBe("String!"); expect(result.resolve).toBeInstanceOf(Function); expect(result.args).toMatchObject({}); }); diff --git a/packages/graphql/src/schema/resolvers/field/cypher.ts b/packages/graphql/src/schema/resolvers/field/cypher.ts index a450fb4d2d..876089806a 100644 --- a/packages/graphql/src/schema/resolvers/field/cypher.ts +++ b/packages/graphql/src/schema/resolvers/field/cypher.ts @@ -18,82 +18,17 @@ */ import type { GraphQLResolveInfo } from "graphql"; -import { execute } from "../../../utils"; -import type { CypherField } from "../../../types"; -import { graphqlArgsToCompose, graphqlArgsToCompose2 } from "../../to-compose"; -import { isNeoInt } from "../../../utils/utils"; +import type { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; import { translateTopLevelCypher } from "../../../translate"; -import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; +import type { CypherField } from "../../../types"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; +import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; -import type { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; +import { isNeoInt } from "../../../utils/utils"; +import { graphqlArgsToCompose } from "../../to-compose"; +import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; export function cypherResolver({ - field, - statement, - type, -}: { - field: CypherField; - statement: string; - type: "Query" | "Mutation"; -}) { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - const resolveTree = getNeo4jResolveTree(info); - - (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; - - const { cypher, params } = translateTopLevelCypher({ - context: context as Neo4jGraphQLTranslationContext, - field, - args, - type, - statement, - }); - - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: type === "Query" ? "READ" : "WRITE", - context, - info, - }); - - const values = executeResult.result.records.map((record) => { - const value = record.get(0); - - if (["number", "string", "boolean"].includes(typeof value)) { - return value; - } - - if (!value) { - return undefined; - } - - if (isNeoInt(value)) { - return Number(value); - } - - if (value.identity && value.labels && value.properties) { - return value.properties; - } - - return value; - }); - - if (!field.typeMeta.array) { - return values[0]; - } - - return values; - } - - return { - type: field.typeMeta.pretty, - resolve, - args: graphqlArgsToCompose(field.arguments), - }; -} -export function cypherResolver2({ field, attributeAdapter, type, @@ -156,6 +91,6 @@ export function cypherResolver2({ return { type: attributeAdapter.getTypePrettyName(), resolve, - args: graphqlArgsToCompose2(attributeAdapter.args), + args: graphqlArgsToCompose(attributeAdapter.args), }; } diff --git a/packages/graphql/src/schema/resolvers/mutation/create.test.ts b/packages/graphql/src/schema/resolvers/mutation/create.test.ts index 4868013f4c..a22665cb43 100644 --- a/packages/graphql/src/schema/resolvers/mutation/create.test.ts +++ b/packages/graphql/src/schema/resolvers/mutation/create.test.ts @@ -17,16 +17,28 @@ * limitations under the License. */ -import { createResolver } from "./create"; 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 { createResolver } from "./create"; describe("Create resolver", () => { test("should return the correct; type, args and resolve", () => { const node = new NodeBuilder({ name: "Movie", }).instance(); + const concreteEntity = new ConcreteEntity({ + name: "Movie", + labels: ["Movie"], + annotations: [], + attributes: [], + compositeEntities: [], + description: undefined, + relationships: [], + }); + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - const result = createResolver({ node }); + const result = createResolver({ node, concreteEntityAdapter }); expect(result.type).toBe("CreateMoviesMutationResponse!"); expect(result.resolve).toBeInstanceOf(Function); expect(result.args).toMatchObject({ diff --git a/packages/graphql/src/schema/resolvers/mutation/create.ts b/packages/graphql/src/schema/resolvers/mutation/create.ts index d824c0e8c9..d6331fedb2 100644 --- a/packages/graphql/src/schema/resolvers/mutation/create.ts +++ b/packages/graphql/src/schema/resolvers/mutation/create.ts @@ -27,46 +27,7 @@ import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function createResolver({ node }: { node: Node }) { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - const resolveTree = getNeo4jResolveTree(info, { args }); - - (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; - - const { cypher, params } = await translateCreate({ context: context as Neo4jGraphQLTranslationContext, node }); - - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: "WRITE", - context, - info, - }); - - const nodeProjection = info.fieldNodes[0]?.selectionSet?.selections.find( - (selection) => selection.kind === Kind.FIELD && selection.name.value === node.plural - ) as FieldNode; - const nodeKey = nodeProjection?.alias ? nodeProjection.alias.value : nodeProjection?.name?.value; - - publishEventsToSubscriptionMechanism(executeResult, context.features?.subscriptions, context.schemaModel); - - return { - info: { - bookmark: executeResult.bookmark, - ...executeResult.statistics, - }, - ...(nodeProjection ? { [nodeKey]: executeResult.records[0]?.data || [] } : {}), - }; - } - - return { - type: `${node.mutationResponseTypeNames.create}!`, - resolve, - args: { input: `[${node.name}CreateInput!]!` }, - }; -} - -export function createResolver2({ +export function createResolver({ node, concreteEntityAdapter, }: { diff --git a/packages/graphql/src/schema/resolvers/mutation/delete.test.ts b/packages/graphql/src/schema/resolvers/mutation/delete.test.ts index 049586d24f..d68655ea48 100644 --- a/packages/graphql/src/schema/resolvers/mutation/delete.test.ts +++ b/packages/graphql/src/schema/resolvers/mutation/delete.test.ts @@ -19,6 +19,8 @@ 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", () => { @@ -27,10 +29,20 @@ describe("Delete resolver", () => { name: "Movie", relationFields: [], }).instance(); + const concreteEntity = new ConcreteEntity({ + name: "Movie", + labels: ["Movie"], + annotations: [], + attributes: [], + compositeEntities: [], + description: undefined, + relationships: [], + }); + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); const composer = new SchemaComposer(); - const result = deleteResolver({ node, composer }); + const result = deleteResolver({ node, 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 d66e1a2d19..da0844e4ea 100644 --- a/packages/graphql/src/schema/resolvers/mutation/delete.ts +++ b/packages/graphql/src/schema/resolvers/mutation/delete.ts @@ -28,43 +28,7 @@ import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function deleteResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - const resolveTree = getNeo4jResolveTree(info, { args }); - - (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; - - const { cypher, params } = translateDelete({ context: context as Neo4jGraphQLTranslationContext, node }); - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: "WRITE", - context, - info, - }); - - publishEventsToSubscriptionMechanism(executeResult, context.features?.subscriptions, context.schemaModel); - - return { bookmark: executeResult.bookmark, ...executeResult.statistics }; - } - - const hasDeleteInput = composer.has(`${node.name}DeleteInput`); - - return { - type: `DeleteInfo!`, - resolve, - args: { - where: `${node.name}Where`, - ...(hasDeleteInput - ? { - delete: `${node.name}DeleteInput`, - } - : {}), - }, - }; -} - -export function deleteResolver2({ +export function deleteResolver({ node, composer, concreteEntityAdapter, diff --git a/packages/graphql/src/schema/resolvers/mutation/update.test.ts b/packages/graphql/src/schema/resolvers/mutation/update.test.ts index 8912365874..23cdb54a31 100644 --- a/packages/graphql/src/schema/resolvers/mutation/update.test.ts +++ b/packages/graphql/src/schema/resolvers/mutation/update.test.ts @@ -19,6 +19,8 @@ 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 { updateResolver } from "./update"; describe("Update resolver", () => { @@ -28,6 +30,16 @@ describe("Update resolver", () => { // @ts-ignore relationFields: [{}, {}], }).instance(); + const concreteEntity = new ConcreteEntity({ + name: "Movie", + labels: ["Movie"], + annotations: [], + attributes: [], + compositeEntities: [], + description: undefined, + relationships: [], + }); + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); const composer = new SchemaComposer(); composer.createInputTC("MovieRelationInput"); @@ -36,7 +48,7 @@ describe("Update resolver", () => { composer.createInputTC("MovieDisconnectInput"); composer.createInputTC("MovieConnectOrCreateInput"); - const result = updateResolver({ node, composer }); + const result = updateResolver({ node, composer, concreteEntityAdapter }); expect(result.type).toBe("UpdateMoviesMutationResponse!"); expect(result.resolve).toBeInstanceOf(Function); expect(result.args).toMatchObject({ @@ -55,12 +67,22 @@ describe("Update resolver", () => { // @ts-ignore relationFields: [{}, {}], }).instance(); + const concreteEntity = new ConcreteEntity({ + name: "Movie", + labels: ["Movie"], + annotations: [], + attributes: [], + compositeEntities: [], + description: undefined, + relationships: [], + }); + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); const composer = new SchemaComposer(); composer.createInputTC("MovieConnectInput"); composer.createInputTC("MovieDisconnectInput"); - const result = updateResolver({ node, composer }); + const result = updateResolver({ node, composer, 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 1ada2e8a62..b4fc139967 100644 --- a/packages/graphql/src/schema/resolvers/mutation/update.ts +++ b/packages/graphql/src/schema/resolvers/mutation/update.ts @@ -29,74 +29,7 @@ import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import { publishEventsToSubscriptionMechanism } from "../../subscriptions/publish-events-to-subscription-mechanism"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function updateResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - const resolveTree = getNeo4jResolveTree(info, { args }); - - (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; - - const [cypher, params] = await translateUpdate({ context: context as Neo4jGraphQLTranslationContext, node }); - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: "WRITE", - context, - info, - }); - - publishEventsToSubscriptionMechanism(executeResult, context.features?.subscriptions, context.schemaModel); - - const nodeProjection = info.fieldNodes[0]?.selectionSet?.selections.find( - (selection) => selection.kind === Kind.FIELD && selection.name.value === node.plural - ) as FieldNode; - - const nodeKey = nodeProjection?.alias ? nodeProjection.alias.value : nodeProjection?.name?.value; - - return { - info: { - bookmark: executeResult.bookmark, - ...executeResult.statistics, - }, - ...(nodeProjection ? { [nodeKey]: executeResult.records[0]?.data || [] } : {}), - }; - } - - const relationFields: Record = {}; - - const connectInput = `${node.name}ConnectInput`; - const disconnectInput = `${node.name}DisconnectInput`; - const createInput = `${node.name}RelationInput`; - const deleteInput = `${node.name}DeleteInput`; - const connectOrCreateInput = `${node.name}ConnectOrCreateInput`; - - if (composer.has(connectInput)) { - relationFields.connect = connectInput; - } - if (composer.has(disconnectInput)) { - relationFields.disconnect = disconnectInput; - } - if (composer.has(createInput)) { - relationFields.create = createInput; - } - if (composer.has(deleteInput)) { - relationFields.delete = deleteInput; - } - if (composer.has(connectOrCreateInput)) { - relationFields.connectOrCreate = connectOrCreateInput; - } - - return { - type: `${node.mutationResponseTypeNames.update}!`, - resolve, - args: { - where: `${node.name}Where`, - update: `${node.name}UpdateInput`, - ...relationFields, - }, - }; -} - -export function updateResolver2({ +export function updateResolver({ node, composer, concreteEntityAdapter, diff --git a/packages/graphql/src/schema/resolvers/query/aggregate.ts b/packages/graphql/src/schema/resolvers/query/aggregate.ts index 17a2f1b8dc..1d05232bb0 100644 --- a/packages/graphql/src/schema/resolvers/query/aggregate.ts +++ b/packages/graphql/src/schema/resolvers/query/aggregate.ts @@ -26,50 +26,7 @@ import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function aggregateResolver({ node }: { node: Node }) { - async function resolve(_root: any, _args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - const resolveTree = getNeo4jResolveTree(info); - - (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; - - const [aggregateCypher, aggregateParams] = translateAggregate({ - context: context as Neo4jGraphQLTranslationContext, - node, - }); - - const { cypher, params: builtParams } = aggregateCypher.build(); - const params = { ...aggregateParams, ...builtParams }; - - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: "READ", - context, - info, - }); - - return Object.values(executeResult.records[0] || {})[0]; - } - - return { - type: `${node.aggregateTypeNames.selection}!`, - resolve, - args: { - where: `${node.name}Where`, - ...(node.fulltextDirective - ? { - fulltext: { - type: `${node.name}Fulltext`, - description: - "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", - }, - } - : {}), - }, - }; -} - -export function aggregateResolver2({ +export function aggregateResolver({ node, concreteEntityAdapter, }: { diff --git a/packages/graphql/src/schema/resolvers/query/fulltext.ts b/packages/graphql/src/schema/resolvers/query/fulltext.ts index 27856d078d..8131d56cd6 100644 --- a/packages/graphql/src/schema/resolvers/query/fulltext.ts +++ b/packages/graphql/src/schema/resolvers/query/fulltext.ts @@ -19,7 +19,6 @@ import Cypher from "@neo4j/cypher-builder"; import type { GraphQLFieldResolver, GraphQLResolveInfo } from "graphql"; -import type { ObjectTypeComposerFieldConfigDefinition } from "graphql-compose"; import type { Node } from "../../../classes"; import { translateRead } from "../../../translate"; import type { FulltextContext } from "../../../types"; @@ -28,53 +27,7 @@ import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function fulltextResolver( - { node }: { node: Node }, - index: FulltextContext -): ObjectTypeComposerFieldConfigDefinition { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - context.fulltext = index; - context.fulltext.scoreVariable = new Cypher.Variable(); - - const resolveTree = getNeo4jResolveTree(info, { args }); - resolveTree.args.options = { - sort: resolveTree.args.sort, - limit: resolveTree.args.limit, - offset: resolveTree.args.offset, - }; - - (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; - - const { cypher, params } = translateRead( - { context: context as Neo4jGraphQLTranslationContext, node }, - node.singular - ); - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: "READ", - context, - info, - }); - return executeResult.records; - } - - return { - type: `[${node.fulltextTypeNames.result}!]!`, - description: - "Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the `fulltext` argument under other queries for this functionality.", - resolve, - args: { - phrase: "String!", - where: node.fulltextTypeNames.where, - sort: `[${node.fulltextTypeNames.sort}!]`, - limit: "Int", - offset: "Int", - }, - }; -} - -export function fulltextResolver2({ +export function fulltextResolver({ node, index, }: { diff --git a/packages/graphql/src/schema/resolvers/query/read.test.ts b/packages/graphql/src/schema/resolvers/query/read.test.ts index 1f5093c89e..de3e964185 100644 --- a/packages/graphql/src/schema/resolvers/query/read.test.ts +++ b/packages/graphql/src/schema/resolvers/query/read.test.ts @@ -17,16 +17,28 @@ * limitations under the License. */ -import { findResolver } from "./read"; 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 { findResolver } from "./read"; describe("Read resolver", () => { test("should return the correct; type, args and resolve", () => { const node = new NodeBuilder({ name: "Movie", }).instance(); + const concreteEntity = new ConcreteEntity({ + name: "Movie", + labels: ["Movie"], + annotations: [], + attributes: [], + compositeEntities: [], + description: undefined, + relationships: [], + }); + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - const result = findResolver({ node }); + const result = findResolver({ node, concreteEntityAdapter }); expect(result.type).toBe(`[Movie!]!`); expect(result.resolve).toBeInstanceOf(Function); expect(result.args).toMatchObject({ diff --git a/packages/graphql/src/schema/resolvers/query/read.ts b/packages/graphql/src/schema/resolvers/query/read.ts index 1aeabf9701..477cafd98a 100644 --- a/packages/graphql/src/schema/resolvers/query/read.ts +++ b/packages/graphql/src/schema/resolvers/query/read.ts @@ -26,45 +26,7 @@ import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function findResolver({ node }: { node: Node }) { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - const resolveTree = getNeo4jResolveTree(info, { args }); - - (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; - - const { cypher, params } = translateRead({ context: context as Neo4jGraphQLTranslationContext, node }); - - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: "READ", - context, - info, - }); - - return executeResult.records.map((x) => x.this); - } - - return { - type: `[${node.name}!]!`, - resolve, - args: { - where: `${node.name}Where`, - options: `${node.name}Options`, - ...(node.fulltextDirective - ? { - fulltext: { - type: `${node.name}Fulltext`, - description: - "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", - }, - } - : {}), - }, - }; -} - -export function findResolver2({ +export function findResolver({ node, concreteEntityAdapter, }: { diff --git a/packages/graphql/src/schema/resolvers/query/root-connection.ts b/packages/graphql/src/schema/resolvers/query/root-connection.ts index b6369a1a23..addfd8ec63 100644 --- a/packages/graphql/src/schema/resolvers/query/root-connection.ts +++ b/packages/graphql/src/schema/resolvers/query/root-connection.ts @@ -26,7 +26,6 @@ import { type SelectionSetNode, } from "graphql"; import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; -import { upperFirst } from "graphql-compose"; import type { PageInfo as PageInfoRelay } from "graphql-relay"; import type { Node } from "../../../classes"; import { PageInfo } from "../../../graphql/objects/PageInfo"; @@ -40,111 +39,7 @@ import { createConnectionWithEdgeProperties } from "../../pagination"; import { graphqlDirectivesToCompose } from "../../to-compose"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -export function rootConnectionResolver({ node, composer }: { node: Node; composer: SchemaComposer }) { - async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - const resolveTree = getNeo4jResolveTree(info, { args }); - - const edgeTree = resolveTree.fieldsByTypeName[`${upperFirst(node.plural)}Connection`]?.edges; - const nodeTree = edgeTree?.fieldsByTypeName[`${node.name}Edge`]?.node; - const resolveTreeForContext = nodeTree || resolveTree; - - (context as Neo4jGraphQLTranslationContext).resolveTree = { - ...resolveTreeForContext, - args: resolveTree.args, - }; - - const { cypher, params } = translateRead({ - context: context as Neo4jGraphQLTranslationContext, - node, - isRootConnectionField: true, - }); - - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: "READ", - context, - }); - - let totalCount = 0; - let edges: any[] = []; - let pageInfo: PageInfoRelay = { - hasNextPage: false, - hasPreviousPage: false, - startCursor: null, - endCursor: null, - }; - - if (executeResult.records[0]) { - const record = executeResult.records[0].this; - - totalCount = isNeoInt(record.totalCount) ? record.totalCount.toNumber() : record.totalCount; - - const connection = createConnectionWithEdgeProperties({ - selectionSet: resolveTree as unknown as SelectionSetNode, - source: { edges: record.edges }, - args: { first: args.first, after: args.after }, - totalCount, - }); - - edges = connection.edges as any[]; - pageInfo = connection.pageInfo as PageInfoRelay; - } - - return { - totalCount, - edges, - pageInfo, - }; - } - - const rootEdge = composer.createObjectTC({ - name: `${node.name}Edge`, - fields: { - cursor: "String!", - node: `${node.name}!`, - }, - directives: graphqlDirectivesToCompose(node.propagatedDirectives), - }); - - const rootConnection = composer.createObjectTC({ - name: `${upperFirst(node.plural)}Connection`, - fields: { - totalCount: "Int!", - pageInfo: "PageInfo!", - edges: rootEdge.NonNull.List.NonNull, - }, - directives: graphqlDirectivesToCompose(node.propagatedDirectives), - }); - - // since sort is not created when there is nothing to sort, we check for its existence - let sortArg: InputTypeComposer | undefined; - if (composer.has(`${node.name}Sort`)) { - sortArg = composer.getITC(`${node.name}Sort`); - } - - return { - type: rootConnection.NonNull, - resolve, - args: { - first: "Int", - after: "String", - where: `${node.name}Where`, - ...(sortArg ? { sort: sortArg.List } : {}), - ...(node.fulltextDirective - ? { - fulltext: { - type: `${node.name}Fulltext`, - description: - "Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score.", - }, - } - : {}), - }, - }; -} - -export function rootConnectionResolver2({ +export function rootConnectionResolver({ node, composer, concreteEntityAdapter, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication-selection-set.ts b/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication-selection-set.ts index 70df9fb8d8..4f237c4003 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication-selection-set.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/authentication/check-authentication-selection-set.ts @@ -17,45 +17,18 @@ * limitations under the License. */ -import type Node from "../../../../classes/Node"; -import type { SubscriptionEventType } from "../types"; -import type { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEntity"; import type { GraphQLResolveInfo } from "graphql"; import type { ResolveTree } from "graphql-parse-resolve-info"; import { parseResolveInfo } from "graphql-parse-resolve-info"; +import type { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEntity"; +import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; +import type { SubscriptionEventType } from "../types"; +import { checkAuthentication } from "./check-authentication"; import type { SelectionFields } from "./selection-set-parser"; import { parseSelectionSetForAuthenticated } from "./selection-set-parser"; -import { checkAuthentication } from "./check-authentication"; -import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; -import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; export function checkAuthenticationOnSelectionSet( - resolveInfo: GraphQLResolveInfo, - node: Node, - type: SubscriptionEventType, - context: Neo4jGraphQLComposedSubscriptionsContext -) { - const resolveTree = parseResolveInfo(resolveInfo) as ResolveTree | undefined | null; - if (!resolveTree) { - return; - } - const entities = context.schemaModel.getEntitiesByNameAndLabels(node.name, node.getAllLabels()); - if (!entities.length) { - return; - } - const concreteEntity = entities[0] as ConcreteEntity; - const authenticatedSelections = parseSelectionSetForAuthenticated({ - resolveTree, - entity: concreteEntity, - entityTypeName: node.subscriptionEventTypeNames[type], - entityPayloadTypeName: node.subscriptionEventPayloadFieldNames[type], - context, - }); - authenticatedSelections.forEach(({ entity, fieldSelection }) => - checkAuthenticationOnSelection({ entity, fieldSelection, context }) - ); -} -export function checkAuthenticationOnSelectionSet2( resolveInfo: GraphQLResolveInfo, entityAdapter: ConcreteEntityAdapter, type: SubscriptionEventType, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts b/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts index e288db5a2d..0824e2de61 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/subscribe.ts @@ -18,23 +18,18 @@ */ import { on } from "events"; -import type { ObjectFields } from "../../../schema/get-obj-field-meta"; +import type { GraphQLResolveInfo } from "graphql"; import { Neo4jGraphQLError } from "../../../classes"; -import type Node from "../../../classes/Node"; +import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { NodeSubscriptionsEvent, RelationshipSubscriptionsEvent, SubscriptionsEvent } from "../../../types"; +import type { Neo4jGraphQLComposedSubscriptionsContext } from "../composition/wrap-subscription"; +import { checkAuthentication } from "./authentication/check-authentication"; +import { checkAuthenticationOnSelectionSet } from "./authentication/check-authentication-selection-set"; import { filterAsyncIterator } from "./filter-async-iterator"; import type { SubscriptionEventType } from "./types"; import { updateDiffFilter } from "./update-diff-filter"; -import { subscriptionWhere, subscriptionWhere2 } from "./where/where"; -import { subscriptionAuthorization, subscriptionAuthorization2 } from "./where/authorization"; -import type { GraphQLResolveInfo } from "graphql"; -import { checkAuthentication } from "./authentication/check-authentication"; -import { - checkAuthenticationOnSelectionSet, - checkAuthenticationOnSelectionSet2, -} from "./authentication/check-authentication-selection-set"; -import type { Neo4jGraphQLComposedSubscriptionsContext } from "../composition/wrap-subscription"; -import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { subscriptionAuthorization } from "./where/authorization"; +import { subscriptionWhere } from "./where/where"; export function subscriptionResolve(payload: [SubscriptionsEvent]): SubscriptionsEvent { if (!payload) { @@ -48,75 +43,6 @@ type SubscriptionArgs = { }; export function generateSubscribeMethod({ - node, - type, - nodes, - relationshipFields, -}: { - node: Node; - type: SubscriptionEventType; - nodes?: Node[]; - relationshipFields?: Map; -}) { - return ( - _root: any, - args: SubscriptionArgs, - context: Neo4jGraphQLComposedSubscriptionsContext, - resolveInfo: GraphQLResolveInfo - ): AsyncIterator<[SubscriptionsEvent]> => { - checkAuthenticationOnSelectionSet(resolveInfo, node, type, context); - const entities = context.schemaModel.getEntitiesByLabels(node.getAllLabels()); - const concreteEntity = entities[0]; - - if (!concreteEntity) { - throw new Error("Could not find entity"); - } - - checkAuthentication({ authenticated: concreteEntity, operation: "SUBSCRIBE", context }); - - const iterable: AsyncIterableIterator<[SubscriptionsEvent]> = on(context.subscriptionsEngine.events, type); - if (["create", "update", "delete"].includes(type)) { - return filterAsyncIterator<[SubscriptionsEvent]>(iterable, (data) => { - return ( - (data[0] as NodeSubscriptionsEvent).typename === node.name && - subscriptionAuthorization({ event: data[0], node, entity: concreteEntity, context }) && - subscriptionWhere({ where: args.where, event: data[0], node }) && - updateDiffFilter(data[0]) - ); - }); - } - - if (["create_relationship", "delete_relationship"].includes(type)) { - return filterAsyncIterator<[SubscriptionsEvent]>(iterable, (data) => { - const relationEventPayload = data[0] as RelationshipSubscriptionsEvent; - const isOfRelevantType = - relationEventPayload.toTypename === node.name || relationEventPayload.fromTypename === node.name; - if (!isOfRelevantType) { - return false; - } - const relationFieldName = node.relationFields.find( - (r) => r.typeUnescaped === relationEventPayload.relationshipName - )?.fieldName; - - return ( - !!relationFieldName && - subscriptionAuthorization({ - event: data[0], - node, - entity: concreteEntity, - nodes, - relationshipFields, - context, - }) && - subscriptionWhere({ where: args.where, event: data[0], node, nodes, relationshipFields }) - ); - }); - } - - throw new Neo4jGraphQLError(`Invalid type in subscription: ${type}`); - }; -} -export function generateSubscribeMethod2({ entityAdapter, type, }: { @@ -129,7 +55,7 @@ export function generateSubscribeMethod2({ context: Neo4jGraphQLComposedSubscriptionsContext, resolveInfo: GraphQLResolveInfo ): AsyncIterator<[SubscriptionsEvent]> => { - checkAuthenticationOnSelectionSet2(resolveInfo, entityAdapter, type, context); + checkAuthenticationOnSelectionSet(resolveInfo, entityAdapter, type, context); checkAuthentication({ authenticated: entityAdapter, operation: "SUBSCRIBE", context }); @@ -138,8 +64,8 @@ export function generateSubscribeMethod2({ return filterAsyncIterator<[SubscriptionsEvent]>(iterable, (data) => { return ( (data[0] as NodeSubscriptionsEvent).typename === entityAdapter.name && - subscriptionAuthorization2({ event: data[0], entity: entityAdapter, context }) && - subscriptionWhere2({ where: args.where, event: data[0], entityAdapter }) && + subscriptionAuthorization({ event: data[0], entity: entityAdapter, context }) && + subscriptionWhere({ where: args.where, event: data[0], entityAdapter }) && updateDiffFilter(data[0]) ); }); @@ -160,12 +86,12 @@ export function generateSubscribeMethod2({ return ( !!relationFieldName && - subscriptionAuthorization2({ + subscriptionAuthorization({ event: data[0], entity: entityAdapter, context, }) && - subscriptionWhere2({ where: args.where, event: data[0], entityAdapter }) + subscriptionWhere({ where: args.where, event: data[0], entityAdapter }) ); }); } diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts index 7131218105..aff0ec8913 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/authorization.ts @@ -17,61 +17,14 @@ * limitations under the License. */ +import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { SubscriptionsEvent } from "../../../../types"; -import type Node from "../../../../classes/Node"; -import type { ObjectFields } from "../../../get-obj-field-meta"; -import { filterByAuthorizationRules, filterByAuthorizationRules2 } from "./filters/filter-by-authorization-rules"; -import type { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEntity"; +import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; +import { filterByAuthorizationRules } from "./filters/filter-by-authorization-rules"; import { multipleConditionsAggregationMap } from "./utils/multiple-conditions-aggregation-map"; import { populateWhereParams } from "./utils/populate-where-params"; -import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../composition/wrap-subscription"; -import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; export function subscriptionAuthorization({ - event, - node, - entity, - nodes, - relationshipFields, - context, -}: { - event: SubscriptionsEvent; - node: Node; - entity: ConcreteEntity; - nodes?: Node[]; - relationshipFields?: Map; - context: Neo4jGraphQLComposedSubscriptionsContext; -}): boolean { - const subscriptionsAuthorization = entity.annotations.subscriptionsAuthorization; - - const matchedRules = (subscriptionsAuthorization?.filter || []).filter((rule) => - rule.events.some((e) => e.toLowerCase() === event.event) - ); - - if (!matchedRules.length) { - return true; - } - - const results = matchedRules.map((rule) => { - if (rule.requireAuthentication && !context.authorization.jwt) { - return false; - } - - const where = populateWhereParams({ where: rule.where, context }); - - return filterByAuthorizationRules({ - node, - where, - event, - nodes, - relationshipFields, - context, - }); - }); - - return multipleConditionsAggregationMap.OR(results); -} -export function subscriptionAuthorization2({ event, entity, context, @@ -97,7 +50,7 @@ export function subscriptionAuthorization2({ const where = populateWhereParams({ where: rule.where, context }); - return filterByAuthorizationRules2({ + return filterByAuthorizationRules({ entityAdapter: entity, where, event, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts index b12e6d36f3..b483015264 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-authorization-rules.ts @@ -17,139 +17,22 @@ * limitations under the License. */ -import type { Node, RelationField, RelationshipSubscriptionsEvent, SubscriptionsEvent } from "../../../../../types"; -import type { ObjectFields } from "../../../../get-obj-field-meta"; -import type { RecordType, RelationshipType } from "../../types"; -import { filterByProperties, filterByProperties2 } from "./filter-by-properties"; -import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; -import { filterRelationshipKey, filterRelationshipKey2 } from "../utils/filter-relationship-key"; -import { filterByValues } from "../../../../../translate/authorization/utils/filter-by-values"; import type { SubscriptionsAuthorizationWhere } from "../../../../../schema-model/annotation/SubscriptionsAuthorizationAnnotation"; -import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../../composition/wrap-subscription"; import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { filterByValues } from "../../../../../translate/authorization/utils/filter-by-values"; +import type { RelationshipSubscriptionsEvent, SubscriptionsEvent } from "../../../../../types"; +import type { Neo4jGraphQLComposedSubscriptionsContext } from "../../../composition/wrap-subscription"; +import type { RecordType, RelationshipType } from "../../types"; +import { filterRelationshipKey } from "../utils/filter-relationship-key"; +import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; +import { filterByProperties } from "./filter-by-properties"; function isRelationshipSubscriptionsEvent(event: SubscriptionsEvent): event is RelationshipSubscriptionsEvent { return ["create_relationship", "delete_relationship"].includes(event.event); } export function filterByAuthorizationRules({ - node, - where, - event, - nodes, - relationshipFields, - context, -}: { - node: Node; - where: - | SubscriptionsAuthorizationWhere - | Record< - string, - RecordType | Record | Array> - >; - event: SubscriptionsEvent; - nodes?: Node[]; - relationshipFields?: Map; - context: Neo4jGraphQLComposedSubscriptionsContext; -}): boolean { - const receivedEventProperties = event.properties; - - const results = Object.entries(where).map(([wherePropertyKey, wherePropertyValue]) => { - if (Object.keys(multipleConditionsAggregationMap).includes(wherePropertyKey)) { - const comparisonResultsAggregationFn = multipleConditionsAggregationMap[wherePropertyKey]; - let comparisonResults; - if (wherePropertyKey === "NOT") { - comparisonResults = filterByAuthorizationRules({ - node, - where: wherePropertyValue as Record, - event, - nodes, - relationshipFields, - context, - }); - } else { - comparisonResults = (wherePropertyValue as Array>).map((whereCl) => { - return filterByAuthorizationRules({ - node, - where: whereCl, - event, - nodes, - relationshipFields, - context, - }); - }); - } - - if (!comparisonResultsAggregationFn(comparisonResults)) { - return false; - } - } - - if (wherePropertyKey === "node") { - switch (event.event) { - case "create": - return filterByProperties({ - node, - whereProperties: wherePropertyValue, - receivedProperties: event.properties.new, - }); - case "update": - case "delete": - return filterByProperties({ - node, - whereProperties: wherePropertyValue, - receivedProperties: event.properties.old, - }); - case "create_relationship": - case "delete_relationship": { - const receivedEventRelationshipType = event.relationshipName; - const relationships = node.relationFields.filter((f) => f.type === receivedEventRelationshipType); - if (!relationships.length) { - return false; - } - const receivedEventRelationship = relationships[0] as RelationField; // ONE relationship only possible - const key = receivedEventRelationship.direction === "IN" ? "to" : "from"; - return filterByProperties({ - node, - whereProperties: wherePropertyValue, - receivedProperties: receivedEventProperties[key], - }); - } - } - } - - if (wherePropertyKey === "relationship") { - if (!nodes || !relationshipFields || !isRelationshipSubscriptionsEvent(event)) { - return false; - } - - const receivedEventRelationshipType = event.relationshipName; - const relationships = node.relationFields.filter((f) => f.typeUnescaped === receivedEventRelationshipType); - const receivedEventRelationship = relationships[0]; // ONE relationship only possible - if (!receivedEventRelationship) { - return false; - } - - return filterRelationshipKey({ - receivedEventRelationship, - where: wherePropertyValue, - relationshipFields, - receivedEvent: event, - nodes, - }); - } - - if (wherePropertyKey === "jwt") { - return filterByValues(wherePropertyValue, context.authorization.jwt as Record); - } - - return true; - }); - - return multipleConditionsAggregationMap.AND(results); -} -export function filterByAuthorizationRules2({ entityAdapter, where, event, @@ -172,7 +55,7 @@ export function filterByAuthorizationRules2({ const comparisonResultsAggregationFn = multipleConditionsAggregationMap[wherePropertyKey]; let comparisonResults; if (wherePropertyKey === "NOT") { - comparisonResults = filterByAuthorizationRules2({ + comparisonResults = filterByAuthorizationRules({ entityAdapter, where: wherePropertyValue as Record, event, @@ -180,7 +63,7 @@ export function filterByAuthorizationRules2({ }); } else { comparisonResults = (wherePropertyValue as Array>).map((whereCl) => { - return filterByAuthorizationRules2({ + return filterByAuthorizationRules({ entityAdapter, where: whereCl, event, @@ -197,14 +80,14 @@ export function filterByAuthorizationRules2({ if (wherePropertyKey === "node") { switch (event.event) { case "create": - return filterByProperties2({ + return filterByProperties({ attributes: entityAdapter.attributes, whereProperties: wherePropertyValue, receivedProperties: event.properties.new, }); case "update": case "delete": - return filterByProperties2({ + return filterByProperties({ attributes: entityAdapter.attributes, whereProperties: wherePropertyValue, receivedProperties: event.properties.old, @@ -221,7 +104,7 @@ export function filterByAuthorizationRules2({ } const receivedEventRelationship = relationships[0] as RelationshipAdapter; // ONE relationship only possible const key = receivedEventRelationship.direction === "IN" ? "to" : "from"; - return filterByProperties2({ + return filterByProperties({ attributes: entityAdapter.attributes, whereProperties: wherePropertyValue, receivedProperties: receivedEventProperties[key], @@ -246,7 +129,7 @@ export function filterByAuthorizationRules2({ return false; } - return filterRelationshipKey2({ + return filterRelationshipKey({ receivedEventRelationship, where: wherePropertyValue, receivedEvent: event, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts index 5266ce8a70..b9f4764639 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts @@ -19,60 +19,12 @@ import { int } from "neo4j-driver"; import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; -import type { Node, PrimitiveField } from "../../../../../types"; -import { getFilteringFn, getFilteringFn2 } from "../utils/get-filtering-fn"; +import { getFilteringFn } from "../utils/get-filtering-fn"; import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; import { parseFilterProperty } from "../utils/parse-filter-property"; -import { isFloatType, isIDAsString, isStringType } from "../utils/type-checks"; /** Returns true if receivedProperties comply with filters specified in whereProperties, false otherwise. */ export function filterByProperties({ - node, - whereProperties, - receivedProperties, -}: { - node: Node; - whereProperties: Record> | Record>; - receivedProperties: Record; -}): boolean { - for (const [k, v] of Object.entries(whereProperties)) { - if (Object.keys(multipleConditionsAggregationMap).includes(k)) { - const comparisonResultsAggregationFn = multipleConditionsAggregationMap[k]; - let comparisonResults; - if (k === "NOT") { - comparisonResults = filterByProperties({ - node, - whereProperties: v as Record, - receivedProperties, - }); - } else { - comparisonResults = (v as Array>).map((whereCl) => { - return filterByProperties({ node, whereProperties: whereCl, receivedProperties }); - }); - } - - if (!comparisonResultsAggregationFn(comparisonResults)) { - return false; - } - } else { - const { fieldName, operator } = parseFilterProperty(k); - const receivedValue = receivedProperties[fieldName]; - if (!receivedValue) { - return false; - } - const fieldMeta = node.primitiveFields.find((f) => f.fieldName === fieldName); - const checkFilterPasses = getFilteringFn(operator, operatorMapOverrides); - - if (!checkFilterPasses(receivedValue, v, fieldMeta)) { - return false; - } - } - } - return true; -} - -/** Returns true if receivedProperties comply with filters specified in whereProperties, false otherwise. */ -export function filterByProperties2({ attributes, whereProperties, receivedProperties, @@ -86,14 +38,14 @@ export function filterByProperties2({ const comparisonResultsAggregationFn = multipleConditionsAggregationMap[k]; let comparisonResults; if (k === "NOT") { - comparisonResults = filterByProperties2({ + comparisonResults = filterByProperties({ attributes, whereProperties: v as Record, receivedProperties, }); } else { comparisonResults = (v as Array>).map((whereCl) => { - return filterByProperties2({ attributes, whereProperties: whereCl, receivedProperties }); + return filterByProperties({ attributes, whereProperties: whereCl, receivedProperties }); }); } @@ -107,7 +59,7 @@ export function filterByProperties2({ return false; } const fieldMeta = attributes.get(fieldName); - const checkFilterPasses = getFilteringFn2(operator, operatorMapOverrides2); + const checkFilterPasses = getFilteringFn(operator, operatorMapOverrides); if (!checkFilterPasses(receivedValue, v, fieldMeta)) { return false; @@ -117,47 +69,12 @@ export function filterByProperties2({ return true; } -const operatorMapOverrides = { - INCLUDES: (received: [string | number], filtered: string | number, fieldMeta: PrimitiveField | undefined) => { - if (isFloatType(fieldMeta) || isStringType(fieldMeta) || isIDAsString(fieldMeta, filtered)) { - return received.some((v) => v === filtered); - } - // int/ bigint - const filteredAsNeo4jInteger = int(filtered); - return received.some((r) => int(r).equals(filteredAsNeo4jInteger)); - }, - NOT_INCLUDES: (received: [string | number], filtered: string | number, fieldMeta: PrimitiveField | undefined) => { - if (isFloatType(fieldMeta) || isStringType(fieldMeta) || isIDAsString(fieldMeta, filtered)) { - return !received.some((v) => v === filtered); - } - // int/ bigint - const filteredAsNeo4jInteger = int(filtered); - return !received.some((r) => int(r).equals(filteredAsNeo4jInteger)); - }, - IN: (received: string | number, filtered: [string | number], fieldMeta: PrimitiveField | undefined) => { - if (isFloatType(fieldMeta) || isStringType(fieldMeta) || isIDAsString(fieldMeta, received)) { - return filtered.some((v) => v === received); - } - // int/ bigint - const receivedAsNeo4jInteger = int(received); - return filtered.some((r) => int(r).equals(receivedAsNeo4jInteger)); - }, - NOT_IN: (received: string | number, filtered: [string | number], fieldMeta: PrimitiveField | undefined) => { - if (isFloatType(fieldMeta) || isStringType(fieldMeta) || isIDAsString(fieldMeta, received)) { - return !filtered.some((v) => v === received); - } - // int/ bigint - const receivedAsNeo4jInteger = int(received); - return !filtered.some((r) => int(r).equals(receivedAsNeo4jInteger)); - }, -}; - const isFloatOrStringOrIDAsString = (attributeAdapter: AttributeAdapter | undefined, value: string | number) => attributeAdapter?.isFloat() || attributeAdapter?.isString() || (attributeAdapter?.isID() && int(value).toString() !== value); -const operatorMapOverrides2 = { +const operatorMapOverrides = { INCLUDES: (received: [string | number], filtered: string | number, fieldMeta: AttributeAdapter | undefined) => { if (isFloatOrStringOrIDAsString(fieldMeta, filtered)) { return received.some((v) => v === filtered); diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts index 004c145103..a31ad8bf6f 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-relationship-properties.ts @@ -17,97 +17,16 @@ * limitations under the License. */ -import type { Node, RelationField, RelationshipSubscriptionsEvent } from "../../../../../types"; -import type { ObjectFields } from "../../../../get-obj-field-meta"; -import type { RecordType, RelationshipType } from "../../types"; -import { filterByProperties, filterByProperties2 } from "./filter-by-properties"; -import { parseFilterProperty } from "../utils/parse-filter-property"; -import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; -import { filterRelationshipKey, filterRelationshipKey2 } from "../utils/filter-relationship-key"; import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { RelationshipSubscriptionsEvent } from "../../../../../types"; +import type { RecordType, RelationshipType } from "../../types"; +import { filterRelationshipKey } from "../utils/filter-relationship-key"; +import { multipleConditionsAggregationMap } from "../utils/multiple-conditions-aggregation-map"; +import { parseFilterProperty } from "../utils/parse-filter-property"; +import { filterByProperties } from "./filter-by-properties"; export function filterByRelationshipProperties({ - node, - whereProperties, - receivedEvent, - nodes, - relationshipFields, -}: { - node: Node; - whereProperties: Record< - string, - RecordType | Record | Array> - >; - receivedEvent: RelationshipSubscriptionsEvent; - nodes: Node[]; - relationshipFields: Map; -}): boolean { - const receivedEventProperties = receivedEvent.properties; - const receivedEventRelationshipType = receivedEvent.relationshipName; - const relationships = node.relationFields.filter((f) => f.typeUnescaped === receivedEventRelationshipType); - if (!relationships.length) { - return false; - } - const receivedEventRelationship = relationships[0] as RelationField; // ONE relationship only possible - - for (const [wherePropertyKey, wherePropertyValue] of Object.entries(whereProperties)) { - if (Object.keys(multipleConditionsAggregationMap).includes(wherePropertyKey)) { - const comparisonResultsAggregationFn = multipleConditionsAggregationMap[wherePropertyKey]; - let comparisonResults; - if (wherePropertyKey === "NOT") { - comparisonResults = filterByRelationshipProperties({ - node, - whereProperties: wherePropertyValue as Record, - receivedEvent, - nodes, - relationshipFields, - }); - } else { - comparisonResults = (wherePropertyValue as Array>).map((whereCl) => { - return filterByRelationshipProperties({ - node, - whereProperties: whereCl, - receivedEvent, - nodes, - relationshipFields, - }); - }); - } - - if (!comparisonResultsAggregationFn(comparisonResults)) { - return false; - } - } - const { fieldName } = parseFilterProperty(wherePropertyKey); - - const connectedNodeFieldName = node.subscriptionEventPayloadFieldNames.create_relationship; - if (fieldName === connectedNodeFieldName) { - const key = receivedEventRelationship.direction === "IN" ? "to" : "from"; - if ( - !filterByProperties({ - node, - whereProperties: wherePropertyValue, - receivedProperties: receivedEventProperties[key], - }) - ) { - return false; - } - } - - if (fieldName === "createdRelationship" || fieldName === "deletedRelationship") { - return filterRelationshipKey({ - receivedEventRelationship, - where: wherePropertyValue, - relationshipFields, - receivedEvent, - nodes, - }); - } - } - return true; -} -export function filterByRelationshipProperties2({ entityAdapter, whereProperties, receivedEvent, @@ -136,14 +55,14 @@ export function filterByRelationshipProperties2({ const comparisonResultsAggregationFn = multipleConditionsAggregationMap[wherePropertyKey]; let comparisonResults; if (wherePropertyKey === "NOT") { - comparisonResults = filterByRelationshipProperties2({ + comparisonResults = filterByRelationshipProperties({ entityAdapter, whereProperties: wherePropertyValue as Record, receivedEvent, }); } else { comparisonResults = (wherePropertyValue as Array>).map((whereCl) => { - return filterByRelationshipProperties2({ + return filterByRelationshipProperties({ entityAdapter, whereProperties: whereCl, receivedEvent, @@ -161,7 +80,7 @@ export function filterByRelationshipProperties2({ if (fieldName === connectedNodeFieldName) { const key = receivedEventRelationship.direction === "IN" ? "to" : "from"; if ( - !filterByProperties2({ + !filterByProperties({ attributes: entityAdapter.attributes, whereProperties: wherePropertyValue, receivedProperties: receivedEventProperties[key], @@ -172,7 +91,7 @@ export function filterByRelationshipProperties2({ } if (fieldName === "createdRelationship" || fieldName === "deletedRelationship") { - return filterRelationshipKey2({ + return filterRelationshipKey({ receivedEventRelationship, where: wherePropertyValue, receivedEvent, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts index 7862664822..9ff3aac3ac 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/filter-relationship-key.ts @@ -21,17 +21,10 @@ import type { ConcreteEntityAdapter } from "../../../../../schema-model/entity/m import { InterfaceEntityAdapter } from "../../../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../../../../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { Node, RelationField, RelationshipSubscriptionsEvent } from "../../../../../types"; -import type { ObjectFields } from "../../../../get-obj-field-meta"; +import type { RelationshipSubscriptionsEvent } from "../../../../../types"; import type { InterfaceType, RecordType, RelationshipType, StandardType, UnionType } from "../../types"; -import { filterByProperties, filterByProperties2 } from "../filters/filter-by-properties"; -import { - isInterfaceSpecificFieldType, - isInterfaceType, - isInterfaceType2, - isStandardType, - isStandardType2, -} from "./type-checks"; +import { filterByProperties } from "../filters/filter-by-properties"; +import { isInterfaceSpecificFieldType, isInterfaceType, isStandardType } from "./type-checks"; type EventProperties = { from: Record; @@ -40,114 +33,6 @@ type EventProperties = { }; export function filterRelationshipKey({ - receivedEventRelationship, - where, - relationshipFields, - receivedEvent, - nodes, -}: { - receivedEventRelationship: RelationField; - where: RecordType | Record | Record[]; - relationshipFields: Map; - receivedEvent: RelationshipSubscriptionsEvent; - nodes: Node[]; -}): boolean { - const receivedEventProperties = receivedEvent.properties; - const receivedEventRelationshipName = receivedEventRelationship.fieldName; - const receivedEventRelationshipData = where[receivedEventRelationshipName] as Record; - const isRelationshipOfReceivedTypeFilteredOut = !receivedEventRelationshipData; - if (isRelationshipOfReceivedTypeFilteredOut) { - // case `actors: {}` filtering out relationships of other type - return false; - } - const isRelationshipOfReceivedTypeIncludedWithNoFilters = !Object.keys(receivedEventRelationshipData).length; - if (isRelationshipOfReceivedTypeIncludedWithNoFilters) { - // case `actors: {}` including all relationships of the type - return true; - } - const relationshipPropertiesInterfaceName = receivedEventRelationship.properties || ""; - - const { edge: edgeProperty, node: nodeProperty, ...unionTypes } = receivedEventRelationshipData; - - // relationship properties - if (edgeProperty) { - // apply the filter - if ( - !filterRelationshipEdgeProperty({ - relationshipFields, - relationshipPropertiesInterfaceName, - edgeProperty, - receivedEventProperties, - }) - ) { - return false; - } - } - - const key = receivedEventRelationship.direction === "IN" ? "from" : "to"; - - const isSimpleRelationship = nodeProperty && isStandardType(nodeProperty, receivedEventRelationship); - const isInterfaceRelationship = nodeProperty && isInterfaceType(nodeProperty, receivedEventRelationship); - const isUnionRelationship = Object.keys(unionTypes).length; - - if (isSimpleRelationship) { - const nodeTo = nodes.find((n) => n.name === receivedEventRelationship.typeMeta.name) as Node; - - // apply the filter - if ( - !filterByProperties({ - node: nodeTo, - whereProperties: nodeProperty, - receivedProperties: receivedEventProperties[key], - }) - ) { - return false; - } - } - - if (isInterfaceRelationship) { - const targetNodeTypename = receivedEvent[`${key}Typename`]; - - // apply the filter - if ( - !filterRelationshipInterfaceProperty({ - nodeProperty, - nodes, - receivedEventProperties, - targetNodeTypename, - key, - }) - ) { - return false; - } - } - - if (isUnionRelationship) { - const targetNodeTypename = receivedEvent[`${key}Typename`]; - const targetNodePropsByTypename = unionTypes[targetNodeTypename] as Record; - const isRelationshipOfReceivedTypeFilteredOut = !targetNodePropsByTypename; - if (isRelationshipOfReceivedTypeFilteredOut) { - return false; - } - - // apply the filter - if ( - !filterRelationshipUnionProperties({ - targetNodePropsByTypename, - targetNodeTypename, - receivedEventProperties, - relationshipFields, - relationshipPropertiesInterfaceName, - key, - nodes, - }) - ) { - return false; - } - } - return true; -} -export function filterRelationshipKey2({ receivedEventRelationship, where, receivedEvent, @@ -176,7 +61,7 @@ export function filterRelationshipKey2({ if (edgeProperty) { // apply the filter if ( - !filterRelationshipEdgeProperty2({ + !filterRelationshipEdgeProperty({ relationshipAdapter: receivedEventRelationship, edgeProperty, receivedEventProperties, @@ -188,8 +73,8 @@ export function filterRelationshipKey2({ const key = receivedEventRelationship.direction === "IN" ? "from" : "to"; - const isSimpleRelationship = nodeProperty && isStandardType2(nodeProperty, receivedEventRelationship); - const isInterfaceRelationship = nodeProperty && isInterfaceType2(nodeProperty, receivedEventRelationship); + const isSimpleRelationship = nodeProperty && isStandardType(nodeProperty, receivedEventRelationship); + const isInterfaceRelationship = nodeProperty && isInterfaceType(nodeProperty, receivedEventRelationship); const isUnionRelationship = Object.keys(unionTypes).length; if (isSimpleRelationship) { @@ -198,7 +83,7 @@ export function filterRelationshipKey2({ // apply the filter if ( - !filterByProperties2({ + !filterByProperties({ attributes: nodeTo.attributes, whereProperties: nodeProperty, receivedProperties: receivedEventProperties[key], @@ -213,7 +98,7 @@ export function filterRelationshipKey2({ // apply the filter if ( - !filterRelationshipInterfaceProperty2({ + !filterRelationshipInterfaceProperty({ nodeProperty, relationshipAdapter: receivedEventRelationship, receivedEventProperties, @@ -235,7 +120,7 @@ export function filterRelationshipKey2({ // apply the filter if ( - !filterRelationshipUnionProperties2({ + !filterRelationshipUnionProperties({ targetNodePropsByTypename, targetNodeTypename, receivedEventProperties, @@ -250,50 +135,6 @@ export function filterRelationshipKey2({ } function filterRelationshipUnionProperties({ - targetNodePropsByTypename, - targetNodeTypename, - receivedEventProperties, - relationshipFields, - relationshipPropertiesInterfaceName, - key, - nodes, -}: { - targetNodePropsByTypename: Record; - targetNodeTypename: string; - receivedEventProperties: EventProperties; - relationshipFields: Map; - relationshipPropertiesInterfaceName: string; - key: string; - nodes: Node[]; -}): boolean { - for (const [propertyName, propertyValueAsUnionTypeData] of Object.entries(targetNodePropsByTypename)) { - if (propertyName === "node") { - const nodeTo = nodes.find((n) => targetNodeTypename === n.name) as Node; - if ( - !filterByProperties({ - node: nodeTo, - whereProperties: propertyValueAsUnionTypeData, - receivedProperties: receivedEventProperties[key], - }) - ) { - return false; - } - } - if ( - propertyName === "edge" && - !filterRelationshipEdgeProperty({ - relationshipFields, - relationshipPropertiesInterfaceName, - edgeProperty: propertyValueAsUnionTypeData, - receivedEventProperties, - }) - ) { - return false; - } - } - return true; -} -function filterRelationshipUnionProperties2({ targetNodePropsByTypename, targetNodeTypename, receivedEventProperties, @@ -317,7 +158,7 @@ function filterRelationshipUnionProperties2({ throw new Error(`${targetNodeTypename} not found as part of union ${unionTarget.name}`); } if ( - !filterByProperties2({ + !filterByProperties({ attributes: nodeTo.attributes, whereProperties: propertyValueAsUnionTypeData, receivedProperties: receivedEventProperties[key], @@ -328,7 +169,7 @@ function filterRelationshipUnionProperties2({ } if ( propertyName === "edge" && - !filterRelationshipEdgeProperty2({ + !filterRelationshipEdgeProperty({ relationshipAdapter, edgeProperty: propertyValueAsUnionTypeData, receivedEventProperties, @@ -341,51 +182,6 @@ function filterRelationshipUnionProperties2({ } function filterRelationshipInterfaceProperty({ - nodeProperty, - nodes, - receivedEventProperties, - targetNodeTypename, - key, -}: { - nodeProperty: InterfaceType; - nodes: Node[]; - receivedEventProperties: EventProperties; - targetNodeTypename: string; - key: string; -}): boolean { - const { _on, ...commonFields } = nodeProperty; - const targetNode = nodes.find((n) => n.name === targetNodeTypename) as Node; - if (commonFields && !_on) { - if ( - !filterByProperties({ - node: targetNode, - whereProperties: commonFields, - receivedProperties: receivedEventProperties[key], - }) - ) { - return false; - } - } - if (isInterfaceSpecificFieldType(_on)) { - const isRelationshipOfReceivedTypeFilteredOut = !_on[targetNodeTypename]; - if (isRelationshipOfReceivedTypeFilteredOut) { - return false; - } - const commonFieldsMergedWithSpecificFields = { ...commonFields, ..._on[targetNodeTypename] }; //override common combination with specific - - if ( - !filterByProperties({ - node: targetNode, - whereProperties: commonFieldsMergedWithSpecificFields, - receivedProperties: receivedEventProperties[key], - }) - ) { - return false; - } - } - return true; -} -function filterRelationshipInterfaceProperty2({ nodeProperty, relationshipAdapter, receivedEventProperties, @@ -410,7 +206,7 @@ function filterRelationshipInterfaceProperty2({ // const targetNode = nodes.find((n) => n.name === targetNodeTypename) as Node; if (commonFields && !_on) { if ( - !filterByProperties2({ + !filterByProperties({ attributes: nodeTo.attributes, whereProperties: commonFields, receivedProperties: receivedEventProperties[key], @@ -427,7 +223,7 @@ function filterRelationshipInterfaceProperty2({ const commonFieldsMergedWithSpecificFields = { ...commonFields, ..._on[targetNodeTypename] }; //override common combination with specific if ( - !filterByProperties2({ + !filterByProperties({ attributes: nodeTo.attributes, whereProperties: commonFieldsMergedWithSpecificFields, receivedProperties: receivedEventProperties[key], @@ -440,28 +236,6 @@ function filterRelationshipInterfaceProperty2({ } function filterRelationshipEdgeProperty({ - relationshipFields, - relationshipPropertiesInterfaceName, - edgeProperty, - receivedEventProperties, -}: { - relationshipFields: Map; - relationshipPropertiesInterfaceName: string; - edgeProperty: StandardType; - receivedEventProperties: EventProperties; -}): boolean { - const relationship = relationshipFields.get(relationshipPropertiesInterfaceName); - const noRelationshipPropertiesFound = !relationship; - if (noRelationshipPropertiesFound) { - return true; - } - return filterByProperties({ - node: relationship as Node, - whereProperties: edgeProperty, - receivedProperties: receivedEventProperties.relationship, - }); -} -function filterRelationshipEdgeProperty2({ relationshipAdapter, edgeProperty, receivedEventProperties, @@ -474,7 +248,7 @@ function filterRelationshipEdgeProperty2({ if (noRelationshipPropertiesFound) { return true; } - return filterByProperties2({ + return filterByProperties({ attributes: relationshipAdapter.attributes, whereProperties: edgeProperty, receivedProperties: receivedEventProperties.relationship, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts index 2b193e3230..eb8a9f6395 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts @@ -18,11 +18,8 @@ */ import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; -import type { PrimitiveField } from "../../../../../types"; -type ComparatorFn = (received: T, filtered: T, fieldMeta?: PrimitiveField | undefined) => boolean; - -type ComparatorFn2 = (received: T, filtered: T, fieldMeta?: AttributeAdapter | undefined) => boolean; +type ComparatorFn = (received: T, filtered: T, fieldMeta?: AttributeAdapter | undefined) => boolean; const operatorCheckMap = { NOT: (received: string, filtered: string) => received !== filtered, @@ -78,15 +75,3 @@ export function getFilteringFn( return operators[operator]; } -export function getFilteringFn2( - operator: string | undefined, - overrides?: Record boolean> -): ComparatorFn2 { - if (!operator) { - return (received: T, filtered: T) => received === filtered; - } - - const operators = { ...operatorCheckMap, ...overrides }; - - return operators[operator]; -} diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/type-checks.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/type-checks.ts index cad3f638af..6fdd5d1c74 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/type-checks.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/type-checks.ts @@ -20,7 +20,7 @@ import { int } from "neo4j-driver"; import { InterfaceEntityAdapter } from "../../../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { PrimitiveField, RelationField } from "../../../../../types"; +import type { PrimitiveField } from "../../../../../types"; import type { InterfaceSpecificType, InterfaceType, StandardType } from "../../types"; export function isFloatType(fieldMeta: PrimitiveField | undefined) { @@ -40,26 +40,13 @@ export function isIDAsString(fieldMeta: PrimitiveField | undefined, value: strin } export function isInterfaceType( - node: StandardType | InterfaceType, - receivedEventRelationship: RelationField -): node is InterfaceType { - return !!receivedEventRelationship.interface?.implementations; -} - -export function isStandardType( - node: StandardType | InterfaceType, - receivedEventRelationship: RelationField -): node is StandardType { - return !receivedEventRelationship.interface?.implementations; -} -export function isInterfaceType2( node: StandardType | InterfaceType, receivedEventRelationship: RelationshipAdapter ): node is InterfaceType { return !!(receivedEventRelationship.target instanceof InterfaceEntityAdapter); } -export function isStandardType2( +export function isStandardType( node: StandardType | InterfaceType, receivedEventRelationship: RelationshipAdapter ): node is StandardType { diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/where.test.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/where.test.ts index 995fb77bb2..d3eb311bf5 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/where.test.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/where.test.ts @@ -17,8 +17,9 @@ * limitations under the License. */ +import { ConcreteEntity } from "../../../../schema-model/entity/ConcreteEntity"; +import { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { SubscriptionsEvent } from "../../../../types"; -import { NodeBuilder } from "../../../../../tests/utils/builders/node-builder"; import { subscriptionWhere } from "./where"; describe("subscriptionWhere", () => { @@ -40,50 +41,18 @@ describe("subscriptionWhere", () => { typename: "Movie", }; - const node = new NodeBuilder({ + const concreteEntity = new ConcreteEntity({ name: "Movie", - primitiveFields: [ - { - fieldName: "title", - typeMeta: { - name: "String", - array: false, - required: false, - pretty: "String", - input: { - where: { - type: "String", - pretty: "String", - }, - create: { - type: "String", - pretty: "String", - }, - update: { - type: "String", - pretty: "String", - }, - }, - }, - selectableOptions: { - onRead: true, - onAggregate: false, - }, - settableOptions: { - onCreate: true, - onUpdate: true, - }, - filterableOptions: { - byValue: true, - byAggregate: true, - }, - otherDirectives: [], - arguments: [], - }, - ], - }).instance(); + labels: ["Movie"], + annotations: [], + attributes: [], + compositeEntities: [], + description: undefined, + relationships: [], + }); + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - expect(subscriptionWhere({ where: args, event, node })).toBe(true); + expect(subscriptionWhere({ where: args, event, entityAdapter: concreteEntityAdapter })).toBe(true); }); test("filters expected not", () => { @@ -104,49 +73,17 @@ describe("subscriptionWhere", () => { typename: "Movie", }; - const node = new NodeBuilder({ + const concreteEntity = new ConcreteEntity({ name: "Movie", - primitiveFields: [ - { - fieldName: "title", - typeMeta: { - name: "String", - array: false, - required: false, - pretty: "String", - input: { - where: { - type: "String", - pretty: "String", - }, - create: { - type: "String", - pretty: "String", - }, - update: { - type: "String", - pretty: "String", - }, - }, - }, - selectableOptions: { - onRead: true, - onAggregate: false, - }, - settableOptions: { - onCreate: true, - onUpdate: true, - }, - filterableOptions: { - byValue: true, - byAggregate: true, - }, - otherDirectives: [], - arguments: [], - }, - ], - }).instance(); + labels: ["Movie"], + annotations: [], + attributes: [], + compositeEntities: [], + description: undefined, + relationships: [], + }); + const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - expect(subscriptionWhere({ where: args, event, node })).toBe(false); + expect(subscriptionWhere({ where: args, event, entityAdapter: concreteEntityAdapter })).toBe(false); }); }); diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts index 48f869a7a7..dc5241c300 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/where.ts @@ -17,58 +17,13 @@ * limitations under the License. */ +import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { SubscriptionsEvent } from "../../../../types"; -import type Node from "../../../../classes/Node"; -import type { ObjectFields } from "../../../get-obj-field-meta"; -import { filterByProperties, filterByProperties2 } from "./filters/filter-by-properties"; -import { - filterByRelationshipProperties, - filterByRelationshipProperties2, -} from "./filters/filter-by-relationship-properties"; import type { RecordType, RelationshipType } from "../types"; -import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { filterByProperties } from "./filters/filter-by-properties"; +import { filterByRelationshipProperties } from "./filters/filter-by-relationship-properties"; export function subscriptionWhere({ - where, - event, - node, - nodes, - relationshipFields, -}: { - where: Record | undefined; - event: SubscriptionsEvent; - node: Node; - nodes?: Node[]; - relationshipFields?: Map; -}): boolean { - if (!where) { - return true; - } - - if (event.event === "create") { - return filterByProperties({ node, whereProperties: where, receivedProperties: event.properties.new }); - } - - if (event.event === "update" || event.event === "delete") { - return filterByProperties({ node, whereProperties: where, receivedProperties: event.properties.old }); - } - - if (event.event === "create_relationship" || event.event === "delete_relationship") { - if (!nodes || !relationshipFields) { - return false; - } - return filterByRelationshipProperties({ - node, - whereProperties: where, - receivedEvent: event, - nodes, - relationshipFields, - }); - } - - return false; -} -export function subscriptionWhere2({ where, event, entityAdapter, @@ -82,7 +37,7 @@ export function subscriptionWhere2({ } if (event.event === "create") { - return filterByProperties2({ + return filterByProperties({ attributes: entityAdapter.attributes, whereProperties: where, receivedProperties: event.properties.new, @@ -90,7 +45,7 @@ export function subscriptionWhere2({ } if (event.event === "update" || event.event === "delete") { - return filterByProperties2({ + return filterByProperties({ attributes: entityAdapter.attributes, whereProperties: where, receivedProperties: event.properties.old, @@ -101,7 +56,7 @@ export function subscriptionWhere2({ // if (!nodes || !relationshipFields) { // return false; // } - return filterByRelationshipProperties2({ + return filterByRelationshipProperties({ entityAdapter, whereProperties: where, receivedEvent: event, diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts index 45cbabf952..1907bd0645 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-connection-types.ts @@ -17,42 +17,16 @@ * limitations under the License. */ +import type { DirectiveNode } from "graphql"; import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; -import type { Node } from "../../classes"; -import { - attributeAdapterToComposeFields, - objectFieldsToComposeFields, - relationshipAdapterToComposeFields, -} from "../to-compose"; -import { upperFirst } from "../../utils/upper-first"; -import type { BaseField, RelationField } from "../../types"; -import type { ObjectFields } from "../get-obj-field-meta"; -import { filterTruthy } from "../../utils/utils"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import type { DirectiveNode } from "graphql"; -import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { filterTruthy } from "../../utils/utils"; +import { attributeAdapterToComposeFields, relationshipAdapterToComposeFields } from "../to-compose"; function buildRelationshipDestinationUnionNodeType({ - unionNodes, - relationNodeTypeName, - schemaComposer, -}: { - unionNodes: ObjectTypeComposer[]; - relationNodeTypeName: string; - schemaComposer: SchemaComposer; -}) { - const atLeastOneTypeHasProperties = unionNodes.filter(hasProperties).length; - if (!atLeastOneTypeHasProperties) { - return null; - } - return schemaComposer.createUnionTC({ - name: `${relationNodeTypeName}EventPayload`, - types: unionNodes, - }); -} -function buildRelationshipDestinationUnionNodeType2({ unionNodes, unionEntity, schemaComposer, @@ -72,43 +46,6 @@ function buildRelationshipDestinationUnionNodeType2({ } function buildRelationshipDestinationInterfaceNodeType({ - relevantInterface, - interfaceNodes, - relationNodeTypeName, - schemaComposer, -}: { - relevantInterface: ObjectFields; - interfaceNodes: ObjectTypeComposer[]; - relationNodeTypeName: string; - schemaComposer: SchemaComposer; -}): InterfaceTypeComposer | undefined { - const selectedFields = [ - ...relevantInterface.primitiveFields, - ...relevantInterface.enumFields, - ...relevantInterface.scalarFields, - ...relevantInterface.temporalFields, - ...relevantInterface.pointFields, - ...relevantInterface.cypherFields, - ]; - - const connectionFields = [...relevantInterface.relationFields, ...relevantInterface.connectionFields]; - const [interfaceComposeFields, interfaceConnectionComposeFields] = [selectedFields, connectionFields].map( - objectFieldsToComposeFields - ) as [any, any]; - - if (Object.keys(interfaceComposeFields).length) { - const nodeTo = schemaComposer.createInterfaceTC({ - name: `${relationNodeTypeName}EventPayload`, - fields: interfaceComposeFields, - }); - interfaceNodes?.forEach((interfaceNodeType) => { - nodeTo.addTypeResolver(interfaceNodeType, () => true); - interfaceNodeType.addFields(interfaceConnectionComposeFields); - }); - return nodeTo; - } -} -function buildRelationshipDestinationInterfaceNodeType2({ interfaceEntity, interfaceNodes, schemaComposer, @@ -146,39 +83,6 @@ function buildRelationshipDestinationInterfaceNodeType2({ } function buildRelationshipDestinationAbstractType({ - relationField, - relationNodeTypeName, - interfaceCommonFields, - schemaComposer, - nodeNameToEventPayloadTypes, -}: { - relationField: RelationField; - relationNodeTypeName: string; - interfaceCommonFields: Map; - schemaComposer: SchemaComposer; - nodeNameToEventPayloadTypes: Record; -}) { - const unionNodeTypes = relationField.union?.nodes; - if (unionNodeTypes) { - const unionNodes = filterTruthy(unionNodeTypes?.map((typeName) => nodeNameToEventPayloadTypes[typeName])); - return buildRelationshipDestinationUnionNodeType({ unionNodes, relationNodeTypeName, schemaComposer }); - } - const interfaceNodeTypeNames = relationField.interface?.implementations; - if (interfaceNodeTypeNames) { - const relevantInterfaceFields = interfaceCommonFields.get(relationNodeTypeName) || ({} as ObjectFields); - const interfaceNodes = filterTruthy( - interfaceNodeTypeNames.map((name: string) => nodeNameToEventPayloadTypes[name]) - ); - return buildRelationshipDestinationInterfaceNodeType({ - schemaComposer, - relevantInterface: relevantInterfaceFields, - interfaceNodes, - relationNodeTypeName, - }); - } - return undefined; -} -function buildRelationshipDestinationAbstractType2({ relationshipAdapter, userDefinedFieldDirectivesForNode, schemaComposer, @@ -195,7 +99,7 @@ function buildRelationshipDestinationAbstractType2({ const unionNodes = filterTruthy( unionEntity?.concreteEntities?.map((unionEntity) => nodeNameToEventPayloadTypes[unionEntity.name]) ); - return buildRelationshipDestinationUnionNodeType2({ unionNodes, unionEntity, schemaComposer }); + return buildRelationshipDestinationUnionNodeType({ unionNodes, unionEntity, schemaComposer }); } const interfaceEntity = relationshipAdapter.target instanceof InterfaceEntityAdapter ? relationshipAdapter.target : undefined; @@ -203,7 +107,7 @@ function buildRelationshipDestinationAbstractType2({ const interfaceNodes = filterTruthy( interfaceEntity.concreteEntities.map((interfaceEntity) => nodeNameToEventPayloadTypes[interfaceEntity.name]) ); - return buildRelationshipDestinationInterfaceNodeType2({ + return buildRelationshipDestinationInterfaceNodeType({ schemaComposer, interfaceEntity, interfaceNodes, @@ -214,33 +118,6 @@ function buildRelationshipDestinationAbstractType2({ } function buildRelationshipFieldDestinationTypes({ - relationField, - interfaceCommonFields, - schemaComposer, - nodeNameToEventPayloadTypes, -}: { - relationField: RelationField; - interfaceCommonFields: Map; - schemaComposer: SchemaComposer; - nodeNameToEventPayloadTypes: Record; -}) { - const relationNodeTypeName = relationField.typeMeta.name; - const nodeTo = nodeNameToEventPayloadTypes[relationNodeTypeName]; - if (nodeTo) { - // standard type - return hasProperties(nodeTo) && nodeTo; - } - // union/interface type - return buildRelationshipDestinationAbstractType({ - relationField, - relationNodeTypeName, - interfaceCommonFields, - schemaComposer, - nodeNameToEventPayloadTypes, - }); -} - -function buildRelationshipFieldDestinationTypes2({ relationshipAdapter, userDefinedFieldDirectivesForNode, schemaComposer, @@ -257,7 +134,7 @@ function buildRelationshipFieldDestinationTypes2({ return hasProperties(nodeTo) && nodeTo; } // union/interface type - return buildRelationshipDestinationAbstractType2({ + return buildRelationshipDestinationAbstractType({ relationshipAdapter, userDefinedFieldDirectivesForNode, schemaComposer, @@ -265,81 +142,11 @@ function buildRelationshipFieldDestinationTypes2({ }); } -function getRelationshipFields({ - relationField, - relationshipFields, -}: { - relationField: RelationField; - relationshipFields: Map; -}): BaseField[] | undefined { - const relationshipProperties = relationshipFields.get(relationField.properties || ""); - if (relationshipProperties) { - return [ - ...relationshipProperties.primitiveFields, - ...relationshipProperties.enumFields, - ...relationshipProperties.scalarFields, - ...relationshipProperties.temporalFields, - ...relationshipProperties.pointFields, - ]; - } -} - export function hasProperties(x: ObjectTypeComposer): boolean { return !!Object.keys(x.getFields()).length; } export function getConnectedTypes({ - node, - relationshipFields, - interfaceCommonFields, - schemaComposer, - nodeNameToEventPayloadTypes, -}: { - node: Node; - relationshipFields: Map; - interfaceCommonFields: Map; - schemaComposer: SchemaComposer; - nodeNameToEventPayloadTypes: Record; -}) { - const { name, relationFields } = node; - - return relationFields - .map((relationField) => { - const fieldName = relationField.fieldName; - - const relationshipFieldType = schemaComposer.createObjectTC({ - name: `${name}${upperFirst(fieldName)}ConnectedRelationship`, - }); - - const edgeProps = getRelationshipFields({ relationField, relationshipFields }); - if (edgeProps) { - relationshipFieldType.addFields(objectFieldsToComposeFields(edgeProps)); - } - - const nodeTo = buildRelationshipFieldDestinationTypes({ - relationField, - interfaceCommonFields, - schemaComposer, - nodeNameToEventPayloadTypes, - }); - if (nodeTo) { - relationshipFieldType.addFields({ node: nodeTo.getTypeNonNull() }); - } - - return { - relationshipFieldType, - fieldName, - }; - }) - .reduce((acc, { relationshipFieldType, fieldName }) => { - if (relationshipFieldType && hasProperties(relationshipFieldType)) { - acc[fieldName] = relationshipFieldType; - } - return acc; - }, {}); -} - -export function getConnectedTypes2({ entityAdapter, schemaComposer, nodeNameToEventPayloadTypes, @@ -370,7 +177,7 @@ export function getConnectedTypes2({ relationshipFieldType.addFields(composeFields); } - const nodeTo = buildRelationshipFieldDestinationTypes2({ + const nodeTo = buildRelationshipFieldDestinationTypes({ relationshipAdapter, userDefinedFieldDirectivesForNode, schemaComposer, diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts index 43bb18ff2a..f70f3b9a35 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts @@ -20,336 +20,20 @@ import type { DirectiveNode } from "graphql"; import { GraphQLFloat, GraphQLNonNull, GraphQLString } from "graphql"; import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; -import type { Node } from "../../classes"; import { EventType } from "../../graphql/enums/EventType"; -import { - generateSubscriptionWhereType, - generateSubscriptionConnectionWhereType, - generateSubscriptionWhereType2, - generateSubscriptionConnectionWhereType2, -} from "./generate-subscription-where-type"; -import { generateEventPayloadType } from "./generate-event-payload-type"; -import { - generateSubscribeMethod, - generateSubscribeMethod2, - subscriptionResolve, -} from "../resolvers/subscriptions/subscribe"; -import type { - NodeSubscriptionsEvent, - RelationField, - RelationshipSubscriptionsEvent, - SubscriptionsEvent, -} from "../../types"; -import type { ObjectFields } from "../get-obj-field-meta"; -import { getConnectedTypes, getConnectedTypes2, hasProperties } from "./generate-subscription-connection-types"; -import type { SchemaConfiguration } from "../schema-configuration"; -import { getSchemaConfigurationFlags } from "../schema-configuration"; import type { Neo4jGraphQLSchemaModel } from "../../schema-model/Neo4jGraphQLSchemaModel"; import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import { attributeAdapterToComposeFields } from "../to-compose"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { NodeSubscriptionsEvent, RelationshipSubscriptionsEvent, SubscriptionsEvent } from "../../types"; +import { generateSubscribeMethod, subscriptionResolve } from "../resolvers/subscriptions/subscribe"; +import { attributeAdapterToComposeFields } from "../to-compose"; +import { getConnectedTypes, hasProperties } from "./generate-subscription-connection-types"; +import { + generateSubscriptionConnectionWhereType, + generateSubscriptionWhereType, +} from "./generate-subscription-where-type"; export function generateSubscriptionTypes({ - schemaComposer, - nodes, - relationshipFields, - interfaceCommonFields, - globalSchemaConfiguration, -}: { - schemaComposer: SchemaComposer; - nodes: Node[]; - relationshipFields: Map; - interfaceCommonFields: Map; - globalSchemaConfiguration: SchemaConfiguration; -}): void { - const subscriptionComposer = schemaComposer.Subscription; - - const eventTypeEnum = schemaComposer.createEnumTC(EventType); - - const shouldIncludeSubscriptionOperation = (node: Node) => !node.exclude?.operations.includes("subscribe"); - const nodesWithSubscriptionOperation = nodes.filter(shouldIncludeSubscriptionOperation); - const nodeNameToEventPayloadTypes: Record = nodesWithSubscriptionOperation.reduce( - (acc, node) => { - acc[node.name] = generateEventPayloadType(node, schemaComposer); - return acc; - }, - {} - ); - hydrateSchemaWithSubscriptionWhereTypes(nodesWithSubscriptionOperation, schemaComposer); - - const nodeToRelationFieldMap: Map> = new Map(); - nodesWithSubscriptionOperation.forEach((node) => { - const eventPayload = nodeNameToEventPayloadTypes[node.name] as ObjectTypeComposer; - const where = generateSubscriptionWhereType(node, schemaComposer); - const { subscriptionEventTypeNames, subscriptionEventPayloadFieldNames, rootTypeFieldNames } = node; - const { subscribe: subscribeOperation } = rootTypeFieldNames; - - const nodeCreatedEvent = schemaComposer.createObjectTC({ - name: subscriptionEventTypeNames.create, - fields: { - event: { - type: eventTypeEnum.NonNull, - resolve: () => EventType.getValue("CREATE")?.value, - }, - timestamp: { - type: new GraphQLNonNull(GraphQLFloat), - resolve: (source: SubscriptionsEvent) => source.timestamp, - }, - }, - }); - - const nodeUpdatedEvent = schemaComposer.createObjectTC({ - name: subscriptionEventTypeNames.update, - fields: { - event: { - type: eventTypeEnum.NonNull, - resolve: () => EventType.getValue("UPDATE")?.value, - }, - timestamp: { - type: new GraphQLNonNull(GraphQLFloat), - resolve: (source: SubscriptionsEvent) => source.timestamp, - }, - }, - }); - - const nodeDeletedEvent = schemaComposer.createObjectTC({ - name: subscriptionEventTypeNames.delete, - fields: { - event: { - type: eventTypeEnum.NonNull, - resolve: () => EventType.getValue("DELETE")?.value, - }, - timestamp: { - type: new GraphQLNonNull(GraphQLFloat), - resolve: (source: SubscriptionsEvent) => source.timestamp, - }, - }, - }); - - const relationshipCreatedEvent = schemaComposer.createObjectTC({ - name: subscriptionEventTypeNames.create_relationship, - fields: { - event: { - type: eventTypeEnum.NonNull, - resolve: () => EventType.getValue("CREATE_RELATIONSHIP")?.value, - }, - timestamp: { - type: new GraphQLNonNull(GraphQLFloat), - resolve: (source: RelationshipSubscriptionsEvent) => source.timestamp, - }, - }, - }); - - const relationshipDeletedEvent = schemaComposer.createObjectTC({ - name: subscriptionEventTypeNames.delete_relationship, - fields: { - event: { - type: eventTypeEnum.NonNull, - resolve: () => EventType.getValue("DELETE_RELATIONSHIP")?.value, - }, - timestamp: { - type: new GraphQLNonNull(GraphQLFloat), - resolve: (source: RelationshipSubscriptionsEvent) => source.timestamp, - }, - }, - }); - - const connectedTypes = getConnectedTypes({ - node, - relationshipFields, - interfaceCommonFields, - schemaComposer, - nodeNameToEventPayloadTypes, - }); - const relationsEventPayload = schemaComposer.createObjectTC({ - name: `${node.name}ConnectedRelationships`, - fields: connectedTypes, - }); - - if (hasProperties(eventPayload)) { - nodeCreatedEvent.addFields({ - [subscriptionEventPayloadFieldNames.create]: { - type: eventPayload.NonNull, - resolve: (source: SubscriptionsEvent) => (source as NodeSubscriptionsEvent).properties.new, - }, - }); - - nodeUpdatedEvent.addFields({ - previousState: { - type: eventPayload.NonNull, - resolve: (source: SubscriptionsEvent) => (source as NodeSubscriptionsEvent).properties.old, - }, - [subscriptionEventPayloadFieldNames.update]: { - type: eventPayload.NonNull, - resolve: (source: SubscriptionsEvent) => (source as NodeSubscriptionsEvent).properties.new, - }, - }); - - nodeDeletedEvent.addFields({ - [subscriptionEventPayloadFieldNames.delete]: { - type: eventPayload.NonNull, - resolve: (source: SubscriptionsEvent) => (source as NodeSubscriptionsEvent).properties.old, - }, - }); - - relationshipCreatedEvent.addFields({ - [subscriptionEventPayloadFieldNames.create_relationship]: { - type: eventPayload.NonNull, - resolve: (source: RelationshipSubscriptionsEvent) => { - return getRelationshipEventDataForNode(source, node, nodeToRelationFieldMap).properties; - }, - }, - relationshipFieldName: { - type: new GraphQLNonNull(GraphQLString), - resolve: (source: RelationshipSubscriptionsEvent) => { - return getRelationField({ - node, - relationshipName: source.relationshipName, - nodeToRelationFieldMap, - })?.fieldName; - }, - }, - }); - - relationshipDeletedEvent.addFields({ - [subscriptionEventPayloadFieldNames.delete_relationship]: { - type: eventPayload.NonNull, - resolve: (source: RelationshipSubscriptionsEvent) => { - return getRelationshipEventDataForNode(source, node, nodeToRelationFieldMap).properties; - }, - }, - relationshipFieldName: { - type: new GraphQLNonNull(GraphQLString), - resolve: (source: RelationshipSubscriptionsEvent) => { - return getRelationField({ - node, - relationshipName: source.relationshipName, - nodeToRelationFieldMap, - })?.fieldName; - }, - }, - }); - } - - if (hasProperties(relationsEventPayload)) { - const resolveRelationship = (source: RelationshipSubscriptionsEvent) => { - const thisRel = getRelationField({ - node, - relationshipName: source.relationshipName, - nodeToRelationFieldMap, - }) as RelationField; - const { destinationProperties: props, destinationTypename: typename } = getRelationshipEventDataForNode( - source, - node, - nodeToRelationFieldMap - ); - - return { - [thisRel.fieldName]: { - ...source.properties.relationship, - node: { - ...props, - __typename: `${typename}EventPayload`, - }, - }, - }; - }; - relationshipCreatedEvent.addFields({ - createdRelationship: { - type: relationsEventPayload.NonNull, - resolve: resolveRelationship, - }, - }); - relationshipDeletedEvent.addFields({ - deletedRelationship: { - type: relationsEventPayload.NonNull, - resolve: resolveRelationship, - }, - }); - } - - const whereArgument = where && { args: { where } }; - - const schemaConfigurationFlags = getSchemaConfigurationFlags({ - globalSchemaConfiguration, - nodeSchemaConfiguration: node.schemaConfiguration, - excludeDirective: node.exclude, - }); - - if (schemaConfigurationFlags.subscribeCreate) { - subscriptionComposer.addFields({ - [subscribeOperation.created]: { - ...whereArgument, - type: nodeCreatedEvent.NonNull, - subscribe: generateSubscribeMethod({ node, type: "create" }), - resolve: subscriptionResolve, - }, - }); - } - if (schemaConfigurationFlags.subscribeUpdate) { - subscriptionComposer.addFields({ - [subscribeOperation.updated]: { - ...whereArgument, - type: nodeUpdatedEvent.NonNull, - subscribe: generateSubscribeMethod({ node, type: "update" }), - resolve: subscriptionResolve, - }, - }); - } - - if (schemaConfigurationFlags.subscribeDelete) { - subscriptionComposer.addFields({ - [subscribeOperation.deleted]: { - ...whereArgument, - type: nodeDeletedEvent.NonNull, - subscribe: generateSubscribeMethod({ node, type: "delete" }), - resolve: subscriptionResolve, - }, - }); - } - - const connectionWhere = generateSubscriptionConnectionWhereType({ - node, - schemaComposer, - relationshipFields, - interfaceCommonFields, - }); - if (node.relationFields.length > 0) { - if (schemaConfigurationFlags.subscribeCreateRelationship) { - subscriptionComposer.addFields({ - [subscribeOperation.relationship_created]: { - ...(connectionWhere?.created && { args: { where: connectionWhere?.created } }), - type: relationshipCreatedEvent.NonNull, - subscribe: generateSubscribeMethod({ - node, - type: "create_relationship", - nodes, - relationshipFields, - }), - resolve: subscriptionResolve, - }, - }); - } - if (schemaConfigurationFlags.subscribeDeleteRelationship) { - subscriptionComposer.addFields({ - [subscribeOperation.relationship_deleted]: { - ...(connectionWhere?.deleted && { args: { where: connectionWhere?.deleted } }), - type: relationshipDeletedEvent.NonNull, - subscribe: generateSubscribeMethod({ - node, - type: "delete_relationship", - nodes, - relationshipFields, - }), - resolve: subscriptionResolve, - }, - }); - } - } - }); -} - -export function generateSubscriptionTypes2({ schemaComposer, schemaModel, userDefinedFieldDirectivesForNode, @@ -380,13 +64,13 @@ export function generateSubscriptionTypes2({ return acc; }, {}); - allNodes.forEach((entityAdapter) => generateSubscriptionWhereType2(entityAdapter, schemaComposer)); + allNodes.forEach((entityAdapter) => generateSubscriptionWhereType(entityAdapter, schemaComposer)); const nodeToRelationFieldMap: Map> = new Map(); const nodesWithSubscriptionOperation = allNodes.filter((e) => e.isSubscribable); nodesWithSubscriptionOperation.forEach((entityAdapter) => { const eventPayload = nodeNameToEventPayloadTypes[entityAdapter.name] as ObjectTypeComposer; - const where = generateSubscriptionWhereType2(entityAdapter, schemaComposer); + const where = generateSubscriptionWhereType(entityAdapter, schemaComposer); const nodeCreatedEvent = schemaComposer.createObjectTC({ name: entityAdapter.operations.subscriptionEventTypeNames.create, @@ -458,7 +142,7 @@ export function generateSubscriptionTypes2({ }, }); - const connectedTypes = getConnectedTypes2({ + const connectedTypes = getConnectedTypes({ entityAdapter, schemaComposer, nodeNameToEventPayloadTypes, @@ -500,14 +184,14 @@ export function generateSubscriptionTypes2({ [entityAdapter.operations.subscriptionEventPayloadFieldNames.create_relationship]: { type: eventPayload.NonNull, resolve: (source: RelationshipSubscriptionsEvent) => { - return getRelationshipEventDataForNode2(source, entityAdapter, nodeToRelationFieldMap) + return getRelationshipEventDataForNode(source, entityAdapter, nodeToRelationFieldMap) .properties; }, }, relationshipFieldName: { type: new GraphQLNonNull(GraphQLString), resolve: (source: RelationshipSubscriptionsEvent) => { - return getRelationField2({ + return getRelationField({ entityAdapter, relationshipName: source.relationshipName, nodeToRelationFieldMap, @@ -520,14 +204,14 @@ export function generateSubscriptionTypes2({ [entityAdapter.operations.subscriptionEventPayloadFieldNames.delete_relationship]: { type: eventPayload.NonNull, resolve: (source: RelationshipSubscriptionsEvent) => { - return getRelationshipEventDataForNode2(source, entityAdapter, nodeToRelationFieldMap) + return getRelationshipEventDataForNode(source, entityAdapter, nodeToRelationFieldMap) .properties; }, }, relationshipFieldName: { type: new GraphQLNonNull(GraphQLString), resolve: (source: RelationshipSubscriptionsEvent) => { - return getRelationField2({ + return getRelationField({ entityAdapter, relationshipName: source.relationshipName, nodeToRelationFieldMap, @@ -539,7 +223,7 @@ export function generateSubscriptionTypes2({ if (hasProperties(relationsEventPayload)) { const resolveRelationship = (source: RelationshipSubscriptionsEvent) => { - const thisRel = getRelationField2({ + const thisRel = getRelationField({ entityAdapter, relationshipName: source.relationshipName, nodeToRelationFieldMap, @@ -547,8 +231,11 @@ export function generateSubscriptionTypes2({ if (!thisRel) { return; } - const { destinationProperties: props, destinationTypename: typename } = - getRelationshipEventDataForNode2(source, entityAdapter, nodeToRelationFieldMap); + const { destinationProperties: props, destinationTypename: typename } = getRelationshipEventDataForNode( + source, + entityAdapter, + nodeToRelationFieldMap + ); return { [thisRel.name]: { @@ -581,7 +268,7 @@ export function generateSubscriptionTypes2({ [entityAdapter.operations.rootTypeFieldNames.subscribe.created]: { ...whereArgument, type: nodeCreatedEvent.NonNull, - subscribe: generateSubscribeMethod2({ entityAdapter, type: "create" }), + subscribe: generateSubscribeMethod({ entityAdapter, type: "create" }), resolve: subscriptionResolve, }, }); @@ -591,7 +278,7 @@ export function generateSubscriptionTypes2({ [entityAdapter.operations.rootTypeFieldNames.subscribe.updated]: { ...whereArgument, type: nodeUpdatedEvent.NonNull, - subscribe: generateSubscribeMethod2({ entityAdapter, type: "update" }), + subscribe: generateSubscribeMethod({ entityAdapter, type: "update" }), resolve: subscriptionResolve, }, }); @@ -602,13 +289,13 @@ export function generateSubscriptionTypes2({ [entityAdapter.operations.rootTypeFieldNames.subscribe.deleted]: { ...whereArgument, type: nodeDeletedEvent.NonNull, - subscribe: generateSubscribeMethod2({ entityAdapter, type: "delete" }), + subscribe: generateSubscribeMethod({ entityAdapter, type: "delete" }), resolve: subscriptionResolve, }, }); } - const connectionWhere = generateSubscriptionConnectionWhereType2({ + const connectionWhere = generateSubscriptionConnectionWhereType({ entityAdapter, schemaComposer, }); @@ -618,7 +305,7 @@ export function generateSubscriptionTypes2({ [entityAdapter.operations.rootTypeFieldNames.subscribe.relationship_created]: { ...(connectionWhere?.created && { args: { where: connectionWhere?.created } }), type: relationshipCreatedEvent.NonNull, - subscribe: generateSubscribeMethod2({ + subscribe: generateSubscribeMethod({ entityAdapter, type: "create_relationship", }), @@ -631,7 +318,7 @@ export function generateSubscriptionTypes2({ [entityAdapter.operations.rootTypeFieldNames.subscribe.relationship_deleted]: { ...(connectionWhere?.deleted && { args: { where: connectionWhere?.deleted } }), type: relationshipDeletedEvent.NonNull, - subscribe: generateSubscribeMethod2({ + subscribe: generateSubscribeMethod({ entityAdapter, type: "delete_relationship", }), @@ -643,49 +330,7 @@ export function generateSubscriptionTypes2({ }); } -function hydrateSchemaWithSubscriptionWhereTypes( - nodesWithSubscriptionOperation: Node[], - schemaComposer: SchemaComposer -): void { - nodesWithSubscriptionOperation.forEach((node) => generateSubscriptionWhereType(node, schemaComposer)); -} - function getRelationshipEventDataForNode( - event: RelationshipSubscriptionsEvent, - node: Node, - nodeToRelationFieldMap: Map> -): { - direction: string; - properties: Record; - destinationProperties: Record; - destinationTypename: string; -} { - let condition = event.toTypename === node.name; - if (event.toTypename === event.fromTypename) { - // must check relationship direction from schema - const { direction } = getRelationField({ - node, - relationshipName: event.relationshipName, - nodeToRelationFieldMap, - }) as RelationField; - condition = direction === "IN"; - } - if (condition) { - return { - direction: "IN", - properties: event.properties.to, - destinationProperties: event.properties.from, - destinationTypename: event.fromTypename, - }; - } - return { - direction: "OUT", - properties: event.properties.from, - destinationProperties: event.properties.to, - destinationTypename: event.toTypename, - }; -} -function getRelationshipEventDataForNode2( event: RelationshipSubscriptionsEvent, entityAdapter: ConcreteEntityAdapter, nodeToRelationFieldMap: Map> @@ -699,7 +344,7 @@ function getRelationshipEventDataForNode2( let condition = event.toTypename === entityAdapter.name; if (event.toTypename === event.fromTypename) { // must check relationship direction from schema - const relationship = getRelationField2({ + const relationship = getRelationField({ entityAdapter, relationshipName: event.relationshipName, nodeToRelationFieldMap, @@ -723,29 +368,6 @@ function getRelationshipEventDataForNode2( } function getRelationField({ - node, - relationshipName, - nodeToRelationFieldMap, -}: { - node: Node; - relationshipName: string; - nodeToRelationFieldMap: Map>; -}): RelationField | undefined { - // TODO: move to schemaModel intermediate representation - let relationshipNameToRelationField: Map; - if (!nodeToRelationFieldMap.has(node)) { - relationshipNameToRelationField = new Map(); - nodeToRelationFieldMap.set(node, relationshipNameToRelationField); - } else { - relationshipNameToRelationField = nodeToRelationFieldMap.get(node) as Map; - } - if (!relationshipNameToRelationField.has(relationshipName)) { - const relationField = node.relationFields.find((f) => f.typeUnescaped === relationshipName); - relationshipNameToRelationField.set(relationshipName, relationField); - } - return relationshipNameToRelationField.get(relationshipName); -} -function getRelationField2({ entityAdapter, relationshipName, nodeToRelationFieldMap, diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts index 75b90b8b4f..39beb6d886 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-where-type.ts @@ -18,42 +18,15 @@ */ import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; -import type { Node } from "../../classes"; -import { attributesToSubscriptionsWhereInputFields, objectFieldsToSubscriptionsWhereInputFields } from "../to-compose"; -import type { ObjectFields } from "../get-obj-field-meta"; -import { upperFirst } from "../../utils/upper-first"; -import type { RelationField } from "../../types"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import { attributesToSubscriptionsWhereInputFields } from "../to-compose"; const isEmptyObject = (obj: Record) => !Object.keys(obj).length; export function generateSubscriptionWhereType( - node: Node, - schemaComposer: SchemaComposer -): InputTypeComposer | undefined { - const typeName = node.name; - if (schemaComposer.has(`${node.name}SubscriptionWhere`)) { - return schemaComposer.getITC(`${node.name}SubscriptionWhere`); - } - const whereFields = objectFieldsToSubscriptionsWhereInputFields(typeName, [ - ...node.primitiveFields, - ...node.enumFields, - ...node.scalarFields, - ...node.temporalFields, - ...node.pointFields, - ]); - if (isEmptyObject(whereFields)) { - return; - } - return schemaComposer.createInputTC({ - name: `${node.name}SubscriptionWhere`, - fields: whereFields, - }); -} -export function generateSubscriptionWhereType2( entityAdapter: ConcreteEntityAdapter, schemaComposer: SchemaComposer ): InputTypeComposer | undefined { @@ -71,68 +44,13 @@ export function generateSubscriptionWhereType2( } export function generateSubscriptionConnectionWhereType({ - node, - schemaComposer, - relationshipFields, - interfaceCommonFields, -}: { - node: Node; - schemaComposer: SchemaComposer; - relationshipFields: Map; - interfaceCommonFields: Map; -}): { created: InputTypeComposer; deleted: InputTypeComposer } | undefined { - const fieldName = node.subscriptionEventPayloadFieldNames.create_relationship; - const typeName = node.name; - - const connectedRelationship = getRelationshipConnectionWhereTypes({ - node, - schemaComposer, - relationshipFields, - interfaceCommonFields, - }); - const isConnectedNodeTypeNotExcluded = schemaComposer.has(`${typeName}SubscriptionWhere`); - if (!isConnectedNodeTypeNotExcluded && !connectedRelationship) { - return; - } - - const relationshipCreatedWhere = `${typeName}RelationshipCreatedSubscriptionWhere`; - const relationshipDeletedWhere = `${typeName}RelationshipDeletedSubscriptionWhere`; - - return { - created: schemaComposer.createInputTC({ - name: relationshipCreatedWhere, - fields: { - AND: `[${relationshipCreatedWhere}!]`, - OR: `[${relationshipCreatedWhere}!]`, - NOT: relationshipCreatedWhere, - ...(isConnectedNodeTypeNotExcluded && { - [fieldName]: schemaComposer.getITC(`${typeName}SubscriptionWhere`), - }), - ...(connectedRelationship && { createdRelationship: connectedRelationship }), - }, - }), - deleted: schemaComposer.createInputTC({ - name: relationshipDeletedWhere, - fields: { - AND: `[${relationshipDeletedWhere}!]`, - OR: `[${relationshipDeletedWhere}!]`, - NOT: relationshipDeletedWhere, - ...(isConnectedNodeTypeNotExcluded && { - [fieldName]: schemaComposer.getITC(`${typeName}SubscriptionWhere`), - }), - ...(connectedRelationship && { deletedRelationship: connectedRelationship }), - }, - }), - }; -} -export function generateSubscriptionConnectionWhereType2({ entityAdapter, schemaComposer, }: { entityAdapter: ConcreteEntityAdapter; schemaComposer: SchemaComposer; }): { created: InputTypeComposer; deleted: InputTypeComposer } | undefined { - const connectedRelationship = getRelationshipConnectionWhereTypes2({ + const connectedRelationship = getRelationshipConnectionWhereTypes({ entityAdapter, schemaComposer, }); @@ -171,48 +89,6 @@ export function generateSubscriptionConnectionWhereType2({ } function getRelationshipConnectionWhereTypes({ - node, - schemaComposer, - relationshipFields, - interfaceCommonFields, -}: { - node: Node; - schemaComposer: SchemaComposer; - relationshipFields: Map; - interfaceCommonFields: Map; -}): InputTypeComposer | undefined { - const { name, relationFields } = node; - const relationsFieldInputWhereTypeFields = relationFields.reduce((acc, rf) => { - const { fieldName } = rf; - const nodeRelationPrefix = `${name}${upperFirst(fieldName)}`; - const fields = makeNodeRelationFields({ - relationField: rf, - schemaComposer, - interfaceCommonFields, - relationshipFields, - nodeRelationPrefix, - }); - if (!fields) { - return acc; - } - const relationFieldInputWhereType = schemaComposer.createInputTC({ - name: `${nodeRelationPrefix}RelationshipSubscriptionWhere`, - fields, - }); - acc[fieldName] = relationFieldInputWhereType; - return acc; - }, {}); - - if (isEmptyObject(relationsFieldInputWhereTypeFields)) { - return; - } - const relationsFieldInputWhereType = schemaComposer.createInputTC({ - name: `${name}RelationshipsSubscriptionWhere`, - fields: relationsFieldInputWhereTypeFields, - }); - return relationsFieldInputWhereType; -} -function getRelationshipConnectionWhereTypes2({ entityAdapter, schemaComposer, }: { @@ -221,7 +97,7 @@ function getRelationshipConnectionWhereTypes2({ }): InputTypeComposer | undefined { const relationsFieldInputWhereTypeFields = Array.from(entityAdapter.relationships.values()).reduce( (acc, relationshipAdapter) => { - const fields = makeNodeRelationFields2({ + const fields = makeNodeRelationFields({ relationshipAdapter, schemaComposer, }); @@ -249,50 +125,13 @@ function getRelationshipConnectionWhereTypes2({ } function makeNodeRelationFields({ - relationField, - schemaComposer, - interfaceCommonFields, - relationshipFields, - nodeRelationPrefix, -}: { - relationField: RelationField; - nodeRelationPrefix: string; - schemaComposer: SchemaComposer; - relationshipFields: Map; - interfaceCommonFields: Map; -}) { - const edgeType = makeRelationshipWhereType({ - relationshipFields, - schemaComposer, - relationField, - }); - - const unionNodeTypes = relationField.union?.nodes; - if (unionNodeTypes) { - return makeRelationshipToUnionTypeWhereType({ unionNodeTypes, schemaComposer, nodeRelationPrefix, edgeType }); - } - const interfaceNodeTypes = relationField.interface?.implementations; - if (interfaceNodeTypes) { - const interfaceNodeTypeName = relationField.typeMeta.name; - const interfaceCommonFieldsOnImplementations = interfaceCommonFields.get(interfaceNodeTypeName); - return makeRelationshipToInterfaceTypeWhereType({ - interfaceNodeTypeName, - schemaComposer, - interfaceNodeTypes, - interfaceCommonFieldsOnImplementations, - edgeType, - }); - } - return makeRelationshipToConcreteTypeWhereType({ relationField, edgeType, schemaComposer }); -} -function makeNodeRelationFields2({ relationshipAdapter, schemaComposer, }: { relationshipAdapter: RelationshipAdapter; schemaComposer: SchemaComposer; }) { - const edgeType = makeRelationshipWhereType2({ + const edgeType = makeRelationshipWhereType({ schemaComposer, relationshipAdapter, }); @@ -300,45 +139,21 @@ function makeNodeRelationFields2({ const unionNode = relationshipAdapter.target instanceof UnionEntityAdapter ? relationshipAdapter.target : undefined; if (unionNode) { const unionNodeTypes = unionNode.concreteEntities; - return makeRelationshipToUnionTypeWhereType2({ unionNodeTypes, schemaComposer, relationshipAdapter, edgeType }); + return makeRelationshipToUnionTypeWhereType({ unionNodeTypes, schemaComposer, relationshipAdapter, edgeType }); } const interfaceEntity = relationshipAdapter.target instanceof InterfaceEntityAdapter ? relationshipAdapter.target : undefined; if (interfaceEntity) { - return makeRelationshipToInterfaceTypeWhereType2({ + return makeRelationshipToInterfaceTypeWhereType({ schemaComposer, interfaceEntity, edgeType, }); } - return makeRelationshipToConcreteTypeWhereType2({ relationshipAdapter, edgeType, schemaComposer }); + return makeRelationshipToConcreteTypeWhereType({ relationshipAdapter, edgeType, schemaComposer }); } function makeRelationshipWhereType({ - relationshipFields, - schemaComposer, - relationField, -}: { - schemaComposer: SchemaComposer; - relationshipFields: Map; - relationField: RelationField; -}): InputTypeComposer | undefined { - const relationProperties = relationshipFields.get(relationField.properties || ""); - if (!relationProperties) { - return undefined; - } - return schemaComposer.getOrCreateITC(`${relationField.properties}SubscriptionWhere`, (tc) => - tc.addFields( - objectFieldsToSubscriptionsWhereInputFields(relationField.properties as string, [ - ...relationProperties.primitiveFields, - ...relationProperties.enumFields, - ...relationProperties.scalarFields, - ...relationProperties.temporalFields, - ]) - ) - ); -} -function makeRelationshipWhereType2({ schemaComposer, relationshipAdapter, }: { @@ -357,25 +172,6 @@ function makeRelationshipWhereType2({ } function makeRelationshipToConcreteTypeWhereType({ - relationField, - edgeType, - schemaComposer, -}: { - relationField: RelationField; - edgeType: InputTypeComposer | undefined; - schemaComposer: SchemaComposer; -}): { node?: string; edge?: InputTypeComposer } | undefined { - const nodeTypeName = relationField.typeMeta.name; - const nodeExists = schemaComposer.has(`${nodeTypeName}SubscriptionWhere`); - if (!nodeExists && !edgeType) { - return undefined; - } - return { - ...(nodeExists && { node: `${nodeTypeName}SubscriptionWhere` }), - ...(edgeType && { edge: edgeType }), - }; -} -function makeRelationshipToConcreteTypeWhereType2({ relationshipAdapter, edgeType, schemaComposer, @@ -396,39 +192,6 @@ function makeRelationshipToConcreteTypeWhereType2({ } function makeRelationshipToUnionTypeWhereType({ - unionNodeTypes, - schemaComposer, - nodeRelationPrefix, - edgeType, -}: { - schemaComposer: SchemaComposer; - unionNodeTypes: string[]; - nodeRelationPrefix: string; - edgeType: InputTypeComposer | undefined; -}): Record | undefined { - const unionTypes = unionNodeTypes.reduce((acc, concreteTypeName) => { - const nodeExists = schemaComposer.has(`${concreteTypeName}SubscriptionWhere`); - if (!nodeExists && !edgeType) { - return acc; - } - acc[concreteTypeName] = schemaComposer.getOrCreateITC( - `${nodeRelationPrefix}${concreteTypeName}SubscriptionWhere`, - (tc) => - tc.addFields({ - ...(nodeExists && { node: `${concreteTypeName}SubscriptionWhere` }), - ...(edgeType && { edge: edgeType }), - }) - ); - - return acc; - }, {}); - - if (isEmptyObject(unionTypes)) { - return; - } - return unionTypes; -} -function makeRelationshipToUnionTypeWhereType2({ unionNodeTypes, schemaComposer, relationshipAdapter, @@ -463,61 +226,6 @@ function makeRelationshipToUnionTypeWhereType2({ } function makeRelationshipToInterfaceTypeWhereType({ - interfaceNodeTypeName, - schemaComposer, - interfaceNodeTypes, - interfaceCommonFieldsOnImplementations, - edgeType, -}: { - interfaceNodeTypeName: string; - schemaComposer: SchemaComposer; - interfaceNodeTypes: string[]; - interfaceCommonFieldsOnImplementations: ObjectFields | undefined; - edgeType: InputTypeComposer | undefined; -}): { node?: InputTypeComposer; edge?: InputTypeComposer } | undefined { - let interfaceImplementationsType: InputTypeComposer | undefined, - interfaceNodeType: InputTypeComposer | undefined = undefined; - - const implementationsFields = interfaceNodeTypes.reduce((acc, concreteTypeName) => { - if (schemaComposer.has(`${concreteTypeName}SubscriptionWhere`)) { - acc[concreteTypeName] = `${concreteTypeName}SubscriptionWhere`; - } - return acc; - }, {}); - if (!isEmptyObject(implementationsFields)) { - interfaceImplementationsType = schemaComposer.getOrCreateITC( - `${interfaceNodeTypeName}ImplementationsSubscriptionWhere`, - (tc) => tc.addFields(implementationsFields) - ); - } - if (interfaceImplementationsType || interfaceCommonFieldsOnImplementations) { - const interfaceFields = { - ...(interfaceImplementationsType && { _on: interfaceImplementationsType }), - ...(interfaceCommonFieldsOnImplementations && - objectFieldsToSubscriptionsWhereInputFields(interfaceNodeTypeName, [ - ...interfaceCommonFieldsOnImplementations.primitiveFields, - ...interfaceCommonFieldsOnImplementations.enumFields, - ...interfaceCommonFieldsOnImplementations.scalarFields, - ...interfaceCommonFieldsOnImplementations.temporalFields, - ...interfaceCommonFieldsOnImplementations.pointFields, - ])), - }; - if (!isEmptyObject(interfaceFields)) { - interfaceNodeType = schemaComposer.getOrCreateITC(`${interfaceNodeTypeName}SubscriptionWhere`, (tc) => - tc.addFields(interfaceFields) - ); - } - } - - if (!interfaceNodeType && !edgeType) { - return; - } - return { - ...(interfaceNodeType && { node: interfaceNodeType }), - ...(edgeType && { edge: edgeType }), - }; -} -function makeRelationshipToInterfaceTypeWhereType2({ schemaComposer, interfaceEntity, edgeType, diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index 2e11dab4b8..90c7fd9312 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -17,15 +17,14 @@ * limitations under the License. */ -import { any } from "@neo4j/cypher-builder"; -import { DirectiveNode, GraphQLInt, InputValueDefinitionNode } from "graphql"; +import type { DirectiveNode, InputValueDefinitionNode } from "graphql"; +import { GraphQLInt } from "graphql"; import type { Directive, DirectiveArgs, InputTypeComposerFieldConfigMapDefinition, ObjectTypeComposerFieldConfigAsObjectDefinition, } from "graphql-compose"; -import { argsToArgsConfig } from "graphql/type/definition"; import { DEPRECATED } from "../constants"; import type { Argument } from "../schema-model/argument/Argument"; import { ArgumentAdapter } from "../schema-model/argument/model-adapters/ArgumentAdapter"; @@ -40,7 +39,7 @@ import getFieldTypeMeta from "./get-field-type-meta"; import { idResolver } from "./resolvers/field/id"; import { numericalResolver } from "./resolvers/field/numerical"; -export function graphqlArgsToCompose(args: InputValueDefinitionNode[]) { +export function graphqlInputValueToCompose(args: InputValueDefinitionNode[]) { return args.reduce((res, arg) => { const meta = getFieldTypeMeta(arg.type); @@ -55,7 +54,7 @@ export function graphqlArgsToCompose(args: InputValueDefinitionNode[]) { }, {}); } -export function graphqlArgsToCompose2(args: Argument[]) { +export function graphqlArgsToCompose(args: Argument[]) { return args.reduce((res, arg) => { const inputValueAdapter = new ArgumentAdapter(arg); @@ -109,7 +108,7 @@ export function objectFieldsToComposeFields(fields: BaseField[]): { } if (field.arguments) { - newField.args = graphqlArgsToCompose(field.arguments); + newField.args = graphqlInputValueToCompose(field.arguments); } return { ...res, [field.fieldName]: newField }; @@ -139,7 +138,7 @@ export function relationshipAdapterToComposeFields( for (const { typeName, fieldName } of relationshipFields) { const newField: ObjectTypeComposerFieldConfigAsObjectDefinition = { type: typeName, - args: graphqlArgsToCompose2(field.args), + args: graphqlArgsToCompose(field.args), description: field.description, }; @@ -185,7 +184,7 @@ export function attributeAdapterToComposeFields( } if (field.args) { - newField.args = graphqlArgsToCompose2(field.args); + newField.args = graphqlArgsToCompose(field.args); } composeFields[field.name] = newField; From 000afbb47ed710dc65693b0268a69d71c7ce7878 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 26 Sep 2023 15:33:17 +0200 Subject: [PATCH 133/162] refactor: remove unused files --- .../schema/create-connection-fields-old.ts | 294 ------------------ .../utils/builders/relation-field-builder.ts | 68 ---- 2 files changed, 362 deletions(-) delete mode 100644 packages/graphql/src/schema/create-connection-fields-old.ts delete mode 100644 packages/graphql/tests/utils/builders/relation-field-builder.ts diff --git a/packages/graphql/src/schema/create-connection-fields-old.ts b/packages/graphql/src/schema/create-connection-fields-old.ts deleted file mode 100644 index 0b6115270f..0000000000 --- a/packages/graphql/src/schema/create-connection-fields-old.ts +++ /dev/null @@ -1,294 +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 { GraphQLResolveInfo } from "graphql"; -import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; -import type { Node } from "../classes"; -import { Relationship } from "../classes"; -import { DEPRECATED } from "../constants"; - -import type { ConnectionField, ConnectionQueryArgs } from "../types"; - -import { addRelationshipArrayFilters } from "./augment/add-relationship-array-filters"; -import { DEPRECATE_NOT } from "./constants"; -import { addDirectedArgument } from "./directed-argument"; -import type { ObjectFields } from "./get-obj-field-meta"; -import getSortableFields from "./get-sortable-fields"; -import { connectionFieldResolver } from "./pagination"; -import { graphqlDirectivesToCompose } from "./to-compose"; - -function createConnectionFields({ - connectionFields, - schemaComposer, - composeNode, - sourceName, - nodes, - relationshipPropertyFields, -}: { - connectionFields: ConnectionField[]; - schemaComposer: SchemaComposer; - composeNode: ObjectTypeComposer | InterfaceTypeComposer; - sourceName: string; - nodes: Node[]; - relationshipPropertyFields: Map; -}): Relationship[] { - const relationships: Relationship[] = []; - - const whereInput = schemaComposer.getITC(`${composeNode.getTypeName()}Where`); - - connectionFields.forEach((connectionField) => { - const relationship = schemaComposer.getOrCreateOTC(connectionField.relationshipTypeName, (tc) => { - tc.addFields({ - cursor: "String!", - node: `${connectionField.relationship.typeMeta.name}!`, - }); - }); - const deprecatedDirectives = graphqlDirectivesToCompose( - connectionField.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) - ); - - const connectionWhereName = `${connectionField.typeMeta.name}Where`; - - const connectionWhere = schemaComposer.getOrCreateITC(connectionWhereName); - - if (!connectionField.relationship.union) { - connectionWhere.addFields({ - AND: `[${connectionWhereName}!]`, - OR: `[${connectionWhereName}!]`, - NOT: connectionWhereName, - }); - } - - const connection = schemaComposer.getOrCreateOTC(connectionField.typeMeta.name, (tc) => { - tc.addFields({ - edges: relationship.NonNull.List.NonNull, - totalCount: "Int!", - pageInfo: "PageInfo!", - }); - }); - - if (connectionField.relationship.properties && !connectionField.relationship.union) { - const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); - relationship.addInterface(propertiesInterface); - relationship.addFields(propertiesInterface.getFields()); - - connectionWhere.addFields({ - edge: `${connectionField.relationship.properties}Where`, - edge_NOT: { - type: `${connectionField.relationship.properties}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - if (connectionField.relationship.filterableOptions.byValue) { - whereInput.addFields({ - [connectionField.fieldName]: connectionWhere, - [`${connectionField.fieldName}_NOT`]: { - type: connectionWhere, - }, - }); - } - - // n..m Relationships - if (connectionField.relationship.typeMeta.array && connectionField.relationship.filterableOptions.byValue) { - addRelationshipArrayFilters({ - whereInput, - fieldName: connectionField.fieldName, - sourceName: sourceName, - relatedType: connectionField.typeMeta.name, - whereType: connectionWhere, - directives: deprecatedDirectives, - }); - } - - const composeNodeBaseArgs: { - where: any; - sort?: any; - first?: any; - after?: any; - } = { - where: connectionWhere, - first: { - type: "Int", - }, - after: { - type: "String", - }, - }; - - const composeNodeArgs = addDirectedArgument(composeNodeBaseArgs, connectionField.relationship); - - if (connectionField.relationship.properties) { - const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); - connectionSort.addFields({ - edge: `${connectionField.relationship.properties}Sort`, - }); - composeNodeArgs.sort = connectionSort.NonNull.List; - } - - if (connectionField.relationship.interface) { - connectionWhere.addFields({ - OR: connectionWhere.NonNull.List, - AND: connectionWhere.NonNull.List, - NOT: connectionWhereName, - node: `${connectionField.relationship.typeMeta.name}Where`, - node_NOT: { - type: `${connectionField.relationship.typeMeta.name}Where`, - directives: [DEPRECATE_NOT], - }, - }); - - if (schemaComposer.has(`${connectionField.relationship.typeMeta.name}Sort`)) { - const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); - connectionSort.addFields({ - node: `${connectionField.relationship.typeMeta.name}Sort`, - }); - if (!composeNodeArgs.sort) { - composeNodeArgs.sort = connectionSort.NonNull.List; - } - } - - if (connectionField.relationship.properties) { - const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); - relationship.addInterface(propertiesInterface); - relationship.addFields(propertiesInterface.getFields()); - - connectionWhere.addFields({ - edge: `${connectionField.relationship.properties}Where`, - edge_NOT: { - type: `${connectionField.relationship.properties}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - } else if (connectionField.relationship.union) { - const relatedNodes = nodes.filter((n) => connectionField.relationship.union?.nodes?.includes(n.name)); - - relatedNodes.forEach((n) => { - const connectionName = connectionField.typeMeta.name; - - // Append union member name before "ConnectionWhere" - const unionWhereName = `${connectionName.substring(0, connectionName.length - "Connection".length)}${ - n.name - }ConnectionWhere`; - - const unionWhere = schemaComposer.createInputTC({ - name: unionWhereName, - fields: { - OR: `[${unionWhereName}!]`, - AND: `[${unionWhereName}!]`, - NOT: unionWhereName, - }, - }); - - unionWhere.addFields({ - node: `${n.name}Where`, - node_NOT: { - type: `${n.name}Where`, - directives: [DEPRECATE_NOT], - }, - }); - - if (connectionField.relationship.properties) { - const propertiesInterface = schemaComposer.getIFTC(connectionField.relationship.properties); - relationship.addInterface(propertiesInterface); - relationship.addFields(propertiesInterface.getFields()); - - unionWhere.addFields({ - edge: `${connectionField.relationship.properties}Where`, - edge_NOT: { - type: `${connectionField.relationship.properties}Where`, - directives: [DEPRECATE_NOT], - }, - }); - } - - connectionWhere.addFields({ - [n.name]: unionWhere, - }); - }); - } else { - const relatedNode = nodes.find((n) => n.name === connectionField.relationship.typeMeta.name) as Node; - - connectionWhere.addFields({ - node: `${connectionField.relationship.typeMeta.name}Where`, - node_NOT: { - type: `${connectionField.relationship.typeMeta.name}Where`, - directives: [DEPRECATE_NOT], - }, - }); - - if (getSortableFields(relatedNode).length) { - const connectionSort = schemaComposer.getOrCreateITC(`${connectionField.typeMeta.name}Sort`); - connectionSort.addFields({ - node: `${connectionField.relationship.typeMeta.name}Sort`, - }); - if (!composeNodeArgs.sort) { - composeNodeArgs.sort = connectionSort.NonNull.List; - } - } - } - - if (!connectionField.relationship.writeonly && connectionField.selectableOptions.onRead) { - const deprecatedDirectives = graphqlDirectivesToCompose( - connectionField.otherDirectives.filter((directive) => directive.name.value === DEPRECATED) - ); - composeNode.addFields({ - [connectionField.fieldName]: { - type: connection.NonNull, - args: composeNodeArgs, - directives: deprecatedDirectives, - resolve: (source, args: ConnectionQueryArgs, _ctx, info: GraphQLResolveInfo) => { - return connectionFieldResolver({ - connectionField, - args, - info, - source, - }); - }, - }, - }); - } - - const relFields = connectionField.relationship.properties - ? relationshipPropertyFields.get(connectionField.relationship.properties) - : ({} as ObjectFields | undefined); - - const r = new Relationship({ - name: connectionField.relationshipTypeName, - type: connectionField.relationship.type, - properties: connectionField.relationship.properties, - ...(relFields - ? { - temporalFields: relFields.temporalFields, - scalarFields: relFields.scalarFields, - primitiveFields: relFields.primitiveFields, - enumFields: relFields.enumFields, - pointFields: relFields.pointFields, - customResolverFields: relFields.customResolverFields, - } - : {}), - }); - relationships.push(r); - }); - - return relationships; -} - -export default createConnectionFields; diff --git a/packages/graphql/tests/utils/builders/relation-field-builder.ts b/packages/graphql/tests/utils/builders/relation-field-builder.ts deleted file mode 100644 index 8007c41775..0000000000 --- a/packages/graphql/tests/utils/builders/relation-field-builder.ts +++ /dev/null @@ -1,68 +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 "../../../src/constants"; -import { defaultNestedOperations } from "../../../src/graphql/directives/relationship"; -import type { RelationField } from "../../../src/types"; -import { Builder } from "./builder"; - -export class RelationFieldBuilder extends Builder { - constructor(newOptions: Partial = {}) { - super({ - direction: "OUT", - type: "", - typeUnescaped: "", - fieldName: "", - typeMeta: { - name: "", - required: false, - pretty: "", - input: {} as any, - }, - selectableOptions: { - onRead: true, - onAggregate: true, - }, - settableOptions: { - onCreate: true, - onUpdate: true, - }, - filterableOptions: { - byValue: true, - byAggregate: true, - }, - otherDirectives: [], - arguments: [], - inherited: false, - queryDirection: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, - nestedOperations: defaultNestedOperations, - aggregate: true, - ...newOptions, - }); - } - - public with(newOptions: Partial): RelationFieldBuilder { - this.options = { ...this.options, ...newOptions }; - return this; - } - - public instance(): RelationField { - return this.options; - } -} From f360a2becbb8feea96b7bfe060a68a7988ade3bc Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Tue, 26 Sep 2023 15:49:13 +0200 Subject: [PATCH 134/162] feat: add descriptions to graphql types --- packages/graphql/src/graphql/enums/SortDirection.ts | 2 +- packages/graphql/src/graphql/objects/CartesianPoint.ts | 3 ++- packages/graphql/src/graphql/objects/CreateInfo.ts | 2 +- packages/graphql/src/graphql/objects/DeleteInfo.ts | 2 +- packages/graphql/src/graphql/objects/Point.ts | 3 ++- packages/graphql/src/graphql/objects/UpdateInfo.ts | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/graphql/src/graphql/enums/SortDirection.ts b/packages/graphql/src/graphql/enums/SortDirection.ts index 8656e0d17e..fb04e1e604 100644 --- a/packages/graphql/src/graphql/enums/SortDirection.ts +++ b/packages/graphql/src/graphql/enums/SortDirection.ts @@ -21,7 +21,7 @@ import { GraphQLEnumType } from "graphql"; export const SortDirection = new GraphQLEnumType({ name: "SortDirection", - description: "SortDirection", + description: "An enum for sorting in either ascending or descending order.", values: { ASC: { value: "ASC", diff --git a/packages/graphql/src/graphql/objects/CartesianPoint.ts b/packages/graphql/src/graphql/objects/CartesianPoint.ts index 3d5a4f80ce..531495806e 100644 --- a/packages/graphql/src/graphql/objects/CartesianPoint.ts +++ b/packages/graphql/src/graphql/objects/CartesianPoint.ts @@ -21,7 +21,8 @@ import { GraphQLFloat, GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLStr export const CartesianPoint = new GraphQLObjectType({ name: "CartesianPoint", - description: "CartesianPoint type", + description: + "A point in a two- or three-dimensional Cartesian coordinate system or in a three-dimensional cylindrical coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#cartesian-point", fields: { x: { type: new GraphQLNonNull(GraphQLFloat), diff --git a/packages/graphql/src/graphql/objects/CreateInfo.ts b/packages/graphql/src/graphql/objects/CreateInfo.ts index be3740bb9e..c7d7f60cb1 100644 --- a/packages/graphql/src/graphql/objects/CreateInfo.ts +++ b/packages/graphql/src/graphql/objects/CreateInfo.ts @@ -21,7 +21,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const CreateInfo = new GraphQLObjectType({ name: "CreateInfo", - description: "CreateInfo", + description: "Information about the creation of a node or relationship.", fields: { bookmark: { type: GraphQLString, diff --git a/packages/graphql/src/graphql/objects/DeleteInfo.ts b/packages/graphql/src/graphql/objects/DeleteInfo.ts index 3f749ce5ee..b70290ee08 100644 --- a/packages/graphql/src/graphql/objects/DeleteInfo.ts +++ b/packages/graphql/src/graphql/objects/DeleteInfo.ts @@ -21,7 +21,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const DeleteInfo = new GraphQLObjectType({ name: "DeleteInfo", - description: "DeleteInfo", + description: "Information about the deletion of a node or relationship.", fields: { bookmark: { type: GraphQLString, diff --git a/packages/graphql/src/graphql/objects/Point.ts b/packages/graphql/src/graphql/objects/Point.ts index 11ab2ca334..b5e263eaf1 100644 --- a/packages/graphql/src/graphql/objects/Point.ts +++ b/packages/graphql/src/graphql/objects/Point.ts @@ -21,7 +21,8 @@ import { GraphQLFloat, GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLStr export const Point = new GraphQLObjectType({ name: "Point", - description: "Point type", + description: + "A point in a coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#point", fields: { longitude: { type: new GraphQLNonNull(GraphQLFloat), diff --git a/packages/graphql/src/graphql/objects/UpdateInfo.ts b/packages/graphql/src/graphql/objects/UpdateInfo.ts index c8a36ae9b2..3b07da4dec 100644 --- a/packages/graphql/src/graphql/objects/UpdateInfo.ts +++ b/packages/graphql/src/graphql/objects/UpdateInfo.ts @@ -21,7 +21,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const UpdateInfo = new GraphQLObjectType({ name: "UpdateInfo", - description: "UpdateInfo", + description: "Information about the update of a node or relationship.", fields: { bookmark: { type: GraphQLString, From 28ddd09410de01a185d80b6c0c80c8aa84efa944 Mon Sep 17 00:00:00 2001 From: a-alle Date: Tue, 26 Sep 2023 16:30:32 +0100 Subject: [PATCH 135/162] refactor make-augmented-schema, fulltext and add copyright to some files --- .../graphql/src/schema-model/Operation.ts | 1 - .../model-adapters/AttributeAdapter.ts | 151 +----- .../ConcreteEntityAdapter.test.ts | 1 + .../ConcreteEntityOperations.ts | 2 + packages/graphql/src/schema/array-methods.ts | 34 -- .../graphql/src/schema/augment/fulltext.ts | 93 +--- .../src/schema/generation/aggregate-types.ts | 20 +- .../generation/augment-object-or-interface.ts | 18 + .../schema/generation/augment-where-input.ts | 19 + .../src/schema/generation/connect-input.ts | 19 + .../generation/connect-or-create-input.ts | 18 + .../src/schema/generation/create-input.ts | 2 - .../src/schema/generation/delete-input.ts | 19 + .../src/schema/generation/disconnect-input.ts | 19 + .../src/schema/generation/fulltext-input.ts | 165 ++++++ .../generation/implementation-inputs.ts | 19 +- .../src/schema/generation/interface-type.ts | 18 + .../src/schema/generation/object-type.ts | 18 + .../src/schema/generation/response-types.ts | 18 + .../generation/sort-and-options-input.ts | 18 + .../src/schema/generation/update-input.ts | 19 + .../src/schema/generation/where-input.ts | 19 + .../src/schema/make-augmented-schema.ts | 483 +++--------------- .../user-defined-directives.ts | 119 +++++ .../generate-subscription-types.ts | 1 + 25 files changed, 659 insertions(+), 654 deletions(-) delete mode 100644 packages/graphql/src/schema/array-methods.ts create mode 100644 packages/graphql/src/schema/generation/fulltext-input.ts create mode 100644 packages/graphql/src/schema/make-augmented-schema/user-defined-directives.ts diff --git a/packages/graphql/src/schema-model/Operation.ts b/packages/graphql/src/schema-model/Operation.ts index 7e95137f39..d32146080e 100644 --- a/packages/graphql/src/schema-model/Operation.ts +++ b/packages/graphql/src/schema-model/Operation.ts @@ -22,7 +22,6 @@ import { Neo4jGraphQLSchemaValidationError } from "../classes"; import type { Annotation, Annotations } from "./annotation/Annotation"; import { annotationToKey } from "./annotation/Annotation"; import type { Attribute } from "./attribute/Attribute"; -// import type { Field } from "./attribute/Field"; export class Operation { public readonly name: string; diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 85aaa2d215..c3ea38ad17 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -18,7 +18,6 @@ */ import type { Annotations } from "../../annotation/Annotation"; -import type { FullTextField } from "../../annotation/FullTextAnnotation"; import type { Argument } from "../../argument/Argument"; import type { Attribute } from "../Attribute"; import type { AttributeType } from "../AttributeType"; @@ -67,20 +66,6 @@ export class AttributeAdapter { }; } - /** - * Previously defined as: - * [ - ...this.temporalFields, - ...this.enumFields, - ...this.objectFields, - ...this.scalarFields, - ...this.primitiveFields, - ...this.interfaceFields, - ...this.objectFields, - ...this.unionFields, - ...this.pointFields, - ]; - */ isMutable(): boolean { return ( (this.isEnum() || this.isAbstract() || this.isSpatial() || this.isScalar() || this.isObject()) && @@ -96,14 +81,6 @@ export class AttributeAdapter { return !!this.annotations.cypher; } - /** - * Previously defined as: - * [...this.primitiveFields, - ...this.scalarFields, - ...this.enumFields, - ...this.temporalFields, - ...this.pointFields,] - */ isConstrainable(): boolean { return ( this.isGraphQLBuiltInScalar() || @@ -114,39 +91,10 @@ export class AttributeAdapter { ); } - /** - * Previously defined as: - * const nodeFields = objectFieldsToComposeFields([ - ...node.primitiveFields, - ...node.cypherFields, - ...node.enumFields, - ...node.scalarFields, - ...node.interfaceFields, - ...node.objectFields, - ...node.unionFields, - ...node.temporalFields, - ...node.pointFields, - ...node.customResolverFields, - ]); - */ isObjectField(): boolean { - return ( - this.isScalar() || this.isEnum() || this.isAbstract() || this.isObject() || this.isSpatial() - // this.isCustomResolver() - ); + return this.isScalar() || this.isEnum() || this.isAbstract() || this.isObject() || this.isSpatial(); } - /** - * Previously defined as: - * ...objectFields.enumFields, - ...objectFields.interfaceFields, - ...objectFields.primitiveFields, - ...objectFields.relationFields, - ...objectFields.scalarFields, - ...objectFields.unionFields, - ...objectFields.objectFields, - ...objectFields.temporalFields, - */ isRootTypeObjectField(): boolean { return ( this.isGraphQLBuiltInScalar() || @@ -160,31 +108,6 @@ export class AttributeAdapter { ); } - /* - return [ - ...obj.primitiveFields, - ...obj.scalarFields, - ...obj.enumFields, - ...obj.temporalFields, - ...obj.pointFields, - ...obj.cypherFields.filter((field) => - [ - "Boolean", - "ID", - "Int", - "BigInt", - "Float", - "String", - "DateTime", - "LocalDateTime", - "Time", - "LocalTime", - "Date", - "Duration", - ].includes(field.typeMeta.name) - ), - ].filter((field) => !field.typeMeta.array); - */ isSortableField(): boolean { return ( !this.isList() && @@ -193,16 +116,6 @@ export class AttributeAdapter { ); } - /** - * - fields: { - temporalFields: node.temporalFields, - enumFields: node.enumFields, - pointFields: node.pointFields, - primitiveFields: node.primitiveFields, - scalarFields: node.scalarFields, - }, - */ isWhereField(): boolean { return ( (this.isEnum() || this.isSpatial() || this.isScalar()) && @@ -212,72 +125,24 @@ export class AttributeAdapter { ); } - /** - * - ...node.primitiveFields, - ...node.enumFields, - ...node.scalarFields, - ...node.temporalFields, - ...node.pointFields, - ...node.cypherFields, - */ isEventPayloadField(): boolean { return this.isEnum() || this.isSpatial() || this.isScalar(); } - /** - * - ...node.primitiveFields, - ...node.enumFields, - ...node.scalarFields, - ...node.temporalFields, - ...node.pointFields, - */ + isSubscriptionWhereField(): boolean { return (this.isEnum() || this.isSpatial() || this.isScalar()) && !this.isCypher(); } - /** - * - ...node.primitiveFields, - ...node.enumFields, - ...node.scalarFields, - ...node.temporalFields, - ...node.pointFields, - */ + isSubscriptionConnectedRelationshipField(): boolean { return (this.isEnum() || this.isSpatial() || this.isScalar()) && !this.isCypher(); } - /** - * [ - * ...node.primitiveFields, - ...node.scalarFields, - ...node.enumFields, - ...node.pointFields, - ...node.temporalFields - ] - */ isOnCreateField(): boolean { return ( this.isNonGeneratedField() && (this.isScalar() || this.isSpatial() || this.isEnum() || this.isAbstract()) ); } - /** - * - if ( - [ - "Float", - "Int", - "BigInt", - "DateTime", - "Date", - "LocalDateTime", - "Time", - "LocalTime", - "Duration", - ].includes(f.typeMeta.name) - ), - */ isNumericalOrTemporal(): boolean { return this.isFloat() || this.isInt() || this.isBigInt() || this.isTemporal(); } @@ -631,16 +496,6 @@ export class AttributeAdapter { return !!this.annotations.customResolver; } - // TODO: Check if this is the right place for this - isFulltext(): boolean { - return !!this.annotations.fulltext; - } - - // TODO: Check if this is the right place for this - getFulltextIndexes(): FullTextField[] | undefined { - return this.annotations.fulltext?.indexes; - } - isPartOfUpdateInputType(): boolean { if (this.isScalar() || this.isEnum() || this.isSpatial()) { return true; diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.test.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.test.ts index a2ce9f6fbb..66d5de60c6 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.test.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.test.ts @@ -119,6 +119,7 @@ describe("ConcreteEntityAdapter", () => { create: "createUsers", delete: "deleteUsers", read: "users", + connection: "usersConnection", subscribe: { created: "userCreated", deleted: "userDeleted", diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts index f9de40734e..39970a47e9 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityOperations.ts @@ -26,6 +26,7 @@ type RootTypeFieldNames = { update: string; delete: string; aggregate: string; + connection: string; subscribe: { created: string; updated: string; @@ -179,6 +180,7 @@ export class ConcreteEntityOperations { update: `update${this.pascalCasePlural}`, delete: `delete${this.pascalCasePlural}`, aggregate: `${this.concreteEntityAdapter.plural}Aggregate`, + connection: `${this.concreteEntityAdapter.plural}Connection`, subscribe: { created: `${this.concreteEntityAdapter.singular}Created`, updated: `${this.concreteEntityAdapter.singular}Updated`, diff --git a/packages/graphql/src/schema/array-methods.ts b/packages/graphql/src/schema/array-methods.ts deleted file mode 100644 index 0f2168e7d8..0000000000 --- a/packages/graphql/src/schema/array-methods.ts +++ /dev/null @@ -1,34 +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 { GraphQLInt } from "graphql"; -import type { InputTypeComposer } from "graphql-compose"; -import type { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; - -export function addArrayMethodsToITC(itc: InputTypeComposer, arrayMethodFields: AttributeAdapter[]): void { - // TODO: Did we need to consider the deprecated directives here? - // It wasn't done before - - arrayMethodFields.forEach((arrayField) => { - itc.addFields({ - [`${arrayField.name}_POP`]: GraphQLInt, - [`${arrayField.name}_PUSH`]: arrayField.getInputTypeNames().update.pretty, - }); - }); -} diff --git a/packages/graphql/src/schema/augment/fulltext.ts b/packages/graphql/src/schema/augment/fulltext.ts index ed7053b836..e7e4914bd1 100644 --- a/packages/graphql/src/schema/augment/fulltext.ts +++ b/packages/graphql/src/schema/augment/fulltext.ts @@ -17,13 +17,17 @@ * limitations under the License. */ -import { GraphQLFloat, GraphQLInt, GraphQLNonNull, GraphQLString } from "graphql"; -import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import { GraphQLInt, GraphQLNonNull, GraphQLString } from "graphql"; +import type { SchemaComposer } from "graphql-compose"; import type { Node } from "../../classes"; -import { SCORE_FIELD } from "../../graphql/directives/fulltext"; -import { SortDirection } from "../../graphql/enums/SortDirection"; -import { FloatWhere } from "../../graphql/input-objects/FloatWhere"; + import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { + withFullTextInputType, + withFullTextResultType, + withFullTextSortInputType, + withFullTextWhereInputType, +} from "../generation/fulltext-input"; import { fulltextResolver } from "../resolvers/query/fulltext"; export function augmentFulltextSchema( @@ -35,66 +39,20 @@ export function augmentFulltextSchema( return; } - const fields = concreteEntityAdapter.annotations.fulltext.indexes.reduce( - (res: Record, index): Record => { - const indexName = index.indexName || index.name; - if (indexName === undefined) { - throw new Error("The name of the fulltext index should be defined using the indexName argument."); - } - return { - ...res, - [indexName]: composer.createInputTC({ - name: concreteEntityAdapter.operations.getFullTextIndexInputTypeName(indexName), - fields: { - phrase: new GraphQLNonNull(GraphQLString), - }, - }), - }; - }, - {} - ); - - const fulltextResultDescription = `The result of a fulltext search on an index of ${concreteEntityAdapter.name}`; - const fulltextWhereDescription = `The input for filtering a fulltext query on an index of ${concreteEntityAdapter.name}`; - const fulltextSortDescription = `The input for sorting a fulltext query on an index of ${concreteEntityAdapter.name}`; - - composer.createInputTC({ - name: concreteEntityAdapter.operations.fullTextInputTypeName, - fields, - }); - - const fulltextSortITC = composer.createInputTC({ - name: concreteEntityAdapter.operations.fulltextTypeNames.sort, - description: fulltextSortDescription, - fields: { - [SCORE_FIELD]: SortDirection.name, - [concreteEntityAdapter.singular]: concreteEntityAdapter.operations.sortInputTypeName, - }, - }); - - composer.createInputTC({ - name: concreteEntityAdapter.operations.fulltextTypeNames.where, - description: fulltextWhereDescription, - fields: { - [SCORE_FIELD]: FloatWhere.name, - [concreteEntityAdapter.singular]: concreteEntityAdapter.operations.whereInputTypeName, - }, - }); - - const fulltextResultITC = composer.createObjectTC({ - name: concreteEntityAdapter.operations.fulltextTypeNames.result, - description: fulltextResultDescription, - fields: { - [SCORE_FIELD]: new GraphQLNonNull(GraphQLFloat), - [concreteEntityAdapter.singular]: `${concreteEntityAdapter.name}!`, - }, - }); + withFullTextInputType({ concreteEntityAdapter, composer }); + withFullTextWhereInputType({ composer, concreteEntityAdapter }); - // TODO: to move this over to the concreteEntityAdapter we need to check what the use of - // the queryType and scoreVariable properties are in FulltextContext - // and determine if we can remove them + /** + * TODO [fulltext-deprecations] + * to move this over to the concreteEntityAdapter we need to check what the use of + * the queryType and scoreVariable properties are in FulltextContext + * and determine if we can remove them + */ concreteEntityAdapter.annotations.fulltext.indexes.forEach((index) => { - // TODO: remove indexName assignment and undefined check once the name argument has been removed. + /** + * TODO [fulltext-deprecations] + * remove indexName assignment and undefined check once the name argument has been removed. + */ const indexName = index.indexName || index.name; if (indexName === undefined) { throw new Error("The name of the fulltext index should be defined using the indexName argument."); @@ -104,7 +62,10 @@ export function augmentFulltextSchema( if (index.queryName) { queryName = index.queryName; } - // TODO: temporary for compatibility with translation layer + /** + * TODO [translation-layer-compatibility] + * temporary for compatibility with translation layer + */ const nodeIndex = node.fulltextDirective!.indexes.find((i) => { const iName = i.indexName || i.name; return iName === indexName; @@ -114,14 +75,14 @@ export function augmentFulltextSchema( } composer.Query.addFields({ [queryName]: { - type: fulltextResultITC.NonNull.List.NonNull, + type: withFullTextResultType({ composer, concreteEntityAdapter }).NonNull.List.NonNull, description: "Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the `fulltext` argument under other queries for this functionality.", resolve: fulltextResolver({ node, index: nodeIndex }), args: { phrase: new GraphQLNonNull(GraphQLString), where: concreteEntityAdapter.operations.fulltextTypeNames.where, - sort: fulltextSortITC.NonNull.List, + sort: withFullTextSortInputType({ concreteEntityAdapter, composer }).NonNull.List, limit: GraphQLInt, offset: GraphQLInt, }, diff --git a/packages/graphql/src/schema/generation/aggregate-types.ts b/packages/graphql/src/schema/generation/aggregate-types.ts index 1894d76712..04acff946e 100644 --- a/packages/graphql/src/schema/generation/aggregate-types.ts +++ b/packages/graphql/src/schema/generation/aggregate-types.ts @@ -1,3 +1,21 @@ +/* + * 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 { DirectiveNode } from "graphql"; import { GraphQLFloat, GraphQLID, GraphQLInt, GraphQLNonNull, GraphQLString } from "graphql"; import type { @@ -150,7 +168,7 @@ function makeAggregationFields(attributes: AttributeAdapter[]): InputTypeCompose return aggregationFields; } -// TODO: refactor this ALE +// TODO: refactor this by introducing specialized Adapters function getAggregationFieldsByType(attribute: AttributeAdapter): InputTypeComposerFieldConfigMapDefinition { const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (attribute.isID()) { 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 6135e168ed..918514c92a 100644 --- a/packages/graphql/src/schema/generation/augment-object-or-interface.ts +++ b/packages/graphql/src/schema/generation/augment-object-or-interface.ts @@ -1,3 +1,21 @@ +/* + * 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 { DirectiveNode } from "graphql"; import type { Directive } from "graphql-compose"; import type { Subgraph } from "../../classes/Subgraph"; diff --git a/packages/graphql/src/schema/generation/augment-where-input.ts b/packages/graphql/src/schema/generation/augment-where-input.ts index cef4e3bcf7..728bf6e6d5 100644 --- a/packages/graphql/src/schema/generation/augment-where-input.ts +++ b/packages/graphql/src/schema/generation/augment-where-input.ts @@ -1,3 +1,22 @@ +/* + * 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, InputTypeComposerFieldConfigMapDefinition } from "graphql-compose"; import { DEPRECATED } from "../../constants"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; diff --git a/packages/graphql/src/schema/generation/connect-input.ts b/packages/graphql/src/schema/generation/connect-input.ts index 07dce1ef3e..9bab884ed7 100644 --- a/packages/graphql/src/schema/generation/connect-input.ts +++ b/packages/graphql/src/schema/generation/connect-input.ts @@ -1,3 +1,22 @@ +/* + * 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, InputTypeComposer, diff --git a/packages/graphql/src/schema/generation/connect-or-create-input.ts b/packages/graphql/src/schema/generation/connect-or-create-input.ts index d345435e65..69d828c356 100644 --- a/packages/graphql/src/schema/generation/connect-or-create-input.ts +++ b/packages/graphql/src/schema/generation/connect-or-create-input.ts @@ -1,3 +1,21 @@ +/* + * 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 { DirectiveNode } from "graphql"; import type { Directive, diff --git a/packages/graphql/src/schema/generation/create-input.ts b/packages/graphql/src/schema/generation/create-input.ts index 70150297d7..82a0365c7a 100644 --- a/packages/graphql/src/schema/generation/create-input.ts +++ b/packages/graphql/src/schema/generation/create-input.ts @@ -42,7 +42,6 @@ export function withCreateInputType({ // ensureNonEmptyInput(composer, createInputType); - not for relationshipAdapter return createInputType; } - function makeCreateInputFields( interfaceEntityAdapter: InterfaceEntityAdapter ): InputTypeComposerFieldConfigMapDefinition { @@ -55,7 +54,6 @@ function makeCreateInputFields( return fields; } -// -------------------- FIELD INPUT ------------------------ export function augmentCreateInputTypeWithRelationshipsInput({ relationshipAdapter, composer, diff --git a/packages/graphql/src/schema/generation/delete-input.ts b/packages/graphql/src/schema/generation/delete-input.ts index e7dbdc9b48..d2be681949 100644 --- a/packages/graphql/src/schema/generation/delete-input.ts +++ b/packages/graphql/src/schema/generation/delete-input.ts @@ -1,3 +1,22 @@ +/* + * 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, InputTypeComposer, diff --git a/packages/graphql/src/schema/generation/disconnect-input.ts b/packages/graphql/src/schema/generation/disconnect-input.ts index 8c6284fb9c..18b7d4212e 100644 --- a/packages/graphql/src/schema/generation/disconnect-input.ts +++ b/packages/graphql/src/schema/generation/disconnect-input.ts @@ -1,3 +1,22 @@ +/* + * 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, InputTypeComposer, diff --git a/packages/graphql/src/schema/generation/fulltext-input.ts b/packages/graphql/src/schema/generation/fulltext-input.ts new file mode 100644 index 0000000000..8efac3fb4a --- /dev/null +++ b/packages/graphql/src/schema/generation/fulltext-input.ts @@ -0,0 +1,165 @@ +/* + * 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 { + InputTypeComposer, + InputTypeComposerFieldConfigMapDefinition, + ObjectTypeComposer, + SchemaComposer, +} from "graphql-compose"; +import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { GraphQLFloat, GraphQLNonNull, GraphQLString } from "graphql"; +import { SCORE_FIELD } from "../../graphql/directives/fulltext"; +import { FloatWhere } from "../../graphql/input-objects/FloatWhere"; +import { SortDirection } from "../../graphql/enums/SortDirection"; + +export function withFullTextInputType({ + concreteEntityAdapter, + composer, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; + composer: SchemaComposer; +}): InputTypeComposer | undefined { + const typeName = concreteEntityAdapter.operations.fullTextInputTypeName; + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const fields = makeFullTextInputFields({ concreteEntityAdapter, composer }); + const fulltextInputType = composer.createInputTC({ + name: typeName, + fields, + }); + return fulltextInputType; +} + +function makeFullTextInputFields({ + concreteEntityAdapter, + composer, +}: { + concreteEntityAdapter: ConcreteEntityAdapter; + composer: SchemaComposer; +}): InputTypeComposerFieldConfigMapDefinition { + const fields: InputTypeComposerFieldConfigMapDefinition = {}; + if (!concreteEntityAdapter.annotations.fulltext) { + throw new Error("Expected fulltext annotation"); + } + for (const index of concreteEntityAdapter.annotations.fulltext.indexes) { + const indexName = index.indexName || index.name; + if (indexName === undefined) { + throw new Error("The name of the fulltext index should be defined using the indexName argument."); + } + const fieldInput = withFullTextIndexInputType({ + concreteEntityAdapter, + indexName, + composer, + }); + if (fieldInput) { + fields[indexName] = fieldInput; + } + } + return fields; +} + +function withFullTextIndexInputType({ + composer, + concreteEntityAdapter, + indexName, +}: { + composer: SchemaComposer; + concreteEntityAdapter: ConcreteEntityAdapter; + indexName: string; +}): InputTypeComposer { + const typeName = concreteEntityAdapter.operations.getFullTextIndexInputTypeName(indexName); + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const indexInput = composer.createInputTC({ + name: typeName, + fields: { + phrase: new GraphQLNonNull(GraphQLString), + }, + }); + return indexInput; +} + +export function withFullTextWhereInputType({ + composer, + concreteEntityAdapter, +}: { + composer: SchemaComposer; + concreteEntityAdapter: ConcreteEntityAdapter; +}): InputTypeComposer { + const typeName = concreteEntityAdapter.operations.fulltextTypeNames.where; + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const whereInput = composer.createInputTC({ + name: typeName, + description: `The input for filtering a fulltext query on an index of ${concreteEntityAdapter.name}`, + fields: { + [SCORE_FIELD]: FloatWhere.name, + [concreteEntityAdapter.singular]: concreteEntityAdapter.operations.whereInputTypeName, + }, + }); + return whereInput; +} + +export function withFullTextSortInputType({ + composer, + concreteEntityAdapter, +}: { + composer: SchemaComposer; + concreteEntityAdapter: ConcreteEntityAdapter; +}): InputTypeComposer { + const typeName = concreteEntityAdapter.operations.fulltextTypeNames.sort; + if (composer.has(typeName)) { + return composer.getITC(typeName); + } + const whereInput = composer.createInputTC({ + name: typeName, + description: `The input for sorting a fulltext query on an index of ${concreteEntityAdapter.name}`, + fields: { + [SCORE_FIELD]: SortDirection.name, + [concreteEntityAdapter.singular]: concreteEntityAdapter.operations.sortInputTypeName, + }, + }); + return whereInput; +} + +export function withFullTextResultType({ + composer, + concreteEntityAdapter, +}: { + composer: SchemaComposer; + concreteEntityAdapter: ConcreteEntityAdapter; +}): ObjectTypeComposer { + const typeName = concreteEntityAdapter.operations.fulltextTypeNames.result; + if (composer.has(typeName)) { + return composer.getOTC(typeName); + } + const whereInput = composer.createObjectTC({ + name: typeName, + description: `The result of a fulltext search on an index of ${concreteEntityAdapter.name}`, + fields: { + [SCORE_FIELD]: new GraphQLNonNull(GraphQLFloat), + [concreteEntityAdapter.singular]: `${concreteEntityAdapter.name}!`, + }, + }); + return whereInput; +} diff --git a/packages/graphql/src/schema/generation/implementation-inputs.ts b/packages/graphql/src/schema/generation/implementation-inputs.ts index 9d01d54062..78a36f7ed3 100644 --- a/packages/graphql/src/schema/generation/implementation-inputs.ts +++ b/packages/graphql/src/schema/generation/implementation-inputs.ts @@ -1,3 +1,21 @@ +/* + * 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 { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { ensureNonEmptyInput } from "../ensure-non-empty-input"; @@ -38,7 +56,6 @@ export function makeImplementationsConnectInput({ }): InputTypeComposer | undefined { const fields: InputTypeComposerFieldConfigMapDefinition = {}; for (const entityAdapter of interfaceEntityAdapter.concreteEntities) { - // if (entityAdapter.relationships.size && composer.has(entityAdapter.operations.connectInputTypeName)) { if (entityAdapter.relationships.size) { fields[entityAdapter.name] = { type: `[${entityAdapter.operations.connectInputTypeName}!]`, diff --git a/packages/graphql/src/schema/generation/interface-type.ts b/packages/graphql/src/schema/generation/interface-type.ts index e8d60ccc6b..dbce537b94 100644 --- a/packages/graphql/src/schema/generation/interface-type.ts +++ b/packages/graphql/src/schema/generation/interface-type.ts @@ -1,3 +1,21 @@ +/* + * 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 { DirectiveNode } from "graphql"; import type { InterfaceTypeComposer, SchemaComposer } from "graphql-compose"; import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; diff --git a/packages/graphql/src/schema/generation/object-type.ts b/packages/graphql/src/schema/generation/object-type.ts index e23578d382..cdc90d110e 100644 --- a/packages/graphql/src/schema/generation/object-type.ts +++ b/packages/graphql/src/schema/generation/object-type.ts @@ -1,3 +1,21 @@ +/* + * 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 { DirectiveNode } from "graphql"; import { GraphQLID, GraphQLNonNull } from "graphql"; import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; diff --git a/packages/graphql/src/schema/generation/response-types.ts b/packages/graphql/src/schema/generation/response-types.ts index 502b0c7304..a456a86cfa 100644 --- a/packages/graphql/src/schema/generation/response-types.ts +++ b/packages/graphql/src/schema/generation/response-types.ts @@ -1,3 +1,21 @@ +/* + * 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 { DirectiveNode } from "graphql"; import { GraphQLNonNull } from "graphql"; import type { SchemaComposer } from "graphql-compose"; diff --git a/packages/graphql/src/schema/generation/sort-and-options-input.ts b/packages/graphql/src/schema/generation/sort-and-options-input.ts index 8ca726b8d8..61c5751420 100644 --- a/packages/graphql/src/schema/generation/sort-and-options-input.ts +++ b/packages/graphql/src/schema/generation/sort-and-options-input.ts @@ -1,3 +1,21 @@ +/* + * 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 { GraphQLInt, type DirectiveNode } from "graphql"; import type { InputTypeComposer, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import { DEPRECATED } from "../../constants"; diff --git a/packages/graphql/src/schema/generation/update-input.ts b/packages/graphql/src/schema/generation/update-input.ts index 6a8b3c7c85..2616303bf8 100644 --- a/packages/graphql/src/schema/generation/update-input.ts +++ b/packages/graphql/src/schema/generation/update-input.ts @@ -1,3 +1,22 @@ +/* + * 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 { DirectiveNode } from "graphql"; import type { Directive, diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index 0788ab7e42..68665443c5 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -1,3 +1,22 @@ +/* + * 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 { DirectiveNode } from "graphql"; import { GraphQLID } from "graphql"; import type { diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index cd34912917..80b7dd6884 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -22,13 +22,11 @@ import type { DefinitionNode, DirectiveNode, DocumentNode, - FieldDefinitionNode, GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLScalarType, - InterfaceTypeDefinitionNode, NameNode, ObjectTypeDefinitionNode, SchemaExtensionNode, @@ -39,7 +37,6 @@ import { SchemaComposer } from "graphql-compose"; import type { Node } from "../classes"; import type Relationship from "../classes/Relationship"; import * as Scalars from "../graphql/scalars"; -import { isRootType } from "../utils/is-root-type"; import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper"; import { augmentFulltextSchema } from "./augment/fulltext"; import { ensureNonEmptyInput } from "./ensure-non-empty-input"; @@ -60,7 +57,6 @@ import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "./t // GraphQL type imports import type { GraphQLToolsResolveMethods } from "graphql-compose/lib/SchemaComposer"; import type { Subgraph } from "../classes/Subgraph"; -import { FIELD_DIRECTIVES, INTERFACE_DIRECTIVES, OBJECT_DIRECTIVES, PROPAGATED_DIRECTIVES } from "../constants"; import { SortDirection } from "../graphql/enums/SortDirection"; import { CartesianPointDistance } from "../graphql/input-objects/CartesianPointDistance"; import { CartesianPointInput } from "../graphql/input-objects/CartesianPointInput"; @@ -85,7 +81,6 @@ import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/In import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { CypherField, Neo4jFeaturesSettings } from "../types"; -import { isInArray } from "../utils/is-in-array"; import { createConnectionFields } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; import { createRelationshipFields } from "./create-relationship-fields/create-relationship-fields"; @@ -102,6 +97,7 @@ import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; +import { getUserDefinedDirectives } from "./make-augmented-schema/user-defined-directives"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; @@ -164,12 +160,6 @@ class AugmentedSchemaGenerator { this.addToComposer(this.getSpatialTypes(pointInTypeDefs, cartesianPointInTypeDefs)); this.addToComposer(this.getTemporalTypes(floatWhereInTypeDefs)); - // this.add(this.getEntityTypes()); - // const relationshipPropertiesTypes = this.getRelationshipProperties( - // this._definitionCollection.relationshipProperties - // ); - // this.add(relationshipPropertiesTypes); - return this.composer; } @@ -231,54 +221,6 @@ class AugmentedSchemaGenerator { }; } - /* - private addGlobalNodeFields(concreteEntities: ConcreteEntity[], nodes: Node[]) { - const globalEntities = concreteEntities.filter((entity) => { - const model = new ConcreteEntityAdapter(entity); - return model.isGlobalNode(); - }); - const globalNodes = nodes.filter((n) => globalEntities.find((e) => e.name === n.name)); - - const fetchById = (id: string, context: Context, info: GraphQLResolveInfo) => { - const resolver = globalNodeResolver({ nodes: globalNodes }); - return resolver.resolve(null, { id }, context, info); - }; - - const resolveType = (obj: { [key: string]: unknown; __resolveType: string }) => obj.__resolveType; - - const { nodeInterface, nodeField } = nodeDefinitions(fetchById, resolveType); - - this._composer.createInterfaceTC(nodeInterface); - this._composer.Query.addFields({ - node: nodeField as ObjectTypeComposerFieldConfigAsObjectDefinition, - }); - } - - // TODO: alternatively, get these from Entity.Relationship - private getRelationshipProperties(relationshipPropertiesInterface: CompositeEntity) { - new ToComposer(relationshipPropertiesInterface) - .withInterfaceType() - .withSortInputType() - .withWhereInputType({ enabledFeatures }) - .withUpdateInputType({ addMathOperators: true, addArrayMethods: true }) - .withCreateInputType() - .build(this._composer); - } - - private getEntityTypes() { - // TODO: consider Factory - this.schemaModel.concreteEntities.forEach((concreteEntity) => { - new ToComposer(concreteEntity) - .withObjectType() - .withSortInputType() - .withWhereInputType({ enabledFeatures }) - .withUpdateInputType({ addMathOperators: true, addArrayMethods: true }) - .withCreateInputType() - .build(this._composer); - }); - } - -*/ private addToComposer({ objects = [], inputs = [], @@ -300,161 +242,6 @@ class AugmentedSchemaGenerator { } } -// abstract ComposerBuilder -// ConcreteEntityBuilder extends ComposerBuilder -// CompositeEntityBuilder extends ComposerBuilder - -/* -class ToComposer { - _entity: ConcreteEntity | CompositeEntity; - _entityModel: ConcreteEntityAdapter | CompositeEntityAdapter; - _ts: TypeStorage; - - constructor(fromEntity: ConcreteEntity | CompositeEntity) { - this._entity = fromEntity; - this._entityModel = - this._entity instanceof ConcreteEntity - ? new ConcreteEntityAdapter(this._entity) - : new CompositeEntityAdapter(this._entity); - this._ts = new TypeStorage(); - } - - public withInterfaceType() { - // this._tempComposer.add(InterfaceTypeComposer.createTemp(this._currentType)); - this._ts.set( - this._entity.name, - InterfaceTypeComposer.createTemp({ - name: this._entity.name, - fields: ToComposer._attributesToComposeFields(Array.from(this._entityModel.attributes.values())), - }) - ); - return this; - } - - public withObjectType() { - this._ts.set( - this._entity.name, - ObjectTypeComposer.createTemp({ - name: this._entity.name, - fields: ToComposer._attributesToComposeFields(Array.from(this._entityModel.attributes.values())), - // TODO: add description field - // description: this._entity.description, - // TODO: discuss with Simone - create an AnnotationAdapter or logic straight in AttributeAdapter - // directives: graphqlDirectivesToCompose([...node.otherDirectives, ...node.propagatedDirectives]), - // TODO: discuss with Simone - add interfaces to ConcreteEntity - // interfaces: this._entity.interfaces.map((x) => x.name.value) - }) - ); - return this; - } - - public withSortInputType() { - const sortTypeName = `${this._entity.name}Sort`; - const currentType = this._ts.get(this._entity.name); - this._ts.set( - sortTypeName, - InputTypeComposer.createTemp({ - name: sortTypeName, - fields: currentType.getFieldNames().reduce((res, f) => { - return { ...res, [f]: "SortDirection" }; - }, {}), - }) - ); - return this; - } - - public withWhereInputType({ enabledFeatures }) { - const whereTypeName = `${this._entity.name}Where`; - this._ts.set( - whereTypeName, - InputTypeComposer.createTemp({ - name: whereTypeName, - fields: ToComposer._attributesToComposeFields(this._entityModel.getCreateInputTypeFields()), - // TODO: refactor getWhereFields - // getWhereFields({ typeName: relationship.name.value, fields: adapter.getWhereInputTypeFields(), enabledFeatures: features.filters }) - }) - ); - return this; - } - - public withUpdateInputType({ addMathOperators = true, addArrayMethods = true }) { - const updateTypeName = `${this._entity.name}UpdateInput`; - const updateInput = InputTypeComposer.createTemp({ - name: updateTypeName, - fields: ToComposer._attributesToComposeFields(this._entityModel.getUpdateInputTypeFields()), - }); - addMathOperators && addMathOperatorsToITC(updateInput); - addArrayMethods && addArrayMethodsToITC(updateInput, relFields.primitiveFields); - addArrayMethods && addArrayMethodsToITC(updateInput, relFields.pointFields); - this._ts.set(updateTypeName, updateInput); - - return this; - - // TODO: add these - // addMathOperatorsToITC(relationshipUpdateITC); - // addArrayMethodsToITC(relationshipUpdateITC, relFields.primitiveFields); - // addArrayMethodsToITC(relationshipUpdateITC, relFields.pointFields); - } - - public withCreateInputType() { - const createTypeName = `${this._entity.name}CreateInput`; - this._ts.set( - createTypeName, - InputTypeComposer.createTemp({ - name: createTypeName, - fields: ToComposer._attributesToComposeFields(this._entityModel.getCreateInputTypeFields()), - }) - ); - - return this; - } - - public build(_composer: SchemaComposer) { - // _composer.createInterfaceTC(x); - - this._ts.forEach((v) => { - _composer.add(v); - }); - - // _composer.merge(t); - } -} -*/ - -function getUserDefinedFieldDirectivesForDefinition( - definitionNode: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, - definitionNodes: DefinitionNodes -): Map { - const userDefinedFieldDirectives = new Map(); - - const allFields: Array = [...(definitionNode.fields || [])]; - // TODO: is it a good idea to inherit the field directives from implemented interfaces? - // makes sense for deprecated but for other user-defined directives?? - if (definitionNode.interfaces) { - for (const inheritsFrom of definitionNode.interfaces) { - const interfaceDefinition = definitionNodes.interfaceTypes.find( - (type) => type.name.value === inheritsFrom.name.value - ); - const inheritedFields = interfaceDefinition?.fields; - if (inheritedFields) { - allFields.push(...inheritedFields); - } - } - } - for (const field of allFields) { - if (!field.directives) { - return userDefinedFieldDirectives; - } - - const matched = field.directives.filter((directive) => !isInArray(FIELD_DIRECTIVES, directive.name.value)); - if (matched.length) { - userDefinedFieldDirectives.set(field.name.value, matched); - } - } - - return userDefinedFieldDirectives; -} - function makeAugmentedSchema( document: DocumentNode, { @@ -482,18 +269,9 @@ function makeAugmentedSchema( const definitionNodes = getDefinitionNodes(document); const customResolvers = getCustomResolvers(document); - const { - interfaceTypes, - scalarTypes, - objectTypes, - enumTypes, - // inputObjectTypes, - // directives, - unionTypes, - schemaExtensions, - } = definitionNodes; - - // TODO: use schemaModel.definitionCollection instead of definitionNodes? need to add inputObjectTypes and customResolvers + const { interfaceTypes, scalarTypes, objectTypes, enumTypes, unionTypes, schemaExtensions } = definitionNodes; + + // TODO: maybe use schemaModel.definitionCollection instead of definitionNodes? need to add inputObjectTypes and customResolvers const schemaGenerator = new AugmentedSchemaGenerator( schemaModel, definitionNodes, @@ -504,7 +282,7 @@ function makeAugmentedSchema( const generatorComposer = schemaGenerator.generate(); composer.merge(generatorComposer); - // TODO: move these to SchemaGenerator once nodes are moved (in the meantime references to object types are causing errors because they are not present in the generated schema) + // TODO: move these to SchemaGenerator once the other types are moved (in the meantime references to object types are causing errors because they are not present in the generated schema) const pipedDefs = [ ...definitionNodes.enumTypes, ...definitionNodes.scalarTypes, @@ -550,39 +328,18 @@ function makeAugmentedSchema( interfaceRelationshipNames ); - // TODO: find some solution for this - // TODO: should directives be inherited?? they are user-defined after all - // TODO: other considerations might apply to PROPAGATED_DIRECTIVES: deprecated and shareable - // ATM we only test deprecated propagates - // also, should these live in the schema model?? - const userDefinedFieldDirectivesForNode = new Map>(); - const userDefinedDirectivesForNode = new Map(); - const propagatedDirectivesForNode = new Map(); - const userDefinedDirectivesForInterface = new Map(); - - for (const definitionNode of definitionNodes.objectTypes) { - const userDefinedObjectDirectives = - definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; - const propagatedDirectives = - definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || - []; - userDefinedDirectivesForNode.set(definitionNode.name.value, userDefinedObjectDirectives); - propagatedDirectivesForNode.set(definitionNode.name.value, propagatedDirectives); - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); - } - - for (const definitionNode of definitionNodes.interfaceTypes) { - const userDefinedInterfaceDirectives = - definitionNode.directives?.filter((directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value)) || - []; - userDefinedDirectivesForInterface.set(definitionNode.name.value, userDefinedInterfaceDirectives); - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); - } - - // TODO: keeping this `relationshipFields` scaffold for backwards compatibility on translation layer - // actual functional logic is in schemaModel.concreteEntities.forEach + const { + userDefinedFieldDirectivesForNode, + userDefinedDirectivesForNode, + propagatedDirectivesForNode, + userDefinedDirectivesForInterface, + } = getUserDefinedDirectives(definitionNodes); + + /** + * TODO [translation-layer-compatibility] + * keeping this `relationshipFields` scaffold for backwards compatibility on translation layer + * actual functional logic is in schemaModel.concreteEntities.forEach + */ const relationshipFields = new Map(); relationshipProperties.forEach((relationship) => { const relFields = getObjFieldMeta({ @@ -604,28 +361,29 @@ function makeAugmentedSchema( schemaModel.concreteEntities.forEach((concreteEntity) => { const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - for (const relationship of concreteEntityAdapter.relationships.values()) { + for (const relationshipAdapter of concreteEntityAdapter.relationships.values()) { { if ( - !relationship.propertiesTypeName || - seenRelationshipPropertiesInterfaces.has(relationship.propertiesTypeName) + !relationshipAdapter.propertiesTypeName || + seenRelationshipPropertiesInterfaces.has(relationshipAdapter.propertiesTypeName) ) { continue; } - doForRelationshipPropertiesInterface( + doForRelationshipPropertiesInterface({ composer, - relationship, - definitionNodes, + relationshipAdapter, userDefinedDirectivesForInterface, - features - ); - seenRelationshipPropertiesInterfaces.add(relationship.propertiesTypeName); + userDefinedFieldDirectivesForNode, + features, + }); + seenRelationshipPropertiesInterfaces.add(relationshipAdapter.propertiesTypeName); } } }); - // TODO: temporary helper to keep track of which interface entities were already "visited" - // say why this is happening here ALE + // temporary helper to keep track of which interface entities were already "visited" + // currently generated schema depends on these types being created BEFORE the rest + // ideally the dependency should be eradicated and these should be part of the schemaModel.compositeEntities.forEach const seenInterfaces = new Set(); interfaceRelationships.forEach((interfaceRelationship) => { const interfaceEntity = schemaModel.getEntity(interfaceRelationship.name.value) as InterfaceEntity; @@ -633,10 +391,10 @@ function makeAugmentedSchema( const updatedRelationships = doForInterfacesThatAreTargetOfARelationship({ composer, interfaceEntityAdapter, - definitionNodes, subgraph, relationships, relationshipFields, + userDefinedFieldDirectivesForNode, }); if (updatedRelationships) { relationships = updatedRelationships; @@ -645,7 +403,10 @@ function makeAugmentedSchema( }); schemaModel.concreteEntities.forEach((concreteEntity) => { - // TODO: temporary for backwards compatibility for translation layer + /** + * TODO [translation-layer-compatibility] + * need the node for fulltext translation + */ const node = nodes.find((n) => n.name === concreteEntity.name); if (!node) { throw new Error(`Node not found with the name ${concreteEntity.name}`); @@ -663,41 +424,23 @@ function makeAugmentedSchema( ); withOptionsInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - withAggregateSelectionType({ concreteEntityAdapter, aggregationTypesMapper, propagatedDirectives, composer }); - withWhereInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, features, composer }); - - // TODO: new way - // TODO: Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model + /** + * TODO [translation-layer-compatibility] + * Need to migrate resolvers, which themselves rely on the translation layer being migrated to the new schema model + */ augmentFulltextSchema(node, composer, concreteEntityAdapter); - withUniqueWhereInputType({ concreteEntityAdapter, composer }); - withCreateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - withMutationResponseTypes({ concreteEntityAdapter, propagatedDirectives, composer }); - - // createRelationshipFields({ - // relationshipFields: node.relationFields, - // concreteEntityAdapter, - // schemaComposer: composer, - // composeNode, - // sourceName: concreteEntityAdapter.name, - // nodes, - // relationshipPropertyFields: relationshipFields, - // subgraph, - // }); - const composeNode = withObjectType({ concreteEntityAdapter, userDefinedFieldDirectives, userDefinedObjectDirectives, composer, }); - createRelationshipFields({ entityAdapter: concreteEntityAdapter, schemaComposer: composer, @@ -705,19 +448,6 @@ function makeAugmentedSchema( subgraph, userDefinedFieldDirectives, }); - - // relationships = [ - // ...relationships, - // ...createConnectionFields({ - // connectionFields: node.connectionFields, - // schemaComposer: composer, - // composeNode, - // sourceName: concreteEntityAdapter.name, - // nodes, - // relationshipPropertyFields: relationshipFields, - // }), - // ]; - relationships = [ ...relationships, ...createConnectionFields({ @@ -744,7 +474,7 @@ function makeAugmentedSchema( graphqlDirectivesToCompose(propagatedDirectives) ); composer.Query.addFields({ - [`${concreteEntityAdapter.plural}Connection`]: rootConnectionResolver({ + [concreteEntityAdapter.operations.rootTypeFieldNames.connection]: rootConnectionResolver({ node, composer, concreteEntityAdapter, @@ -752,7 +482,7 @@ function makeAugmentedSchema( }), }); composer.Query.setFieldDirectives( - `${concreteEntityAdapter.plural}Connection`, + concreteEntityAdapter.operations.rootTypeFieldNames.connection, graphqlDirectivesToCompose(propagatedDirectives) ); } @@ -822,22 +552,13 @@ function makeAugmentedSchema( return; } if (entity instanceof InterfaceEntity && !seenInterfaces.has(entity.name)) { - const definitionNode = definitionNodes.interfaceTypes.find((type) => type.name.value === entity.name); - - if (!definitionNode) { - console.error(`Definition node not found for ${entity.name}`); - return; - } - - const interfaceEntityAdapter = new InterfaceEntityAdapter(entity); - - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition( - definitionNode, - definitionNodes - ); + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(entity.name) as Map< + string, + DirectiveNode[] + >; const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(entity.name) || []; withInterfaceType({ - entityAdapter: interfaceEntityAdapter, + entityAdapter: new InterfaceEntityAdapter(entity), userDefinedFieldDirectives, userDefinedInterfaceDirectives, composer, @@ -851,13 +572,6 @@ function makeAugmentedSchema( }); if (generateSubscriptions && nodes.length) { - // generateSubscriptionTypes({ - // schemaComposer: composer, - // nodes, - // relationshipFields, - // interfaceCommonFields, - // globalSchemaConfiguration, - // }); generateSubscriptionTypes({ schemaComposer: composer, schemaModel, @@ -865,7 +579,6 @@ function makeAugmentedSchema( }); } - // TODO: test this - toplevel cypher fields of type Point? ["Query", "Mutation"].forEach((type) => { const objectComposer: ObjectTypeComposer = composer[type]; @@ -874,33 +587,22 @@ function makeAugmentedSchema( return; } const operationAdapter = new OperationAdapter(operation); - - const definitionNode = definitionNodes.operations.find( - (d) => d.name.value === type - ) as ObjectTypeDefinitionNode; - const userDefinedDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - - // TODO: this check is for getObjFieldMeta - // this should technically be implied. TBD in Operations class - const hasCypherAttributes = Array.from(operationAdapter.attributes.values()).find( - (attribute) => attribute.annotations.cypher !== undefined - ); - if (!hasCypherAttributes) { - return; - } - // needed for compatibility with translation layer - const objectFields = getObjFieldMeta({ - obj: customResolvers[`customCypher${type}`], // Apparently this can't be undefined in getObjFieldMeta, but can be undefined from getCustomResolvers? - scalars: scalarTypes, - enums: enumTypes, - interfaces: filteredInterfaceTypes, - unions: unionTypes, - objects: objectTypes, - callbacks, - }); + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(type) as Map; for (const attributeAdapter of operationAdapter.attributes.values()) { - // needed for compatibility with translation layer + /** + * TODO [translation-layer-compatibility] + * needed for compatibility with translation layer + */ + const objectFields = getObjFieldMeta({ + obj: customResolvers[`customCypher${type}`], + scalars: scalarTypes, + enums: enumTypes, + interfaces: filteredInterfaceTypes, + unions: unionTypes, + objects: objectTypes, + callbacks, + }); const field = objectFields.cypherFields.find((f) => f.fieldName === attributeAdapter.name) as CypherField; const customResolver = cypherResolver({ field, @@ -908,7 +610,7 @@ function makeAugmentedSchema( type: type as "Query" | "Mutation", }); - const composedField = attributeAdapterToComposeFields([attributeAdapter], userDefinedDirectives)[ + const composedField = attributeAdapterToComposeFields([attributeAdapter], userDefinedFieldDirectives)[ attributeAdapter.name ]; @@ -919,7 +621,6 @@ function makeAugmentedSchema( if (!Object.values(composer.Mutation.getFields()).length) { composer.delete("Mutation"); } - // TODO: why is this now needed? if (!Object.values(composer.Subscription.getFields()).length) { composer.delete("Subscription"); } @@ -928,21 +629,6 @@ function makeAugmentedSchema( let parsedDoc = parse(generatedTypeDefs); - const emptyObjectsInterfaces = parsedDoc.definitions - .filter( - (x): x is InterfaceTypeDefinitionNode | ObjectTypeDefinitionNode => - (x.kind === Kind.OBJECT_TYPE_DEFINITION && !isRootType(x)) || x.kind === Kind.INTERFACE_TYPE_DEFINITION - ) - .filter((x) => !x.fields?.length); - - if (emptyObjectsInterfaces.length) { - throw new Error( - `Objects and Interfaces must have one or more fields: ${emptyObjectsInterfaces - .map((x) => x.name.value) - .join(", ")}` - ); - } - const documentNames = new Set(parsedDoc.definitions.filter(definitionNodeHasName).map((x) => x.name.value)); const resolveMethods = getResolveAndSubscriptionMethods(composer); @@ -1042,23 +728,25 @@ function makeAugmentedSchema( export default makeAugmentedSchema; -function doForRelationshipPropertiesInterface( - composer: SchemaComposer, - relationshipAdapter: RelationshipAdapter, - definitionNodes: DefinitionNodes, - userDefinedDirectivesForInterface: Map, - features?: Neo4jFeaturesSettings -) { +function doForRelationshipPropertiesInterface({ + composer, + relationshipAdapter, + userDefinedDirectivesForInterface, + userDefinedFieldDirectivesForNode, + features, +}: { + composer: SchemaComposer; + relationshipAdapter: RelationshipAdapter; + userDefinedDirectivesForInterface: Map; + userDefinedFieldDirectivesForNode: Map>; + features?: Neo4jFeaturesSettings; +}) { if (!relationshipAdapter.propertiesTypeName) { return; } - - const obj = definitionNodes.interfaceTypes.find((i) => i.name.value === relationshipAdapter.propertiesTypeName); - if (!obj) { - throw new Error(`Could not find interface named ${relationshipAdapter.propertiesTypeName}`); - } - - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(obj, definitionNodes); + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get( + relationshipAdapter.propertiesTypeName + ) as Map; const userDefinedInterfaceDirectives = userDefinedDirectivesForInterface.get(relationshipAdapter.name) || []; withInterfaceType({ entityAdapter: relationshipAdapter, @@ -1075,31 +763,24 @@ function doForRelationshipPropertiesInterface( function doForInterfacesThatAreTargetOfARelationship({ composer, interfaceEntityAdapter, - definitionNodes, features, subgraph, relationships, relationshipFields, + userDefinedFieldDirectivesForNode, }: { composer: SchemaComposer; interfaceEntityAdapter: InterfaceEntityAdapter; - definitionNodes: DefinitionNodes; features?: Neo4jFeaturesSettings; subgraph?: Subgraph; relationships: Relationship[]; relationshipFields: Map; + userDefinedFieldDirectivesForNode: Map>; }) { - // We wanted to get the userDefinedDirectives - const definitionNode = definitionNodes.interfaceTypes.find( - (type) => type.name.value === interfaceEntityAdapter.name - ); - if (!definitionNode) { - console.error(`Definition node not found for ${interfaceEntityAdapter.name}`); - return; - } - - const userDefinedFieldDirectives = getUserDefinedFieldDirectivesForDefinition(definitionNode, definitionNodes); - + const userDefinedFieldDirectives = userDefinedFieldDirectivesForNode.get(interfaceEntityAdapter.name) as Map< + string, + DirectiveNode[] + >; withOptionsInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); withWhereInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, features, composer }); withCreateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); diff --git a/packages/graphql/src/schema/make-augmented-schema/user-defined-directives.ts b/packages/graphql/src/schema/make-augmented-schema/user-defined-directives.ts new file mode 100644 index 0000000000..6f04a663d3 --- /dev/null +++ b/packages/graphql/src/schema/make-augmented-schema/user-defined-directives.ts @@ -0,0 +1,119 @@ +/* + * 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 { + DirectiveNode, + FieldDefinitionNode, + InterfaceTypeDefinitionNode, + ObjectTypeDefinitionNode, +} from "graphql"; +import { FIELD_DIRECTIVES, INTERFACE_DIRECTIVES, OBJECT_DIRECTIVES, PROPAGATED_DIRECTIVES } from "../../constants"; +import { isInArray } from "../../utils/is-in-array"; +import type { DefinitionNodes } from "../get-definition-nodes"; + +function getUserDefinedMergedFieldDirectivesForDefinition( + definitionNode: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, + definitionNodes: DefinitionNodes +): Map { + const userDefinedFieldDirectives = new Map(); + + const allFields: Array = [...(definitionNode.fields || [])]; + /** + * TODO [directive-inheritance] + * is it a good idea to inherit the field directives from implemented interfaces? + * makes sense for deprecated but for other user-defined directives? + */ + if (definitionNode.interfaces) { + for (const inheritsFrom of definitionNode.interfaces) { + const interfaceDefinition = definitionNodes.interfaceTypes.find( + (type) => type.name.value === inheritsFrom.name.value + ); + const inheritedFields = interfaceDefinition?.fields; + if (inheritedFields) { + allFields.push(...inheritedFields); + } + } + } + for (const field of allFields) { + if (!field.directives) { + return userDefinedFieldDirectives; + } + + const matched = field.directives.filter((directive) => !isInArray(FIELD_DIRECTIVES, directive.name.value)); + if (matched.length) { + userDefinedFieldDirectives.set(field.name.value, matched); + } + } + + return userDefinedFieldDirectives; +} + +/** + * TODO [directive-inheritance] + * should directives be inherited?? they are user-defined after all. + * other considerations might apply to PROPAGATED_DIRECTIVES: deprecated and shareable + * ATM we only test deprecated propagates + */ +export function getUserDefinedDirectives(definitionNodes: DefinitionNodes) { + const userDefinedFieldDirectivesForNode = new Map>(); + const userDefinedDirectivesForNode = new Map(); + const propagatedDirectivesForNode = new Map(); + const userDefinedDirectivesForInterface = new Map(); + + for (const definitionNode of definitionNodes.objectTypes) { + const userDefinedObjectDirectives = + definitionNode.directives?.filter((directive) => !isInArray(OBJECT_DIRECTIVES, directive.name.value)) || []; + const propagatedDirectives = + definitionNode.directives?.filter((directive) => isInArray(PROPAGATED_DIRECTIVES, directive.name.value)) || + []; + userDefinedDirectivesForNode.set(definitionNode.name.value, userDefinedObjectDirectives); + propagatedDirectivesForNode.set(definitionNode.name.value, propagatedDirectives); + const userDefinedFieldDirectives = getUserDefinedMergedFieldDirectivesForDefinition( + definitionNode, + definitionNodes + ); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } + + for (const definitionNode of definitionNodes.interfaceTypes) { + const userDefinedInterfaceDirectives = + definitionNode.directives?.filter((directive) => !isInArray(INTERFACE_DIRECTIVES, directive.name.value)) || + []; + userDefinedDirectivesForInterface.set(definitionNode.name.value, userDefinedInterfaceDirectives); + const userDefinedFieldDirectives = getUserDefinedMergedFieldDirectivesForDefinition( + definitionNode, + definitionNodes + ); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } + + for (const definitionNode of definitionNodes.operations) { + const userDefinedFieldDirectives = getUserDefinedMergedFieldDirectivesForDefinition( + definitionNode, + definitionNodes + ); + userDefinedFieldDirectivesForNode.set(definitionNode.name.value, userDefinedFieldDirectives); + } + return { + userDefinedFieldDirectivesForNode, + userDefinedDirectivesForNode, + propagatedDirectivesForNode, + userDefinedDirectivesForInterface, + }; +} diff --git a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts index f70f3b9a35..dc536155d8 100644 --- a/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts +++ b/packages/graphql/src/schema/subscriptions/generate-subscription-types.ts @@ -378,6 +378,7 @@ function getRelationField({ }): RelationshipAdapter | undefined { // TODO: move to schemaModel intermediate representation // TODO: relationships by propertiesTypeName instead of by fieldName + // TODO: need to identify exact the relationship given an entity and an event (has relationshipName/type, toTypename, fromTypename) let relationshipNameToRelationField: Map; if (!nodeToRelationFieldMap.has(entityAdapter)) { relationshipNameToRelationField = new Map(); From 9774fabf90e789b644ab7c403592ba59264b5e78 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 09:26:02 +0200 Subject: [PATCH 136/162] test: update test type descriptions --- .../graphql/tests/schema/aggregations.test.ts | 2956 +- .../tests/schema/array-methods.test.ts | 1278 +- packages/graphql/tests/schema/arrays.test.ts | 328 +- .../tests/schema/authorization.test.ts | 1156 +- .../graphql/tests/schema/comments.test.ts | 3040 +- .../tests/schema/connect-or-create-id.test.ts | 2208 +- .../schema/connect-or-create-unions.test.ts | 1216 +- .../tests/schema/connect-or-create.test.ts | 2132 +- .../tests/schema/connections/enums.test.ts | 1224 +- .../tests/schema/connections/sort.test.ts | 982 +- .../tests/schema/connections/unions.test.ts | 1952 +- .../tests/schema/custom-mutations.test.ts | 288 +- .../tests/schema/directive-preserve.test.ts | 6720 ++--- .../tests/schema/directives/alias.test.ts | 1176 +- .../schema/directives/autogenerate.test.ts | 298 +- .../schema/directives/customResolver.test.ts | 344 +- .../tests/schema/directives/cypher.test.ts | 856 +- .../tests/schema/directives/default.test.ts | 494 +- .../schema/directives/filterable.test.ts | 23602 ++++++++-------- .../tests/schema/directives/plural.test.ts | 1924 +- .../schema/directives/populatedBy.test.ts | 2860 +- .../tests/schema/directives/private.test.ts | 270 +- .../directives/relationship-aggregate.test.ts | 5360 ++-- .../relationship-nested-operations.test.ts | 23346 +++++++-------- .../relationship-properties.test.ts | 4340 +-- .../schema/directives/relationship.test.ts | 1854 +- .../schema/directives/selectable.test.ts | 7042 ++--- .../tests/schema/directives/settable.test.ts | 15540 +++++----- .../schema/directives/timestamps.test.ts | 322 +- packages/graphql/tests/schema/enum.test.ts | 250 +- packages/graphql/tests/schema/extend.test.ts | 302 +- .../graphql/tests/schema/federation.test.ts | 1980 +- .../graphql/tests/schema/fulltext.test.ts | 374 +- .../graphql/tests/schema/global-node.test.ts | 328 +- .../graphql/tests/schema/inheritance.test.ts | 8 +- packages/graphql/tests/schema/inputs.test.ts | 272 +- .../schema/interface-relationships.test.ts | 8132 +++--- .../graphql/tests/schema/interfaces.test.ts | 1148 +- .../graphql/tests/schema/issues/1038.test.ts | 474 +- .../graphql/tests/schema/issues/1182.test.ts | 1040 +- .../graphql/tests/schema/issues/162.test.ts | 1110 +- .../graphql/tests/schema/issues/200.test.ts | 346 +- .../graphql/tests/schema/issues/2187.test.ts | 1330 +- .../graphql/tests/schema/issues/2377.test.ts | 980 +- .../graphql/tests/schema/issues/2969.test.ts | 1130 +- .../graphql/tests/schema/issues/2981.test.ts | 1714 +- .../graphql/tests/schema/issues/2993.test.ts | 734 +- .../graphql/tests/schema/issues/3428.test.ts | 1404 +- .../graphql/tests/schema/issues/3439.test.ts | 6194 ++-- .../graphql/tests/schema/issues/3537.test.ts | 1584 +- .../graphql/tests/schema/issues/3541.test.ts | 1414 +- .../graphql/tests/schema/issues/3816.test.ts | 1988 +- .../graphql/tests/schema/issues/609.test.ts | 262 +- .../graphql/tests/schema/issues/872.test.ts | 1394 +- .../tests/schema/lowercase-type-names.test.ts | 8 +- packages/graphql/tests/schema/math.test.ts | 4716 +-- packages/graphql/tests/schema/null.test.ts | 578 +- .../schema/pluralize-consistency.test.ts | 8 +- .../tests/schema/query-direction.test.ts | 1866 +- packages/graphql/tests/schema/scalar.test.ts | 310 +- packages/graphql/tests/schema/simple.test.ts | 366 +- .../tests/schema/string-comparators.test.ts | 2236 +- .../tests/schema/subscriptions.test.ts | 64 +- .../graphql/tests/schema/types/bigint.test.ts | 316 +- .../graphql/tests/schema/types/date.test.ts | 292 +- .../tests/schema/types/datetime.test.ts | 304 +- .../tests/schema/types/duration.test.ts | 304 +- .../tests/schema/types/localdatetime.test.ts | 304 +- .../tests/schema/types/localtime.test.ts | 308 +- .../graphql/tests/schema/types/point.test.ts | 1066 +- .../graphql/tests/schema/types/time.test.ts | 304 +- packages/graphql/tests/schema/unions.test.ts | 800 +- 72 files changed, 82581 insertions(+), 82569 deletions(-) diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index 88a2346c77..d8977d4149 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -43,357 +43,357 @@ describe("Aggregations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\" -A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. -\\"\\"\\" -scalar BigInt - -type BigIntAggregateSelectionNullable { - average: BigInt - max: BigInt - min: BigInt - sum: BigInt -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNullable { - max: DateTime - min: DateTime -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -\\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" -scalar Duration - -type DurationAggregateSelectionNullable { - max: Duration - min: Duration -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -\\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" -scalar LocalDateTime - -type LocalDateTimeAggregateSelectionNullable { - max: LocalDateTime - min: LocalDateTime -} - -\\"\\"\\" -A local time, represented as a time string without timezone information -\\"\\"\\" -scalar LocalTime - -type LocalTimeAggregateSelectionNullable { - max: LocalTime - min: LocalTime -} - -type Movie { - createdAt: DateTime - id: ID - imdbRating: Float - isbn: String! - screenTime: Duration - someBigInt: BigInt - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - title: String -} - -type MovieAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - imdbRating: FloatAggregateSelectionNullable! - isbn: StringAggregateSelectionNonNullable! - screenTime: DurationAggregateSelectionNullable! - someBigInt: BigIntAggregateSelectionNullable! - someInt: IntAggregateSelectionNullable! - someLocalDateTime: LocalDateTimeAggregateSelectionNullable! - someLocalTime: LocalTimeAggregateSelectionNullable! - someTime: TimeAggregateSelectionNullable! - title: StringAggregateSelectionNullable! -} - -input MovieCreateInput { - createdAt: DateTime - id: ID - imdbRating: Float - isbn: String! - screenTime: Duration - someBigInt: BigInt - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - title: String -} - -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 { - createdAt: SortDirection - id: SortDirection - imdbRating: SortDirection - isbn: SortDirection - screenTime: SortDirection - someBigInt: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someTime: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - createdAt: DateTime - id: ID - imdbRating: Float - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SUBTRACT: Float - isbn: String - screenTime: Duration - someBigInt: BigInt - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someInt: Int - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn: String - isbn_CONTAINS: String - isbn_ENDS_WITH: String - isbn_IN: [String!] - isbn_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_STARTS_WITH: String - screenTime: Duration - screenTime_GT: Duration - screenTime_GTE: Duration - screenTime_IN: [Duration] - screenTime_LT: Duration - screenTime_LTE: Duration - screenTime_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" -scalar Time - -type TimeAggregateSelectionNullable { - max: Time - min: Time -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. + \\"\\"\\" + scalar BigInt + + type BigIntAggregateSelectionNullable { + average: BigInt + max: BigInt + min: BigInt + sum: BigInt + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNullable { + max: DateTime + min: DateTime + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelectionNullable { + max: Duration + min: Duration + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelectionNullable { + max: LocalDateTime + min: LocalDateTime + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelectionNullable { + max: LocalTime + min: LocalTime + } + + type Movie { + createdAt: DateTime + id: ID + imdbRating: Float + isbn: String! + screenTime: Duration + someBigInt: BigInt + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + title: String + } + + type MovieAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + imdbRating: FloatAggregateSelectionNullable! + isbn: StringAggregateSelectionNonNullable! + screenTime: DurationAggregateSelectionNullable! + someBigInt: BigIntAggregateSelectionNullable! + someInt: IntAggregateSelectionNullable! + someLocalDateTime: LocalDateTimeAggregateSelectionNullable! + someLocalTime: LocalTimeAggregateSelectionNullable! + someTime: TimeAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + } + + input MovieCreateInput { + createdAt: DateTime + id: ID + imdbRating: Float + isbn: String! + screenTime: Duration + someBigInt: BigInt + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + title: String + } + + 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 { + createdAt: SortDirection + id: SortDirection + imdbRating: SortDirection + isbn: SortDirection + screenTime: SortDirection + someBigInt: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someTime: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + createdAt: DateTime + id: ID + imdbRating: Float + imdbRating_ADD: Float + imdbRating_DIVIDE: Float + imdbRating_MULTIPLY: Float + imdbRating_SUBTRACT: Float + isbn: String + screenTime: Duration + someBigInt: BigInt + someBigInt_DECREMENT: BigInt + someBigInt_INCREMENT: BigInt + someInt: Int + someInt_DECREMENT: Int + someInt_INCREMENT: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + imdbRating: Float + imdbRating_GT: Float + imdbRating_GTE: Float + imdbRating_IN: [Float] + imdbRating_LT: Float + imdbRating_LTE: Float + imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn: String + isbn_CONTAINS: String + isbn_ENDS_WITH: String + isbn_IN: [String!] + isbn_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_STARTS_WITH: String + screenTime: Duration + screenTime_GT: Duration + screenTime_GTE: Duration + screenTime_IN: [Duration] + screenTime_LT: Duration + screenTime_LTE: Duration + screenTime_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someBigInt: BigInt + someBigInt_GT: BigInt + someBigInt_GTE: BigInt + someBigInt_IN: [BigInt] + someBigInt_LT: BigInt + someBigInt_LTE: BigInt + someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someInt: Int + someInt_GT: Int + someInt_GTE: Int + someInt_IN: [Int] + someInt_LT: Int + someInt_LTE: Int + someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime: LocalDateTime + someLocalDateTime_GT: LocalDateTime + someLocalDateTime_GTE: LocalDateTime + someLocalDateTime_IN: [LocalDateTime] + someLocalDateTime_LT: LocalDateTime + someLocalDateTime_LTE: LocalDateTime + someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime: LocalTime + someLocalTime_GT: LocalTime + someLocalTime_GTE: LocalTime + someLocalTime_IN: [LocalTime] + someLocalTime_LT: LocalTime + someLocalTime_LTE: LocalTime + someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someTime: Time + someTime_GT: Time + someTime_GTE: Time + someTime_IN: [Time] + someTime_LT: Time + someTime_LTE: Time + someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelectionNullable { + max: Time + min: Time + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Where Level Aggregations", async () => { @@ -433,1132 +433,1132 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\" -A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. -\\"\\"\\" -scalar BigInt - -type BigIntAggregateSelectionNullable { - average: BigInt - max: BigInt - min: BigInt - sum: BigInt -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNullable { - max: DateTime - min: DateTime -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -\\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" -scalar Duration - -type DurationAggregateSelectionNullable { - max: Duration - min: Duration -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -interface Likes { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -input LikesCreateInput { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -input LikesSort { - someBigInt: SortDirection - someDateTime: SortDirection - someDuration: SortDirection - someFloat: SortDirection - someId: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someString: SortDirection - someTime: SortDirection -} - -input LikesUpdateInput { - someBigInt: BigInt - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someFloat_ADD: Float - someFloat_DIVIDE: Float - someFloat_MULTIPLY: Float - someFloat_SUBTRACT: Float - someId: ID - someInt: Int - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -input LikesWhere { - AND: [LikesWhere!] - NOT: LikesWhere - OR: [LikesWhere!] - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDateTime: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDateTime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDateTime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDuration: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someDuration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDuration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someFloat: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someFloat_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someFloat_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId: ID - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_IN: [ID] - someId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_STARTS_WITH: ID - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString: String - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_IN: [String] - someString_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_STARTS_WITH: String - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -\\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" -scalar LocalDateTime - -type LocalDateTimeAggregateSelectionNullable { - max: LocalDateTime - min: LocalDateTime -} - -\\"\\"\\" -A local time, represented as a time string without timezone information -\\"\\"\\" -scalar LocalTime - -type LocalTimeAggregateSelectionNullable { - max: LocalTime - min: LocalTime -} - -type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! - likesAggregate(directed: Boolean = true, where: UserWhere): PostUserLikesAggregationSelection - likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! - title: String -} - -type PostAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input PostConnectInput { - likes: [PostLikesConnectFieldInput!] -} - -input PostCreateInput { - likes: PostLikesFieldInput - title: String -} - -input PostDeleteInput { - likes: [PostLikesDeleteFieldInput!] -} - -input PostDisconnectInput { - likes: [PostLikesDisconnectFieldInput!] -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostLikesAggregateInput { - AND: [PostLikesAggregateInput!] - NOT: PostLikesAggregateInput - OR: [PostLikesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: PostLikesEdgeAggregationWhereInput - node: PostLikesNodeAggregationWhereInput -} - -input PostLikesConnectFieldInput { - edge: LikesCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type PostLikesConnection { - edges: [PostLikesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PostLikesConnectionSort { - edge: LikesSort - node: UserSort -} - -input PostLikesConnectionWhere { - AND: [PostLikesConnectionWhere!] - NOT: PostLikesConnectionWhere - OR: [PostLikesConnectionWhere!] - edge: LikesWhere - edge_NOT: LikesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PostLikesCreateFieldInput { - edge: LikesCreateInput - node: UserCreateInput! -} - -input PostLikesDeleteFieldInput { - where: PostLikesConnectionWhere -} - -input PostLikesDisconnectFieldInput { - where: PostLikesConnectionWhere -} - -input PostLikesEdgeAggregationWhereInput { - AND: [PostLikesEdgeAggregationWhereInput!] - NOT: PostLikesEdgeAggregationWhereInput - OR: [PostLikesEdgeAggregationWhereInput!] - someBigInt_AVERAGE_EQUAL: BigInt - someBigInt_AVERAGE_GT: BigInt - someBigInt_AVERAGE_GTE: BigInt - someBigInt_AVERAGE_LT: BigInt - someBigInt_AVERAGE_LTE: BigInt - someBigInt_EQUAL: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_GT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_GTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_LT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_LTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_MAX_EQUAL: BigInt - someBigInt_MAX_GT: BigInt - someBigInt_MAX_GTE: BigInt - someBigInt_MAX_LT: BigInt - someBigInt_MAX_LTE: BigInt - someBigInt_MIN_EQUAL: BigInt - someBigInt_MIN_GT: BigInt - someBigInt_MIN_GTE: BigInt - someBigInt_MIN_LT: BigInt - someBigInt_MIN_LTE: BigInt - someBigInt_SUM_EQUAL: BigInt - someBigInt_SUM_GT: BigInt - someBigInt_SUM_GTE: BigInt - someBigInt_SUM_LT: BigInt - someBigInt_SUM_LTE: BigInt - someDateTime_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_MAX_EQUAL: DateTime - someDateTime_MAX_GT: DateTime - someDateTime_MAX_GTE: DateTime - someDateTime_MAX_LT: DateTime - someDateTime_MAX_LTE: DateTime - someDateTime_MIN_EQUAL: DateTime - someDateTime_MIN_GT: DateTime - someDateTime_MIN_GTE: DateTime - someDateTime_MIN_LT: DateTime - someDateTime_MIN_LTE: DateTime - someDuration_AVERAGE_EQUAL: Duration - someDuration_AVERAGE_GT: Duration - someDuration_AVERAGE_GTE: Duration - someDuration_AVERAGE_LT: Duration - someDuration_AVERAGE_LTE: Duration - someDuration_EQUAL: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_GT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_GTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_LT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_LTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_MAX_EQUAL: Duration - someDuration_MAX_GT: Duration - someDuration_MAX_GTE: Duration - someDuration_MAX_LT: Duration - someDuration_MAX_LTE: Duration - someDuration_MIN_EQUAL: Duration - someDuration_MIN_GT: Duration - someDuration_MIN_GTE: Duration - someDuration_MIN_LT: Duration - someDuration_MIN_LTE: Duration - someFloat_AVERAGE_EQUAL: Float - someFloat_AVERAGE_GT: Float - someFloat_AVERAGE_GTE: Float - someFloat_AVERAGE_LT: Float - someFloat_AVERAGE_LTE: Float - someFloat_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_MAX_EQUAL: Float - someFloat_MAX_GT: Float - someFloat_MAX_GTE: Float - someFloat_MAX_LT: Float - someFloat_MAX_LTE: Float - someFloat_MIN_EQUAL: Float - someFloat_MIN_GT: Float - someFloat_MIN_GTE: Float - someFloat_MIN_LT: Float - someFloat_MIN_LTE: Float - someFloat_SUM_EQUAL: Float - someFloat_SUM_GT: Float - someFloat_SUM_GTE: Float - someFloat_SUM_LT: Float - someFloat_SUM_LTE: Float - someId_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_AVERAGE_EQUAL: Float - someInt_AVERAGE_GT: Float - someInt_AVERAGE_GTE: Float - someInt_AVERAGE_LT: Float - someInt_AVERAGE_LTE: Float - someInt_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_MAX_EQUAL: Int - someInt_MAX_GT: Int - someInt_MAX_GTE: Int - someInt_MAX_LT: Int - someInt_MAX_LTE: Int - someInt_MIN_EQUAL: Int - someInt_MIN_GT: Int - someInt_MIN_GTE: Int - someInt_MIN_LT: Int - someInt_MIN_LTE: Int - someInt_SUM_EQUAL: Int - someInt_SUM_GT: Int - someInt_SUM_GTE: Int - someInt_SUM_LT: Int - someInt_SUM_LTE: Int - someLocalDateTime_EQUAL: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_MAX_EQUAL: LocalDateTime - someLocalDateTime_MAX_GT: LocalDateTime - someLocalDateTime_MAX_GTE: LocalDateTime - someLocalDateTime_MAX_LT: LocalDateTime - someLocalDateTime_MAX_LTE: LocalDateTime - someLocalDateTime_MIN_EQUAL: LocalDateTime - someLocalDateTime_MIN_GT: LocalDateTime - someLocalDateTime_MIN_GTE: LocalDateTime - someLocalDateTime_MIN_LT: LocalDateTime - someLocalDateTime_MIN_LTE: LocalDateTime - someLocalTime_EQUAL: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_GT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_GTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_LT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_LTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_MAX_EQUAL: LocalTime - someLocalTime_MAX_GT: LocalTime - someLocalTime_MAX_GTE: LocalTime - someLocalTime_MAX_LT: LocalTime - someLocalTime_MAX_LTE: LocalTime - someLocalTime_MIN_EQUAL: LocalTime - someLocalTime_MIN_GT: LocalTime - someLocalTime_MIN_GTE: LocalTime - someLocalTime_MIN_LT: LocalTime - someLocalTime_MIN_LTE: LocalTime - someString_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_LENGTH_EQUAL: Float - someString_AVERAGE_LENGTH_GT: Float - someString_AVERAGE_LENGTH_GTE: Float - someString_AVERAGE_LENGTH_LT: Float - someString_AVERAGE_LENGTH_LTE: Float - someString_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_LENGTH_EQUAL: Int - someString_LONGEST_LENGTH_GT: Int - someString_LONGEST_LENGTH_GTE: Int - someString_LONGEST_LENGTH_LT: Int - someString_LONGEST_LENGTH_LTE: Int - someString_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_LENGTH_EQUAL: Int - someString_SHORTEST_LENGTH_GT: Int - someString_SHORTEST_LENGTH_GTE: Int - someString_SHORTEST_LENGTH_LT: Int - someString_SHORTEST_LENGTH_LTE: Int - someString_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someTime_EQUAL: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_GT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_GTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_LT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_LTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_MAX_EQUAL: Time - someTime_MAX_GT: Time - someTime_MAX_GTE: Time - someTime_MAX_LT: Time - someTime_MAX_LTE: Time - someTime_MIN_EQUAL: Time - someTime_MIN_GT: Time - someTime_MIN_GTE: Time - someTime_MIN_LT: Time - someTime_MIN_LTE: Time -} - -input PostLikesFieldInput { - connect: [PostLikesConnectFieldInput!] - create: [PostLikesCreateFieldInput!] -} - -input PostLikesNodeAggregationWhereInput { - AND: [PostLikesNodeAggregationWhereInput!] - NOT: PostLikesNodeAggregationWhereInput - OR: [PostLikesNodeAggregationWhereInput!] - someBigInt_AVERAGE_EQUAL: BigInt - someBigInt_AVERAGE_GT: BigInt - someBigInt_AVERAGE_GTE: BigInt - someBigInt_AVERAGE_LT: BigInt - someBigInt_AVERAGE_LTE: BigInt - someBigInt_EQUAL: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_GT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_GTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_LT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_LTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someBigInt_MAX_EQUAL: BigInt - someBigInt_MAX_GT: BigInt - someBigInt_MAX_GTE: BigInt - someBigInt_MAX_LT: BigInt - someBigInt_MAX_LTE: BigInt - someBigInt_MIN_EQUAL: BigInt - someBigInt_MIN_GT: BigInt - someBigInt_MIN_GTE: BigInt - someBigInt_MIN_LT: BigInt - someBigInt_MIN_LTE: BigInt - someBigInt_SUM_EQUAL: BigInt - someBigInt_SUM_GT: BigInt - someBigInt_SUM_GTE: BigInt - someBigInt_SUM_LT: BigInt - someBigInt_SUM_LTE: BigInt - someDateTime_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDateTime_MAX_EQUAL: DateTime - someDateTime_MAX_GT: DateTime - someDateTime_MAX_GTE: DateTime - someDateTime_MAX_LT: DateTime - someDateTime_MAX_LTE: DateTime - someDateTime_MIN_EQUAL: DateTime - someDateTime_MIN_GT: DateTime - someDateTime_MIN_GTE: DateTime - someDateTime_MIN_LT: DateTime - someDateTime_MIN_LTE: DateTime - someDuration_AVERAGE_EQUAL: Duration - someDuration_AVERAGE_GT: Duration - someDuration_AVERAGE_GTE: Duration - someDuration_AVERAGE_LT: Duration - someDuration_AVERAGE_LTE: Duration - someDuration_EQUAL: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_GT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_GTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_LT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_LTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someDuration_MAX_EQUAL: Duration - someDuration_MAX_GT: Duration - someDuration_MAX_GTE: Duration - someDuration_MAX_LT: Duration - someDuration_MAX_LTE: Duration - someDuration_MIN_EQUAL: Duration - someDuration_MIN_GT: Duration - someDuration_MIN_GTE: Duration - someDuration_MIN_LT: Duration - someDuration_MIN_LTE: Duration - someFloat_AVERAGE_EQUAL: Float - someFloat_AVERAGE_GT: Float - someFloat_AVERAGE_GTE: Float - someFloat_AVERAGE_LT: Float - someFloat_AVERAGE_LTE: Float - someFloat_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someFloat_MAX_EQUAL: Float - someFloat_MAX_GT: Float - someFloat_MAX_GTE: Float - someFloat_MAX_LT: Float - someFloat_MAX_LTE: Float - someFloat_MIN_EQUAL: Float - someFloat_MIN_GT: Float - someFloat_MIN_GTE: Float - someFloat_MIN_LT: Float - someFloat_MIN_LTE: Float - someFloat_SUM_EQUAL: Float - someFloat_SUM_GT: Float - someFloat_SUM_GTE: Float - someFloat_SUM_LT: Float - someFloat_SUM_LTE: Float - someId_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_AVERAGE_EQUAL: Float - someInt_AVERAGE_GT: Float - someInt_AVERAGE_GTE: Float - someInt_AVERAGE_LT: Float - someInt_AVERAGE_LTE: Float - someInt_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someInt_MAX_EQUAL: Int - someInt_MAX_GT: Int - someInt_MAX_GTE: Int - someInt_MAX_LT: Int - someInt_MAX_LTE: Int - someInt_MIN_EQUAL: Int - someInt_MIN_GT: Int - someInt_MIN_GTE: Int - someInt_MIN_LT: Int - someInt_MIN_LTE: Int - someInt_SUM_EQUAL: Int - someInt_SUM_GT: Int - someInt_SUM_GTE: Int - someInt_SUM_LT: Int - someInt_SUM_LTE: Int - someLocalDateTime_EQUAL: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalDateTime_MAX_EQUAL: LocalDateTime - someLocalDateTime_MAX_GT: LocalDateTime - someLocalDateTime_MAX_GTE: LocalDateTime - someLocalDateTime_MAX_LT: LocalDateTime - someLocalDateTime_MAX_LTE: LocalDateTime - someLocalDateTime_MIN_EQUAL: LocalDateTime - someLocalDateTime_MIN_GT: LocalDateTime - someLocalDateTime_MIN_GTE: LocalDateTime - someLocalDateTime_MIN_LT: LocalDateTime - someLocalDateTime_MIN_LTE: LocalDateTime - someLocalTime_EQUAL: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_GT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_GTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_LT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_LTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someLocalTime_MAX_EQUAL: LocalTime - someLocalTime_MAX_GT: LocalTime - someLocalTime_MAX_GTE: LocalTime - someLocalTime_MAX_LT: LocalTime - someLocalTime_MAX_LTE: LocalTime - someLocalTime_MIN_EQUAL: LocalTime - someLocalTime_MIN_GT: LocalTime - someLocalTime_MIN_GTE: LocalTime - someLocalTime_MIN_LT: LocalTime - someLocalTime_MIN_LTE: LocalTime - someString_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_LENGTH_EQUAL: Float - someString_AVERAGE_LENGTH_GT: Float - someString_AVERAGE_LENGTH_GTE: Float - someString_AVERAGE_LENGTH_LT: Float - someString_AVERAGE_LENGTH_LTE: Float - someString_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_LENGTH_EQUAL: Int - someString_LONGEST_LENGTH_GT: Int - someString_LONGEST_LENGTH_GTE: Int - someString_LONGEST_LENGTH_LT: Int - someString_LONGEST_LENGTH_LTE: Int - someString_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someString_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_LENGTH_EQUAL: Int - someString_SHORTEST_LENGTH_GT: Int - someString_SHORTEST_LENGTH_GTE: Int - someString_SHORTEST_LENGTH_LT: Int - someString_SHORTEST_LENGTH_LTE: Int - someString_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someString_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - someTime_EQUAL: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_GT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_GTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_LT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_LTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - someTime_MAX_EQUAL: Time - someTime_MAX_GT: Time - someTime_MAX_GTE: Time - someTime_MAX_LT: Time - someTime_MAX_LTE: Time - someTime_MIN_EQUAL: Time - someTime_MIN_GT: Time - someTime_MIN_GTE: Time - someTime_MIN_LT: Time - someTime_MIN_LTE: Time -} - -type PostLikesRelationship implements Likes { - cursor: String! - node: User! - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -input PostLikesUpdateConnectionInput { - edge: LikesUpdateInput - node: UserUpdateInput -} - -input PostLikesUpdateFieldInput { - connect: [PostLikesConnectFieldInput!] - create: [PostLikesCreateFieldInput!] - delete: [PostLikesDeleteFieldInput!] - disconnect: [PostLikesDisconnectFieldInput!] - update: PostLikesUpdateConnectionInput - where: PostLikesConnectionWhere -} - -input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] -} - -input PostRelationInput { - likes: [PostLikesCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -\\"\\"\\" -input PostSort { - title: SortDirection -} - -input PostUpdateInput { - likes: [PostLikesUpdateFieldInput!] - title: String -} - -type PostUserLikesAggregationSelection { - count: Int! - edge: PostUserLikesEdgeAggregateSelection - node: PostUserLikesNodeAggregateSelection -} - -type PostUserLikesEdgeAggregateSelection { - someBigInt: BigIntAggregateSelectionNullable! - someDateTime: DateTimeAggregateSelectionNullable! - someDuration: DurationAggregateSelectionNullable! - someFloat: FloatAggregateSelectionNullable! - someId: IDAggregateSelectionNullable! - someInt: IntAggregateSelectionNullable! - someLocalDateTime: LocalDateTimeAggregateSelectionNullable! - someLocalTime: LocalTimeAggregateSelectionNullable! - someString: StringAggregateSelectionNullable! - someTime: TimeAggregateSelectionNullable! -} - -type PostUserLikesNodeAggregateSelection { - someBigInt: BigIntAggregateSelectionNullable! - someDateTime: DateTimeAggregateSelectionNullable! - someDuration: DurationAggregateSelectionNullable! - someFloat: FloatAggregateSelectionNullable! - someId: IDAggregateSelectionNullable! - someInt: IntAggregateSelectionNullable! - someLocalDateTime: LocalDateTimeAggregateSelectionNullable! - someLocalTime: LocalTimeAggregateSelectionNullable! - someString: StringAggregateSelectionNullable! - someTime: TimeAggregateSelectionNullable! -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - likes: UserWhere @deprecated(reason: \\"Use \`likes_SOME\` instead.\\") - likesAggregate: PostLikesAggregateInput - likesConnection: PostLikesConnectionWhere @deprecated(reason: \\"Use \`likesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Posts where all of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_ALL: PostLikesConnectionWhere - \\"\\"\\" - Return Posts where none of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_NONE: PostLikesConnectionWhere - likesConnection_NOT: PostLikesConnectionWhere @deprecated(reason: \\"Use \`likesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Posts where one of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_SINGLE: PostLikesConnectionWhere - \\"\\"\\" - Return Posts where some of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_SOME: PostLikesConnectionWhere - \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" - likes_ALL: UserWhere - \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" - likes_NONE: UserWhere - likes_NOT: UserWhere @deprecated(reason: \\"Use \`likes_NONE\` instead.\\") - \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" - likes_SINGLE: UserWhere - \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" - likes_SOME: UserWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" -scalar Time - -type TimeAggregateSelectionNullable { - max: Time - min: Time -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -type UserAggregateSelection { - count: Int! - someBigInt: BigIntAggregateSelectionNullable! - someDateTime: DateTimeAggregateSelectionNullable! - someDuration: DurationAggregateSelectionNullable! - someFloat: FloatAggregateSelectionNullable! - someId: IDAggregateSelectionNullable! - someInt: IntAggregateSelectionNullable! - someLocalDateTime: LocalDateTimeAggregateSelectionNullable! - someLocalTime: LocalTimeAggregateSelectionNullable! - someString: StringAggregateSelectionNullable! - someTime: TimeAggregateSelectionNullable! -} - -input UserConnectWhere { - node: UserWhere! -} - -input UserCreateInput { - someBigInt: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someId: ID - someInt: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -type UserEdge { - cursor: String! - node: User! -} - -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 { - someBigInt: SortDirection - someDateTime: SortDirection - someDuration: SortDirection - someFloat: SortDirection - someId: SortDirection - someInt: SortDirection - someLocalDateTime: SortDirection - someLocalTime: SortDirection - someString: SortDirection - someTime: SortDirection -} - -input UserUpdateInput { - someBigInt: BigInt - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float - someFloat_ADD: Float - someFloat_DIVIDE: Float - someFloat_MULTIPLY: Float - someFloat_SUBTRACT: Float - someId: ID - someInt: Int - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - someBigInt: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDateTime: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDateTime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDateTime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDuration: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someDuration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someDuration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someFloat: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someFloat_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someFloat_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId: ID - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_IN: [ID] - someId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someId_STARTS_WITH: ID - someInt: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString: String - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_IN: [String] - someString_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someString_STARTS_WITH: String - someTime: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. + \\"\\"\\" + scalar BigInt + + type BigIntAggregateSelectionNullable { + average: BigInt + max: BigInt + min: BigInt + sum: BigInt + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNullable { + max: DateTime + min: DateTime + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelectionNullable { + max: Duration + min: Duration + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + interface Likes { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + input LikesCreateInput { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + input LikesSort { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection + } + + input LikesUpdateInput { + someBigInt: BigInt + someBigInt_DECREMENT: BigInt + someBigInt_INCREMENT: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someFloat_ADD: Float + someFloat_DIVIDE: Float + someFloat_MULTIPLY: Float + someFloat_SUBTRACT: Float + someId: ID + someInt: Int + someInt_DECREMENT: Int + someInt_INCREMENT: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + input LikesWhere { + AND: [LikesWhere!] + NOT: LikesWhere + OR: [LikesWhere!] + someBigInt: BigInt + someBigInt_GT: BigInt + someBigInt_GTE: BigInt + someBigInt_IN: [BigInt] + someBigInt_LT: BigInt + someBigInt_LTE: BigInt + someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDateTime: DateTime + someDateTime_GT: DateTime + someDateTime_GTE: DateTime + someDateTime_IN: [DateTime] + someDateTime_LT: DateTime + someDateTime_LTE: DateTime + someDateTime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDateTime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDuration: Duration + someDuration_GT: Duration + someDuration_GTE: Duration + someDuration_IN: [Duration] + someDuration_LT: Duration + someDuration_LTE: Duration + someDuration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDuration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someFloat: Float + someFloat_GT: Float + someFloat_GTE: Float + someFloat_IN: [Float] + someFloat_LT: Float + someFloat_LTE: Float + someFloat_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someFloat_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId: ID + someId_CONTAINS: ID + someId_ENDS_WITH: ID + someId_IN: [ID] + someId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_STARTS_WITH: ID + someInt: Int + someInt_GT: Int + someInt_GTE: Int + someInt_IN: [Int] + someInt_LT: Int + someInt_LTE: Int + someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime: LocalDateTime + someLocalDateTime_GT: LocalDateTime + someLocalDateTime_GTE: LocalDateTime + someLocalDateTime_IN: [LocalDateTime] + someLocalDateTime_LT: LocalDateTime + someLocalDateTime_LTE: LocalDateTime + someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime: LocalTime + someLocalTime_GT: LocalTime + someLocalTime_GTE: LocalTime + someLocalTime_IN: [LocalTime] + someLocalTime_LT: LocalTime + someLocalTime_LTE: LocalTime + someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString: String + someString_CONTAINS: String + someString_ENDS_WITH: String + someString_IN: [String] + someString_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_STARTS_WITH: String + someTime: Time + someTime_GT: Time + someTime_GTE: Time + someTime_IN: [Time] + someTime_LT: Time + someTime_LTE: Time + someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelectionNullable { + max: LocalDateTime + min: LocalDateTime + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelectionNullable { + max: LocalTime + min: LocalTime + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + likes(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! + likesAggregate(directed: Boolean = true, where: UserWhere): PostUserLikesAggregationSelection + likesConnection(after: String, directed: Boolean = true, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + title: String + } + + type PostAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input PostConnectInput { + likes: [PostLikesConnectFieldInput!] + } + + input PostCreateInput { + likes: PostLikesFieldInput + title: String + } + + input PostDeleteInput { + likes: [PostLikesDeleteFieldInput!] + } + + input PostDisconnectInput { + likes: [PostLikesDisconnectFieldInput!] + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostLikesAggregateInput { + AND: [PostLikesAggregateInput!] + NOT: PostLikesAggregateInput + OR: [PostLikesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: PostLikesEdgeAggregationWhereInput + node: PostLikesNodeAggregationWhereInput + } + + input PostLikesConnectFieldInput { + edge: LikesCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type PostLikesConnection { + edges: [PostLikesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostLikesConnectionSort { + edge: LikesSort + node: UserSort + } + + input PostLikesConnectionWhere { + AND: [PostLikesConnectionWhere!] + NOT: PostLikesConnectionWhere + OR: [PostLikesConnectionWhere!] + edge: LikesWhere + edge_NOT: LikesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PostLikesCreateFieldInput { + edge: LikesCreateInput + node: UserCreateInput! + } + + input PostLikesDeleteFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesDisconnectFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesEdgeAggregationWhereInput { + AND: [PostLikesEdgeAggregationWhereInput!] + NOT: PostLikesEdgeAggregationWhereInput + OR: [PostLikesEdgeAggregationWhereInput!] + someBigInt_AVERAGE_EQUAL: BigInt + someBigInt_AVERAGE_GT: BigInt + someBigInt_AVERAGE_GTE: BigInt + someBigInt_AVERAGE_LT: BigInt + someBigInt_AVERAGE_LTE: BigInt + someBigInt_EQUAL: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_MAX_EQUAL: BigInt + someBigInt_MAX_GT: BigInt + someBigInt_MAX_GTE: BigInt + someBigInt_MAX_LT: BigInt + someBigInt_MAX_LTE: BigInt + someBigInt_MIN_EQUAL: BigInt + someBigInt_MIN_GT: BigInt + someBigInt_MIN_GTE: BigInt + someBigInt_MIN_LT: BigInt + someBigInt_MIN_LTE: BigInt + someBigInt_SUM_EQUAL: BigInt + someBigInt_SUM_GT: BigInt + someBigInt_SUM_GTE: BigInt + someBigInt_SUM_LT: BigInt + someBigInt_SUM_LTE: BigInt + someDateTime_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_MAX_EQUAL: DateTime + someDateTime_MAX_GT: DateTime + someDateTime_MAX_GTE: DateTime + someDateTime_MAX_LT: DateTime + someDateTime_MAX_LTE: DateTime + someDateTime_MIN_EQUAL: DateTime + someDateTime_MIN_GT: DateTime + someDateTime_MIN_GTE: DateTime + someDateTime_MIN_LT: DateTime + someDateTime_MIN_LTE: DateTime + someDuration_AVERAGE_EQUAL: Duration + someDuration_AVERAGE_GT: Duration + someDuration_AVERAGE_GTE: Duration + someDuration_AVERAGE_LT: Duration + someDuration_AVERAGE_LTE: Duration + someDuration_EQUAL: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_GT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_GTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_LT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_LTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_MAX_EQUAL: Duration + someDuration_MAX_GT: Duration + someDuration_MAX_GTE: Duration + someDuration_MAX_LT: Duration + someDuration_MAX_LTE: Duration + someDuration_MIN_EQUAL: Duration + someDuration_MIN_GT: Duration + someDuration_MIN_GTE: Duration + someDuration_MIN_LT: Duration + someDuration_MIN_LTE: Duration + someFloat_AVERAGE_EQUAL: Float + someFloat_AVERAGE_GT: Float + someFloat_AVERAGE_GTE: Float + someFloat_AVERAGE_LT: Float + someFloat_AVERAGE_LTE: Float + someFloat_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_MAX_EQUAL: Float + someFloat_MAX_GT: Float + someFloat_MAX_GTE: Float + someFloat_MAX_LT: Float + someFloat_MAX_LTE: Float + someFloat_MIN_EQUAL: Float + someFloat_MIN_GT: Float + someFloat_MIN_GTE: Float + someFloat_MIN_LT: Float + someFloat_MIN_LTE: Float + someFloat_SUM_EQUAL: Float + someFloat_SUM_GT: Float + someFloat_SUM_GTE: Float + someFloat_SUM_LT: Float + someFloat_SUM_LTE: Float + someId_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_AVERAGE_EQUAL: Float + someInt_AVERAGE_GT: Float + someInt_AVERAGE_GTE: Float + someInt_AVERAGE_LT: Float + someInt_AVERAGE_LTE: Float + someInt_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_MAX_EQUAL: Int + someInt_MAX_GT: Int + someInt_MAX_GTE: Int + someInt_MAX_LT: Int + someInt_MAX_LTE: Int + someInt_MIN_EQUAL: Int + someInt_MIN_GT: Int + someInt_MIN_GTE: Int + someInt_MIN_LT: Int + someInt_MIN_LTE: Int + someInt_SUM_EQUAL: Int + someInt_SUM_GT: Int + someInt_SUM_GTE: Int + someInt_SUM_LT: Int + someInt_SUM_LTE: Int + someLocalDateTime_EQUAL: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_MAX_EQUAL: LocalDateTime + someLocalDateTime_MAX_GT: LocalDateTime + someLocalDateTime_MAX_GTE: LocalDateTime + someLocalDateTime_MAX_LT: LocalDateTime + someLocalDateTime_MAX_LTE: LocalDateTime + someLocalDateTime_MIN_EQUAL: LocalDateTime + someLocalDateTime_MIN_GT: LocalDateTime + someLocalDateTime_MIN_GTE: LocalDateTime + someLocalDateTime_MIN_LT: LocalDateTime + someLocalDateTime_MIN_LTE: LocalDateTime + someLocalTime_EQUAL: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_MAX_EQUAL: LocalTime + someLocalTime_MAX_GT: LocalTime + someLocalTime_MAX_GTE: LocalTime + someLocalTime_MAX_LT: LocalTime + someLocalTime_MAX_LTE: LocalTime + someLocalTime_MIN_EQUAL: LocalTime + someLocalTime_MIN_GT: LocalTime + someLocalTime_MIN_GTE: LocalTime + someLocalTime_MIN_LT: LocalTime + someLocalTime_MIN_LTE: LocalTime + someString_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_LENGTH_EQUAL: Float + someString_AVERAGE_LENGTH_GT: Float + someString_AVERAGE_LENGTH_GTE: Float + someString_AVERAGE_LENGTH_LT: Float + someString_AVERAGE_LENGTH_LTE: Float + someString_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_LENGTH_EQUAL: Int + someString_LONGEST_LENGTH_GT: Int + someString_LONGEST_LENGTH_GTE: Int + someString_LONGEST_LENGTH_LT: Int + someString_LONGEST_LENGTH_LTE: Int + someString_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_LENGTH_EQUAL: Int + someString_SHORTEST_LENGTH_GT: Int + someString_SHORTEST_LENGTH_GTE: Int + someString_SHORTEST_LENGTH_LT: Int + someString_SHORTEST_LENGTH_LTE: Int + someString_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someTime_EQUAL: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_GT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_GTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_LT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_LTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_MAX_EQUAL: Time + someTime_MAX_GT: Time + someTime_MAX_GTE: Time + someTime_MAX_LT: Time + someTime_MAX_LTE: Time + someTime_MIN_EQUAL: Time + someTime_MIN_GT: Time + someTime_MIN_GTE: Time + someTime_MIN_LT: Time + someTime_MIN_LTE: Time + } + + input PostLikesFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + } + + input PostLikesNodeAggregationWhereInput { + AND: [PostLikesNodeAggregationWhereInput!] + NOT: PostLikesNodeAggregationWhereInput + OR: [PostLikesNodeAggregationWhereInput!] + someBigInt_AVERAGE_EQUAL: BigInt + someBigInt_AVERAGE_GT: BigInt + someBigInt_AVERAGE_GTE: BigInt + someBigInt_AVERAGE_LT: BigInt + someBigInt_AVERAGE_LTE: BigInt + someBigInt_EQUAL: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someBigInt_MAX_EQUAL: BigInt + someBigInt_MAX_GT: BigInt + someBigInt_MAX_GTE: BigInt + someBigInt_MAX_LT: BigInt + someBigInt_MAX_LTE: BigInt + someBigInt_MIN_EQUAL: BigInt + someBigInt_MIN_GT: BigInt + someBigInt_MIN_GTE: BigInt + someBigInt_MIN_LT: BigInt + someBigInt_MIN_LTE: BigInt + someBigInt_SUM_EQUAL: BigInt + someBigInt_SUM_GT: BigInt + someBigInt_SUM_GTE: BigInt + someBigInt_SUM_LT: BigInt + someBigInt_SUM_LTE: BigInt + someDateTime_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDateTime_MAX_EQUAL: DateTime + someDateTime_MAX_GT: DateTime + someDateTime_MAX_GTE: DateTime + someDateTime_MAX_LT: DateTime + someDateTime_MAX_LTE: DateTime + someDateTime_MIN_EQUAL: DateTime + someDateTime_MIN_GT: DateTime + someDateTime_MIN_GTE: DateTime + someDateTime_MIN_LT: DateTime + someDateTime_MIN_LTE: DateTime + someDuration_AVERAGE_EQUAL: Duration + someDuration_AVERAGE_GT: Duration + someDuration_AVERAGE_GTE: Duration + someDuration_AVERAGE_LT: Duration + someDuration_AVERAGE_LTE: Duration + someDuration_EQUAL: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_GT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_GTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_LT: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_LTE: Duration @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someDuration_MAX_EQUAL: Duration + someDuration_MAX_GT: Duration + someDuration_MAX_GTE: Duration + someDuration_MAX_LT: Duration + someDuration_MAX_LTE: Duration + someDuration_MIN_EQUAL: Duration + someDuration_MIN_GT: Duration + someDuration_MIN_GTE: Duration + someDuration_MIN_LT: Duration + someDuration_MIN_LTE: Duration + someFloat_AVERAGE_EQUAL: Float + someFloat_AVERAGE_GT: Float + someFloat_AVERAGE_GTE: Float + someFloat_AVERAGE_LT: Float + someFloat_AVERAGE_LTE: Float + someFloat_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someFloat_MAX_EQUAL: Float + someFloat_MAX_GT: Float + someFloat_MAX_GTE: Float + someFloat_MAX_LT: Float + someFloat_MAX_LTE: Float + someFloat_MIN_EQUAL: Float + someFloat_MIN_GT: Float + someFloat_MIN_GTE: Float + someFloat_MIN_LT: Float + someFloat_MIN_LTE: Float + someFloat_SUM_EQUAL: Float + someFloat_SUM_GT: Float + someFloat_SUM_GTE: Float + someFloat_SUM_LT: Float + someFloat_SUM_LTE: Float + someId_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_AVERAGE_EQUAL: Float + someInt_AVERAGE_GT: Float + someInt_AVERAGE_GTE: Float + someInt_AVERAGE_LT: Float + someInt_AVERAGE_LTE: Float + someInt_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someInt_MAX_EQUAL: Int + someInt_MAX_GT: Int + someInt_MAX_GTE: Int + someInt_MAX_LT: Int + someInt_MAX_LTE: Int + someInt_MIN_EQUAL: Int + someInt_MIN_GT: Int + someInt_MIN_GTE: Int + someInt_MIN_LT: Int + someInt_MIN_LTE: Int + someInt_SUM_EQUAL: Int + someInt_SUM_GT: Int + someInt_SUM_GTE: Int + someInt_SUM_LT: Int + someInt_SUM_LTE: Int + someLocalDateTime_EQUAL: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalDateTime_MAX_EQUAL: LocalDateTime + someLocalDateTime_MAX_GT: LocalDateTime + someLocalDateTime_MAX_GTE: LocalDateTime + someLocalDateTime_MAX_LT: LocalDateTime + someLocalDateTime_MAX_LTE: LocalDateTime + someLocalDateTime_MIN_EQUAL: LocalDateTime + someLocalDateTime_MIN_GT: LocalDateTime + someLocalDateTime_MIN_GTE: LocalDateTime + someLocalDateTime_MIN_LT: LocalDateTime + someLocalDateTime_MIN_LTE: LocalDateTime + someLocalTime_EQUAL: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someLocalTime_MAX_EQUAL: LocalTime + someLocalTime_MAX_GT: LocalTime + someLocalTime_MAX_GTE: LocalTime + someLocalTime_MAX_LT: LocalTime + someLocalTime_MAX_LTE: LocalTime + someLocalTime_MIN_EQUAL: LocalTime + someLocalTime_MIN_GT: LocalTime + someLocalTime_MIN_GTE: LocalTime + someLocalTime_MIN_LT: LocalTime + someLocalTime_MIN_LTE: LocalTime + someString_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_LENGTH_EQUAL: Float + someString_AVERAGE_LENGTH_GT: Float + someString_AVERAGE_LENGTH_GTE: Float + someString_AVERAGE_LENGTH_LT: Float + someString_AVERAGE_LENGTH_LTE: Float + someString_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_LENGTH_EQUAL: Int + someString_LONGEST_LENGTH_GT: Int + someString_LONGEST_LENGTH_GTE: Int + someString_LONGEST_LENGTH_LT: Int + someString_LONGEST_LENGTH_LTE: Int + someString_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someString_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_LENGTH_EQUAL: Int + someString_SHORTEST_LENGTH_GT: Int + someString_SHORTEST_LENGTH_GTE: Int + someString_SHORTEST_LENGTH_LT: Int + someString_SHORTEST_LENGTH_LTE: Int + someString_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someString_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + someTime_EQUAL: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_GT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_GTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_LT: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_LTE: Time @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + someTime_MAX_EQUAL: Time + someTime_MAX_GT: Time + someTime_MAX_GTE: Time + someTime_MAX_LT: Time + someTime_MAX_LTE: Time + someTime_MIN_EQUAL: Time + someTime_MIN_GT: Time + someTime_MIN_GTE: Time + someTime_MIN_LT: Time + someTime_MIN_LTE: Time + } + + type PostLikesRelationship implements Likes { + cursor: String! + node: User! + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + input PostLikesUpdateConnectionInput { + edge: LikesUpdateInput + node: UserUpdateInput + } + + input PostLikesUpdateFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + delete: [PostLikesDeleteFieldInput!] + disconnect: [PostLikesDisconnectFieldInput!] + update: PostLikesUpdateConnectionInput + where: PostLikesConnectionWhere + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + input PostRelationInput { + likes: [PostLikesCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + title: SortDirection + } + + input PostUpdateInput { + likes: [PostLikesUpdateFieldInput!] + title: String + } + + type PostUserLikesAggregationSelection { + count: Int! + edge: PostUserLikesEdgeAggregateSelection + node: PostUserLikesNodeAggregateSelection + } + + type PostUserLikesEdgeAggregateSelection { + someBigInt: BigIntAggregateSelectionNullable! + someDateTime: DateTimeAggregateSelectionNullable! + someDuration: DurationAggregateSelectionNullable! + someFloat: FloatAggregateSelectionNullable! + someId: IDAggregateSelectionNullable! + someInt: IntAggregateSelectionNullable! + someLocalDateTime: LocalDateTimeAggregateSelectionNullable! + someLocalTime: LocalTimeAggregateSelectionNullable! + someString: StringAggregateSelectionNullable! + someTime: TimeAggregateSelectionNullable! + } + + type PostUserLikesNodeAggregateSelection { + someBigInt: BigIntAggregateSelectionNullable! + someDateTime: DateTimeAggregateSelectionNullable! + someDuration: DurationAggregateSelectionNullable! + someFloat: FloatAggregateSelectionNullable! + someId: IDAggregateSelectionNullable! + someInt: IntAggregateSelectionNullable! + someLocalDateTime: LocalDateTimeAggregateSelectionNullable! + someLocalTime: LocalTimeAggregateSelectionNullable! + someString: StringAggregateSelectionNullable! + someTime: TimeAggregateSelectionNullable! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + likes: UserWhere @deprecated(reason: \\"Use \`likes_SOME\` instead.\\") + likesAggregate: PostLikesAggregateInput + likesConnection: PostLikesConnectionWhere @deprecated(reason: \\"Use \`likesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Posts where all of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_ALL: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_NONE: PostLikesConnectionWhere + likesConnection_NOT: PostLikesConnectionWhere @deprecated(reason: \\"Use \`likesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Posts where one of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SINGLE: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SOME: PostLikesConnectionWhere + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + likes_ALL: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + likes_NONE: UserWhere + likes_NOT: UserWhere @deprecated(reason: \\"Use \`likes_NONE\` instead.\\") + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + likes_SINGLE: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + likes_SOME: UserWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelectionNullable { + max: Time + min: Time + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + type UserAggregateSelection { + count: Int! + someBigInt: BigIntAggregateSelectionNullable! + someDateTime: DateTimeAggregateSelectionNullable! + someDuration: DurationAggregateSelectionNullable! + someFloat: FloatAggregateSelectionNullable! + someId: IDAggregateSelectionNullable! + someInt: IntAggregateSelectionNullable! + someLocalDateTime: LocalDateTimeAggregateSelectionNullable! + someLocalTime: LocalTimeAggregateSelectionNullable! + someString: StringAggregateSelectionNullable! + someTime: TimeAggregateSelectionNullable! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + type UserEdge { + cursor: String! + node: User! + } + + 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 { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection + } + + input UserUpdateInput { + someBigInt: BigInt + someBigInt_DECREMENT: BigInt + someBigInt_INCREMENT: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someFloat_ADD: Float + someFloat_DIVIDE: Float + someFloat_MULTIPLY: Float + someFloat_SUBTRACT: Float + someId: ID + someInt: Int + someInt_DECREMENT: Int + someInt_INCREMENT: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + someBigInt: BigInt + someBigInt_GT: BigInt + someBigInt_GTE: BigInt + someBigInt_IN: [BigInt] + someBigInt_LT: BigInt + someBigInt_LTE: BigInt + someBigInt_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someBigInt_NOT_IN: [BigInt] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDateTime: DateTime + someDateTime_GT: DateTime + someDateTime_GTE: DateTime + someDateTime_IN: [DateTime] + someDateTime_LT: DateTime + someDateTime_LTE: DateTime + someDateTime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDateTime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDuration: Duration + someDuration_GT: Duration + someDuration_GTE: Duration + someDuration_IN: [Duration] + someDuration_LT: Duration + someDuration_LTE: Duration + someDuration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someDuration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someFloat: Float + someFloat_GT: Float + someFloat_GTE: Float + someFloat_IN: [Float] + someFloat_LT: Float + someFloat_LTE: Float + someFloat_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someFloat_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId: ID + someId_CONTAINS: ID + someId_ENDS_WITH: ID + someId_IN: [ID] + someId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someId_STARTS_WITH: ID + someInt: Int + someInt_GT: Int + someInt_GTE: Int + someInt_IN: [Int] + someInt_LT: Int + someInt_LTE: Int + someInt_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someInt_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime: LocalDateTime + someLocalDateTime_GT: LocalDateTime + someLocalDateTime_GTE: LocalDateTime + someLocalDateTime_IN: [LocalDateTime] + someLocalDateTime_LT: LocalDateTime + someLocalDateTime_LTE: LocalDateTime + someLocalDateTime_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalDateTime_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime: LocalTime + someLocalTime_GT: LocalTime + someLocalTime_GTE: LocalTime + someLocalTime_IN: [LocalTime] + someLocalTime_LT: LocalTime + someLocalTime_LTE: LocalTime + someLocalTime_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someLocalTime_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString: String + someString_CONTAINS: String + someString_ENDS_WITH: String + someString_IN: [String] + someString_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someString_STARTS_WITH: String + someTime: Time + someTime_GT: Time + someTime_GTE: Time + someTime_IN: [Time] + someTime_LT: Time + someTime_LTE: Time + someTime_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someTime_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index 7c280a74ab..cf3a0f6683 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -45,644 +45,644 @@ describe("Arrays Methods", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - pay: [Float] -} - -input ActedInCreateInput { - pay: [Float] -} - -input ActedInSort { - pay: SortDirection -} - -input ActedInUpdateInput { - pay: [Float] - pay_POP: Int - pay_PUSH: [Float] -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - pay: [Float] - pay_INCLUDES: Float - pay_NOT: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - pay_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: MovieSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - edge: ActedInCreateInput - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Movie! - pay: [Float] -} - -input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInNodeAggregateSelection { - averageRating: FloatAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float! - id: ID! - ratings: [Float!]! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - pay: [Float] -} - -input MovieActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - averageRating: FloatAggregateSelectionNonNullable! - count: Int! - id: IDAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - averageRating: Float! - id: ID! - ratings: [Float!]! -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - averageRating: SortDirection - id: SortDirection -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - ratings: [Float!] - ratings_POP: Int - ratings_PUSH: [Float!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - ratings: [Float!] - ratings_INCLUDES: Float - ratings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - ratings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + pay: [Float] + } + + input ActedInCreateInput { + pay: [Float] + } + + input ActedInSort { + pay: SortDirection + } + + input ActedInUpdateInput { + pay: [Float] + pay_POP: Int + pay_PUSH: [Float] + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + pay: [Float] + pay_INCLUDES: Float + pay_NOT: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + pay_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String + } + + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput + } + + input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + edge: ActedInSort + node: MovieSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + edge: ActedInCreateInput + node: MovieCreateInput! + } + + input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + averageRating_AVERAGE_EQUAL: Float + averageRating_AVERAGE_GT: Float + averageRating_AVERAGE_GTE: Float + averageRating_AVERAGE_LT: Float + averageRating_AVERAGE_LTE: Float + averageRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + averageRating_MAX_EQUAL: Float + averageRating_MAX_GT: Float + averageRating_MAX_GTE: Float + averageRating_MAX_LT: Float + averageRating_MAX_LTE: Float + averageRating_MIN_EQUAL: Float + averageRating_MIN_GT: Float + averageRating_MIN_GTE: Float + averageRating_MIN_LT: Float + averageRating_MIN_LTE: Float + averageRating_SUM_EQUAL: Float + averageRating_SUM_GT: Float + averageRating_SUM_GTE: Float + averageRating_SUM_LT: Float + averageRating_SUM_LTE: Float + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Movie! + pay: [Float] + } + + input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInNodeAggregateSelection { + averageRating: FloatAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float! + id: ID! + ratings: [Float!]! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + pay: [Float] + } + + input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + averageRating: FloatAggregateSelectionNonNullable! + count: Int! + id: IDAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + averageRating: Float! + id: ID! + ratings: [Float!]! + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + averageRating: SortDirection + id: SortDirection + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + ratings: [Float!] + ratings_POP: Int + ratings_PUSH: [Float!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float!] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + ratings: [Float!] + ratings_INCLUDES: Float + ratings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + ratings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index 1aa23fe658..207ffb3d34 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -35,169 +35,169 @@ describe("Arrays", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Movie { - averageRating: Float! - id: ID! - ratings: [Float!]! -} - -type MovieAggregateSelection { - averageRating: FloatAggregateSelectionNonNullable! - count: Int! - id: IDAggregateSelectionNonNullable! -} - -input MovieCreateInput { - averageRating: Float! - id: ID! - ratings: [Float!]! -} - -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 { - averageRating: SortDirection - id: SortDirection -} - -input MovieUpdateInput { - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - ratings: [Float!] - ratings_POP: Int - ratings_PUSH: [Float!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - ratings: [Float!] - ratings_INCLUDES: Float - ratings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - ratings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Movie { + averageRating: Float! + id: ID! + ratings: [Float!]! + } + + type MovieAggregateSelection { + averageRating: FloatAggregateSelectionNonNullable! + count: Int! + id: IDAggregateSelectionNonNullable! + } + + input MovieCreateInput { + averageRating: Float! + id: ID! + ratings: [Float!]! + } + + 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 { + averageRating: SortDirection + id: SortDirection + } + + input MovieUpdateInput { + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + ratings: [Float!] + ratings_POP: Int + ratings_PUSH: [Float!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float!] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + ratings: [Float!] + ratings_INCLUDES: Float + ratings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + ratings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index c6b99a3ba1..b117d4bcd4 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -42,583 +42,583 @@ describe("Authorization", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! - id: ID! - name: String! -} - -type PostAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput -} - -input PostAuthorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type PostAuthorConnection { - edges: [PostAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PostAuthorConnectionSort { - node: UserSort -} - -input PostAuthorConnectionWhere { - AND: [PostAuthorConnectionWhere!] - NOT: PostAuthorConnectionWhere - OR: [PostAuthorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PostAuthorCreateFieldInput { - node: UserCreateInput! -} - -input PostAuthorDeleteFieldInput { - delete: UserDeleteInput - where: PostAuthorConnectionWhere -} - -input PostAuthorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: PostAuthorConnectionWhere -} - -input PostAuthorFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput -} - -input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type PostAuthorRelationship { - cursor: String! - node: User! -} - -input PostAuthorUpdateConnectionInput { - node: UserUpdateInput -} - -input PostAuthorUpdateFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - delete: PostAuthorDeleteFieldInput - disconnect: PostAuthorDisconnectFieldInput - update: PostAuthorUpdateConnectionInput - where: PostAuthorConnectionWhere -} - -input PostConnectInput { - author: PostAuthorConnectFieldInput -} - -input PostCreateInput { - author: PostAuthorFieldInput - id: ID! - name: String! -} - -input PostDeleteInput { - author: PostAuthorDeleteFieldInput -} - -input PostDisconnectInput { - author: PostAuthorDisconnectFieldInput -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] -} - -input PostRelationInput { - author: PostAuthorCreateFieldInput -} - -\\"\\"\\" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -\\"\\"\\" -input PostSort { - id: SortDirection - name: SortDirection -} - -input PostUpdateInput { - author: PostAuthorUpdateFieldInput - id: ID - name: String -} - -type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection -} - -type PostUserAuthorNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - author: UserWhere - authorAggregate: PostAuthorAggregateInput - authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - id: ID! - name: String! - posts(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! - postsAggregate(directed: Boolean = true, where: UserWhere): UserUserPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! -} - -type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input UserConnectInput { - posts: [UserPostsConnectFieldInput!] -} - -input UserConnectWhere { - node: UserWhere! -} - -input UserCreateInput { - id: ID! - name: String! - posts: UserPostsFieldInput -} - -input UserDeleteInput { - posts: [UserPostsDeleteFieldInput!] -} - -input UserDisconnectInput { - posts: [UserPostsDisconnectFieldInput!] -} - -type UserEdge { - cursor: String! - node: User! -} - -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!] -} - -input UserPostsAggregateInput { - AND: [UserPostsAggregateInput!] - NOT: UserPostsAggregateInput - OR: [UserPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserPostsNodeAggregationWhereInput -} - -input UserPostsConnectFieldInput { - connect: [UserConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type UserPostsConnection { - edges: [UserPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserPostsConnectionSort { - node: UserSort -} - -input UserPostsConnectionWhere { - AND: [UserPostsConnectionWhere!] - NOT: UserPostsConnectionWhere - OR: [UserPostsConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input UserPostsCreateFieldInput { - node: UserCreateInput! -} - -input UserPostsDeleteFieldInput { - delete: UserDeleteInput - where: UserPostsConnectionWhere -} - -input UserPostsDisconnectFieldInput { - disconnect: UserDisconnectInput - where: UserPostsConnectionWhere -} - -input UserPostsFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] -} - -input UserPostsNodeAggregationWhereInput { - AND: [UserPostsNodeAggregationWhereInput!] - NOT: UserPostsNodeAggregationWhereInput - OR: [UserPostsNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type UserPostsRelationship { - cursor: String! - node: User! -} - -input UserPostsUpdateConnectionInput { - node: UserUpdateInput -} - -input UserPostsUpdateFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - delete: [UserPostsDeleteFieldInput!] - disconnect: [UserPostsDisconnectFieldInput!] - update: UserPostsUpdateConnectionInput - where: UserPostsConnectionWhere -} - -input UserRelationInput { - posts: [UserPostsCreateFieldInput!] -} - -\\"\\"\\" -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 { - id: SortDirection - name: SortDirection -} - -input UserUpdateInput { - id: ID - name: String - posts: [UserPostsUpdateFieldInput!] -} - -type UserUserPostsAggregationSelection { - count: Int! - node: UserUserPostsNodeAggregateSelection -} - -type UserUserPostsNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - posts: UserWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: UserPostsAggregateInput - postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere - postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere - \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" - posts_ALL: UserWhere - \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" - posts_NONE: UserWhere - posts_NOT: UserWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" - posts_SINGLE: UserWhere - \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" - posts_SOME: UserWhere -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + id: ID! + name: String! + } + + type PostAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input PostAuthorAggregateInput { + AND: [PostAuthorAggregateInput!] + NOT: PostAuthorAggregateInput + OR: [PostAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostAuthorNodeAggregationWhereInput + } + + input PostAuthorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostAuthorConnectionSort { + node: UserSort + } + + input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PostAuthorCreateFieldInput { + node: UserCreateInput! + } + + input PostAuthorDeleteFieldInput { + delete: UserDeleteInput + where: PostAuthorConnectionWhere + } + + input PostAuthorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostAuthorConnectionWhere + } + + input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + } + + input PostAuthorNodeAggregationWhereInput { + AND: [PostAuthorNodeAggregationWhereInput!] + NOT: PostAuthorNodeAggregationWhereInput + OR: [PostAuthorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type PostAuthorRelationship { + cursor: String! + node: User! + } + + input PostAuthorUpdateConnectionInput { + node: UserUpdateInput + } + + input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere + } + + input PostConnectInput { + author: PostAuthorConnectFieldInput + } + + input PostCreateInput { + author: PostAuthorFieldInput + id: ID! + name: String! + } + + input PostDeleteInput { + author: PostAuthorDeleteFieldInput + } + + input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + input PostRelationInput { + author: PostAuthorCreateFieldInput + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + id: SortDirection + name: SortDirection + } + + input PostUpdateInput { + author: PostAuthorUpdateFieldInput + id: ID + name: String + } + + type PostUserAuthorAggregationSelection { + count: Int! + node: PostUserAuthorNodeAggregateSelection + } + + type PostUserAuthorNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + id: ID! + name: String! + posts(directed: Boolean = true, options: UserOptions, where: UserWhere): [User!]! + postsAggregate(directed: Boolean = true, where: UserWhere): UserUserPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + } + + type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input UserConnectInput { + posts: [UserPostsConnectFieldInput!] + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + id: ID! + name: String! + posts: UserPostsFieldInput + } + + input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] + } + + input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] + } + + type UserEdge { + cursor: String! + node: User! + } + + 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!] + } + + input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput + } + + input UserPostsConnectFieldInput { + connect: [UserConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserPostsConnectionSort { + node: UserSort + } + + input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserPostsCreateFieldInput { + node: UserCreateInput! + } + + input UserPostsDeleteFieldInput { + delete: UserDeleteInput + where: UserPostsConnectionWhere + } + + input UserPostsDisconnectFieldInput { + disconnect: UserDisconnectInput + where: UserPostsConnectionWhere + } + + input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + } + + input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type UserPostsRelationship { + cursor: String! + node: User! + } + + input UserPostsUpdateConnectionInput { + node: UserUpdateInput + } + + input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere + } + + input UserRelationInput { + posts: [UserPostsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: SortDirection + name: SortDirection + } + + input UserUpdateInput { + id: ID + name: String + posts: [UserPostsUpdateFieldInput!] + } + + type UserUserPostsAggregationSelection { + count: Int! + node: UserUserPostsNodeAggregateSelection + } + + type UserUserPostsNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: UserWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" + posts_ALL: UserWhere + \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" + posts_NONE: UserWhere + posts_NOT: UserWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" + posts_SINGLE: UserWhere + \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" + posts_SOME: UserWhere + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 2b3ee5a901..473682e1d4 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -60,223 +60,223 @@ describe("Comments", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A custom scalar.\\"\\"\\" -scalar CustomScalar - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -\\"\\"\\"An enumeration of movie genres.\\"\\"\\" -enum Genre { - ACTION - DRAMA - ROMANCE -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -\\"\\"\\"A type describing a movie.\\"\\"\\" -type Movie { - \\"\\"\\"The number of actors who acted in the movie.\\"\\"\\" - actorCount: Int - \\"\\"\\"The average rating for the movie.\\"\\"\\" - averageRating: Float - customScalar: CustomScalar - genre: Genre - id: ID - \\"\\"\\" - Is the movie active? - - This is measured based on annual profit. - \\"\\"\\" - isActive: Boolean -} - -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - actorCount: Int - averageRating: Float - customScalar: CustomScalar - genre: Genre - id: ID - isActive: Boolean -} - -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 { - actorCount: SortDirection - averageRating: SortDirection - customScalar: SortDirection - genre: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - customScalar: CustomScalar - genre: Genre - id: ID - isActive: Boolean -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - customScalar: CustomScalar - customScalar_IN: [CustomScalar] - customScalar_NOT: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - customScalar_NOT_IN: [CustomScalar] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - genre: Genre - genre_IN: [Genre] - genre_NOT: Genre @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - genre_NOT_IN: [Genre] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A custom scalar.\\"\\"\\" + scalar CustomScalar + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + \\"\\"\\"An enumeration of movie genres.\\"\\"\\" + enum Genre { + ACTION + DRAMA + ROMANCE + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + \\"\\"\\"A type describing a movie.\\"\\"\\" + type Movie { + \\"\\"\\"The number of actors who acted in the movie.\\"\\"\\" + actorCount: Int + \\"\\"\\"The average rating for the movie.\\"\\"\\" + averageRating: Float + customScalar: CustomScalar + genre: Genre + id: ID + \\"\\"\\" + Is the movie active? + + This is measured based on annual profit. + \\"\\"\\" + isActive: Boolean + } + + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + actorCount: Int + averageRating: Float + customScalar: CustomScalar + genre: Genre + id: ID + isActive: Boolean + } + + 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 { + actorCount: SortDirection + averageRating: SortDirection + customScalar: SortDirection + genre: SortDirection + id: SortDirection + isActive: SortDirection + } + + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + customScalar: CustomScalar + genre: Genre + id: ID + isActive: Boolean + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + customScalar: CustomScalar + customScalar_IN: [CustomScalar] + customScalar_NOT: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + customScalar_NOT_IN: [CustomScalar] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + genre: Genre + genre_IN: [Genre] + genre_NOT: Genre @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + genre_NOT_IN: [Genre] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); describe("Relationship", () => { @@ -296,396 +296,396 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - name: String -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - name: String -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - \\"\\"\\"Actors in Movie\\"\\"\\" - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + name: String + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + name: String + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + \\"\\"\\"Actors in Movie\\"\\"\\" + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Interface", async () => { @@ -718,519 +718,519 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - screenTime: Int! -} - -input ActedInCreateInput { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - \\"\\"\\"Acted in Production\\"\\"\\" - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - edge: ActedInCreateInput! - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - screenTime: Int! -} - -input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie implements Production { - runtime: Int! - title: String! -} - -type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - runtime: Int! - title: String! -} - -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 { - runtime: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - title: String! -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - episodes: Int! - title: String! -} - -type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - episodes: Int! - title: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - episodes: Int - episodes_DECREMENT: Int - episodes_INCREMENT: Int - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + screenTime: Int! + } + + input ActedInCreateInput { + screenTime: Int! + } + + input ActedInSort { + screenTime: SortDirection + } + + input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + \\"\\"\\"Acted in Production\\"\\"\\" + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectFieldInput { + edge: ActedInCreateInput! + where: ProductionConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + screenTime: Int! + } + + input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie implements Production { + runtime: Int! + title: String! + } + + type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + runtime: Int! + title: String! + } + + 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 { + runtime: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + title: String! + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + episodes: Int! + title: String! + } + + type SeriesAggregateSelection { + count: Int! + episodes: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + episodes: Int! + title: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + episodes: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + episodes: Int + episodes_DECREMENT: Int + episodes_INCREMENT: Int + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + episodes: Int + episodes_GT: Int + episodes_GTE: Int + episodes_IN: [Int!] + episodes_LT: Int + episodes_LTE: Int + episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); test("Unions", async () => { @@ -1251,406 +1251,406 @@ type UpdateSeriesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Genre { - id: ID -} - -type GenreAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input GenreConnectWhere { - node: GenreWhere! -} - -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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! - searchNoDirective: Search -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - search: MovieSearchConnectInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - id: ID - search: MovieSearchCreateInput -} - -input MovieDeleteInput { - search: MovieSearchDeleteInput -} - -input MovieDisconnectInput { - search: MovieSearchDisconnectInput -} - -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!] -} - -input MovieRelationInput { - search: MovieSearchCreateFieldInput -} - -input MovieSearchConnectInput { - Genre: [MovieSearchGenreConnectFieldInput!] - Movie: [MovieSearchMovieConnectFieldInput!] -} - -type MovieSearchConnection { - edges: [MovieSearchRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieSearchConnectionWhere { - Genre: MovieSearchGenreConnectionWhere - Movie: MovieSearchMovieConnectionWhere -} - -input MovieSearchCreateFieldInput { - Genre: [MovieSearchGenreCreateFieldInput!] - Movie: [MovieSearchMovieCreateFieldInput!] -} - -input MovieSearchCreateInput { - Genre: MovieSearchGenreFieldInput - Movie: MovieSearchMovieFieldInput -} - -input MovieSearchDeleteInput { - Genre: [MovieSearchGenreDeleteFieldInput!] - Movie: [MovieSearchMovieDeleteFieldInput!] -} - -input MovieSearchDisconnectInput { - Genre: [MovieSearchGenreDisconnectFieldInput!] - Movie: [MovieSearchMovieDisconnectFieldInput!] -} - -input MovieSearchGenreConnectFieldInput { - where: GenreConnectWhere -} - -input MovieSearchGenreConnectionWhere { - AND: [MovieSearchGenreConnectionWhere!] - NOT: MovieSearchGenreConnectionWhere - OR: [MovieSearchGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieSearchGenreCreateFieldInput { - node: GenreCreateInput! -} - -input MovieSearchGenreDeleteFieldInput { - where: MovieSearchGenreConnectionWhere -} - -input MovieSearchGenreDisconnectFieldInput { - where: MovieSearchGenreConnectionWhere -} - -input MovieSearchGenreFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] -} - -input MovieSearchGenreUpdateConnectionInput { - node: GenreUpdateInput -} - -input MovieSearchGenreUpdateFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] - delete: [MovieSearchGenreDeleteFieldInput!] - disconnect: [MovieSearchGenreDisconnectFieldInput!] - update: MovieSearchGenreUpdateConnectionInput - where: MovieSearchGenreConnectionWhere -} - -input MovieSearchMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere -} - -input MovieSearchMovieConnectionWhere { - AND: [MovieSearchMovieConnectionWhere!] - NOT: MovieSearchMovieConnectionWhere - OR: [MovieSearchMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieSearchMovieCreateFieldInput { - node: MovieCreateInput! -} - -input MovieSearchMovieDeleteFieldInput { - delete: MovieDeleteInput - where: MovieSearchMovieConnectionWhere -} - -input MovieSearchMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieSearchMovieConnectionWhere -} - -input MovieSearchMovieFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] -} - -input MovieSearchMovieUpdateConnectionInput { - node: MovieUpdateInput -} - -input MovieSearchMovieUpdateFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] - delete: [MovieSearchMovieDeleteFieldInput!] - disconnect: [MovieSearchMovieDisconnectFieldInput!] - update: MovieSearchMovieUpdateConnectionInput - where: MovieSearchMovieConnectionWhere -} - -type MovieSearchRelationship { - cursor: String! - node: Search! -} - -input MovieSearchUpdateInput { - Genre: [MovieSearchGenreUpdateFieldInput!] - Movie: [MovieSearchMovieUpdateFieldInput!] -} - -\\"\\"\\" -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 { - id: ID - search: MovieSearchUpdateInput -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - searchConnection: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_ALL: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_NONE: MovieSearchConnectionWhere - searchConnection_NOT: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SINGLE: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SOME: MovieSearchConnectionWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -union Search = Genre | Movie - -input SearchWhere { - Genre: GenreWhere - Movie: MovieWhere -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Genre { + id: ID + } + + type GenreAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input GenreConnectWhere { + node: GenreWhere! + } + + 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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! + searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + searchNoDirective: Search + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + search: MovieSearchConnectInput + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + id: ID + search: MovieSearchCreateInput + } + + input MovieDeleteInput { + search: MovieSearchDeleteInput + } + + input MovieDisconnectInput { + search: MovieSearchDisconnectInput + } + + 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!] + } + + input MovieRelationInput { + search: MovieSearchCreateFieldInput + } + + input MovieSearchConnectInput { + Genre: [MovieSearchGenreConnectFieldInput!] + Movie: [MovieSearchMovieConnectFieldInput!] + } + + type MovieSearchConnection { + edges: [MovieSearchRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieSearchConnectionWhere { + Genre: MovieSearchGenreConnectionWhere + Movie: MovieSearchMovieConnectionWhere + } + + input MovieSearchCreateFieldInput { + Genre: [MovieSearchGenreCreateFieldInput!] + Movie: [MovieSearchMovieCreateFieldInput!] + } + + input MovieSearchCreateInput { + Genre: MovieSearchGenreFieldInput + Movie: MovieSearchMovieFieldInput + } + + input MovieSearchDeleteInput { + Genre: [MovieSearchGenreDeleteFieldInput!] + Movie: [MovieSearchMovieDeleteFieldInput!] + } + + input MovieSearchDisconnectInput { + Genre: [MovieSearchGenreDisconnectFieldInput!] + Movie: [MovieSearchMovieDisconnectFieldInput!] + } + + input MovieSearchGenreConnectFieldInput { + where: GenreConnectWhere + } + + input MovieSearchGenreConnectionWhere { + AND: [MovieSearchGenreConnectionWhere!] + NOT: MovieSearchGenreConnectionWhere + OR: [MovieSearchGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieSearchGenreCreateFieldInput { + node: GenreCreateInput! + } + + input MovieSearchGenreDeleteFieldInput { + where: MovieSearchGenreConnectionWhere + } + + input MovieSearchGenreDisconnectFieldInput { + where: MovieSearchGenreConnectionWhere + } + + input MovieSearchGenreFieldInput { + connect: [MovieSearchGenreConnectFieldInput!] + create: [MovieSearchGenreCreateFieldInput!] + } + + input MovieSearchGenreUpdateConnectionInput { + node: GenreUpdateInput + } + + input MovieSearchGenreUpdateFieldInput { + connect: [MovieSearchGenreConnectFieldInput!] + create: [MovieSearchGenreCreateFieldInput!] + delete: [MovieSearchGenreDeleteFieldInput!] + disconnect: [MovieSearchGenreDisconnectFieldInput!] + update: MovieSearchGenreUpdateConnectionInput + where: MovieSearchGenreConnectionWhere + } + + input MovieSearchMovieConnectFieldInput { + connect: [MovieConnectInput!] + where: MovieConnectWhere + } + + input MovieSearchMovieConnectionWhere { + AND: [MovieSearchMovieConnectionWhere!] + NOT: MovieSearchMovieConnectionWhere + OR: [MovieSearchMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieSearchMovieCreateFieldInput { + node: MovieCreateInput! + } + + input MovieSearchMovieDeleteFieldInput { + delete: MovieDeleteInput + where: MovieSearchMovieConnectionWhere + } + + input MovieSearchMovieDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieSearchMovieConnectionWhere + } + + input MovieSearchMovieFieldInput { + connect: [MovieSearchMovieConnectFieldInput!] + create: [MovieSearchMovieCreateFieldInput!] + } + + input MovieSearchMovieUpdateConnectionInput { + node: MovieUpdateInput + } + + input MovieSearchMovieUpdateFieldInput { + connect: [MovieSearchMovieConnectFieldInput!] + create: [MovieSearchMovieCreateFieldInput!] + delete: [MovieSearchMovieDeleteFieldInput!] + disconnect: [MovieSearchMovieDisconnectFieldInput!] + update: MovieSearchMovieUpdateConnectionInput + where: MovieSearchMovieConnectionWhere + } + + type MovieSearchRelationship { + cursor: String! + node: Search! + } + + input MovieSearchUpdateInput { + Genre: [MovieSearchGenreUpdateFieldInput!] + Movie: [MovieSearchMovieUpdateFieldInput!] + } + + \\"\\"\\" + 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 { + id: ID + search: MovieSearchUpdateInput + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + searchConnection: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_ALL: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_NONE: MovieSearchConnectionWhere + searchConnection_NOT: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_SINGLE: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_SOME: MovieSearchConnectionWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"\\"\\"\\" + 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 UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); }); diff --git a/packages/graphql/tests/schema/connect-or-create-id.test.ts b/packages/graphql/tests/schema/connect-or-create-id.test.ts index 351844b798..be7f217c2e 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -39,437 +39,437 @@ describe("connect or create with id", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectOrCreateInput { - movies: [ActorMoviesConnectOrCreateFieldInput!] -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - name: String! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -input ActorMoviesConnectOrCreateFieldInput { - onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! -} - -input ActorMoviesConnectOrCreateFieldInputOnCreate { - node: MovieOnCreateInput! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input ActorMoviesDeleteFieldInput { - where: ActorMoviesConnectionWhere -} - -input ActorMoviesDisconnectFieldInput { - where: ActorMoviesConnectionWhere -} - -input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - create: [ActorMoviesCreateFieldInput!] -} - -input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Movie { - id: ID! - title: String! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOnCreateInput { - title: String! -} - -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 - title: SortDirection -} - -input MovieUniqueWhere { - id: ID -} - -input MovieUpdateInput { - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + name: String! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! + } + + input ActorMoviesConnectOrCreateFieldInputOnCreate { + node: MovieOnCreateInput! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + where: ActorMoviesConnectionWhere + } + + input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Movie { + id: ID! + title: String! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + title: String! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOnCreateInput { + title: String! + } + + 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 + title: SortDirection + } + + input MovieUniqueWhere { + id: ID + } + + input MovieUpdateInput { + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("connect or create with non-autogenerated id", async () => { @@ -491,678 +491,678 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, connectOrCreate: PostConnectOrCreateInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, connectOrCreate: UserConnectOrCreateInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - content: String! - createdAt: DateTime! - creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection - creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCreatorConnectionSort!], where: PostCreatorConnectionWhere): PostCreatorConnection! - id: ID! -} - -type PostAggregateSelection { - content: StringAggregateSelectionNonNullable! - count: Int! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! -} - -input PostConnectInput { - creator: PostCreatorConnectFieldInput -} - -input PostConnectOrCreateInput { - creator: PostCreatorConnectOrCreateFieldInput -} - -input PostConnectOrCreateWhere { - node: PostUniqueWhere! -} - -input PostConnectWhere { - node: PostWhere! -} - -input PostCreateInput { - content: String! - createdAt: DateTime! - creator: PostCreatorFieldInput - id: ID! -} - -input PostCreatorAggregateInput { - AND: [PostCreatorAggregateInput!] - NOT: PostCreatorAggregateInput - OR: [PostCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostCreatorNodeAggregationWhereInput -} - -input PostCreatorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -input PostCreatorConnectOrCreateFieldInput { - onCreate: PostCreatorConnectOrCreateFieldInputOnCreate! - where: UserConnectOrCreateWhere! -} - -input PostCreatorConnectOrCreateFieldInputOnCreate { - node: UserOnCreateInput! -} - -type PostCreatorConnection { - edges: [PostCreatorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PostCreatorConnectionSort { - node: UserSort -} - -input PostCreatorConnectionWhere { - AND: [PostCreatorConnectionWhere!] - NOT: PostCreatorConnectionWhere - OR: [PostCreatorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PostCreatorCreateFieldInput { - node: UserCreateInput! -} - -input PostCreatorDeleteFieldInput { - delete: UserDeleteInput - where: PostCreatorConnectionWhere -} - -input PostCreatorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: PostCreatorConnectionWhere -} - -input PostCreatorFieldInput { - connect: PostCreatorConnectFieldInput - connectOrCreate: PostCreatorConnectOrCreateFieldInput - create: PostCreatorCreateFieldInput -} - -input PostCreatorNodeAggregationWhereInput { - AND: [PostCreatorNodeAggregationWhereInput!] - NOT: PostCreatorNodeAggregationWhereInput - OR: [PostCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type PostCreatorRelationship { - cursor: String! - node: User! -} - -input PostCreatorUpdateConnectionInput { - node: UserUpdateInput -} - -input PostCreatorUpdateFieldInput { - connect: PostCreatorConnectFieldInput - connectOrCreate: PostCreatorConnectOrCreateFieldInput - create: PostCreatorCreateFieldInput - delete: PostCreatorDeleteFieldInput - disconnect: PostCreatorDisconnectFieldInput - update: PostCreatorUpdateConnectionInput - where: PostCreatorConnectionWhere -} - -input PostDeleteInput { - creator: PostCreatorDeleteFieldInput -} - -input PostDisconnectInput { - creator: PostCreatorDisconnectFieldInput -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostOnCreateInput { - content: String! - createdAt: DateTime! - id: ID! -} - -input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] -} - -input PostRelationInput { - creator: PostCreatorCreateFieldInput -} - -\\"\\"\\" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -\\"\\"\\" -input PostSort { - content: SortDirection - createdAt: SortDirection - id: SortDirection -} - -input PostUniqueWhere { - id: ID -} - -input PostUpdateInput { - content: String - createdAt: DateTime - creator: PostCreatorUpdateFieldInput - id: ID -} - -type PostUserCreatorAggregationSelection { - count: Int! - node: PostUserCreatorNodeAggregateSelection -} - -type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String!] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - creator: UserWhere - creatorAggregate: PostCreatorAggregateInput - creatorConnection: PostCreatorConnectionWhere - creatorConnection_NOT: PostCreatorConnectionWhere - creator_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - id: ID! - name: String! - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! -} - -type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input UserConnectInput { - posts: [UserPostsConnectFieldInput!] -} - -input UserConnectOrCreateInput { - posts: [UserPostsConnectOrCreateFieldInput!] -} - -input UserConnectOrCreateWhere { - node: UserUniqueWhere! -} - -input UserConnectWhere { - node: UserWhere! -} - -input UserCreateInput { - name: String! - posts: UserPostsFieldInput -} - -input UserDeleteInput { - posts: [UserPostsDeleteFieldInput!] -} - -input UserDisconnectInput { - posts: [UserPostsDisconnectFieldInput!] -} - -type UserEdge { - cursor: String! - node: User! -} - -input UserOnCreateInput { - name: String! -} - -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!] -} - -type UserPostPostsAggregationSelection { - count: Int! - node: UserPostPostsNodeAggregateSelection -} - -type UserPostPostsNodeAggregateSelection { - content: StringAggregateSelectionNonNullable! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! -} - -input UserPostsAggregateInput { - AND: [UserPostsAggregateInput!] - NOT: UserPostsAggregateInput - OR: [UserPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserPostsNodeAggregationWhereInput -} - -input UserPostsConnectFieldInput { - connect: [PostConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere -} - -input UserPostsConnectOrCreateFieldInput { - onCreate: UserPostsConnectOrCreateFieldInputOnCreate! - where: PostConnectOrCreateWhere! -} - -input UserPostsConnectOrCreateFieldInputOnCreate { - node: PostOnCreateInput! -} - -type UserPostsConnection { - edges: [UserPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserPostsConnectionSort { - node: PostSort -} - -input UserPostsConnectionWhere { - AND: [UserPostsConnectionWhere!] - NOT: UserPostsConnectionWhere - OR: [UserPostsConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input UserPostsCreateFieldInput { - node: PostCreateInput! -} - -input UserPostsDeleteFieldInput { - delete: PostDeleteInput - where: UserPostsConnectionWhere -} - -input UserPostsDisconnectFieldInput { - disconnect: PostDisconnectInput - where: UserPostsConnectionWhere -} - -input UserPostsFieldInput { - connect: [UserPostsConnectFieldInput!] - connectOrCreate: [UserPostsConnectOrCreateFieldInput!] - create: [UserPostsCreateFieldInput!] -} - -input UserPostsNodeAggregationWhereInput { - AND: [UserPostsNodeAggregationWhereInput!] - NOT: UserPostsNodeAggregationWhereInput - OR: [UserPostsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_MAX_EQUAL: DateTime - createdAt_MAX_GT: DateTime - createdAt_MAX_GTE: DateTime - createdAt_MAX_LT: DateTime - createdAt_MAX_LTE: DateTime - createdAt_MIN_EQUAL: DateTime - createdAt_MIN_GT: DateTime - createdAt_MIN_GTE: DateTime - createdAt_MIN_LT: DateTime - createdAt_MIN_LTE: DateTime - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type UserPostsRelationship { - cursor: String! - node: Post! -} - -input UserPostsUpdateConnectionInput { - node: PostUpdateInput -} - -input UserPostsUpdateFieldInput { - connect: [UserPostsConnectFieldInput!] - connectOrCreate: [UserPostsConnectOrCreateFieldInput!] - create: [UserPostsCreateFieldInput!] - delete: [UserPostsDeleteFieldInput!] - disconnect: [UserPostsDisconnectFieldInput!] - update: UserPostsUpdateConnectionInput - where: UserPostsConnectionWhere -} - -input UserRelationInput { - posts: [UserPostsCreateFieldInput!] -} - -\\"\\"\\" -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 { - id: SortDirection - name: SortDirection -} - -input UserUniqueWhere { - id: ID -} - -input UserUpdateInput { - name: String - posts: [UserPostsUpdateFieldInput!] -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: UserPostsAggregateInput - postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere - postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere - \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere - \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere - posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere - \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, connectOrCreate: PostConnectOrCreateInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, connectOrCreate: UserConnectOrCreateInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + content: String! + createdAt: DateTime! + creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection + creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCreatorConnectionSort!], where: PostCreatorConnectionWhere): PostCreatorConnection! + id: ID! + } + + type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + } + + input PostConnectInput { + creator: PostCreatorConnectFieldInput + } + + input PostConnectOrCreateInput { + creator: PostCreatorConnectOrCreateFieldInput + } + + input PostConnectOrCreateWhere { + node: PostUniqueWhere! + } + + input PostConnectWhere { + node: PostWhere! + } + + input PostCreateInput { + content: String! + createdAt: DateTime! + creator: PostCreatorFieldInput + id: ID! + } + + input PostCreatorAggregateInput { + AND: [PostCreatorAggregateInput!] + NOT: PostCreatorAggregateInput + OR: [PostCreatorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostCreatorNodeAggregationWhereInput + } + + input PostCreatorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + input PostCreatorConnectOrCreateFieldInput { + onCreate: PostCreatorConnectOrCreateFieldInputOnCreate! + where: UserConnectOrCreateWhere! + } + + input PostCreatorConnectOrCreateFieldInputOnCreate { + node: UserOnCreateInput! + } + + type PostCreatorConnection { + edges: [PostCreatorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostCreatorConnectionSort { + node: UserSort + } + + input PostCreatorConnectionWhere { + AND: [PostCreatorConnectionWhere!] + NOT: PostCreatorConnectionWhere + OR: [PostCreatorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PostCreatorCreateFieldInput { + node: UserCreateInput! + } + + input PostCreatorDeleteFieldInput { + delete: UserDeleteInput + where: PostCreatorConnectionWhere + } + + input PostCreatorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostCreatorConnectionWhere + } + + input PostCreatorFieldInput { + connect: PostCreatorConnectFieldInput + connectOrCreate: PostCreatorConnectOrCreateFieldInput + create: PostCreatorCreateFieldInput + } + + input PostCreatorNodeAggregationWhereInput { + AND: [PostCreatorNodeAggregationWhereInput!] + NOT: PostCreatorNodeAggregationWhereInput + OR: [PostCreatorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type PostCreatorRelationship { + cursor: String! + node: User! + } + + input PostCreatorUpdateConnectionInput { + node: UserUpdateInput + } + + input PostCreatorUpdateFieldInput { + connect: PostCreatorConnectFieldInput + connectOrCreate: PostCreatorConnectOrCreateFieldInput + create: PostCreatorCreateFieldInput + delete: PostCreatorDeleteFieldInput + disconnect: PostCreatorDisconnectFieldInput + update: PostCreatorUpdateConnectionInput + where: PostCreatorConnectionWhere + } + + input PostDeleteInput { + creator: PostCreatorDeleteFieldInput + } + + input PostDisconnectInput { + creator: PostCreatorDisconnectFieldInput + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostOnCreateInput { + content: String! + createdAt: DateTime! + id: ID! + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + input PostRelationInput { + creator: PostCreatorCreateFieldInput + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + content: SortDirection + createdAt: SortDirection + id: SortDirection + } + + input PostUniqueWhere { + id: ID + } + + input PostUpdateInput { + content: String + createdAt: DateTime + creator: PostCreatorUpdateFieldInput + id: ID + } + + type PostUserCreatorAggregationSelection { + count: Int! + node: PostUserCreatorNodeAggregateSelection + } + + type PostUserCreatorNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime!] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + creator: UserWhere + creatorAggregate: PostCreatorAggregateInput + creatorConnection: PostCreatorConnectionWhere + creatorConnection_NOT: PostCreatorConnectionWhere + creator_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + id: ID! + name: String! + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + } + + type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input UserConnectInput { + posts: [UserPostsConnectFieldInput!] + } + + input UserConnectOrCreateInput { + posts: [UserPostsConnectOrCreateFieldInput!] + } + + input UserConnectOrCreateWhere { + node: UserUniqueWhere! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + name: String! + posts: UserPostsFieldInput + } + + input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] + } + + input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] + } + + type UserEdge { + cursor: String! + node: User! + } + + input UserOnCreateInput { + name: String! + } + + 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!] + } + + type UserPostPostsAggregationSelection { + count: Int! + node: UserPostPostsNodeAggregateSelection + } + + type UserPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNonNullable! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + } + + input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput + } + + input UserPostsConnectFieldInput { + connect: [PostConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere + } + + input UserPostsConnectOrCreateFieldInput { + onCreate: UserPostsConnectOrCreateFieldInputOnCreate! + where: PostConnectOrCreateWhere! + } + + input UserPostsConnectOrCreateFieldInputOnCreate { + node: PostOnCreateInput! + } + + type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserPostsConnectionSort { + node: PostSort + } + + input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserPostsCreateFieldInput { + node: PostCreateInput! + } + + input UserPostsDeleteFieldInput { + delete: PostDeleteInput + where: UserPostsConnectionWhere + } + + input UserPostsDisconnectFieldInput { + disconnect: PostDisconnectInput + where: UserPostsConnectionWhere + } + + input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + connectOrCreate: [UserPostsConnectOrCreateFieldInput!] + create: [UserPostsCreateFieldInput!] + } + + input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_MAX_EQUAL: DateTime + createdAt_MAX_GT: DateTime + createdAt_MAX_GTE: DateTime + createdAt_MAX_LT: DateTime + createdAt_MAX_LTE: DateTime + createdAt_MIN_EQUAL: DateTime + createdAt_MIN_GT: DateTime + createdAt_MIN_GTE: DateTime + createdAt_MIN_LT: DateTime + createdAt_MIN_LTE: DateTime + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type UserPostsRelationship { + cursor: String! + node: Post! + } + + input UserPostsUpdateConnectionInput { + node: PostUpdateInput + } + + input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + connectOrCreate: [UserPostsConnectOrCreateFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere + } + + input UserRelationInput { + posts: [UserPostsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: SortDirection + name: SortDirection + } + + input UserUniqueWhere { + id: ID + } + + input UserUpdateInput { + name: String + posts: [UserPostsUpdateFieldInput!] + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index 5066fbd9ed..192aca0548 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -50,613 +50,613 @@ describe("Connect Or Create", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - screenTime: Int! -} - -input ActedInCreateInput { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] -} - -input ActorActedInConnectOrCreateInput { - Movie: [ActorActedInMovieConnectOrCreateFieldInput!] - Series: [ActorActedInSeriesConnectOrCreateFieldInput!] -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort -} - -input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere -} - -input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput -} - -input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] -} - -input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] -} - -input ActorActedInMovieConnectFieldInput { - edge: ActedInCreateInput! - where: MovieConnectWhere -} - -input ActorActedInMovieConnectOrCreateFieldInput { - onCreate: ActorActedInMovieConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! -} - -input ActorActedInMovieConnectOrCreateFieldInputOnCreate { - edge: ActedInCreateInput! - node: MovieOnCreateInput! -} - -input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInMovieCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! -} - -input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - connectOrCreate: [ActorActedInMovieConnectOrCreateFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] -} - -input ActorActedInMovieUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput -} - -input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - connectOrCreate: [ActorActedInMovieConnectOrCreateFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere -} - -type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - screenTime: Int! -} - -input ActorActedInSeriesConnectFieldInput { - edge: ActedInCreateInput! - where: SeriesConnectWhere -} - -input ActorActedInSeriesConnectOrCreateFieldInput { - onCreate: ActorActedInSeriesConnectOrCreateFieldInputOnCreate! - where: SeriesConnectOrCreateWhere! -} - -input ActorActedInSeriesConnectOrCreateFieldInputOnCreate { - edge: ActedInCreateInput! - node: SeriesOnCreateInput! -} - -input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInSeriesCreateFieldInput { - edge: ActedInCreateInput! - node: SeriesCreateInput! -} - -input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - connectOrCreate: [ActorActedInSeriesConnectOrCreateFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInSeriesUpdateConnectionInput { - edge: ActedInUpdateInput - node: SeriesUpdateInput -} - -input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - connectOrCreate: [ActorActedInSeriesConnectOrCreateFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: ActorActedInConnectInput -} - -input ActorConnectOrCreateInput { - actedIn: ActorActedInConnectOrCreateInput -} - -input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! -} - -input ActorDeleteInput { - actedIn: ActorActedInDeleteInput -} - -input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput -} - -\\"\\"\\" -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 { - actedIn: ActorActedInUpdateInput - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - isan: String! - title: String! -} - -type MovieAggregateSelection { - count: Int! - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - isan: String! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOnCreateInput { - isan: String! - title: String! -} - -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 { - isan: SortDirection - title: SortDirection -} - -input MovieUniqueWhere { - isan: String -} - -input MovieUpdateInput { - isan: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - isan: String - isan_CONTAINS: String - isan_ENDS_WITH: String - isan_IN: [String!] - isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Production = Movie | Series - -input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -type Series { - isan: String! - title: String! -} - -type SeriesAggregateSelection { - count: Int! - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input SeriesConnectOrCreateWhere { - node: SeriesUniqueWhere! -} - -input SeriesConnectWhere { - node: SeriesWhere! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - isan: String! - title: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOnCreateInput { - isan: String! - title: String! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - isan: SortDirection - title: SortDirection -} - -input SeriesUniqueWhere { - isan: String -} - -input SeriesUpdateInput { - isan: String - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - isan: String - isan_CONTAINS: String - isan_ENDS_WITH: String - isan_IN: [String!] - isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + screenTime: Int! + } + + input ActedInCreateInput { + screenTime: Int! + } + + input ActedInSort { + screenTime: SortDirection + } + + input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] + } + + input ActorActedInConnectOrCreateInput { + Movie: [ActorActedInMovieConnectOrCreateFieldInput!] + Series: [ActorActedInSeriesConnectOrCreateFieldInput!] + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + edge: ActedInSort + } + + input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere + } + + input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput + } + + input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] + } + + input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] + } + + input ActorActedInMovieConnectFieldInput { + edge: ActedInCreateInput! + where: MovieConnectWhere + } + + input ActorActedInMovieConnectOrCreateFieldInput { + onCreate: ActorActedInMovieConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! + } + + input ActorActedInMovieConnectOrCreateFieldInputOnCreate { + edge: ActedInCreateInput! + node: MovieOnCreateInput! + } + + input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInMovieCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! + } + + input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + connectOrCreate: [ActorActedInMovieConnectOrCreateFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + } + + input ActorActedInMovieUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput + } + + input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + connectOrCreate: [ActorActedInMovieConnectOrCreateFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere + } + + type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + screenTime: Int! + } + + input ActorActedInSeriesConnectFieldInput { + edge: ActedInCreateInput! + where: SeriesConnectWhere + } + + input ActorActedInSeriesConnectOrCreateFieldInput { + onCreate: ActorActedInSeriesConnectOrCreateFieldInputOnCreate! + where: SeriesConnectOrCreateWhere! + } + + input ActorActedInSeriesConnectOrCreateFieldInputOnCreate { + edge: ActedInCreateInput! + node: SeriesOnCreateInput! + } + + input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInSeriesCreateFieldInput { + edge: ActedInCreateInput! + node: SeriesCreateInput! + } + + input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + connectOrCreate: [ActorActedInSeriesConnectOrCreateFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInSeriesUpdateConnectionInput { + edge: ActedInUpdateInput + node: SeriesUpdateInput + } + + input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + connectOrCreate: [ActorActedInSeriesConnectOrCreateFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: ActorActedInConnectInput + } + + input ActorConnectOrCreateInput { + actedIn: ActorActedInConnectOrCreateInput + } + + input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! + } + + input ActorDeleteInput { + actedIn: ActorActedInDeleteInput + } + + input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput + } + + \\"\\"\\" + 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 { + actedIn: ActorActedInUpdateInput + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + isan: String! + title: String! + } + + type MovieAggregateSelection { + count: Int! + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + isan: String! + title: String! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOnCreateInput { + isan: String! + title: String! + } + + 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 { + isan: SortDirection + title: SortDirection + } + + input MovieUniqueWhere { + isan: String + } + + input MovieUpdateInput { + isan: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + isan: String + isan_CONTAINS: String + isan_ENDS_WITH: String + isan_IN: [String!] + isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Production = Movie | Series + + input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + type Series { + isan: String! + title: String! + } + + type SeriesAggregateSelection { + count: Int! + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input SeriesConnectOrCreateWhere { + node: SeriesUniqueWhere! + } + + input SeriesConnectWhere { + node: SeriesWhere! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + isan: String! + title: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOnCreateInput { + isan: String! + title: String! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + isan: SortDirection + title: SortDirection + } + + input SeriesUniqueWhere { + isan: String + } + + input SeriesUpdateInput { + isan: String + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + isan: String + isan_CONTAINS: String + isan_ENDS_WITH: String + isan_IN: [String!] + isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index 2039cb0528..9c006ce9f0 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -39,469 +39,469 @@ describe("Connect Or Create", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectOrCreateInput { - movies: [ActorMoviesConnectOrCreateFieldInput!] -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - name: String! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -input ActorMoviesConnectOrCreateFieldInput { - onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! -} - -input ActorMoviesConnectOrCreateFieldInputOnCreate { - node: MovieOnCreateInput! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input ActorMoviesDeleteFieldInput { - where: ActorMoviesConnectionWhere -} - -input ActorMoviesDisconnectFieldInput { - where: ActorMoviesConnectionWhere -} - -input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - create: [ActorMoviesCreateFieldInput!] -} - -input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - isan_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_LENGTH_EQUAL: Float - isan_AVERAGE_LENGTH_GT: Float - isan_AVERAGE_LENGTH_GTE: Float - isan_AVERAGE_LENGTH_LT: Float - isan_AVERAGE_LENGTH_LTE: Float - isan_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_LENGTH_EQUAL: Int - isan_LONGEST_LENGTH_GT: Int - isan_LONGEST_LENGTH_GTE: Int - isan_LONGEST_LENGTH_LT: Int - isan_LONGEST_LENGTH_LTE: Int - isan_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_LENGTH_EQUAL: Int - isan_SHORTEST_LENGTH_GT: Int - isan_SHORTEST_LENGTH_GTE: Int - isan_SHORTEST_LENGTH_LT: Int - isan_SHORTEST_LENGTH_LTE: Int - isan_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - isan: String! - title: String! -} - -type MovieAggregateSelection { - count: Int! - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - isan: String! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOnCreateInput { - isan: String! - title: String! -} - -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 { - isan: SortDirection - title: SortDirection -} - -input MovieUniqueWhere { - isan: String -} - -input MovieUpdateInput { - isan: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - isan: String - isan_CONTAINS: String - isan_ENDS_WITH: String - isan_IN: [String!] - isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + name: String! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! + } + + input ActorMoviesConnectOrCreateFieldInputOnCreate { + node: MovieOnCreateInput! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + where: ActorMoviesConnectionWhere + } + + input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + isan_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_LENGTH_EQUAL: Float + isan_AVERAGE_LENGTH_GT: Float + isan_AVERAGE_LENGTH_GTE: Float + isan_AVERAGE_LENGTH_LT: Float + isan_AVERAGE_LENGTH_LTE: Float + isan_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_LENGTH_EQUAL: Int + isan_LONGEST_LENGTH_GT: Int + isan_LONGEST_LENGTH_GTE: Int + isan_LONGEST_LENGTH_LT: Int + isan_LONGEST_LENGTH_LTE: Int + isan_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_LENGTH_EQUAL: Int + isan_SHORTEST_LENGTH_GT: Int + isan_SHORTEST_LENGTH_GTE: Int + isan_SHORTEST_LENGTH_LT: Int + isan_SHORTEST_LENGTH_LTE: Int + isan_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + isan: String! + title: String! + } + + type MovieAggregateSelection { + count: Int! + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + isan: String! + title: String! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOnCreateInput { + isan: String! + title: String! + } + + 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 { + isan: SortDirection + title: SortDirection + } + + input MovieUniqueWhere { + isan: String + } + + input MovieUpdateInput { + isan: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + isan: String + isan_CONTAINS: String + isan_ENDS_WITH: String + isan_IN: [String!] + isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Connect Or Create with relation properties", async () => { @@ -525,608 +525,608 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - characterName: String - screentime: Int! -} - -input ActedInCreateInput { - characterName: String - screentime: Int! -} - -input ActedInSort { - characterName: SortDirection - screentime: SortDirection -} - -input ActedInUpdateInput { - characterName: String - screentime: Int - screentime_DECREMENT: Int - screentime_INCREMENT: Int -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - characterName: String - characterName_CONTAINS: String - characterName_ENDS_WITH: String - characterName_IN: [String] - characterName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - characterName_STARTS_WITH: String - screentime: Int - screentime_GT: Int - screentime_GTE: Int - screentime_IN: [Int!] - screentime_LT: Int - screentime_LTE: Int - screentime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screentime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectOrCreateInput { - movies: [ActorMoviesConnectOrCreateFieldInput!] -} - -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 { - characterName: StringAggregateSelectionNullable! - screentime: IntAggregateSelectionNonNullable! -} - -type ActorMovieMoviesNodeAggregateSelection { - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorMoviesEdgeAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -input ActorMoviesConnectOrCreateFieldInput { - onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! -} - -input ActorMoviesConnectOrCreateFieldInputOnCreate { - edge: ActedInCreateInput! - node: MovieOnCreateInput! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - edge: ActedInSort - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! -} - -input ActorMoviesDeleteFieldInput { - where: ActorMoviesConnectionWhere -} - -input ActorMoviesDisconnectFieldInput { - where: ActorMoviesConnectionWhere -} - -input ActorMoviesEdgeAggregationWhereInput { - AND: [ActorMoviesEdgeAggregationWhereInput!] - NOT: ActorMoviesEdgeAggregationWhereInput - OR: [ActorMoviesEdgeAggregationWhereInput!] - characterName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_AVERAGE_LENGTH_EQUAL: Float - characterName_AVERAGE_LENGTH_GT: Float - characterName_AVERAGE_LENGTH_GTE: Float - characterName_AVERAGE_LENGTH_LT: Float - characterName_AVERAGE_LENGTH_LTE: Float - characterName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LONGEST_LENGTH_EQUAL: Int - characterName_LONGEST_LENGTH_GT: Int - characterName_LONGEST_LENGTH_GTE: Int - characterName_LONGEST_LENGTH_LT: Int - characterName_LONGEST_LENGTH_LTE: Int - characterName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - characterName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_SHORTEST_LENGTH_EQUAL: Int - characterName_SHORTEST_LENGTH_GT: Int - characterName_SHORTEST_LENGTH_GTE: Int - characterName_SHORTEST_LENGTH_LT: Int - characterName_SHORTEST_LENGTH_LTE: Int - characterName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - characterName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screentime_AVERAGE_EQUAL: Float - screentime_AVERAGE_GT: Float - screentime_AVERAGE_GTE: Float - screentime_AVERAGE_LT: Float - screentime_AVERAGE_LTE: Float - screentime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screentime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screentime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screentime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screentime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - create: [ActorMoviesCreateFieldInput!] -} - -input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - isan_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_LENGTH_EQUAL: Float - isan_AVERAGE_LENGTH_GT: Float - isan_AVERAGE_LENGTH_GTE: Float - isan_AVERAGE_LENGTH_LT: Float - isan_AVERAGE_LENGTH_LTE: Float - isan_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_LENGTH_EQUAL: Int - isan_LONGEST_LENGTH_GT: Int - isan_LONGEST_LENGTH_GTE: Int - isan_LONGEST_LENGTH_LT: Int - isan_LONGEST_LENGTH_LTE: Int - isan_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isan_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_LENGTH_EQUAL: Int - isan_SHORTEST_LENGTH_GT: Int - isan_SHORTEST_LENGTH_GTE: Int - isan_SHORTEST_LENGTH_LT: Int - isan_SHORTEST_LENGTH_LTE: Int - isan_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isan_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship implements ActedIn { - characterName: String - cursor: String! - node: Movie! - screentime: Int! -} - -input ActorMoviesUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput -} - -input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie { - isan: String! - title: String! -} - -type MovieAggregateSelection { - count: Int! - isan: StringAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - isan: String! - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOnCreateInput { - isan: String! - title: String! -} - -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 { - isan: SortDirection - title: SortDirection -} - -input MovieUniqueWhere { - isan: String -} - -input MovieUpdateInput { - isan: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - isan: String - isan_CONTAINS: String - isan_ENDS_WITH: String - isan_IN: [String!] - isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isan_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + characterName: String + screentime: Int! + } + + input ActedInCreateInput { + characterName: String + screentime: Int! + } + + input ActedInSort { + characterName: SortDirection + screentime: SortDirection + } + + input ActedInUpdateInput { + characterName: String + screentime: Int + screentime_DECREMENT: Int + screentime_INCREMENT: Int + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + characterName: String + characterName_CONTAINS: String + characterName_ENDS_WITH: String + characterName_IN: [String] + characterName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + characterName_STARTS_WITH: String + screentime: Int + screentime_GT: Int + screentime_GTE: Int + screentime_IN: [Int!] + screentime_LT: Int + screentime_LTE: Int + screentime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screentime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] + } + + 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 { + characterName: StringAggregateSelectionNullable! + screentime: IntAggregateSelectionNonNullable! + } + + type ActorMovieMoviesNodeAggregateSelection { + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! + } + + input ActorMoviesConnectOrCreateFieldInputOnCreate { + edge: ActedInCreateInput! + node: MovieOnCreateInput! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + edge: ActedInSort + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + where: ActorMoviesConnectionWhere + } + + input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + characterName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_AVERAGE_LENGTH_EQUAL: Float + characterName_AVERAGE_LENGTH_GT: Float + characterName_AVERAGE_LENGTH_GTE: Float + characterName_AVERAGE_LENGTH_LT: Float + characterName_AVERAGE_LENGTH_LTE: Float + characterName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LONGEST_LENGTH_EQUAL: Int + characterName_LONGEST_LENGTH_GT: Int + characterName_LONGEST_LENGTH_GTE: Int + characterName_LONGEST_LENGTH_LT: Int + characterName_LONGEST_LENGTH_LTE: Int + characterName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + characterName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_SHORTEST_LENGTH_EQUAL: Int + characterName_SHORTEST_LENGTH_GT: Int + characterName_SHORTEST_LENGTH_GTE: Int + characterName_SHORTEST_LENGTH_LT: Int + characterName_SHORTEST_LENGTH_LTE: Int + characterName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + characterName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screentime_AVERAGE_EQUAL: Float + screentime_AVERAGE_GT: Float + screentime_AVERAGE_GTE: Float + screentime_AVERAGE_LT: Float + screentime_AVERAGE_LTE: Float + screentime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screentime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screentime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screentime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screentime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + isan_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_LENGTH_EQUAL: Float + isan_AVERAGE_LENGTH_GT: Float + isan_AVERAGE_LENGTH_GTE: Float + isan_AVERAGE_LENGTH_LT: Float + isan_AVERAGE_LENGTH_LTE: Float + isan_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_LENGTH_EQUAL: Int + isan_LONGEST_LENGTH_GT: Int + isan_LONGEST_LENGTH_GTE: Int + isan_LONGEST_LENGTH_LT: Int + isan_LONGEST_LENGTH_LTE: Int + isan_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isan_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_LENGTH_EQUAL: Int + isan_SHORTEST_LENGTH_GT: Int + isan_SHORTEST_LENGTH_GTE: Int + isan_SHORTEST_LENGTH_LT: Int + isan_SHORTEST_LENGTH_LTE: Int + isan_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isan_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship implements ActedIn { + characterName: String + cursor: String! + node: Movie! + screentime: Int! + } + + input ActorMoviesUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput + } + + input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie { + isan: String! + title: String! + } + + type MovieAggregateSelection { + count: Int! + isan: StringAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + isan: String! + title: String! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOnCreateInput { + isan: String! + title: String! + } + + 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 { + isan: SortDirection + title: SortDirection + } + + input MovieUniqueWhere { + isan: String + } + + input MovieUpdateInput { + isan: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + isan: String + isan_CONTAINS: String + isan_ENDS_WITH: String + isan_IN: [String!] + isan_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isan_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index b7384e2525..187fd80fa5 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -48,617 +48,617 @@ describe("Enums", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - roleType: RoleType! -} - -input ActedInCreateInput { - roleType: RoleType! -} - -input ActedInSort { - roleType: SortDirection -} - -input ActedInUpdateInput { - roleType: RoleType -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - roleType: RoleType - roleType_IN: [RoleType!] - roleType_NOT: RoleType @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - roleType_NOT_IN: [RoleType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -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! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship implements ActedIn { - cursor: String! - node: Movie! - roleType: RoleType! -} - -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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - roleType: RoleType! -} - -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: StringAggregateSelectionNonNullable! -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -enum RoleType { - LEADING - SUPPORTING -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + roleType: RoleType! + } + + input ActedInCreateInput { + roleType: RoleType! + } + + input ActedInSort { + roleType: SortDirection + } + + input ActedInUpdateInput { + roleType: RoleType + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + roleType: RoleType + roleType_IN: [RoleType!] + roleType_NOT: RoleType @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + roleType_NOT_IN: [RoleType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + 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! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship implements ActedIn { + cursor: String! + node: Movie! + roleType: RoleType! + } + + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + roleType: RoleType! + } + + 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: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + enum RoleType { + LEADING + SUPPORTING + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 932225e449..fa3ee1f93f 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -38,496 +38,496 @@ describe("Sort", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateNode1sMutationResponse { - info: CreateInfo! - node1s: [Node1!]! -} - -type CreateNode2sMutationResponse { - info: CreateInfo! - node2s: [Node2!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createNode1s(input: [Node1CreateInput!]!): CreateNode1sMutationResponse! - createNode2s(input: [Node2CreateInput!]!): CreateNode2sMutationResponse! - deleteNode1s(delete: Node1DeleteInput, where: Node1Where): DeleteInfo! - deleteNode2s(delete: Node2DeleteInput, where: Node2Where): DeleteInfo! - updateNode1s(connect: Node1ConnectInput, create: Node1RelationInput, delete: Node1DeleteInput, disconnect: Node1DisconnectInput, update: Node1UpdateInput, where: Node1Where): UpdateNode1sMutationResponse! - updateNode2s(connect: Node2ConnectInput, create: Node2RelationInput, delete: Node2DeleteInput, disconnect: Node2DisconnectInput, update: Node2UpdateInput, where: Node2Where): UpdateNode2sMutationResponse! -} - -type Node1 { - property: String! - relatedTo(directed: Boolean = true, options: Node2Options, where: Node2Where): [Node2!]! - relatedToAggregate(directed: Boolean = true, where: Node2Where): Node1Node2RelatedToAggregationSelection - relatedToConnection(after: String, directed: Boolean = true, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! -} - -type Node1AggregateSelection { - count: Int! - property: StringAggregateSelectionNonNullable! -} - -input Node1ConnectInput { - relatedTo: [Node1RelatedToConnectFieldInput!] -} - -input Node1ConnectWhere { - node: Node1Where! -} - -input Node1CreateInput { - property: String! - relatedTo: Node1RelatedToFieldInput -} - -input Node1DeleteInput { - relatedTo: [Node1RelatedToDeleteFieldInput!] -} - -input Node1DisconnectInput { - relatedTo: [Node1RelatedToDisconnectFieldInput!] -} - -type Node1Edge { - cursor: String! - node: Node1! -} - -type Node1Node2RelatedToAggregationSelection { - count: Int! -} - -input Node1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Node1Sort objects to sort Node1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Node1Sort!] -} - -input Node1RelatedToAggregateInput { - AND: [Node1RelatedToAggregateInput!] - NOT: Node1RelatedToAggregateInput - OR: [Node1RelatedToAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int -} - -input Node1RelatedToConnectFieldInput { - connect: [Node2ConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: Node2ConnectWhere -} - -type Node1RelatedToConnection { - edges: [Node1RelatedToRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input Node1RelatedToConnectionWhere { - AND: [Node1RelatedToConnectionWhere!] - NOT: Node1RelatedToConnectionWhere - OR: [Node1RelatedToConnectionWhere!] - node: Node2Where - node_NOT: Node2Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input Node1RelatedToCreateFieldInput { - node: Node2CreateInput! -} - -input Node1RelatedToDeleteFieldInput { - delete: Node2DeleteInput - where: Node1RelatedToConnectionWhere -} - -input Node1RelatedToDisconnectFieldInput { - disconnect: Node2DisconnectInput - where: Node1RelatedToConnectionWhere -} - -input Node1RelatedToFieldInput { - connect: [Node1RelatedToConnectFieldInput!] - create: [Node1RelatedToCreateFieldInput!] -} - -type Node1RelatedToRelationship { - cursor: String! - node: Node2! -} - -input Node1RelatedToUpdateConnectionInput { - node: Node2UpdateInput -} - -input Node1RelatedToUpdateFieldInput { - connect: [Node1RelatedToConnectFieldInput!] - create: [Node1RelatedToCreateFieldInput!] - delete: [Node1RelatedToDeleteFieldInput!] - disconnect: [Node1RelatedToDisconnectFieldInput!] - update: Node1RelatedToUpdateConnectionInput - where: Node1RelatedToConnectionWhere -} - -input Node1RelationInput { - relatedTo: [Node1RelatedToCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Node1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Node1Sort object. -\\"\\"\\" -input Node1Sort { - property: SortDirection -} - -input Node1UpdateInput { - property: String - relatedTo: [Node1RelatedToUpdateFieldInput!] -} - -input Node1Where { - AND: [Node1Where!] - NOT: Node1Where - OR: [Node1Where!] - property: String - property_CONTAINS: String - property_ENDS_WITH: String - property_IN: [String!] - property_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - property_STARTS_WITH: String - relatedTo: Node2Where @deprecated(reason: \\"Use \`relatedTo_SOME\` instead.\\") - relatedToAggregate: Node1RelatedToAggregateInput - relatedToConnection: Node1RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_SOME\` instead.\\") - \\"\\"\\" - Return Node1s where all of the related Node1RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_ALL: Node1RelatedToConnectionWhere - \\"\\"\\" - Return Node1s where none of the related Node1RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_NONE: Node1RelatedToConnectionWhere - relatedToConnection_NOT: Node1RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_NONE\` instead.\\") - \\"\\"\\" - Return Node1s where one of the related Node1RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_SINGLE: Node1RelatedToConnectionWhere - \\"\\"\\" - Return Node1s where some of the related Node1RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_SOME: Node1RelatedToConnectionWhere - \\"\\"\\"Return Node1s where all of the related Node2s match this filter\\"\\"\\" - relatedTo_ALL: Node2Where - \\"\\"\\"Return Node1s where none of the related Node2s match this filter\\"\\"\\" - relatedTo_NONE: Node2Where - relatedTo_NOT: Node2Where @deprecated(reason: \\"Use \`relatedTo_NONE\` instead.\\") - \\"\\"\\"Return Node1s where one of the related Node2s match this filter\\"\\"\\" - relatedTo_SINGLE: Node2Where - \\"\\"\\"Return Node1s where some of the related Node2s match this filter\\"\\"\\" - relatedTo_SOME: Node2Where -} - -type Node1sConnection { - edges: [Node1Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Node2 { - relatedTo(directed: Boolean = true, options: Node1Options, where: Node1Where): [Node1!]! - relatedToAggregate(directed: Boolean = true, where: Node1Where): Node2Node1RelatedToAggregationSelection - relatedToConnection(after: String, directed: Boolean = true, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! -} - -type Node2AggregateSelection { - count: Int! -} - -input Node2ConnectInput { - relatedTo: [Node2RelatedToConnectFieldInput!] -} - -input Node2ConnectWhere { - node: Node2Where! -} - -input Node2CreateInput { - relatedTo: Node2RelatedToFieldInput -} - -input Node2DeleteInput { - relatedTo: [Node2RelatedToDeleteFieldInput!] -} - -input Node2DisconnectInput { - relatedTo: [Node2RelatedToDisconnectFieldInput!] -} - -type Node2Edge { - cursor: String! - node: Node2! -} - -type Node2Node1RelatedToAggregationSelection { - count: Int! - node: Node2Node1RelatedToNodeAggregateSelection -} - -type Node2Node1RelatedToNodeAggregateSelection { - property: StringAggregateSelectionNonNullable! -} - -input Node2Options { - limit: Int - offset: Int -} - -input Node2RelatedToAggregateInput { - AND: [Node2RelatedToAggregateInput!] - NOT: Node2RelatedToAggregateInput - OR: [Node2RelatedToAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: Node2RelatedToNodeAggregationWhereInput -} - -input Node2RelatedToConnectFieldInput { - connect: [Node1ConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: Node1ConnectWhere -} - -type Node2RelatedToConnection { - edges: [Node2RelatedToRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input Node2RelatedToConnectionSort { - node: Node1Sort -} - -input Node2RelatedToConnectionWhere { - AND: [Node2RelatedToConnectionWhere!] - NOT: Node2RelatedToConnectionWhere - OR: [Node2RelatedToConnectionWhere!] - node: Node1Where - node_NOT: Node1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input Node2RelatedToCreateFieldInput { - node: Node1CreateInput! -} - -input Node2RelatedToDeleteFieldInput { - delete: Node1DeleteInput - where: Node2RelatedToConnectionWhere -} - -input Node2RelatedToDisconnectFieldInput { - disconnect: Node1DisconnectInput - where: Node2RelatedToConnectionWhere -} - -input Node2RelatedToFieldInput { - connect: [Node2RelatedToConnectFieldInput!] - create: [Node2RelatedToCreateFieldInput!] -} - -input Node2RelatedToNodeAggregationWhereInput { - AND: [Node2RelatedToNodeAggregationWhereInput!] - NOT: Node2RelatedToNodeAggregationWhereInput - OR: [Node2RelatedToNodeAggregationWhereInput!] - property_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_AVERAGE_LENGTH_EQUAL: Float - property_AVERAGE_LENGTH_GT: Float - property_AVERAGE_LENGTH_GTE: Float - property_AVERAGE_LENGTH_LT: Float - property_AVERAGE_LENGTH_LTE: Float - property_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LONGEST_LENGTH_EQUAL: Int - property_LONGEST_LENGTH_GT: Int - property_LONGEST_LENGTH_GTE: Int - property_LONGEST_LENGTH_LT: Int - property_LONGEST_LENGTH_LTE: Int - property_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - property_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_SHORTEST_LENGTH_EQUAL: Int - property_SHORTEST_LENGTH_GT: Int - property_SHORTEST_LENGTH_GTE: Int - property_SHORTEST_LENGTH_LT: Int - property_SHORTEST_LENGTH_LTE: Int - property_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - property_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type Node2RelatedToRelationship { - cursor: String! - node: Node1! -} - -input Node2RelatedToUpdateConnectionInput { - node: Node1UpdateInput -} - -input Node2RelatedToUpdateFieldInput { - connect: [Node2RelatedToConnectFieldInput!] - create: [Node2RelatedToCreateFieldInput!] - delete: [Node2RelatedToDeleteFieldInput!] - disconnect: [Node2RelatedToDisconnectFieldInput!] - update: Node2RelatedToUpdateConnectionInput - where: Node2RelatedToConnectionWhere -} - -input Node2RelationInput { - relatedTo: [Node2RelatedToCreateFieldInput!] -} - -input Node2UpdateInput { - relatedTo: [Node2RelatedToUpdateFieldInput!] -} - -input Node2Where { - AND: [Node2Where!] - NOT: Node2Where - OR: [Node2Where!] - relatedTo: Node1Where @deprecated(reason: \\"Use \`relatedTo_SOME\` instead.\\") - relatedToAggregate: Node2RelatedToAggregateInput - relatedToConnection: Node2RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_SOME\` instead.\\") - \\"\\"\\" - Return Node2s where all of the related Node2RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_ALL: Node2RelatedToConnectionWhere - \\"\\"\\" - Return Node2s where none of the related Node2RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_NONE: Node2RelatedToConnectionWhere - relatedToConnection_NOT: Node2RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_NONE\` instead.\\") - \\"\\"\\" - Return Node2s where one of the related Node2RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_SINGLE: Node2RelatedToConnectionWhere - \\"\\"\\" - Return Node2s where some of the related Node2RelatedToConnections match this filter - \\"\\"\\" - relatedToConnection_SOME: Node2RelatedToConnectionWhere - \\"\\"\\"Return Node2s where all of the related Node1s match this filter\\"\\"\\" - relatedTo_ALL: Node1Where - \\"\\"\\"Return Node2s where none of the related Node1s match this filter\\"\\"\\" - relatedTo_NONE: Node1Where - relatedTo_NOT: Node1Where @deprecated(reason: \\"Use \`relatedTo_NONE\` instead.\\") - \\"\\"\\"Return Node2s where one of the related Node1s match this filter\\"\\"\\" - relatedTo_SINGLE: Node1Where - \\"\\"\\"Return Node2s where some of the related Node1s match this filter\\"\\"\\" - relatedTo_SOME: Node1Where -} - -type Node2sConnection { - edges: [Node2Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - node1s(options: Node1Options, where: Node1Where): [Node1!]! - node1sAggregate(where: Node1Where): Node1AggregateSelection! - node1sConnection(after: String, first: Int, sort: [Node1Sort], where: Node1Where): Node1sConnection! - node2s(options: Node2Options, where: Node2Where): [Node2!]! - node2sAggregate(where: Node2Where): Node2AggregateSelection! - node2sConnection(after: String, first: Int, where: Node2Where): Node2sConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateNode1sMutationResponse { - info: UpdateInfo! - node1s: [Node1!]! -} - -type UpdateNode2sMutationResponse { - info: UpdateInfo! - node2s: [Node2!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateNode1sMutationResponse { + info: CreateInfo! + node1s: [Node1!]! + } + + type CreateNode2sMutationResponse { + info: CreateInfo! + node2s: [Node2!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createNode1s(input: [Node1CreateInput!]!): CreateNode1sMutationResponse! + createNode2s(input: [Node2CreateInput!]!): CreateNode2sMutationResponse! + deleteNode1s(delete: Node1DeleteInput, where: Node1Where): DeleteInfo! + deleteNode2s(delete: Node2DeleteInput, where: Node2Where): DeleteInfo! + updateNode1s(connect: Node1ConnectInput, create: Node1RelationInput, delete: Node1DeleteInput, disconnect: Node1DisconnectInput, update: Node1UpdateInput, where: Node1Where): UpdateNode1sMutationResponse! + updateNode2s(connect: Node2ConnectInput, create: Node2RelationInput, delete: Node2DeleteInput, disconnect: Node2DisconnectInput, update: Node2UpdateInput, where: Node2Where): UpdateNode2sMutationResponse! + } + + type Node1 { + property: String! + relatedTo(directed: Boolean = true, options: Node2Options, where: Node2Where): [Node2!]! + relatedToAggregate(directed: Boolean = true, where: Node2Where): Node1Node2RelatedToAggregationSelection + relatedToConnection(after: String, directed: Boolean = true, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! + } + + type Node1AggregateSelection { + count: Int! + property: StringAggregateSelectionNonNullable! + } + + input Node1ConnectInput { + relatedTo: [Node1RelatedToConnectFieldInput!] + } + + input Node1ConnectWhere { + node: Node1Where! + } + + input Node1CreateInput { + property: String! + relatedTo: Node1RelatedToFieldInput + } + + input Node1DeleteInput { + relatedTo: [Node1RelatedToDeleteFieldInput!] + } + + input Node1DisconnectInput { + relatedTo: [Node1RelatedToDisconnectFieldInput!] + } + + type Node1Edge { + cursor: String! + node: Node1! + } + + type Node1Node2RelatedToAggregationSelection { + count: Int! + } + + input Node1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Node1Sort objects to sort Node1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Node1Sort!] + } + + input Node1RelatedToAggregateInput { + AND: [Node1RelatedToAggregateInput!] + NOT: Node1RelatedToAggregateInput + OR: [Node1RelatedToAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + } + + input Node1RelatedToConnectFieldInput { + connect: [Node2ConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: Node2ConnectWhere + } + + type Node1RelatedToConnection { + edges: [Node1RelatedToRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input Node1RelatedToConnectionWhere { + AND: [Node1RelatedToConnectionWhere!] + NOT: Node1RelatedToConnectionWhere + OR: [Node1RelatedToConnectionWhere!] + node: Node2Where + node_NOT: Node2Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input Node1RelatedToCreateFieldInput { + node: Node2CreateInput! + } + + input Node1RelatedToDeleteFieldInput { + delete: Node2DeleteInput + where: Node1RelatedToConnectionWhere + } + + input Node1RelatedToDisconnectFieldInput { + disconnect: Node2DisconnectInput + where: Node1RelatedToConnectionWhere + } + + input Node1RelatedToFieldInput { + connect: [Node1RelatedToConnectFieldInput!] + create: [Node1RelatedToCreateFieldInput!] + } + + type Node1RelatedToRelationship { + cursor: String! + node: Node2! + } + + input Node1RelatedToUpdateConnectionInput { + node: Node2UpdateInput + } + + input Node1RelatedToUpdateFieldInput { + connect: [Node1RelatedToConnectFieldInput!] + create: [Node1RelatedToCreateFieldInput!] + delete: [Node1RelatedToDeleteFieldInput!] + disconnect: [Node1RelatedToDisconnectFieldInput!] + update: Node1RelatedToUpdateConnectionInput + where: Node1RelatedToConnectionWhere + } + + input Node1RelationInput { + relatedTo: [Node1RelatedToCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Node1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Node1Sort object. + \\"\\"\\" + input Node1Sort { + property: SortDirection + } + + input Node1UpdateInput { + property: String + relatedTo: [Node1RelatedToUpdateFieldInput!] + } + + input Node1Where { + AND: [Node1Where!] + NOT: Node1Where + OR: [Node1Where!] + property: String + property_CONTAINS: String + property_ENDS_WITH: String + property_IN: [String!] + property_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + property_STARTS_WITH: String + relatedTo: Node2Where @deprecated(reason: \\"Use \`relatedTo_SOME\` instead.\\") + relatedToAggregate: Node1RelatedToAggregateInput + relatedToConnection: Node1RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_SOME\` instead.\\") + \\"\\"\\" + Return Node1s where all of the related Node1RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_ALL: Node1RelatedToConnectionWhere + \\"\\"\\" + Return Node1s where none of the related Node1RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_NONE: Node1RelatedToConnectionWhere + relatedToConnection_NOT: Node1RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_NONE\` instead.\\") + \\"\\"\\" + Return Node1s where one of the related Node1RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_SINGLE: Node1RelatedToConnectionWhere + \\"\\"\\" + Return Node1s where some of the related Node1RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_SOME: Node1RelatedToConnectionWhere + \\"\\"\\"Return Node1s where all of the related Node2s match this filter\\"\\"\\" + relatedTo_ALL: Node2Where + \\"\\"\\"Return Node1s where none of the related Node2s match this filter\\"\\"\\" + relatedTo_NONE: Node2Where + relatedTo_NOT: Node2Where @deprecated(reason: \\"Use \`relatedTo_NONE\` instead.\\") + \\"\\"\\"Return Node1s where one of the related Node2s match this filter\\"\\"\\" + relatedTo_SINGLE: Node2Where + \\"\\"\\"Return Node1s where some of the related Node2s match this filter\\"\\"\\" + relatedTo_SOME: Node2Where + } + + type Node1sConnection { + edges: [Node1Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Node2 { + relatedTo(directed: Boolean = true, options: Node1Options, where: Node1Where): [Node1!]! + relatedToAggregate(directed: Boolean = true, where: Node1Where): Node2Node1RelatedToAggregationSelection + relatedToConnection(after: String, directed: Boolean = true, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! + } + + type Node2AggregateSelection { + count: Int! + } + + input Node2ConnectInput { + relatedTo: [Node2RelatedToConnectFieldInput!] + } + + input Node2ConnectWhere { + node: Node2Where! + } + + input Node2CreateInput { + relatedTo: Node2RelatedToFieldInput + } + + input Node2DeleteInput { + relatedTo: [Node2RelatedToDeleteFieldInput!] + } + + input Node2DisconnectInput { + relatedTo: [Node2RelatedToDisconnectFieldInput!] + } + + type Node2Edge { + cursor: String! + node: Node2! + } + + type Node2Node1RelatedToAggregationSelection { + count: Int! + node: Node2Node1RelatedToNodeAggregateSelection + } + + type Node2Node1RelatedToNodeAggregateSelection { + property: StringAggregateSelectionNonNullable! + } + + input Node2Options { + limit: Int + offset: Int + } + + input Node2RelatedToAggregateInput { + AND: [Node2RelatedToAggregateInput!] + NOT: Node2RelatedToAggregateInput + OR: [Node2RelatedToAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: Node2RelatedToNodeAggregationWhereInput + } + + input Node2RelatedToConnectFieldInput { + connect: [Node1ConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: Node1ConnectWhere + } + + type Node2RelatedToConnection { + edges: [Node2RelatedToRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input Node2RelatedToConnectionSort { + node: Node1Sort + } + + input Node2RelatedToConnectionWhere { + AND: [Node2RelatedToConnectionWhere!] + NOT: Node2RelatedToConnectionWhere + OR: [Node2RelatedToConnectionWhere!] + node: Node1Where + node_NOT: Node1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input Node2RelatedToCreateFieldInput { + node: Node1CreateInput! + } + + input Node2RelatedToDeleteFieldInput { + delete: Node1DeleteInput + where: Node2RelatedToConnectionWhere + } + + input Node2RelatedToDisconnectFieldInput { + disconnect: Node1DisconnectInput + where: Node2RelatedToConnectionWhere + } + + input Node2RelatedToFieldInput { + connect: [Node2RelatedToConnectFieldInput!] + create: [Node2RelatedToCreateFieldInput!] + } + + input Node2RelatedToNodeAggregationWhereInput { + AND: [Node2RelatedToNodeAggregationWhereInput!] + NOT: Node2RelatedToNodeAggregationWhereInput + OR: [Node2RelatedToNodeAggregationWhereInput!] + property_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_AVERAGE_LENGTH_EQUAL: Float + property_AVERAGE_LENGTH_GT: Float + property_AVERAGE_LENGTH_GTE: Float + property_AVERAGE_LENGTH_LT: Float + property_AVERAGE_LENGTH_LTE: Float + property_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LONGEST_LENGTH_EQUAL: Int + property_LONGEST_LENGTH_GT: Int + property_LONGEST_LENGTH_GTE: Int + property_LONGEST_LENGTH_LT: Int + property_LONGEST_LENGTH_LTE: Int + property_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + property_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_SHORTEST_LENGTH_EQUAL: Int + property_SHORTEST_LENGTH_GT: Int + property_SHORTEST_LENGTH_GTE: Int + property_SHORTEST_LENGTH_LT: Int + property_SHORTEST_LENGTH_LTE: Int + property_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + property_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type Node2RelatedToRelationship { + cursor: String! + node: Node1! + } + + input Node2RelatedToUpdateConnectionInput { + node: Node1UpdateInput + } + + input Node2RelatedToUpdateFieldInput { + connect: [Node2RelatedToConnectFieldInput!] + create: [Node2RelatedToCreateFieldInput!] + delete: [Node2RelatedToDeleteFieldInput!] + disconnect: [Node2RelatedToDisconnectFieldInput!] + update: Node2RelatedToUpdateConnectionInput + where: Node2RelatedToConnectionWhere + } + + input Node2RelationInput { + relatedTo: [Node2RelatedToCreateFieldInput!] + } + + input Node2UpdateInput { + relatedTo: [Node2RelatedToUpdateFieldInput!] + } + + input Node2Where { + AND: [Node2Where!] + NOT: Node2Where + OR: [Node2Where!] + relatedTo: Node1Where @deprecated(reason: \\"Use \`relatedTo_SOME\` instead.\\") + relatedToAggregate: Node2RelatedToAggregateInput + relatedToConnection: Node2RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_SOME\` instead.\\") + \\"\\"\\" + Return Node2s where all of the related Node2RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_ALL: Node2RelatedToConnectionWhere + \\"\\"\\" + Return Node2s where none of the related Node2RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_NONE: Node2RelatedToConnectionWhere + relatedToConnection_NOT: Node2RelatedToConnectionWhere @deprecated(reason: \\"Use \`relatedToConnection_NONE\` instead.\\") + \\"\\"\\" + Return Node2s where one of the related Node2RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_SINGLE: Node2RelatedToConnectionWhere + \\"\\"\\" + Return Node2s where some of the related Node2RelatedToConnections match this filter + \\"\\"\\" + relatedToConnection_SOME: Node2RelatedToConnectionWhere + \\"\\"\\"Return Node2s where all of the related Node1s match this filter\\"\\"\\" + relatedTo_ALL: Node1Where + \\"\\"\\"Return Node2s where none of the related Node1s match this filter\\"\\"\\" + relatedTo_NONE: Node1Where + relatedTo_NOT: Node1Where @deprecated(reason: \\"Use \`relatedTo_NONE\` instead.\\") + \\"\\"\\"Return Node2s where one of the related Node1s match this filter\\"\\"\\" + relatedTo_SINGLE: Node1Where + \\"\\"\\"Return Node2s where some of the related Node1s match this filter\\"\\"\\" + relatedTo_SOME: Node1Where + } + + type Node2sConnection { + edges: [Node2Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + node1s(options: Node1Options, where: Node1Where): [Node1!]! + node1sAggregate(where: Node1Where): Node1AggregateSelection! + node1sConnection(after: String, first: Int, sort: [Node1Sort], where: Node1Where): Node1sConnection! + node2s(options: Node2Options, where: Node2Where): [Node2!]! + node2sAggregate(where: Node2Where): Node2AggregateSelection! + node2sConnection(after: String, first: Int, where: Node2Where): Node2sConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateNode1sMutationResponse { + info: UpdateInfo! + node1s: [Node1!]! + } + + type UpdateNode2sMutationResponse { + info: UpdateInfo! + node2s: [Node2!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 70a8d058c6..848df6c84f 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -50,981 +50,981 @@ describe("Unions", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Author { - name: String! - publications(directed: Boolean = true, options: QueryOptions, where: PublicationWhere): [Publication!]! - publicationsConnection(after: String, directed: Boolean = true, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! -} - -type AuthorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input AuthorConnectInput { - publications: AuthorPublicationsConnectInput -} - -input AuthorConnectWhere { - node: AuthorWhere! -} - -input AuthorCreateInput { - name: String! - publications: AuthorPublicationsCreateInput -} - -input AuthorDeleteInput { - publications: AuthorPublicationsDeleteInput -} - -input AuthorDisconnectInput { - publications: AuthorPublicationsDisconnectInput -} - -type AuthorEdge { - cursor: String! - node: Author! -} - -input AuthorOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AuthorSort objects to sort Authors by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AuthorSort!] -} - -input AuthorPublicationsBookConnectFieldInput { - connect: [BookConnectInput!] - edge: WroteCreateInput! - where: BookConnectWhere -} - -input AuthorPublicationsBookConnectionWhere { - AND: [AuthorPublicationsBookConnectionWhere!] - NOT: AuthorPublicationsBookConnectionWhere - OR: [AuthorPublicationsBookConnectionWhere!] - edge: WroteWhere - edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: BookWhere - node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input AuthorPublicationsBookCreateFieldInput { - edge: WroteCreateInput! - node: BookCreateInput! -} - -input AuthorPublicationsBookDeleteFieldInput { - delete: BookDeleteInput - where: AuthorPublicationsBookConnectionWhere -} - -input AuthorPublicationsBookDisconnectFieldInput { - disconnect: BookDisconnectInput - where: AuthorPublicationsBookConnectionWhere -} - -input AuthorPublicationsBookFieldInput { - connect: [AuthorPublicationsBookConnectFieldInput!] - create: [AuthorPublicationsBookCreateFieldInput!] -} - -input AuthorPublicationsBookUpdateConnectionInput { - edge: WroteUpdateInput - node: BookUpdateInput -} - -input AuthorPublicationsBookUpdateFieldInput { - connect: [AuthorPublicationsBookConnectFieldInput!] - create: [AuthorPublicationsBookCreateFieldInput!] - delete: [AuthorPublicationsBookDeleteFieldInput!] - disconnect: [AuthorPublicationsBookDisconnectFieldInput!] - update: AuthorPublicationsBookUpdateConnectionInput - where: AuthorPublicationsBookConnectionWhere -} - -input AuthorPublicationsConnectInput { - Book: [AuthorPublicationsBookConnectFieldInput!] - Journal: [AuthorPublicationsJournalConnectFieldInput!] -} - -type AuthorPublicationsConnection { - edges: [AuthorPublicationsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input AuthorPublicationsConnectionSort { - edge: WroteSort -} - -input AuthorPublicationsConnectionWhere { - Book: AuthorPublicationsBookConnectionWhere - Journal: AuthorPublicationsJournalConnectionWhere -} - -input AuthorPublicationsCreateFieldInput { - Book: [AuthorPublicationsBookCreateFieldInput!] - Journal: [AuthorPublicationsJournalCreateFieldInput!] -} - -input AuthorPublicationsCreateInput { - Book: AuthorPublicationsBookFieldInput - Journal: AuthorPublicationsJournalFieldInput -} - -input AuthorPublicationsDeleteInput { - Book: [AuthorPublicationsBookDeleteFieldInput!] - Journal: [AuthorPublicationsJournalDeleteFieldInput!] -} - -input AuthorPublicationsDisconnectInput { - Book: [AuthorPublicationsBookDisconnectFieldInput!] - Journal: [AuthorPublicationsJournalDisconnectFieldInput!] -} - -input AuthorPublicationsJournalConnectFieldInput { - connect: [JournalConnectInput!] - edge: WroteCreateInput! - where: JournalConnectWhere -} - -input AuthorPublicationsJournalConnectionWhere { - AND: [AuthorPublicationsJournalConnectionWhere!] - NOT: AuthorPublicationsJournalConnectionWhere - OR: [AuthorPublicationsJournalConnectionWhere!] - edge: WroteWhere - edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: JournalWhere - node_NOT: JournalWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input AuthorPublicationsJournalCreateFieldInput { - edge: WroteCreateInput! - node: JournalCreateInput! -} - -input AuthorPublicationsJournalDeleteFieldInput { - delete: JournalDeleteInput - where: AuthorPublicationsJournalConnectionWhere -} - -input AuthorPublicationsJournalDisconnectFieldInput { - disconnect: JournalDisconnectInput - where: AuthorPublicationsJournalConnectionWhere -} - -input AuthorPublicationsJournalFieldInput { - connect: [AuthorPublicationsJournalConnectFieldInput!] - create: [AuthorPublicationsJournalCreateFieldInput!] -} - -input AuthorPublicationsJournalUpdateConnectionInput { - edge: WroteUpdateInput - node: JournalUpdateInput -} - -input AuthorPublicationsJournalUpdateFieldInput { - connect: [AuthorPublicationsJournalConnectFieldInput!] - create: [AuthorPublicationsJournalCreateFieldInput!] - delete: [AuthorPublicationsJournalDeleteFieldInput!] - disconnect: [AuthorPublicationsJournalDisconnectFieldInput!] - update: AuthorPublicationsJournalUpdateConnectionInput - where: AuthorPublicationsJournalConnectionWhere -} - -type AuthorPublicationsRelationship implements Wrote { - cursor: String! - node: Publication! - words: Int! -} - -input AuthorPublicationsUpdateInput { - Book: [AuthorPublicationsBookUpdateFieldInput!] - Journal: [AuthorPublicationsJournalUpdateFieldInput!] -} - -input AuthorRelationInput { - publications: AuthorPublicationsCreateFieldInput -} - -\\"\\"\\" -Fields to sort Authors by. The order in which sorts are applied is not guaranteed when specifying many fields in one AuthorSort object. -\\"\\"\\" -input AuthorSort { - name: SortDirection -} - -input AuthorUpdateInput { - name: String - publications: AuthorPublicationsUpdateInput -} - -input AuthorWhere { - AND: [AuthorWhere!] - NOT: AuthorWhere - OR: [AuthorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - publicationsConnection: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Use \`publicationsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Authors where all of the related AuthorPublicationsConnections match this filter - \\"\\"\\" - publicationsConnection_ALL: AuthorPublicationsConnectionWhere - \\"\\"\\" - Return Authors where none of the related AuthorPublicationsConnections match this filter - \\"\\"\\" - publicationsConnection_NONE: AuthorPublicationsConnectionWhere - publicationsConnection_NOT: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Use \`publicationsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Authors where one of the related AuthorPublicationsConnections match this filter - \\"\\"\\" - publicationsConnection_SINGLE: AuthorPublicationsConnectionWhere - \\"\\"\\" - Return Authors where some of the related AuthorPublicationsConnections match this filter - \\"\\"\\" - publicationsConnection_SOME: AuthorPublicationsConnectionWhere -} - -type AuthorsConnection { - edges: [AuthorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Book { - author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! - authorAggregate(directed: Boolean = true, where: AuthorWhere): BookAuthorAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! - title: String! -} - -type BookAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! -} - -input BookAuthorAggregateInput { - AND: [BookAuthorAggregateInput!] - NOT: BookAuthorAggregateInput - OR: [BookAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: BookAuthorEdgeAggregationWhereInput - node: BookAuthorNodeAggregationWhereInput -} - -type BookAuthorAuthorAggregationSelection { - count: Int! - edge: BookAuthorAuthorEdgeAggregateSelection - node: BookAuthorAuthorNodeAggregateSelection -} - -type BookAuthorAuthorEdgeAggregateSelection { - words: IntAggregateSelectionNonNullable! -} - -type BookAuthorAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input BookAuthorConnectFieldInput { - connect: [AuthorConnectInput!] - edge: WroteCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: AuthorConnectWhere -} - -type BookAuthorConnection { - edges: [BookAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input BookAuthorConnectionSort { - edge: WroteSort - node: AuthorSort -} - -input BookAuthorConnectionWhere { - AND: [BookAuthorConnectionWhere!] - NOT: BookAuthorConnectionWhere - OR: [BookAuthorConnectionWhere!] - edge: WroteWhere - edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: AuthorWhere - node_NOT: AuthorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input BookAuthorCreateFieldInput { - edge: WroteCreateInput! - node: AuthorCreateInput! -} - -input BookAuthorDeleteFieldInput { - delete: AuthorDeleteInput - where: BookAuthorConnectionWhere -} - -input BookAuthorDisconnectFieldInput { - disconnect: AuthorDisconnectInput - where: BookAuthorConnectionWhere -} - -input BookAuthorEdgeAggregationWhereInput { - AND: [BookAuthorEdgeAggregationWhereInput!] - NOT: BookAuthorEdgeAggregationWhereInput - OR: [BookAuthorEdgeAggregationWhereInput!] - words_AVERAGE_EQUAL: Float - words_AVERAGE_GT: Float - words_AVERAGE_GTE: Float - words_AVERAGE_LT: Float - words_AVERAGE_LTE: Float - words_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_MAX_EQUAL: Int - words_MAX_GT: Int - words_MAX_GTE: Int - words_MAX_LT: Int - words_MAX_LTE: Int - words_MIN_EQUAL: Int - words_MIN_GT: Int - words_MIN_GTE: Int - words_MIN_LT: Int - words_MIN_LTE: Int - words_SUM_EQUAL: Int - words_SUM_GT: Int - words_SUM_GTE: Int - words_SUM_LT: Int - words_SUM_LTE: Int -} - -input BookAuthorFieldInput { - connect: [BookAuthorConnectFieldInput!] - create: [BookAuthorCreateFieldInput!] -} - -input BookAuthorNodeAggregationWhereInput { - AND: [BookAuthorNodeAggregationWhereInput!] - NOT: BookAuthorNodeAggregationWhereInput - OR: [BookAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type BookAuthorRelationship implements Wrote { - cursor: String! - node: Author! - words: Int! -} - -input BookAuthorUpdateConnectionInput { - edge: WroteUpdateInput - node: AuthorUpdateInput -} - -input BookAuthorUpdateFieldInput { - connect: [BookAuthorConnectFieldInput!] - create: [BookAuthorCreateFieldInput!] - delete: [BookAuthorDeleteFieldInput!] - disconnect: [BookAuthorDisconnectFieldInput!] - update: BookAuthorUpdateConnectionInput - where: BookAuthorConnectionWhere -} - -input BookConnectInput { - author: [BookAuthorConnectFieldInput!] -} - -input BookConnectWhere { - node: BookWhere! -} - -input BookCreateInput { - author: BookAuthorFieldInput - title: String! -} - -input BookDeleteInput { - author: [BookAuthorDeleteFieldInput!] -} - -input BookDisconnectInput { - author: [BookAuthorDisconnectFieldInput!] -} - -type BookEdge { - cursor: String! - node: Book! -} - -input BookOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BookSort!] -} - -input BookRelationInput { - author: [BookAuthorCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. -\\"\\"\\" -input BookSort { - title: SortDirection -} - -input BookUpdateInput { - author: [BookAuthorUpdateFieldInput!] - title: String -} - -input BookWhere { - AND: [BookWhere!] - NOT: BookWhere - OR: [BookWhere!] - author: AuthorWhere @deprecated(reason: \\"Use \`author_SOME\` instead.\\") - authorAggregate: BookAuthorAggregateInput - authorConnection: BookAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_SOME\` instead.\\") - \\"\\"\\" - Return Books where all of the related BookAuthorConnections match this filter - \\"\\"\\" - authorConnection_ALL: BookAuthorConnectionWhere - \\"\\"\\" - Return Books where none of the related BookAuthorConnections match this filter - \\"\\"\\" - authorConnection_NONE: BookAuthorConnectionWhere - authorConnection_NOT: BookAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_NONE\` instead.\\") - \\"\\"\\" - Return Books where one of the related BookAuthorConnections match this filter - \\"\\"\\" - authorConnection_SINGLE: BookAuthorConnectionWhere - \\"\\"\\" - Return Books where some of the related BookAuthorConnections match this filter - \\"\\"\\" - authorConnection_SOME: BookAuthorConnectionWhere - \\"\\"\\"Return Books where all of the related Authors match this filter\\"\\"\\" - author_ALL: AuthorWhere - \\"\\"\\"Return Books where none of the related Authors match this filter\\"\\"\\" - author_NONE: AuthorWhere - author_NOT: AuthorWhere @deprecated(reason: \\"Use \`author_NONE\` instead.\\") - \\"\\"\\"Return Books where one of the related Authors match this filter\\"\\"\\" - author_SINGLE: AuthorWhere - \\"\\"\\"Return Books where some of the related Authors match this filter\\"\\"\\" - author_SOME: AuthorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type BooksConnection { - edges: [BookEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateAuthorsMutationResponse { - authors: [Author!]! - info: CreateInfo! -} - -type CreateBooksMutationResponse { - books: [Book!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateJournalsMutationResponse { - info: CreateInfo! - journals: [Journal!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Journal { - author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! - authorAggregate(directed: Boolean = true, where: AuthorWhere): JournalAuthorAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! - subject: String! -} - -type JournalAggregateSelection { - count: Int! - subject: StringAggregateSelectionNonNullable! -} - -input JournalAuthorAggregateInput { - AND: [JournalAuthorAggregateInput!] - NOT: JournalAuthorAggregateInput - OR: [JournalAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: JournalAuthorEdgeAggregationWhereInput - node: JournalAuthorNodeAggregationWhereInput -} - -type JournalAuthorAuthorAggregationSelection { - count: Int! - edge: JournalAuthorAuthorEdgeAggregateSelection - node: JournalAuthorAuthorNodeAggregateSelection -} - -type JournalAuthorAuthorEdgeAggregateSelection { - words: IntAggregateSelectionNonNullable! -} - -type JournalAuthorAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input JournalAuthorConnectFieldInput { - connect: [AuthorConnectInput!] - edge: WroteCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: AuthorConnectWhere -} - -type JournalAuthorConnection { - edges: [JournalAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input JournalAuthorConnectionSort { - edge: WroteSort - node: AuthorSort -} - -input JournalAuthorConnectionWhere { - AND: [JournalAuthorConnectionWhere!] - NOT: JournalAuthorConnectionWhere - OR: [JournalAuthorConnectionWhere!] - edge: WroteWhere - edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: AuthorWhere - node_NOT: AuthorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input JournalAuthorCreateFieldInput { - edge: WroteCreateInput! - node: AuthorCreateInput! -} - -input JournalAuthorDeleteFieldInput { - delete: AuthorDeleteInput - where: JournalAuthorConnectionWhere -} - -input JournalAuthorDisconnectFieldInput { - disconnect: AuthorDisconnectInput - where: JournalAuthorConnectionWhere -} - -input JournalAuthorEdgeAggregationWhereInput { - AND: [JournalAuthorEdgeAggregationWhereInput!] - NOT: JournalAuthorEdgeAggregationWhereInput - OR: [JournalAuthorEdgeAggregationWhereInput!] - words_AVERAGE_EQUAL: Float - words_AVERAGE_GT: Float - words_AVERAGE_GTE: Float - words_AVERAGE_LT: Float - words_AVERAGE_LTE: Float - words_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - words_MAX_EQUAL: Int - words_MAX_GT: Int - words_MAX_GTE: Int - words_MAX_LT: Int - words_MAX_LTE: Int - words_MIN_EQUAL: Int - words_MIN_GT: Int - words_MIN_GTE: Int - words_MIN_LT: Int - words_MIN_LTE: Int - words_SUM_EQUAL: Int - words_SUM_GT: Int - words_SUM_GTE: Int - words_SUM_LT: Int - words_SUM_LTE: Int -} - -input JournalAuthorFieldInput { - connect: [JournalAuthorConnectFieldInput!] - create: [JournalAuthorCreateFieldInput!] -} - -input JournalAuthorNodeAggregationWhereInput { - AND: [JournalAuthorNodeAggregationWhereInput!] - NOT: JournalAuthorNodeAggregationWhereInput - OR: [JournalAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type JournalAuthorRelationship implements Wrote { - cursor: String! - node: Author! - words: Int! -} - -input JournalAuthorUpdateConnectionInput { - edge: WroteUpdateInput - node: AuthorUpdateInput -} - -input JournalAuthorUpdateFieldInput { - connect: [JournalAuthorConnectFieldInput!] - create: [JournalAuthorCreateFieldInput!] - delete: [JournalAuthorDeleteFieldInput!] - disconnect: [JournalAuthorDisconnectFieldInput!] - update: JournalAuthorUpdateConnectionInput - where: JournalAuthorConnectionWhere -} - -input JournalConnectInput { - author: [JournalAuthorConnectFieldInput!] -} - -input JournalConnectWhere { - node: JournalWhere! -} - -input JournalCreateInput { - author: JournalAuthorFieldInput - subject: String! -} - -input JournalDeleteInput { - author: [JournalAuthorDeleteFieldInput!] -} - -input JournalDisconnectInput { - author: [JournalAuthorDisconnectFieldInput!] -} - -type JournalEdge { - cursor: String! - node: Journal! -} - -input JournalOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more JournalSort objects to sort Journals by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [JournalSort!] -} - -input JournalRelationInput { - author: [JournalAuthorCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Journals by. The order in which sorts are applied is not guaranteed when specifying many fields in one JournalSort object. -\\"\\"\\" -input JournalSort { - subject: SortDirection -} - -input JournalUpdateInput { - author: [JournalAuthorUpdateFieldInput!] - subject: String -} - -input JournalWhere { - AND: [JournalWhere!] - NOT: JournalWhere - OR: [JournalWhere!] - author: AuthorWhere @deprecated(reason: \\"Use \`author_SOME\` instead.\\") - authorAggregate: JournalAuthorAggregateInput - authorConnection: JournalAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_SOME\` instead.\\") - \\"\\"\\" - Return Journals where all of the related JournalAuthorConnections match this filter - \\"\\"\\" - authorConnection_ALL: JournalAuthorConnectionWhere - \\"\\"\\" - Return Journals where none of the related JournalAuthorConnections match this filter - \\"\\"\\" - authorConnection_NONE: JournalAuthorConnectionWhere - authorConnection_NOT: JournalAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_NONE\` instead.\\") - \\"\\"\\" - Return Journals where one of the related JournalAuthorConnections match this filter - \\"\\"\\" - authorConnection_SINGLE: JournalAuthorConnectionWhere - \\"\\"\\" - Return Journals where some of the related JournalAuthorConnections match this filter - \\"\\"\\" - authorConnection_SOME: JournalAuthorConnectionWhere - \\"\\"\\"Return Journals where all of the related Authors match this filter\\"\\"\\" - author_ALL: AuthorWhere - \\"\\"\\"Return Journals where none of the related Authors match this filter\\"\\"\\" - author_NONE: AuthorWhere - author_NOT: AuthorWhere @deprecated(reason: \\"Use \`author_NONE\` instead.\\") - \\"\\"\\"Return Journals where one of the related Authors match this filter\\"\\"\\" - author_SINGLE: AuthorWhere - \\"\\"\\"Return Journals where some of the related Authors match this filter\\"\\"\\" - author_SOME: AuthorWhere - subject: String - subject_CONTAINS: String - subject_ENDS_WITH: String - subject_IN: [String!] - subject_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - subject_STARTS_WITH: String -} - -type JournalsConnection { - edges: [JournalEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createAuthors(input: [AuthorCreateInput!]!): CreateAuthorsMutationResponse! - createBooks(input: [BookCreateInput!]!): CreateBooksMutationResponse! - createJournals(input: [JournalCreateInput!]!): CreateJournalsMutationResponse! - deleteAuthors(delete: AuthorDeleteInput, where: AuthorWhere): DeleteInfo! - deleteBooks(delete: BookDeleteInput, where: BookWhere): DeleteInfo! - deleteJournals(delete: JournalDeleteInput, where: JournalWhere): DeleteInfo! - updateAuthors(connect: AuthorConnectInput, create: AuthorRelationInput, delete: AuthorDeleteInput, disconnect: AuthorDisconnectInput, update: AuthorUpdateInput, where: AuthorWhere): UpdateAuthorsMutationResponse! - updateBooks(connect: BookConnectInput, create: BookRelationInput, delete: BookDeleteInput, disconnect: BookDisconnectInput, update: BookUpdateInput, where: BookWhere): UpdateBooksMutationResponse! - updateJournals(connect: JournalConnectInput, create: JournalRelationInput, delete: JournalDeleteInput, disconnect: JournalDisconnectInput, update: JournalUpdateInput, where: JournalWhere): UpdateJournalsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Publication = Book | Journal - -input PublicationWhere { - Book: BookWhere - Journal: JournalWhere -} - -type Query { - authors(options: AuthorOptions, where: AuthorWhere): [Author!]! - authorsAggregate(where: AuthorWhere): AuthorAggregateSelection! - authorsConnection(after: String, first: Int, sort: [AuthorSort], where: AuthorWhere): AuthorsConnection! - books(options: BookOptions, where: BookWhere): [Book!]! - booksAggregate(where: BookWhere): BookAggregateSelection! - booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! - journals(options: JournalOptions, where: JournalWhere): [Journal!]! - journalsAggregate(where: JournalWhere): JournalAggregateSelection! - journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateAuthorsMutationResponse { - authors: [Author!]! - info: UpdateInfo! -} - -type UpdateBooksMutationResponse { - books: [Book!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateJournalsMutationResponse { - info: UpdateInfo! - journals: [Journal!]! -} - -interface Wrote { - words: Int! -} - -input WroteCreateInput { - words: Int! -} - -input WroteSort { - words: SortDirection -} - -input WroteUpdateInput { - words: Int - words_DECREMENT: Int - words_INCREMENT: Int -} - -input WroteWhere { - AND: [WroteWhere!] - NOT: WroteWhere - OR: [WroteWhere!] - words: Int - words_GT: Int - words_GTE: Int - words_IN: [Int!] - words_LT: Int - words_LTE: Int - words_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - words_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Author { + name: String! + publications(directed: Boolean = true, options: QueryOptions, where: PublicationWhere): [Publication!]! + publicationsConnection(after: String, directed: Boolean = true, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! + } + + type AuthorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input AuthorConnectInput { + publications: AuthorPublicationsConnectInput + } + + input AuthorConnectWhere { + node: AuthorWhere! + } + + input AuthorCreateInput { + name: String! + publications: AuthorPublicationsCreateInput + } + + input AuthorDeleteInput { + publications: AuthorPublicationsDeleteInput + } + + input AuthorDisconnectInput { + publications: AuthorPublicationsDisconnectInput + } + + type AuthorEdge { + cursor: String! + node: Author! + } + + input AuthorOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AuthorSort objects to sort Authors by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AuthorSort!] + } + + input AuthorPublicationsBookConnectFieldInput { + connect: [BookConnectInput!] + edge: WroteCreateInput! + where: BookConnectWhere + } + + input AuthorPublicationsBookConnectionWhere { + AND: [AuthorPublicationsBookConnectionWhere!] + NOT: AuthorPublicationsBookConnectionWhere + OR: [AuthorPublicationsBookConnectionWhere!] + edge: WroteWhere + edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: BookWhere + node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input AuthorPublicationsBookCreateFieldInput { + edge: WroteCreateInput! + node: BookCreateInput! + } + + input AuthorPublicationsBookDeleteFieldInput { + delete: BookDeleteInput + where: AuthorPublicationsBookConnectionWhere + } + + input AuthorPublicationsBookDisconnectFieldInput { + disconnect: BookDisconnectInput + where: AuthorPublicationsBookConnectionWhere + } + + input AuthorPublicationsBookFieldInput { + connect: [AuthorPublicationsBookConnectFieldInput!] + create: [AuthorPublicationsBookCreateFieldInput!] + } + + input AuthorPublicationsBookUpdateConnectionInput { + edge: WroteUpdateInput + node: BookUpdateInput + } + + input AuthorPublicationsBookUpdateFieldInput { + connect: [AuthorPublicationsBookConnectFieldInput!] + create: [AuthorPublicationsBookCreateFieldInput!] + delete: [AuthorPublicationsBookDeleteFieldInput!] + disconnect: [AuthorPublicationsBookDisconnectFieldInput!] + update: AuthorPublicationsBookUpdateConnectionInput + where: AuthorPublicationsBookConnectionWhere + } + + input AuthorPublicationsConnectInput { + Book: [AuthorPublicationsBookConnectFieldInput!] + Journal: [AuthorPublicationsJournalConnectFieldInput!] + } + + type AuthorPublicationsConnection { + edges: [AuthorPublicationsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input AuthorPublicationsConnectionSort { + edge: WroteSort + } + + input AuthorPublicationsConnectionWhere { + Book: AuthorPublicationsBookConnectionWhere + Journal: AuthorPublicationsJournalConnectionWhere + } + + input AuthorPublicationsCreateFieldInput { + Book: [AuthorPublicationsBookCreateFieldInput!] + Journal: [AuthorPublicationsJournalCreateFieldInput!] + } + + input AuthorPublicationsCreateInput { + Book: AuthorPublicationsBookFieldInput + Journal: AuthorPublicationsJournalFieldInput + } + + input AuthorPublicationsDeleteInput { + Book: [AuthorPublicationsBookDeleteFieldInput!] + Journal: [AuthorPublicationsJournalDeleteFieldInput!] + } + + input AuthorPublicationsDisconnectInput { + Book: [AuthorPublicationsBookDisconnectFieldInput!] + Journal: [AuthorPublicationsJournalDisconnectFieldInput!] + } + + input AuthorPublicationsJournalConnectFieldInput { + connect: [JournalConnectInput!] + edge: WroteCreateInput! + where: JournalConnectWhere + } + + input AuthorPublicationsJournalConnectionWhere { + AND: [AuthorPublicationsJournalConnectionWhere!] + NOT: AuthorPublicationsJournalConnectionWhere + OR: [AuthorPublicationsJournalConnectionWhere!] + edge: WroteWhere + edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: JournalWhere + node_NOT: JournalWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input AuthorPublicationsJournalCreateFieldInput { + edge: WroteCreateInput! + node: JournalCreateInput! + } + + input AuthorPublicationsJournalDeleteFieldInput { + delete: JournalDeleteInput + where: AuthorPublicationsJournalConnectionWhere + } + + input AuthorPublicationsJournalDisconnectFieldInput { + disconnect: JournalDisconnectInput + where: AuthorPublicationsJournalConnectionWhere + } + + input AuthorPublicationsJournalFieldInput { + connect: [AuthorPublicationsJournalConnectFieldInput!] + create: [AuthorPublicationsJournalCreateFieldInput!] + } + + input AuthorPublicationsJournalUpdateConnectionInput { + edge: WroteUpdateInput + node: JournalUpdateInput + } + + input AuthorPublicationsJournalUpdateFieldInput { + connect: [AuthorPublicationsJournalConnectFieldInput!] + create: [AuthorPublicationsJournalCreateFieldInput!] + delete: [AuthorPublicationsJournalDeleteFieldInput!] + disconnect: [AuthorPublicationsJournalDisconnectFieldInput!] + update: AuthorPublicationsJournalUpdateConnectionInput + where: AuthorPublicationsJournalConnectionWhere + } + + type AuthorPublicationsRelationship implements Wrote { + cursor: String! + node: Publication! + words: Int! + } + + input AuthorPublicationsUpdateInput { + Book: [AuthorPublicationsBookUpdateFieldInput!] + Journal: [AuthorPublicationsJournalUpdateFieldInput!] + } + + input AuthorRelationInput { + publications: AuthorPublicationsCreateFieldInput + } + + \\"\\"\\" + Fields to sort Authors by. The order in which sorts are applied is not guaranteed when specifying many fields in one AuthorSort object. + \\"\\"\\" + input AuthorSort { + name: SortDirection + } + + input AuthorUpdateInput { + name: String + publications: AuthorPublicationsUpdateInput + } + + input AuthorWhere { + AND: [AuthorWhere!] + NOT: AuthorWhere + OR: [AuthorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + publicationsConnection: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Use \`publicationsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Authors where all of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + publicationsConnection_ALL: AuthorPublicationsConnectionWhere + \\"\\"\\" + Return Authors where none of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + publicationsConnection_NONE: AuthorPublicationsConnectionWhere + publicationsConnection_NOT: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Use \`publicationsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Authors where one of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + publicationsConnection_SINGLE: AuthorPublicationsConnectionWhere + \\"\\"\\" + Return Authors where some of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + publicationsConnection_SOME: AuthorPublicationsConnectionWhere + } + + type AuthorsConnection { + edges: [AuthorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Book { + author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! + authorAggregate(directed: Boolean = true, where: AuthorWhere): BookAuthorAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! + title: String! + } + + type BookAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! + } + + input BookAuthorAggregateInput { + AND: [BookAuthorAggregateInput!] + NOT: BookAuthorAggregateInput + OR: [BookAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: BookAuthorEdgeAggregationWhereInput + node: BookAuthorNodeAggregationWhereInput + } + + type BookAuthorAuthorAggregationSelection { + count: Int! + edge: BookAuthorAuthorEdgeAggregateSelection + node: BookAuthorAuthorNodeAggregateSelection + } + + type BookAuthorAuthorEdgeAggregateSelection { + words: IntAggregateSelectionNonNullable! + } + + type BookAuthorAuthorNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input BookAuthorConnectFieldInput { + connect: [AuthorConnectInput!] + edge: WroteCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: AuthorConnectWhere + } + + type BookAuthorConnection { + edges: [BookAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input BookAuthorConnectionSort { + edge: WroteSort + node: AuthorSort + } + + input BookAuthorConnectionWhere { + AND: [BookAuthorConnectionWhere!] + NOT: BookAuthorConnectionWhere + OR: [BookAuthorConnectionWhere!] + edge: WroteWhere + edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: AuthorWhere + node_NOT: AuthorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input BookAuthorCreateFieldInput { + edge: WroteCreateInput! + node: AuthorCreateInput! + } + + input BookAuthorDeleteFieldInput { + delete: AuthorDeleteInput + where: BookAuthorConnectionWhere + } + + input BookAuthorDisconnectFieldInput { + disconnect: AuthorDisconnectInput + where: BookAuthorConnectionWhere + } + + input BookAuthorEdgeAggregationWhereInput { + AND: [BookAuthorEdgeAggregationWhereInput!] + NOT: BookAuthorEdgeAggregationWhereInput + OR: [BookAuthorEdgeAggregationWhereInput!] + words_AVERAGE_EQUAL: Float + words_AVERAGE_GT: Float + words_AVERAGE_GTE: Float + words_AVERAGE_LT: Float + words_AVERAGE_LTE: Float + words_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_MAX_EQUAL: Int + words_MAX_GT: Int + words_MAX_GTE: Int + words_MAX_LT: Int + words_MAX_LTE: Int + words_MIN_EQUAL: Int + words_MIN_GT: Int + words_MIN_GTE: Int + words_MIN_LT: Int + words_MIN_LTE: Int + words_SUM_EQUAL: Int + words_SUM_GT: Int + words_SUM_GTE: Int + words_SUM_LT: Int + words_SUM_LTE: Int + } + + input BookAuthorFieldInput { + connect: [BookAuthorConnectFieldInput!] + create: [BookAuthorCreateFieldInput!] + } + + input BookAuthorNodeAggregationWhereInput { + AND: [BookAuthorNodeAggregationWhereInput!] + NOT: BookAuthorNodeAggregationWhereInput + OR: [BookAuthorNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type BookAuthorRelationship implements Wrote { + cursor: String! + node: Author! + words: Int! + } + + input BookAuthorUpdateConnectionInput { + edge: WroteUpdateInput + node: AuthorUpdateInput + } + + input BookAuthorUpdateFieldInput { + connect: [BookAuthorConnectFieldInput!] + create: [BookAuthorCreateFieldInput!] + delete: [BookAuthorDeleteFieldInput!] + disconnect: [BookAuthorDisconnectFieldInput!] + update: BookAuthorUpdateConnectionInput + where: BookAuthorConnectionWhere + } + + input BookConnectInput { + author: [BookAuthorConnectFieldInput!] + } + + input BookConnectWhere { + node: BookWhere! + } + + input BookCreateInput { + author: BookAuthorFieldInput + title: String! + } + + input BookDeleteInput { + author: [BookAuthorDeleteFieldInput!] + } + + input BookDisconnectInput { + author: [BookAuthorDisconnectFieldInput!] + } + + type BookEdge { + cursor: String! + node: Book! + } + + input BookOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BookSort!] + } + + input BookRelationInput { + author: [BookAuthorCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. + \\"\\"\\" + input BookSort { + title: SortDirection + } + + input BookUpdateInput { + author: [BookAuthorUpdateFieldInput!] + title: String + } + + input BookWhere { + AND: [BookWhere!] + NOT: BookWhere + OR: [BookWhere!] + author: AuthorWhere @deprecated(reason: \\"Use \`author_SOME\` instead.\\") + authorAggregate: BookAuthorAggregateInput + authorConnection: BookAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_SOME\` instead.\\") + \\"\\"\\" + Return Books where all of the related BookAuthorConnections match this filter + \\"\\"\\" + authorConnection_ALL: BookAuthorConnectionWhere + \\"\\"\\" + Return Books where none of the related BookAuthorConnections match this filter + \\"\\"\\" + authorConnection_NONE: BookAuthorConnectionWhere + authorConnection_NOT: BookAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_NONE\` instead.\\") + \\"\\"\\" + Return Books where one of the related BookAuthorConnections match this filter + \\"\\"\\" + authorConnection_SINGLE: BookAuthorConnectionWhere + \\"\\"\\" + Return Books where some of the related BookAuthorConnections match this filter + \\"\\"\\" + authorConnection_SOME: BookAuthorConnectionWhere + \\"\\"\\"Return Books where all of the related Authors match this filter\\"\\"\\" + author_ALL: AuthorWhere + \\"\\"\\"Return Books where none of the related Authors match this filter\\"\\"\\" + author_NONE: AuthorWhere + author_NOT: AuthorWhere @deprecated(reason: \\"Use \`author_NONE\` instead.\\") + \\"\\"\\"Return Books where one of the related Authors match this filter\\"\\"\\" + author_SINGLE: AuthorWhere + \\"\\"\\"Return Books where some of the related Authors match this filter\\"\\"\\" + author_SOME: AuthorWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type BooksConnection { + edges: [BookEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateAuthorsMutationResponse { + authors: [Author!]! + info: CreateInfo! + } + + type CreateBooksMutationResponse { + books: [Book!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateJournalsMutationResponse { + info: CreateInfo! + journals: [Journal!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Journal { + author(directed: Boolean = true, options: AuthorOptions, where: AuthorWhere): [Author!]! + authorAggregate(directed: Boolean = true, where: AuthorWhere): JournalAuthorAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! + subject: String! + } + + type JournalAggregateSelection { + count: Int! + subject: StringAggregateSelectionNonNullable! + } + + input JournalAuthorAggregateInput { + AND: [JournalAuthorAggregateInput!] + NOT: JournalAuthorAggregateInput + OR: [JournalAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: JournalAuthorEdgeAggregationWhereInput + node: JournalAuthorNodeAggregationWhereInput + } + + type JournalAuthorAuthorAggregationSelection { + count: Int! + edge: JournalAuthorAuthorEdgeAggregateSelection + node: JournalAuthorAuthorNodeAggregateSelection + } + + type JournalAuthorAuthorEdgeAggregateSelection { + words: IntAggregateSelectionNonNullable! + } + + type JournalAuthorAuthorNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input JournalAuthorConnectFieldInput { + connect: [AuthorConnectInput!] + edge: WroteCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: AuthorConnectWhere + } + + type JournalAuthorConnection { + edges: [JournalAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input JournalAuthorConnectionSort { + edge: WroteSort + node: AuthorSort + } + + input JournalAuthorConnectionWhere { + AND: [JournalAuthorConnectionWhere!] + NOT: JournalAuthorConnectionWhere + OR: [JournalAuthorConnectionWhere!] + edge: WroteWhere + edge_NOT: WroteWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: AuthorWhere + node_NOT: AuthorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input JournalAuthorCreateFieldInput { + edge: WroteCreateInput! + node: AuthorCreateInput! + } + + input JournalAuthorDeleteFieldInput { + delete: AuthorDeleteInput + where: JournalAuthorConnectionWhere + } + + input JournalAuthorDisconnectFieldInput { + disconnect: AuthorDisconnectInput + where: JournalAuthorConnectionWhere + } + + input JournalAuthorEdgeAggregationWhereInput { + AND: [JournalAuthorEdgeAggregationWhereInput!] + NOT: JournalAuthorEdgeAggregationWhereInput + OR: [JournalAuthorEdgeAggregationWhereInput!] + words_AVERAGE_EQUAL: Float + words_AVERAGE_GT: Float + words_AVERAGE_GTE: Float + words_AVERAGE_LT: Float + words_AVERAGE_LTE: Float + words_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + words_MAX_EQUAL: Int + words_MAX_GT: Int + words_MAX_GTE: Int + words_MAX_LT: Int + words_MAX_LTE: Int + words_MIN_EQUAL: Int + words_MIN_GT: Int + words_MIN_GTE: Int + words_MIN_LT: Int + words_MIN_LTE: Int + words_SUM_EQUAL: Int + words_SUM_GT: Int + words_SUM_GTE: Int + words_SUM_LT: Int + words_SUM_LTE: Int + } + + input JournalAuthorFieldInput { + connect: [JournalAuthorConnectFieldInput!] + create: [JournalAuthorCreateFieldInput!] + } + + input JournalAuthorNodeAggregationWhereInput { + AND: [JournalAuthorNodeAggregationWhereInput!] + NOT: JournalAuthorNodeAggregationWhereInput + OR: [JournalAuthorNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type JournalAuthorRelationship implements Wrote { + cursor: String! + node: Author! + words: Int! + } + + input JournalAuthorUpdateConnectionInput { + edge: WroteUpdateInput + node: AuthorUpdateInput + } + + input JournalAuthorUpdateFieldInput { + connect: [JournalAuthorConnectFieldInput!] + create: [JournalAuthorCreateFieldInput!] + delete: [JournalAuthorDeleteFieldInput!] + disconnect: [JournalAuthorDisconnectFieldInput!] + update: JournalAuthorUpdateConnectionInput + where: JournalAuthorConnectionWhere + } + + input JournalConnectInput { + author: [JournalAuthorConnectFieldInput!] + } + + input JournalConnectWhere { + node: JournalWhere! + } + + input JournalCreateInput { + author: JournalAuthorFieldInput + subject: String! + } + + input JournalDeleteInput { + author: [JournalAuthorDeleteFieldInput!] + } + + input JournalDisconnectInput { + author: [JournalAuthorDisconnectFieldInput!] + } + + type JournalEdge { + cursor: String! + node: Journal! + } + + input JournalOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more JournalSort objects to sort Journals by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [JournalSort!] + } + + input JournalRelationInput { + author: [JournalAuthorCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Journals by. The order in which sorts are applied is not guaranteed when specifying many fields in one JournalSort object. + \\"\\"\\" + input JournalSort { + subject: SortDirection + } + + input JournalUpdateInput { + author: [JournalAuthorUpdateFieldInput!] + subject: String + } + + input JournalWhere { + AND: [JournalWhere!] + NOT: JournalWhere + OR: [JournalWhere!] + author: AuthorWhere @deprecated(reason: \\"Use \`author_SOME\` instead.\\") + authorAggregate: JournalAuthorAggregateInput + authorConnection: JournalAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_SOME\` instead.\\") + \\"\\"\\" + Return Journals where all of the related JournalAuthorConnections match this filter + \\"\\"\\" + authorConnection_ALL: JournalAuthorConnectionWhere + \\"\\"\\" + Return Journals where none of the related JournalAuthorConnections match this filter + \\"\\"\\" + authorConnection_NONE: JournalAuthorConnectionWhere + authorConnection_NOT: JournalAuthorConnectionWhere @deprecated(reason: \\"Use \`authorConnection_NONE\` instead.\\") + \\"\\"\\" + Return Journals where one of the related JournalAuthorConnections match this filter + \\"\\"\\" + authorConnection_SINGLE: JournalAuthorConnectionWhere + \\"\\"\\" + Return Journals where some of the related JournalAuthorConnections match this filter + \\"\\"\\" + authorConnection_SOME: JournalAuthorConnectionWhere + \\"\\"\\"Return Journals where all of the related Authors match this filter\\"\\"\\" + author_ALL: AuthorWhere + \\"\\"\\"Return Journals where none of the related Authors match this filter\\"\\"\\" + author_NONE: AuthorWhere + author_NOT: AuthorWhere @deprecated(reason: \\"Use \`author_NONE\` instead.\\") + \\"\\"\\"Return Journals where one of the related Authors match this filter\\"\\"\\" + author_SINGLE: AuthorWhere + \\"\\"\\"Return Journals where some of the related Authors match this filter\\"\\"\\" + author_SOME: AuthorWhere + subject: String + subject_CONTAINS: String + subject_ENDS_WITH: String + subject_IN: [String!] + subject_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + subject_STARTS_WITH: String + } + + type JournalsConnection { + edges: [JournalEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createAuthors(input: [AuthorCreateInput!]!): CreateAuthorsMutationResponse! + createBooks(input: [BookCreateInput!]!): CreateBooksMutationResponse! + createJournals(input: [JournalCreateInput!]!): CreateJournalsMutationResponse! + deleteAuthors(delete: AuthorDeleteInput, where: AuthorWhere): DeleteInfo! + deleteBooks(delete: BookDeleteInput, where: BookWhere): DeleteInfo! + deleteJournals(delete: JournalDeleteInput, where: JournalWhere): DeleteInfo! + updateAuthors(connect: AuthorConnectInput, create: AuthorRelationInput, delete: AuthorDeleteInput, disconnect: AuthorDisconnectInput, update: AuthorUpdateInput, where: AuthorWhere): UpdateAuthorsMutationResponse! + updateBooks(connect: BookConnectInput, create: BookRelationInput, delete: BookDeleteInput, disconnect: BookDisconnectInput, update: BookUpdateInput, where: BookWhere): UpdateBooksMutationResponse! + updateJournals(connect: JournalConnectInput, create: JournalRelationInput, delete: JournalDeleteInput, disconnect: JournalDisconnectInput, update: JournalUpdateInput, where: JournalWhere): UpdateJournalsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Publication = Book | Journal + + input PublicationWhere { + Book: BookWhere + Journal: JournalWhere + } + + type Query { + authors(options: AuthorOptions, where: AuthorWhere): [Author!]! + authorsAggregate(where: AuthorWhere): AuthorAggregateSelection! + authorsConnection(after: String, first: Int, sort: [AuthorSort], where: AuthorWhere): AuthorsConnection! + books(options: BookOptions, where: BookWhere): [Book!]! + booksAggregate(where: BookWhere): BookAggregateSelection! + booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! + journals(options: JournalOptions, where: JournalWhere): [Journal!]! + journalsAggregate(where: JournalWhere): JournalAggregateSelection! + journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateAuthorsMutationResponse { + authors: [Author!]! + info: UpdateInfo! + } + + type UpdateBooksMutationResponse { + books: [Book!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateJournalsMutationResponse { + info: UpdateInfo! + journals: [Journal!]! + } + + interface Wrote { + words: Int! + } + + input WroteCreateInput { + words: Int! + } + + input WroteSort { + words: SortDirection + } + + input WroteUpdateInput { + words: Int + words_DECREMENT: Int + words_INCREMENT: Int + } + + input WroteWhere { + AND: [WroteWhere!] + NOT: WroteWhere + OR: [WroteWhere!] + words: Int + words_GT: Int + words_GTE: Int + words_IN: [Int!] + words_LT: Int + words_LTE: Int + words_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + words_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + }" + `); }); }); diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index f73b1a7dac..9fce96bc73 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -52,149 +52,149 @@ describe("Custom-mutations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -input ExampleInput { - id: ID -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - testCypherMutation(input: ExampleInput): String - testMutation(input: ExampleInput): String - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - testCypherQuery(input: ExampleInput): String - testQuery(input: ExampleInput): String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type Subscription { - testSubscription(input: ExampleInput): String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + input ExampleInput { + id: ID + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + testCypherMutation(input: ExampleInput): String + testMutation(input: ExampleInput): String + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + testCypherQuery(input: ExampleInput): String + testQuery(input: ExampleInput): String + } + + \\"\\"\\"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 Subscription { + testSubscription(input: ExampleInput): String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index a1c8d23e02..a16e3670ab 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -36,141 +36,141 @@ describe("Directive-preserve", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -directive @preservedFieldLevel(boolean: Boolean, float: Float, int: Int, string: String) on FIELD_DEFINITION - -directive @preservedTopLevel(boolean: Boolean, float: Float, int: Int, string: String) on OBJECT - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie @preservedTopLevel { - id: ID @preservedFieldLevel(string: \\"str\\", int: 12, float: 1.2, boolean: true) -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + directive @preservedFieldLevel(boolean: Boolean, float: Float, int: Int, string: String) on FIELD_DEFINITION + + directive @preservedTopLevel(boolean: Boolean, float: Float, int: Int, string: String) on OBJECT + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie @preservedTopLevel { + id: ID @preservedFieldLevel(string: \\"str\\", int: 12, float: 1.2, boolean: true) + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Directives on relations preserved", async () => { @@ -191,671 +191,671 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - name: String -} - -type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input GenreConnectInput { - movies: [GenreMoviesConnectFieldInput!] -} - -input GenreConnectWhere { - node: GenreWhere! -} - -input GenreCreateInput { - movies: GenreMoviesFieldInput - name: String -} - -input GenreDeleteInput { - movies: [GenreMoviesDeleteFieldInput!] -} - -input GenreDisconnectInput { - movies: [GenreMoviesDisconnectFieldInput!] -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection -} - -type GenreMovieMoviesNodeAggregateSelection { - imdbRating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - year: IntAggregateSelectionNullable! -} - -input GenreMoviesAggregateInput { - AND: [GenreMoviesAggregateInput!] - NOT: GenreMoviesAggregateInput - OR: [GenreMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: GenreMoviesNodeAggregationWhereInput -} - -input GenreMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input GenreMoviesConnectionSort { - node: MovieSort -} - -input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input GenreMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input GenreMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: GenreMoviesConnectionWhere -} - -input GenreMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: GenreMoviesConnectionWhere -} - -input GenreMoviesFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] -} - -input GenreMoviesNodeAggregationWhereInput { - AND: [GenreMoviesNodeAggregationWhereInput!] - NOT: GenreMoviesNodeAggregationWhereInput - OR: [GenreMoviesNodeAggregationWhereInput!] - imdbRating_AVERAGE_EQUAL: Float - imdbRating_AVERAGE_GT: Float - imdbRating_AVERAGE_GTE: Float - imdbRating_AVERAGE_LT: Float - imdbRating_AVERAGE_LTE: Float - imdbRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_MAX_EQUAL: Float - imdbRating_MAX_GT: Float - imdbRating_MAX_GTE: Float - imdbRating_MAX_LT: Float - imdbRating_MAX_LTE: Float - imdbRating_MIN_EQUAL: Float - imdbRating_MIN_GT: Float - imdbRating_MIN_GTE: Float - imdbRating_MIN_LT: Float - imdbRating_MIN_LTE: Float - imdbRating_SUM_EQUAL: Float - imdbRating_SUM_GT: Float - imdbRating_SUM_GTE: Float - imdbRating_SUM_LT: Float - imdbRating_SUM_LTE: Float - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - year_AVERAGE_EQUAL: Float - year_AVERAGE_GT: Float - year_AVERAGE_GTE: Float - year_AVERAGE_LT: Float - year_AVERAGE_LTE: Float - year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_MAX_EQUAL: Int - year_MAX_GT: Int - year_MAX_GTE: Int - year_MAX_LT: Int - year_MAX_LTE: Int - year_MIN_EQUAL: Int - year_MIN_GT: Int - year_MIN_GTE: Int - year_MIN_LT: Int - year_MIN_LTE: Int - year_SUM_EQUAL: Int - year_SUM_GT: Int - year_SUM_GTE: Int - year_SUM_LT: Int - year_SUM_LTE: Int -} - -type GenreMoviesRelationship { - cursor: String! - node: Movie! -} - -input GenreMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input GenreMoviesUpdateFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - delete: [GenreMoviesDeleteFieldInput!] - disconnect: [GenreMoviesDisconnectFieldInput!] - update: GenreMoviesUpdateConnectionInput - where: GenreMoviesConnectionWhere -} - -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!] -} - -input GenreRelationInput { - movies: [GenreMoviesCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: SortDirection -} - -input GenreUpdateInput { - movies: [GenreMoviesUpdateFieldInput!] - name: String -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: GenreMoviesAggregateInput - moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere - moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere - \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") - genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use\\") - imdbRating: Float - title: String - year: Int -} - -type MovieAggregateSelection { - count: Int! - imdbRating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - year: IntAggregateSelectionNullable! -} - -input MovieConnectInput { - genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - genres: MovieGenresFieldInput @deprecated(reason: \\"Do not use\\") - imdbRating: Float - title: String - year: Int -} - -input MovieDeleteInput { - genres: [MovieGenresDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -input MovieDisconnectInput { - genres: [MovieGenresDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieGenreGenresAggregationSelection { - count: Int! - node: MovieGenreGenresNodeAggregateSelection -} - -type MovieGenreGenresNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieGenresAggregateInput { - AND: [MovieGenresAggregateInput!] - NOT: MovieGenresAggregateInput - OR: [MovieGenresAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenresNodeAggregationWhereInput -} - -input MovieGenresConnectFieldInput { - connect: [GenreConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere -} - -type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieGenresConnectionSort { - node: GenreSort -} - -input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieGenresCreateFieldInput { - node: GenreCreateInput! -} - -input MovieGenresDeleteFieldInput { - delete: GenreDeleteInput - where: MovieGenresConnectionWhere -} - -input MovieGenresDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: MovieGenresConnectionWhere -} - -input MovieGenresFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] -} - -input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieGenresRelationship { - cursor: String! - node: Genre! -} - -input MovieGenresUpdateConnectionInput { - node: GenreUpdateInput -} - -input MovieGenresUpdateFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - delete: [MovieGenresDeleteFieldInput!] - disconnect: [MovieGenresDisconnectFieldInput!] - update: MovieGenresUpdateConnectionInput - where: MovieGenresConnectionWhere -} - -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!] -} - -input MovieRelationInput { - genres: [MovieGenresCreateFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -\\"\\"\\" -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 { - imdbRating: SortDirection - title: SortDirection - year: SortDirection -} - -input MovieUpdateInput { - genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - imdbRating: Float - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SUBTRACT: Float - title: String - year: Int - year_DECREMENT: Int - year_INCREMENT: Int -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") - genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use\\") - genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where none of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") - genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where some of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere @deprecated(reason: \\"Do not use\\") - genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere @deprecated(reason: \\"Do not use\\") - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String - year: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int - year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type Genre { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + name: String + } + + type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input GenreConnectInput { + movies: [GenreMoviesConnectFieldInput!] + } + + input GenreConnectWhere { + node: GenreWhere! + } + + input GenreCreateInput { + movies: GenreMoviesFieldInput + name: String + } + + input GenreDeleteInput { + movies: [GenreMoviesDeleteFieldInput!] + } + + input GenreDisconnectInput { + movies: [GenreMoviesDisconnectFieldInput!] + } + + type GenreEdge { + cursor: String! + node: Genre! + } + + type GenreMovieMoviesAggregationSelection { + count: Int! + node: GenreMovieMoviesNodeAggregateSelection + } + + type GenreMovieMoviesNodeAggregateSelection { + imdbRating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! + } + + input GenreMoviesAggregateInput { + AND: [GenreMoviesAggregateInput!] + NOT: GenreMoviesAggregateInput + OR: [GenreMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: GenreMoviesNodeAggregationWhereInput + } + + input GenreMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type GenreMoviesConnection { + edges: [GenreMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input GenreMoviesConnectionSort { + node: MovieSort + } + + input GenreMoviesConnectionWhere { + AND: [GenreMoviesConnectionWhere!] + NOT: GenreMoviesConnectionWhere + OR: [GenreMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input GenreMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input GenreMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: GenreMoviesConnectionWhere + } + + input GenreMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: GenreMoviesConnectionWhere + } + + input GenreMoviesFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + } + + input GenreMoviesNodeAggregationWhereInput { + AND: [GenreMoviesNodeAggregationWhereInput!] + NOT: GenreMoviesNodeAggregationWhereInput + OR: [GenreMoviesNodeAggregationWhereInput!] + imdbRating_AVERAGE_EQUAL: Float + imdbRating_AVERAGE_GT: Float + imdbRating_AVERAGE_GTE: Float + imdbRating_AVERAGE_LT: Float + imdbRating_AVERAGE_LTE: Float + imdbRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_MAX_EQUAL: Float + imdbRating_MAX_GT: Float + imdbRating_MAX_GTE: Float + imdbRating_MAX_LT: Float + imdbRating_MAX_LTE: Float + imdbRating_MIN_EQUAL: Float + imdbRating_MIN_GT: Float + imdbRating_MIN_GTE: Float + imdbRating_MIN_LT: Float + imdbRating_MIN_LTE: Float + imdbRating_SUM_EQUAL: Float + imdbRating_SUM_GT: Float + imdbRating_SUM_GTE: Float + imdbRating_SUM_LT: Float + imdbRating_SUM_LTE: Float + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + year_AVERAGE_EQUAL: Float + year_AVERAGE_GT: Float + year_AVERAGE_GTE: Float + year_AVERAGE_LT: Float + year_AVERAGE_LTE: Float + year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_MAX_EQUAL: Int + year_MAX_GT: Int + year_MAX_GTE: Int + year_MAX_LT: Int + year_MAX_LTE: Int + year_MIN_EQUAL: Int + year_MIN_GT: Int + year_MIN_GTE: Int + year_MIN_LT: Int + year_MIN_LTE: Int + year_SUM_EQUAL: Int + year_SUM_GT: Int + year_SUM_GTE: Int + year_SUM_LT: Int + year_SUM_LTE: Int + } + + type GenreMoviesRelationship { + cursor: String! + node: Movie! + } + + input GenreMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input GenreMoviesUpdateFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + delete: [GenreMoviesDeleteFieldInput!] + disconnect: [GenreMoviesDisconnectFieldInput!] + update: GenreMoviesUpdateConnectionInput + where: GenreMoviesConnectionWhere + } + + 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!] + } + + input GenreRelationInput { + movies: [GenreMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: SortDirection + } + + input GenreUpdateInput { + movies: [GenreMoviesUpdateFieldInput!] + name: String + } + + input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: GenreMoviesConnectionWhere + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") + genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") + genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use\\") + imdbRating: Float + title: String + year: Int + } + + type MovieAggregateSelection { + count: Int! + imdbRating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! + } + + input MovieConnectInput { + genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + genres: MovieGenresFieldInput @deprecated(reason: \\"Do not use\\") + imdbRating: Float + title: String + year: Int + } + + input MovieDeleteInput { + genres: [MovieGenresDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + input MovieDisconnectInput { + genres: [MovieGenresDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieGenreGenresAggregationSelection { + count: Int! + node: MovieGenreGenresNodeAggregateSelection + } + + type MovieGenreGenresNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieGenresAggregateInput { + AND: [MovieGenresAggregateInput!] + NOT: MovieGenresAggregateInput + OR: [MovieGenresAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenresNodeAggregationWhereInput + } + + input MovieGenresConnectFieldInput { + connect: [GenreConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere + } + + type MovieGenresConnection { + edges: [MovieGenresRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieGenresConnectionSort { + node: GenreSort + } + + input MovieGenresConnectionWhere { + AND: [MovieGenresConnectionWhere!] + NOT: MovieGenresConnectionWhere + OR: [MovieGenresConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieGenresCreateFieldInput { + node: GenreCreateInput! + } + + input MovieGenresDeleteFieldInput { + delete: GenreDeleteInput + where: MovieGenresConnectionWhere + } + + input MovieGenresDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: MovieGenresConnectionWhere + } + + input MovieGenresFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + } + + input MovieGenresNodeAggregationWhereInput { + AND: [MovieGenresNodeAggregationWhereInput!] + NOT: MovieGenresNodeAggregationWhereInput + OR: [MovieGenresNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieGenresRelationship { + cursor: String! + node: Genre! + } + + input MovieGenresUpdateConnectionInput { + node: GenreUpdateInput + } + + input MovieGenresUpdateFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + delete: [MovieGenresDeleteFieldInput!] + disconnect: [MovieGenresDisconnectFieldInput!] + update: MovieGenresUpdateConnectionInput + where: MovieGenresConnectionWhere + } + + 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!] + } + + input MovieRelationInput { + genres: [MovieGenresCreateFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + \\"\\"\\" + 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 { + imdbRating: SortDirection + title: SortDirection + year: SortDirection + } + + input MovieUpdateInput { + genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") + imdbRating: Float + imdbRating_ADD: Float + imdbRating_DIVIDE: Float + imdbRating_MULTIPLY: Float + imdbRating_SUBTRACT: Float + title: String + year: Int + year_DECREMENT: Int + year_INCREMENT: Int + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") + genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use\\") + genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + genres_ALL: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + genres_NONE: GenreWhere @deprecated(reason: \\"Do not use\\") + genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + genres_SOME: GenreWhere @deprecated(reason: \\"Do not use\\") + imdbRating: Float + imdbRating_GT: Float + imdbRating_GTE: Float + imdbRating_IN: [Float] + imdbRating_LT: Float + imdbRating_LTE: Float + imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + year: Int + year_GT: Int + year_GTE: Int + year_IN: [Int] + year_LT: Int + year_LTE: Int + year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Directives on implemented interface relations preserved", async () => { @@ -892,2585 +892,2585 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - role: String! -} - -input ActedInCreateInput { - role: String! -} - -input ActedInSort { - role: SortDirection -} - -input ActedInUpdateInput { - role: String -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - role: String - role_CONTAINS: String - role_ENDS_WITH: String - role_IN: [String!] - role_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_STARTS_WITH: String -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - edge: ActedInCreateInput! - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - role: String! -} - -input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") - runtime: Int! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsEdgeAggregateSelection { - role: StringAggregateSelectionNonNullable! -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -input MovieCreateInput { - actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") - runtime: Int! - title: String! -} - -input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -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!] -} - -input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -\\"\\"\\" -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 { - runtime: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - actors: [Actor!]! - title: String! -} - -input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ProductionActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ProductionActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! -} - -input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] -} - -type ProductionActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - role: String! -} - -input ProductionActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput -} - -input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere -} - -input ProductionConnectInput { - _on: ProductionImplementationsConnectInput -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput -} - -input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput -} - -input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] -} - -input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] -} - -input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - episodes: Int! - title: String! -} - -type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection -} - -type SeriesActorActorsEdgeAggregateSelection { - role: StringAggregateSelectionNonNullable! -} - -type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: SeriesActorsEdgeAggregationWhereInput - node: SeriesActorsNodeAggregationWhereInput -} - -input SeriesActorsEdgeAggregationWhereInput { - AND: [SeriesActorsEdgeAggregationWhereInput!] - NOT: SeriesActorsEdgeAggregationWhereInput - OR: [SeriesActorsEdgeAggregationWhereInput!] - role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - actors: ProductionActorsFieldInput - episodes: Int! - title: String! -} - -input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] -} - -input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - episodes: Int - episodes_DECREMENT: Int - episodes_INCREMENT: Int - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + } - test("Directives on base interface preserved", async () => { - const typeDefs = gql` - interface Production { - title: String! - actors: [Actor!]! @deprecated(reason: "Do not use") + interface ActedIn { + role: String! } - type Movie implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - runtime: Int! + input ActedInCreateInput { + role: String! } - type Series implements Production { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! + input ActedInSort { + role: SortDirection } - interface ActedIn @relationshipProperties { - role: String! + input ActedInUpdateInput { + role: String + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + role: String + role_CONTAINS: String + role_ENDS_WITH: String + role_IN: [String!] + role_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_STARTS_WITH: String } type Actor { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - role: String! -} - -input ActedInCreateInput { - role: String! -} - -input ActedInSort { - role: SortDirection -} - -input ActedInUpdateInput { - role: String -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - role: String - role_CONTAINS: String - role_ENDS_WITH: String - role_IN: [String!] - role_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - role_STARTS_WITH: String -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - edge: ActedInCreateInput! - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - role: String! -} - -input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") - runtime: Int! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsEdgeAggregateSelection { - role: StringAggregateSelectionNonNullable! -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -input MovieCreateInput { - actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") - runtime: Int! - title: String! -} - -input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -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!] -} - -input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -\\"\\"\\" -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 { - runtime: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - actors: [Actor!]! @deprecated(reason: \\"Do not use\\") - title: String! -} - -input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ProductionActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ProductionActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! -} - -input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] -} - -type ProductionActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - role: String! -} - -input ProductionActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput -} - -input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere -} - -input ProductionConnectInput { - _on: ProductionImplementationsConnectInput -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput -} - -input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput -} - -input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] -} - -input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] -} - -input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") - episodes: Int! - title: String! -} - -type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection -} - -type SeriesActorActorsEdgeAggregateSelection { - role: StringAggregateSelectionNonNullable! -} - -type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: SeriesActorsEdgeAggregationWhereInput - node: SeriesActorsNodeAggregationWhereInput -} - -input SeriesActorsEdgeAggregationWhereInput { - AND: [SeriesActorsEdgeAggregationWhereInput!] - NOT: SeriesActorsEdgeAggregationWhereInput - OR: [SeriesActorsEdgeAggregationWhereInput!] - role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") - episodes: Int! - title: String! -} - -input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - episodes: Int - episodes_DECREMENT: Int - episodes_INCREMENT: Int - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput @deprecated(reason: \\"Do not use\\") - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); + input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + edge: ActedInCreateInput! + where: ProductionConnectWhere + } - test("Directives on unions preserved", async () => { - const typeDefs = gql` - union Content = Blog | Post + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } - type Blog { - title: String - posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) + input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort } - type Post { - content: String @deprecated(reason: "Do not use post.content") + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } - type User { - name: String - content: [Content!]! - @relationship(type: "HAS_CONTENT", direction: OUT) - @deprecated(reason: "Do not use user.content") + input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Blog { - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true, where: PostWhere): BlogPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! - title: String -} - -type BlogAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input BlogConnectInput { - posts: [BlogPostsConnectFieldInput!] -} - -input BlogConnectWhere { - node: BlogWhere! -} - -input BlogCreateInput { - posts: BlogPostsFieldInput - title: String -} - -input BlogDeleteInput { - posts: [BlogPostsDeleteFieldInput!] -} - -input BlogDisconnectInput { - posts: [BlogPostsDisconnectFieldInput!] -} - -type BlogEdge { - cursor: String! - node: Blog! -} - -input BlogOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BlogSort objects to sort Blogs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BlogSort!] -} - -type BlogPostPostsAggregationSelection { - count: Int! - node: BlogPostPostsNodeAggregateSelection -} - -type BlogPostPostsNodeAggregateSelection { - content: StringAggregateSelectionNullable! -} - -input BlogPostsAggregateInput { - AND: [BlogPostsAggregateInput!] - NOT: BlogPostsAggregateInput - OR: [BlogPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: BlogPostsNodeAggregationWhereInput -} - -input BlogPostsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere -} - -type BlogPostsConnection { - edges: [BlogPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input BlogPostsConnectionSort { - node: PostSort -} - -input BlogPostsConnectionWhere { - AND: [BlogPostsConnectionWhere!] - NOT: BlogPostsConnectionWhere - OR: [BlogPostsConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input BlogPostsCreateFieldInput { - node: PostCreateInput! -} - -input BlogPostsDeleteFieldInput { - where: BlogPostsConnectionWhere -} - -input BlogPostsDisconnectFieldInput { - where: BlogPostsConnectionWhere -} - -input BlogPostsFieldInput { - connect: [BlogPostsConnectFieldInput!] - create: [BlogPostsCreateFieldInput!] -} - -input BlogPostsNodeAggregationWhereInput { - AND: [BlogPostsNodeAggregationWhereInput!] - NOT: BlogPostsNodeAggregationWhereInput - OR: [BlogPostsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type BlogPostsRelationship { - cursor: String! - node: Post! -} - -input BlogPostsUpdateConnectionInput { - node: PostUpdateInput -} - -input BlogPostsUpdateFieldInput { - connect: [BlogPostsConnectFieldInput!] - create: [BlogPostsCreateFieldInput!] - delete: [BlogPostsDeleteFieldInput!] - disconnect: [BlogPostsDisconnectFieldInput!] - update: BlogPostsUpdateConnectionInput - where: BlogPostsConnectionWhere -} - -input BlogRelationInput { - posts: [BlogPostsCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Blogs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BlogSort object. -\\"\\"\\" -input BlogSort { - title: SortDirection -} - -input BlogUpdateInput { - posts: [BlogPostsUpdateFieldInput!] - title: String -} - -input BlogWhere { - AND: [BlogWhere!] - NOT: BlogWhere - OR: [BlogWhere!] - posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: BlogPostsAggregateInput - postsConnection: BlogPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Blogs where all of the related BlogPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: BlogPostsConnectionWhere - \\"\\"\\" - Return Blogs where none of the related BlogPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: BlogPostsConnectionWhere - postsConnection_NOT: BlogPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Blogs where one of the related BlogPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: BlogPostsConnectionWhere - \\"\\"\\" - Return Blogs where some of the related BlogPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: BlogPostsConnectionWhere - \\"\\"\\"Return Blogs where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere - \\"\\"\\"Return Blogs where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere - posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Blogs where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere - \\"\\"\\"Return Blogs where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type BlogsConnection { - edges: [BlogEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -union Content = Blog | Post - -input ContentWhere { - Blog: BlogWhere - Post: PostWhere -} - -type CreateBlogsMutationResponse { - blogs: [Blog!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createBlogs(input: [BlogCreateInput!]!): CreateBlogsMutationResponse! - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteBlogs(delete: BlogDeleteInput, where: BlogWhere): DeleteInfo! - deletePosts(where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateBlogs(connect: BlogConnectInput, create: BlogRelationInput, delete: BlogDeleteInput, disconnect: BlogDisconnectInput, update: BlogUpdateInput, where: BlogWhere): UpdateBlogsMutationResponse! - updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - content: String @deprecated(reason: \\"Do not use post.content\\") -} - -type PostAggregateSelection { - content: StringAggregateSelectionNullable! - count: Int! -} - -input PostConnectWhere { - node: PostWhere! -} - -input PostCreateInput { - content: String @deprecated(reason: \\"Do not use post.content\\") -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] -} - -\\"\\"\\" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -\\"\\"\\" -input PostSort { - content: SortDirection @deprecated(reason: \\"Do not use post.content\\") -} - -input PostUpdateInput { - content: String @deprecated(reason: \\"Do not use post.content\\") -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - content: String @deprecated(reason: \\"Do not use post.content\\") - content_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") - content_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") - content_IN: [String] @deprecated(reason: \\"Do not use post.content\\") - content_NOT: String @deprecated(reason: \\"Do not use post.content\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") - content_NOT_IN: [String] @deprecated(reason: \\"Do not use post.content\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Do not use post.content\\") - content_STARTS_WITH: String @deprecated(reason: \\"Do not use post.content\\") -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - blogs(options: BlogOptions, where: BlogWhere): [Blog!]! - blogsAggregate(where: BlogWhere): BlogAggregateSelection! - blogsConnection(after: String, first: Int, sort: [BlogSort], where: BlogWhere): BlogsConnection! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateBlogsMutationResponse { - blogs: [Blog!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason: \\"Do not use user.content\\") - contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: \\"Do not use user.content\\") - name: String -} - -type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input UserConnectInput { - content: UserContentConnectInput -} - -input UserContentBlogConnectFieldInput { - connect: [BlogConnectInput!] - where: BlogConnectWhere -} - -input UserContentBlogConnectionWhere { - AND: [UserContentBlogConnectionWhere!] - NOT: UserContentBlogConnectionWhere - OR: [UserContentBlogConnectionWhere!] - node: BlogWhere - node_NOT: BlogWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input UserContentBlogCreateFieldInput { - node: BlogCreateInput! -} - -input UserContentBlogDeleteFieldInput { - delete: BlogDeleteInput - where: UserContentBlogConnectionWhere -} - -input UserContentBlogDisconnectFieldInput { - disconnect: BlogDisconnectInput - where: UserContentBlogConnectionWhere -} - -input UserContentBlogFieldInput { - connect: [UserContentBlogConnectFieldInput!] - create: [UserContentBlogCreateFieldInput!] -} - -input UserContentBlogUpdateConnectionInput { - node: BlogUpdateInput -} - -input UserContentBlogUpdateFieldInput { - connect: [UserContentBlogConnectFieldInput!] - create: [UserContentBlogCreateFieldInput!] - delete: [UserContentBlogDeleteFieldInput!] - disconnect: [UserContentBlogDisconnectFieldInput!] - update: UserContentBlogUpdateConnectionInput - where: UserContentBlogConnectionWhere -} - -input UserContentConnectInput { - Blog: [UserContentBlogConnectFieldInput!] - Post: [UserContentPostConnectFieldInput!] -} - -type UserContentConnection { - edges: [UserContentRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserContentConnectionWhere { - Blog: UserContentBlogConnectionWhere - Post: UserContentPostConnectionWhere -} - -input UserContentCreateFieldInput { - Blog: [UserContentBlogCreateFieldInput!] - Post: [UserContentPostCreateFieldInput!] -} - -input UserContentCreateInput { - Blog: UserContentBlogFieldInput - Post: UserContentPostFieldInput -} - -input UserContentDeleteInput { - Blog: [UserContentBlogDeleteFieldInput!] - Post: [UserContentPostDeleteFieldInput!] -} - -input UserContentDisconnectInput { - Blog: [UserContentBlogDisconnectFieldInput!] - Post: [UserContentPostDisconnectFieldInput!] -} - -input UserContentPostConnectFieldInput { - where: PostConnectWhere -} - -input UserContentPostConnectionWhere { - AND: [UserContentPostConnectionWhere!] - NOT: UserContentPostConnectionWhere - OR: [UserContentPostConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input UserContentPostCreateFieldInput { - node: PostCreateInput! -} - -input UserContentPostDeleteFieldInput { - where: UserContentPostConnectionWhere -} - -input UserContentPostDisconnectFieldInput { - where: UserContentPostConnectionWhere -} - -input UserContentPostFieldInput { - connect: [UserContentPostConnectFieldInput!] - create: [UserContentPostCreateFieldInput!] -} - -input UserContentPostUpdateConnectionInput { - node: PostUpdateInput -} - -input UserContentPostUpdateFieldInput { - connect: [UserContentPostConnectFieldInput!] - create: [UserContentPostCreateFieldInput!] - delete: [UserContentPostDeleteFieldInput!] - disconnect: [UserContentPostDisconnectFieldInput!] - update: UserContentPostUpdateConnectionInput - where: UserContentPostConnectionWhere -} - -type UserContentRelationship { - cursor: String! - node: Content! -} - -input UserContentUpdateInput { - Blog: [UserContentBlogUpdateFieldInput!] - Post: [UserContentPostUpdateFieldInput!] -} - -input UserCreateInput { - content: UserContentCreateInput - name: String -} - -input UserDeleteInput { - content: UserContentDeleteInput -} - -input UserDisconnectInput { - content: UserContentDisconnectInput -} - -type UserEdge { - cursor: String! - node: User! -} - -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!] -} - -input UserRelationInput { - content: UserContentCreateFieldInput -} - -\\"\\"\\" -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 { - content: UserContentUpdateInput - name: String -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - contentConnection: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_ALL: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") - \\"\\"\\" - Return Users where none of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_NONE: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") - contentConnection_NOT: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_SINGLE: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") - \\"\\"\\" - Return Users where some of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_SOME: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + role: String! + } + + input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + runtime: Int! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + role: StringAggregateSelectionNonNullable! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + input MovieCreateInput { + actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") + runtime: Int! + title: String! + } + + input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + 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!] + } + + input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + \\"\\"\\" + 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 { + runtime: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + actors: [Actor!]! + title: String! + } + + input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ProductionActorsConnectionSort { + edge: ActedInSort + node: ActorSort + } + + input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ProductionActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! + } + + input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + } + + type ProductionActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + role: String! + } + + input ProductionActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput + } + + input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere + } + + input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + } + + input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + } + + input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] + } + + input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] + } + + input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + episodes: Int! + title: String! + } + + type SeriesActorActorsAggregationSelection { + count: Int! + edge: SeriesActorActorsEdgeAggregateSelection + node: SeriesActorActorsNodeAggregateSelection + } + + type SeriesActorActorsEdgeAggregateSelection { + role: StringAggregateSelectionNonNullable! + } + + type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: SeriesActorsEdgeAggregationWhereInput + node: SeriesActorsNodeAggregationWhereInput + } + + input SeriesActorsEdgeAggregationWhereInput { + AND: [SeriesActorsEdgeAggregationWhereInput!] + NOT: SeriesActorsEdgeAggregationWhereInput + OR: [SeriesActorsEdgeAggregationWhereInput!] + role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type SeriesAggregateSelection { + count: Int! + episodes: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + actors: ProductionActorsFieldInput + episodes: Int! + title: String! + } + + input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] + } + + input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + episodes: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + episodes: Int + episodes_DECREMENT: Int + episodes_INCREMENT: Int + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + episodes: Int + episodes_GT: Int + episodes_GTE: Int + episodes_IN: [Int!] + episodes_LT: Int + episodes_LTE: Int + episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + + test("Directives on base interface preserved", async () => { + const typeDefs = gql` + interface Production { + title: String! + actors: [Actor!]! @deprecated(reason: "Do not use") + } + + type Movie implements Production { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + runtime: Int! + } + + type Series implements Production { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + episodes: Int! + } + + interface ActedIn @relationshipProperties { + role: String! + } + + type Actor { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + role: String! + } + + input ActedInCreateInput { + role: String! + } + + input ActedInSort { + role: SortDirection + } + + input ActedInUpdateInput { + role: String + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + role: String + role_CONTAINS: String + role_ENDS_WITH: String + role_IN: [String!] + role_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + role_STARTS_WITH: String + } + + type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + edge: ActedInCreateInput! + where: ProductionConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + role: String! + } + + input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + runtime: Int! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + role: StringAggregateSelectionNonNullable! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + input MovieCreateInput { + actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") + runtime: Int! + title: String! + } + + input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + 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!] + } + + input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + \\"\\"\\" + 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 { + runtime: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + actors: [Actor!]! @deprecated(reason: \\"Do not use\\") + title: String! + } + + input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ProductionActorsConnectionSort { + edge: ActedInSort + node: ActorSort + } + + input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ProductionActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! + } + + input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + } + + type ProductionActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + role: String! + } + + input ProductionActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput + } + + input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere + } + + input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + } + + input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + } + + input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] + } + + input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] + } + + input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + episodes: Int! + title: String! + } + + type SeriesActorActorsAggregationSelection { + count: Int! + edge: SeriesActorActorsEdgeAggregateSelection + node: SeriesActorActorsNodeAggregateSelection + } + + type SeriesActorActorsEdgeAggregateSelection { + role: StringAggregateSelectionNonNullable! + } + + type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: SeriesActorsEdgeAggregationWhereInput + node: SeriesActorsNodeAggregationWhereInput + } + + input SeriesActorsEdgeAggregationWhereInput { + AND: [SeriesActorsEdgeAggregationWhereInput!] + NOT: SeriesActorsEdgeAggregationWhereInput + OR: [SeriesActorsEdgeAggregationWhereInput!] + role_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + role_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + role_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + role_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type SeriesAggregateSelection { + count: Int! + episodes: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + actors: ProductionActorsFieldInput @deprecated(reason: \\"Do not use\\") + episodes: Int! + title: String! + } + + input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] @deprecated(reason: \\"Do not use\\") + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + episodes: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") + episodes: Int + episodes_DECREMENT: Int + episodes_INCREMENT: Int + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere @deprecated(reason: \\"Do not use\\") + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") + episodes: Int + episodes_GT: Int + episodes_GTE: Int + episodes_IN: [Int!] + episodes_LT: Int + episodes_LTE: Int + episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + + test("Directives on unions preserved", async () => { + const typeDefs = gql` + union Content = Blog | Post + + type Blog { + title: String + posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type Post { + content: String @deprecated(reason: "Do not use post.content") + } + + type User { + name: String + content: [Content!]! + @relationship(type: "HAS_CONTENT", direction: OUT) + @deprecated(reason: "Do not use user.content") + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Blog { + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): BlogPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! + title: String + } + + type BlogAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input BlogConnectInput { + posts: [BlogPostsConnectFieldInput!] + } + + input BlogConnectWhere { + node: BlogWhere! + } + + input BlogCreateInput { + posts: BlogPostsFieldInput + title: String + } + + input BlogDeleteInput { + posts: [BlogPostsDeleteFieldInput!] + } + + input BlogDisconnectInput { + posts: [BlogPostsDisconnectFieldInput!] + } + + type BlogEdge { + cursor: String! + node: Blog! + } + + input BlogOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BlogSort objects to sort Blogs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BlogSort!] + } + + type BlogPostPostsAggregationSelection { + count: Int! + node: BlogPostPostsNodeAggregateSelection + } + + type BlogPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNullable! + } + + input BlogPostsAggregateInput { + AND: [BlogPostsAggregateInput!] + NOT: BlogPostsAggregateInput + OR: [BlogPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: BlogPostsNodeAggregationWhereInput + } + + input BlogPostsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere + } + + type BlogPostsConnection { + edges: [BlogPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input BlogPostsConnectionSort { + node: PostSort + } + + input BlogPostsConnectionWhere { + AND: [BlogPostsConnectionWhere!] + NOT: BlogPostsConnectionWhere + OR: [BlogPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input BlogPostsCreateFieldInput { + node: PostCreateInput! + } + + input BlogPostsDeleteFieldInput { + where: BlogPostsConnectionWhere + } + + input BlogPostsDisconnectFieldInput { + where: BlogPostsConnectionWhere + } + + input BlogPostsFieldInput { + connect: [BlogPostsConnectFieldInput!] + create: [BlogPostsCreateFieldInput!] + } + + input BlogPostsNodeAggregationWhereInput { + AND: [BlogPostsNodeAggregationWhereInput!] + NOT: BlogPostsNodeAggregationWhereInput + OR: [BlogPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type BlogPostsRelationship { + cursor: String! + node: Post! + } + + input BlogPostsUpdateConnectionInput { + node: PostUpdateInput + } + + input BlogPostsUpdateFieldInput { + connect: [BlogPostsConnectFieldInput!] + create: [BlogPostsCreateFieldInput!] + delete: [BlogPostsDeleteFieldInput!] + disconnect: [BlogPostsDisconnectFieldInput!] + update: BlogPostsUpdateConnectionInput + where: BlogPostsConnectionWhere + } + + input BlogRelationInput { + posts: [BlogPostsCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Blogs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BlogSort object. + \\"\\"\\" + input BlogSort { + title: SortDirection + } + + input BlogUpdateInput { + posts: [BlogPostsUpdateFieldInput!] + title: String + } + + input BlogWhere { + AND: [BlogWhere!] + NOT: BlogWhere + OR: [BlogWhere!] + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: BlogPostsAggregateInput + postsConnection: BlogPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Blogs where all of the related BlogPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: BlogPostsConnectionWhere + \\"\\"\\" + Return Blogs where none of the related BlogPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: BlogPostsConnectionWhere + postsConnection_NOT: BlogPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Blogs where one of the related BlogPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: BlogPostsConnectionWhere + \\"\\"\\" + Return Blogs where some of the related BlogPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: BlogPostsConnectionWhere + \\"\\"\\"Return Blogs where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Blogs where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Blogs where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Blogs where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type BlogsConnection { + edges: [BlogEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + union Content = Blog | Post + + input ContentWhere { + Blog: BlogWhere + Post: PostWhere + } + + type CreateBlogsMutationResponse { + blogs: [Blog!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createBlogs(input: [BlogCreateInput!]!): CreateBlogsMutationResponse! + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteBlogs(delete: BlogDeleteInput, where: BlogWhere): DeleteInfo! + deletePosts(where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateBlogs(connect: BlogConnectInput, create: BlogRelationInput, delete: BlogDeleteInput, disconnect: BlogDisconnectInput, update: BlogUpdateInput, where: BlogWhere): UpdateBlogsMutationResponse! + updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + content: String @deprecated(reason: \\"Do not use post.content\\") + } + + type PostAggregateSelection { + content: StringAggregateSelectionNullable! + count: Int! + } + + input PostConnectWhere { + node: PostWhere! + } + + input PostCreateInput { + content: String @deprecated(reason: \\"Do not use post.content\\") + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + content: SortDirection @deprecated(reason: \\"Do not use post.content\\") + } + + input PostUpdateInput { + content: String @deprecated(reason: \\"Do not use post.content\\") + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + content: String @deprecated(reason: \\"Do not use post.content\\") + content_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") + content_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") + content_IN: [String] @deprecated(reason: \\"Do not use post.content\\") + content_NOT: String @deprecated(reason: \\"Do not use post.content\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") + content_NOT_IN: [String] @deprecated(reason: \\"Do not use post.content\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Do not use post.content\\") + content_STARTS_WITH: String @deprecated(reason: \\"Do not use post.content\\") + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + blogs(options: BlogOptions, where: BlogWhere): [Blog!]! + blogsAggregate(where: BlogWhere): BlogAggregateSelection! + blogsConnection(after: String, first: Int, sort: [BlogSort], where: BlogWhere): BlogsConnection! + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateBlogsMutationResponse { + blogs: [Blog!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + content(directed: Boolean = true, options: QueryOptions, where: ContentWhere): [Content!]! @deprecated(reason: \\"Do not use user.content\\") + contentConnection(after: String, directed: Boolean = true, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: \\"Do not use user.content\\") + name: String + } + + type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input UserConnectInput { + content: UserContentConnectInput + } + + input UserContentBlogConnectFieldInput { + connect: [BlogConnectInput!] + where: BlogConnectWhere + } + + input UserContentBlogConnectionWhere { + AND: [UserContentBlogConnectionWhere!] + NOT: UserContentBlogConnectionWhere + OR: [UserContentBlogConnectionWhere!] + node: BlogWhere + node_NOT: BlogWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserContentBlogCreateFieldInput { + node: BlogCreateInput! + } + + input UserContentBlogDeleteFieldInput { + delete: BlogDeleteInput + where: UserContentBlogConnectionWhere + } + + input UserContentBlogDisconnectFieldInput { + disconnect: BlogDisconnectInput + where: UserContentBlogConnectionWhere + } + + input UserContentBlogFieldInput { + connect: [UserContentBlogConnectFieldInput!] + create: [UserContentBlogCreateFieldInput!] + } + + input UserContentBlogUpdateConnectionInput { + node: BlogUpdateInput + } + + input UserContentBlogUpdateFieldInput { + connect: [UserContentBlogConnectFieldInput!] + create: [UserContentBlogCreateFieldInput!] + delete: [UserContentBlogDeleteFieldInput!] + disconnect: [UserContentBlogDisconnectFieldInput!] + update: UserContentBlogUpdateConnectionInput + where: UserContentBlogConnectionWhere + } + + input UserContentConnectInput { + Blog: [UserContentBlogConnectFieldInput!] + Post: [UserContentPostConnectFieldInput!] + } + + type UserContentConnection { + edges: [UserContentRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserContentConnectionWhere { + Blog: UserContentBlogConnectionWhere + Post: UserContentPostConnectionWhere + } + + input UserContentCreateFieldInput { + Blog: [UserContentBlogCreateFieldInput!] + Post: [UserContentPostCreateFieldInput!] + } + + input UserContentCreateInput { + Blog: UserContentBlogFieldInput + Post: UserContentPostFieldInput + } + + input UserContentDeleteInput { + Blog: [UserContentBlogDeleteFieldInput!] + Post: [UserContentPostDeleteFieldInput!] + } + + input UserContentDisconnectInput { + Blog: [UserContentBlogDisconnectFieldInput!] + Post: [UserContentPostDisconnectFieldInput!] + } + + input UserContentPostConnectFieldInput { + where: PostConnectWhere + } + + input UserContentPostConnectionWhere { + AND: [UserContentPostConnectionWhere!] + NOT: UserContentPostConnectionWhere + OR: [UserContentPostConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserContentPostCreateFieldInput { + node: PostCreateInput! + } + + input UserContentPostDeleteFieldInput { + where: UserContentPostConnectionWhere + } + + input UserContentPostDisconnectFieldInput { + where: UserContentPostConnectionWhere + } + + input UserContentPostFieldInput { + connect: [UserContentPostConnectFieldInput!] + create: [UserContentPostCreateFieldInput!] + } + + input UserContentPostUpdateConnectionInput { + node: PostUpdateInput + } + + input UserContentPostUpdateFieldInput { + connect: [UserContentPostConnectFieldInput!] + create: [UserContentPostCreateFieldInput!] + delete: [UserContentPostDeleteFieldInput!] + disconnect: [UserContentPostDisconnectFieldInput!] + update: UserContentPostUpdateConnectionInput + where: UserContentPostConnectionWhere + } + + type UserContentRelationship { + cursor: String! + node: Content! + } + + input UserContentUpdateInput { + Blog: [UserContentBlogUpdateFieldInput!] + Post: [UserContentPostUpdateFieldInput!] + } + + input UserCreateInput { + content: UserContentCreateInput + name: String + } + + input UserDeleteInput { + content: UserContentDeleteInput + } + + input UserDisconnectInput { + content: UserContentDisconnectInput + } + + type UserEdge { + cursor: String! + node: User! + } + + 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!] + } + + input UserRelationInput { + content: UserContentCreateFieldInput + } + + \\"\\"\\" + 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 { + content: UserContentUpdateInput + name: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + contentConnection: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_ALL: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\" + Return Users where none of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_NONE: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + contentConnection_NOT: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_SINGLE: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\" + Return Users where some of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_SOME: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 7870d55a8f..1e0112331e 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -45,593 +45,593 @@ describe("Alias", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - city: String - name: String! -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorActedInEdgeAggregationWhereInput - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - edge: ActorActedInPropsCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActorActedInPropsSort - node: MovieSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActorActedInPropsWhere - edge_NOT: ActorActedInPropsWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - edge: ActorActedInPropsCreateInput! - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInEdgeAggregationWhereInput { - AND: [ActorActedInEdgeAggregationWhereInput!] - NOT: ActorActedInEdgeAggregationWhereInput - OR: [ActorActedInEdgeAggregationWhereInput!] - character_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_AVERAGE_LENGTH_EQUAL: Float - character_AVERAGE_LENGTH_GT: Float - character_AVERAGE_LENGTH_GTE: Float - character_AVERAGE_LENGTH_LT: Float - character_AVERAGE_LENGTH_LTE: Float - character_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LONGEST_LENGTH_EQUAL: Int - character_LONGEST_LENGTH_GT: Int - character_LONGEST_LENGTH_GTE: Int - character_LONGEST_LENGTH_LT: Int - character_LONGEST_LENGTH_LTE: Int - character_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - character_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_SHORTEST_LENGTH_EQUAL: Int - character_SHORTEST_LENGTH_GT: Int - character_SHORTEST_LENGTH_GTE: Int - character_SHORTEST_LENGTH_LT: Int - character_SHORTEST_LENGTH_LTE: Int - character_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - character_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - rating_AVERAGE_EQUAL: Float - rating_AVERAGE_GT: Float - rating_AVERAGE_GTE: Float - rating_AVERAGE_LT: Float - rating_AVERAGE_LTE: Float - rating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - rating_MAX_EQUAL: Float - rating_MAX_GT: Float - rating_MAX_GTE: Float - rating_MAX_LT: Float - rating_MAX_LTE: Float - rating_MIN_EQUAL: Float - rating_MIN_GT: Float - rating_MIN_GTE: Float - rating_MIN_LT: Float - rating_MIN_LTE: Float - rating_SUM_EQUAL: Float - rating_SUM_GT: Float - rating_SUM_GTE: Float - rating_SUM_LT: Float - rating_SUM_LTE: Float - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -interface ActorActedInProps { - character: String! - screenTime: Int -} - -input ActorActedInPropsCreateInput { - character: String! - screenTime: Int -} - -input ActorActedInPropsSort { - character: SortDirection - screenTime: SortDirection -} - -input ActorActedInPropsUpdateInput { - character: String - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int -} - -input ActorActedInPropsWhere { - AND: [ActorActedInPropsWhere!] - NOT: ActorActedInPropsWhere - OR: [ActorActedInPropsWhere!] - character: String - character_CONTAINS: String - character_ENDS_WITH: String - character_IN: [String!] - character_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - character_STARTS_WITH: String - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type ActorActedInRelationship implements ActorActedInProps { - character: String! - cursor: String! - node: Movie! - screenTime: Int -} - -input ActorActedInUpdateConnectionInput { - edge: ActorActedInPropsUpdateInput - node: MovieUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - city: StringAggregateSelectionNullable! - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - city: String - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - edge: ActorMovieActedInEdgeAggregateSelection - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInEdgeAggregateSelection { - character: StringAggregateSelectionNonNullable! - screenTime: IntAggregateSelectionNullable! -} - -type ActorMovieActedInNodeAggregateSelection { - rating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - city: SortDirection - name: SortDirection -} - -input ActorUpdateInput { - actedIn: [ActorActedInUpdateFieldInput!] - city: String - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - city: String - city_CONTAINS: String - city_ENDS_WITH: String - city_IN: [String] - city_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - city_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - rating: Float - title: String! -} - -type MovieAggregateSelection { - count: Int! - rating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - rating: Float - title: String! -} - -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 { - rating: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - rating: Float - rating_ADD: Float - rating_DIVIDE: Float - rating_MULTIPLY: Float - rating_SUBTRACT: Float - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - rating: Float - rating_GT: Float - rating_GTE: Float - rating_IN: [Float] - rating_LT: Float - rating_LTE: Float - rating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - rating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + city: String + name: String! + } + + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorActedInEdgeAggregationWhereInput + node: ActorActedInNodeAggregationWhereInput + } + + input ActorActedInConnectFieldInput { + edge: ActorActedInPropsCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + edge: ActorActedInPropsSort + node: MovieSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActorActedInPropsWhere + edge_NOT: ActorActedInPropsWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + edge: ActorActedInPropsCreateInput! + node: MovieCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInEdgeAggregationWhereInput { + AND: [ActorActedInEdgeAggregationWhereInput!] + NOT: ActorActedInEdgeAggregationWhereInput + OR: [ActorActedInEdgeAggregationWhereInput!] + character_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_AVERAGE_LENGTH_EQUAL: Float + character_AVERAGE_LENGTH_GT: Float + character_AVERAGE_LENGTH_GTE: Float + character_AVERAGE_LENGTH_LT: Float + character_AVERAGE_LENGTH_LTE: Float + character_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LONGEST_LENGTH_EQUAL: Int + character_LONGEST_LENGTH_GT: Int + character_LONGEST_LENGTH_GTE: Int + character_LONGEST_LENGTH_LT: Int + character_LONGEST_LENGTH_LTE: Int + character_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + character_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_SHORTEST_LENGTH_EQUAL: Int + character_SHORTEST_LENGTH_GT: Int + character_SHORTEST_LENGTH_GTE: Int + character_SHORTEST_LENGTH_LT: Int + character_SHORTEST_LENGTH_LTE: Int + character_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + character_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + rating_AVERAGE_EQUAL: Float + rating_AVERAGE_GT: Float + rating_AVERAGE_GTE: Float + rating_AVERAGE_LT: Float + rating_AVERAGE_LTE: Float + rating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + rating_MAX_EQUAL: Float + rating_MAX_GT: Float + rating_MAX_GTE: Float + rating_MAX_LT: Float + rating_MAX_LTE: Float + rating_MIN_EQUAL: Float + rating_MIN_GT: Float + rating_MIN_GTE: Float + rating_MIN_LT: Float + rating_MIN_LTE: Float + rating_SUM_EQUAL: Float + rating_SUM_GT: Float + rating_SUM_GTE: Float + rating_SUM_LT: Float + rating_SUM_LTE: Float + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + interface ActorActedInProps { + character: String! + screenTime: Int + } + + input ActorActedInPropsCreateInput { + character: String! + screenTime: Int + } + + input ActorActedInPropsSort { + character: SortDirection + screenTime: SortDirection + } + + input ActorActedInPropsUpdateInput { + character: String + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int + } + + input ActorActedInPropsWhere { + AND: [ActorActedInPropsWhere!] + NOT: ActorActedInPropsWhere + OR: [ActorActedInPropsWhere!] + character: String + character_CONTAINS: String + character_ENDS_WITH: String + character_IN: [String!] + character_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + character_STARTS_WITH: String + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type ActorActedInRelationship implements ActorActedInProps { + character: String! + cursor: String! + node: Movie! + screenTime: Int + } + + input ActorActedInUpdateConnectionInput { + edge: ActorActedInPropsUpdateInput + node: MovieUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + city: StringAggregateSelectionNullable! + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + city: String + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + edge: ActorMovieActedInEdgeAggregateSelection + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInEdgeAggregateSelection { + character: StringAggregateSelectionNonNullable! + screenTime: IntAggregateSelectionNullable! + } + + type ActorMovieActedInNodeAggregateSelection { + rating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + city: SortDirection + name: SortDirection + } + + input ActorUpdateInput { + actedIn: [ActorActedInUpdateFieldInput!] + city: String + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + city: String + city_CONTAINS: String + city_ENDS_WITH: String + city_IN: [String] + city_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + city_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + rating: Float + title: String! + } + + type MovieAggregateSelection { + count: Int! + rating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + rating: Float + title: String! + } + + 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 { + rating: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + rating: Float + rating_ADD: Float + rating_DIVIDE: Float + rating_MULTIPLY: Float + rating_SUBTRACT: Float + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + rating: Float + rating_GT: Float + rating_GTE: Float + rating_IN: [Float] + rating_LT: Float + rating_LTE: Float + rating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + rating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index b50165c201..9afd72cc70 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -34,154 +34,154 @@ describe("Autogenerate", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Movie { - id: ID! - name: String! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - name: String! -} - -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 - name: SortDirection -} - -input MovieUpdateInput { - name: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Movie { + id: ID! + name: String! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + name: String! + } + + 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 + name: SortDirection + } + + input MovieUpdateInput { + name: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index c9f16d00db..47b7446890 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -49,177 +49,177 @@ describe("@customResolver directive", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User implements UserInterface { - customResolver: String - id: ID! - nickname: String! - password: String! - username: String! -} - -type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input UserCreateInput { - id: ID! - password: String! - username: String! -} - -type UserEdge { - cursor: String! - node: User! -} - -interface UserInterface { - customResolver: String -} - -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 { - id: SortDirection - password: SortDirection - username: SortDirection -} - -input UserUpdateInput { - id: ID - password: String - username: String -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(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(options: UserOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User implements UserInterface { + customResolver: String + id: ID! + nickname: String! + password: String! + username: String! + } + + type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input UserCreateInput { + id: ID! + password: String! + username: String! + } + + type UserEdge { + cursor: String! + node: User! + } + + interface UserInterface { + customResolver: String + } + + 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 { + id: SortDirection + password: SortDirection + username: SortDirection + } + + input UserUpdateInput { + id: ID + password: String + username: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index 538891077b..2566189465 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -46,219 +46,219 @@ describe("Cypher", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - name: String -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input ActorCreateInput { - name: String -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(title: String): [Actor] - id: ID -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + name: String + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input ActorCreateInput { + name: String + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(title: String): [Actor] + id: ID + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Sort On Primitive Field", async () => { @@ -292,220 +292,220 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - name: String - totalScreenTime: Int! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input ActorCreateInput { - name: String -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 - totalScreenTime: SortDirection -} - -input ActorUpdateInput { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(title: String): [Actor] - id: ID -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + name: String + totalScreenTime: Int! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input ActorCreateInput { + name: String + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 + totalScreenTime: SortDirection + } + + input ActorUpdateInput { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(title: String): [Actor] + id: ID + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index d739d8e04b..7f167767cb 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -52,278 +52,278 @@ describe("@default directive", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} + "schema { + query: Query + mutation: Mutation + } -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime -type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! -} + type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! + } -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } -type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! -} + type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! + } -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } -enum Location { - EVERYWHERE - HERE - THERE -} + enum Location { + EVERYWHERE + HERE + THERE + } -type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(where: UserWhere): DeleteInfo! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} + type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(where: UserWhere): DeleteInfo! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } -type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} + type Query { + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + } -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} + \\"\\"\\"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 StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } -type User implements UserInterface { - fromInterface: String! - id: ID! - location: Location! - name: String! - numberOfFriends: Int! - rating: Float! - toBeOverridden: String! - verified: Boolean! - verifiedDate: DateTime! -} + type User implements UserInterface { + fromInterface: String! + id: ID! + location: Location! + name: String! + numberOfFriends: Int! + rating: Float! + toBeOverridden: String! + verified: Boolean! + verifiedDate: DateTime! + } -type UserAggregateSelection { - count: Int! - fromInterface: StringAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - numberOfFriends: IntAggregateSelectionNonNullable! - rating: FloatAggregateSelectionNonNullable! - toBeOverridden: StringAggregateSelectionNonNullable! - verifiedDate: DateTimeAggregateSelectionNonNullable! -} + type UserAggregateSelection { + count: Int! + fromInterface: StringAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + numberOfFriends: IntAggregateSelectionNonNullable! + rating: FloatAggregateSelectionNonNullable! + toBeOverridden: StringAggregateSelectionNonNullable! + verifiedDate: DateTimeAggregateSelectionNonNullable! + } -input UserCreateInput { - fromInterface: String! = \\"Interface default value\\" - id: ID! = \\"00000000-00000000-00000000-00000000\\" - location: Location! = HERE - name: String! = \\"Jane Smith\\" - numberOfFriends: Int! = 0 - rating: Float! = 0 - toBeOverridden: String! = \\"Overridden value\\" - verified: Boolean! = false - verifiedDate: DateTime! = \\"1970-01-01T00:00:00.000Z\\" -} + input UserCreateInput { + fromInterface: String! = \\"Interface default value\\" + id: ID! = \\"00000000-00000000-00000000-00000000\\" + location: Location! = HERE + name: String! = \\"Jane Smith\\" + numberOfFriends: Int! = 0 + rating: Float! = 0 + toBeOverridden: String! = \\"Overridden value\\" + verified: Boolean! = false + verifiedDate: DateTime! = \\"1970-01-01T00:00:00.000Z\\" + } -type UserEdge { - cursor: String! - node: User! -} + type UserEdge { + cursor: String! + node: User! + } -interface UserInterface { - fromInterface: String! - toBeOverridden: String! -} + interface UserInterface { + fromInterface: String! + toBeOverridden: String! + } -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!] -} + 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 { - fromInterface: SortDirection - id: SortDirection - location: SortDirection - name: SortDirection - numberOfFriends: SortDirection - rating: SortDirection - toBeOverridden: SortDirection - verified: SortDirection - verifiedDate: SortDirection -} + \\"\\"\\" + 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 { + fromInterface: SortDirection + id: SortDirection + location: SortDirection + name: SortDirection + numberOfFriends: SortDirection + rating: SortDirection + toBeOverridden: SortDirection + verified: SortDirection + verifiedDate: SortDirection + } -input UserUpdateInput { - fromInterface: String - id: ID - location: Location - name: String - numberOfFriends: Int - numberOfFriends_DECREMENT: Int - numberOfFriends_INCREMENT: Int - rating: Float - rating_ADD: Float - rating_DIVIDE: Float - rating_MULTIPLY: Float - rating_SUBTRACT: Float - toBeOverridden: String - verified: Boolean - verifiedDate: DateTime -} + input UserUpdateInput { + fromInterface: String + id: ID + location: Location + name: String + numberOfFriends: Int + numberOfFriends_DECREMENT: Int + numberOfFriends_INCREMENT: Int + rating: Float + rating_ADD: Float + rating_DIVIDE: Float + rating_MULTIPLY: Float + rating_SUBTRACT: Float + toBeOverridden: String + verified: Boolean + verifiedDate: DateTime + } -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - fromInterface: String - fromInterface_CONTAINS: String - fromInterface_ENDS_WITH: String - fromInterface_IN: [String!] - fromInterface_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - fromInterface_STARTS_WITH: String - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - location: Location - location_IN: [Location!] - location_NOT: Location @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - location_NOT_IN: [Location!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - numberOfFriends: Int - numberOfFriends_GT: Int - numberOfFriends_GTE: Int - numberOfFriends_IN: [Int!] - numberOfFriends_LT: Int - numberOfFriends_LTE: Int - numberOfFriends_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - numberOfFriends_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - rating: Float - rating_GT: Float - rating_GTE: Float - rating_IN: [Float!] - rating_LT: Float - rating_LTE: Float - rating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - rating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden: String - toBeOverridden_CONTAINS: String - toBeOverridden_ENDS_WITH: String - toBeOverridden_IN: [String!] - toBeOverridden_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - toBeOverridden_STARTS_WITH: String - verified: Boolean - verifiedDate: DateTime - verifiedDate_GT: DateTime - verifiedDate_GTE: DateTime - verifiedDate_IN: [DateTime!] - verifiedDate_LT: DateTime - verifiedDate_LTE: DateTime - verifiedDate_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - verifiedDate_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - verified_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + fromInterface: String + fromInterface_CONTAINS: String + fromInterface_ENDS_WITH: String + fromInterface_IN: [String!] + fromInterface_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + fromInterface_STARTS_WITH: String + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + location: Location + location_IN: [Location!] + location_NOT: Location @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + location_NOT_IN: [Location!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + numberOfFriends: Int + numberOfFriends_GT: Int + numberOfFriends_GTE: Int + numberOfFriends_IN: [Int!] + numberOfFriends_LT: Int + numberOfFriends_LTE: Int + numberOfFriends_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + numberOfFriends_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + rating: Float + rating_GT: Float + rating_GTE: Float + rating_IN: [Float!] + rating_LT: Float + rating_LTE: Float + rating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + rating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden: String + toBeOverridden_CONTAINS: String + toBeOverridden_ENDS_WITH: String + toBeOverridden_IN: [String!] + toBeOverridden_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + toBeOverridden_STARTS_WITH: String + verified: Boolean + verifiedDate: DateTime + verifiedDate_GT: DateTime + verifiedDate_GTE: DateTime + verifiedDate_IN: [DateTime!] + verifiedDate_LT: DateTime + verifiedDate_LTE: DateTime + verifiedDate_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + verifiedDate_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + verified_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index b6d0b1d2a4..7ee9917e39 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -911,794 +911,794 @@ describe("@filterable directive", () => { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere -} - -input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere -} - -input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - node: ActorEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnectedRelationship { + node: ActorEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("enable value and aggregation filters", async () => { @@ -1723,11087 +1723,11087 @@ type UpdateMoviesMutationResponse { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - node: ActorEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } - test("enable only aggregation filters", async () => { - const typeDefs = gql` type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! } - type Movie { - title: String @filterable(byValue: false, byAggregate: true) - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnectedRelationship { + node: ActorEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("enable only aggregation filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Movie { + title: String @filterable(byValue: false, byAggregate: true) + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnectedRelationship { + node: ActorEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated: MovieCreatedEvent! + movieDeleted: MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated: MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + }); + + describe("on RELATIONSHIP FIELD", () => { + test("default arguments should disable aggregation", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Movie { + title: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnectedRelationship { + node: ActorEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("enable value and aggregation filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Movie { + title: String + actors: [Actor!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnectedRelationship { + node: ActorEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("enable only aggregation filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Movie { + title: String + actors: [Actor!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: false, byAggregate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnectedRelationship { + node: ActorEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsAggregate: MovieActorsAggregateInput + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("enable only value filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Movie { + title: String + actors: [Actor!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnectedRelationship { + node: ActorEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + }); + + describe("on INTERFACE RELATIONSHIP FIELD, (aggregation does not exists on abstract types)", () => { + test("default arguments should disable aggregation", async () => { + const typeDefs = gql` + type Actor implements Person { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + interface Person { + username: String! + } + + type Movie { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor implements Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload implements PersonEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsConnectFieldInput { + connect: PersonConnectInput + where: PersonConnectWhere + } + + type MovieActorsConnectedRelationship { + node: PersonEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: PersonSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + username: String! + } + + input PersonConnectInput { + _on: PersonImplementationsConnectInput + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + Actor: ActorCreateInput + } + + input PersonDeleteInput { + _on: PersonImplementationsDeleteInput + } + + input PersonDisconnectInput { + _on: PersonImplementationsDisconnectInput + } + + interface PersonEventPayload { + username: String! + } + + input PersonImplementationsConnectInput { + Actor: [ActorConnectInput!] + } + + input PersonImplementationsDeleteInput { + Actor: [ActorDeleteInput!] + } + + input PersonImplementationsDisconnectInput { + Actor: [ActorDisconnectInput!] + } + + input PersonImplementationsSubscriptionWhere { + Actor: ActorSubscriptionWhere + } + + input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput + } + + input PersonImplementationsWhere { + Actor: ActorWhere + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + username: SortDirection + } + + input PersonSubscriptionWhere { + AND: [PersonSubscriptionWhere!] + NOT: PersonSubscriptionWhere + OR: [PersonSubscriptionWhere!] + _on: PersonImplementationsSubscriptionWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + username: String + } + + input PersonWhere { + _on: PersonImplementationsWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("enable value and aggregation filters", async () => { + const typeDefs = gql` + type Actor implements Person { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + interface Person { + username: String! + } + + type Movie { + title: String + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor implements Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload implements PersonEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsConnectFieldInput { + connect: PersonConnectInput + where: PersonConnectWhere + } + + type MovieActorsConnectedRelationship { + node: PersonEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: PersonSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + username: String! + } + + input PersonConnectInput { + _on: PersonImplementationsConnectInput + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + Actor: ActorCreateInput + } + + input PersonDeleteInput { + _on: PersonImplementationsDeleteInput + } + + input PersonDisconnectInput { + _on: PersonImplementationsDisconnectInput + } + + interface PersonEventPayload { + username: String! + } + + input PersonImplementationsConnectInput { + Actor: [ActorConnectInput!] + } + + input PersonImplementationsDeleteInput { + Actor: [ActorDeleteInput!] + } + + input PersonImplementationsDisconnectInput { + Actor: [ActorDisconnectInput!] + } + + input PersonImplementationsSubscriptionWhere { + Actor: ActorSubscriptionWhere + } + + input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput + } + + input PersonImplementationsWhere { + Actor: ActorWhere + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + username: SortDirection + } + + input PersonSubscriptionWhere { + AND: [PersonSubscriptionWhere!] + NOT: PersonSubscriptionWhere + OR: [PersonSubscriptionWhere!] + _on: PersonImplementationsSubscriptionWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + username: String + } + + input PersonWhere { + _on: PersonImplementationsWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("enable only value filters", async () => { + const typeDefs = gql` + type Actor implements Person { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + interface Person { + username: String! + } + + type Movie { + title: String + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor implements Person { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload implements PersonEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsConnectFieldInput { + connect: PersonConnectInput + where: PersonConnectWhere + } + + type MovieActorsConnectedRelationship { + node: PersonEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsRelationshipSubscriptionWhere { + node: PersonSubscriptionWhere + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + username: String! + } + + input PersonConnectInput { + _on: PersonImplementationsConnectInput + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + Actor: ActorCreateInput + } + + input PersonDeleteInput { + _on: PersonImplementationsDeleteInput + } + + input PersonDisconnectInput { + _on: PersonImplementationsDisconnectInput + } + + interface PersonEventPayload { + username: String! + } + + input PersonImplementationsConnectInput { + Actor: [ActorConnectInput!] + } + + input PersonImplementationsDeleteInput { + Actor: [ActorDeleteInput!] + } + + input PersonImplementationsDisconnectInput { + Actor: [ActorDisconnectInput!] + } + + input PersonImplementationsSubscriptionWhere { + Actor: ActorSubscriptionWhere + } + + input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput + } + + input PersonImplementationsWhere { + Actor: ActorWhere + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + username: SortDirection + } + + input PersonSubscriptionWhere { + AND: [PersonSubscriptionWhere!] + NOT: PersonSubscriptionWhere + OR: [PersonSubscriptionWhere!] + _on: PersonImplementationsSubscriptionWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + username: String + } + + input PersonWhere { + _on: PersonImplementationsWhere + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + }); + + describe("on UNION RELATIONSHIP FIELD, (aggregation does not exists on abstract types)", () => { + test("default arguments should disable aggregation", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Appearance { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + union Person = Actor | Appearance + + type Movie { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Appearance { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! + } + + type AppearanceAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input AppearanceConnectInput { + movies: [AppearanceMoviesConnectFieldInput!] + } + + input AppearanceConnectWhere { + node: AppearanceWhere! + } + + type AppearanceConnectedRelationships { + movies: AppearanceMoviesConnectedRelationship + } + + input AppearanceCreateInput { + movies: AppearanceMoviesFieldInput + password: String! + username: String! + } + + type AppearanceCreatedEvent { + createdAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! + } + + input AppearanceDeleteInput { + movies: [AppearanceMoviesDeleteFieldInput!] + } + + type AppearanceDeletedEvent { + deletedAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! + } + + input AppearanceDisconnectInput { + movies: [AppearanceMoviesDisconnectFieldInput!] + } + + type AppearanceEdge { + cursor: String! + node: Appearance! + } + + type AppearanceEventPayload { + password: String! + username: String! + } + + type AppearanceMovieMoviesAggregationSelection { + count: Int! + node: AppearanceMovieMoviesNodeAggregateSelection + } + + type AppearanceMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input AppearanceMoviesAggregateInput { + AND: [AppearanceMoviesAggregateInput!] + NOT: AppearanceMoviesAggregateInput + OR: [AppearanceMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: AppearanceMoviesNodeAggregationWhereInput + } + + input AppearanceMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type AppearanceMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input AppearanceMoviesConnectionSort { + node: MovieSort + } + + input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input AppearanceMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input AppearanceMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceMoviesFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + } + + input AppearanceMoviesNodeAggregationWhereInput { + AND: [AppearanceMoviesNodeAggregationWhereInput!] + NOT: AppearanceMoviesNodeAggregationWhereInput + OR: [AppearanceMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type AppearanceMoviesRelationship { + cursor: String! + node: Movie! + } + + input AppearanceMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input AppearanceMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input AppearanceMoviesUpdateFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + delete: [AppearanceMoviesDeleteFieldInput!] + disconnect: [AppearanceMoviesDisconnectFieldInput!] + update: AppearanceMoviesUpdateConnectionInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AppearanceSort!] + } + + input AppearanceRelationInput { + movies: [AppearanceMoviesCreateFieldInput!] + } + + type AppearanceRelationshipCreatedEvent { + appearance: AppearanceEventPayload! + createdRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input AppearanceRelationshipCreatedSubscriptionWhere { + AND: [AppearanceRelationshipCreatedSubscriptionWhere!] + NOT: AppearanceRelationshipCreatedSubscriptionWhere + OR: [AppearanceRelationshipCreatedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + createdRelationship: AppearanceRelationshipsSubscriptionWhere + } + + type AppearanceRelationshipDeletedEvent { + appearance: AppearanceEventPayload! + deletedRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input AppearanceRelationshipDeletedSubscriptionWhere { + AND: [AppearanceRelationshipDeletedSubscriptionWhere!] + NOT: AppearanceRelationshipDeletedSubscriptionWhere + OR: [AppearanceRelationshipDeletedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + deletedRelationship: AppearanceRelationshipsSubscriptionWhere + } + + input AppearanceRelationshipsSubscriptionWhere { + movies: AppearanceMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. + \\"\\"\\" + input AppearanceSort { + password: SortDirection + username: SortDirection + } + + input AppearanceSubscriptionWhere { + AND: [AppearanceSubscriptionWhere!] + NOT: AppearanceSubscriptionWhere + OR: [AppearanceSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input AppearanceUpdateInput { + movies: [AppearanceMoviesUpdateFieldInput!] + password: String + username: String + } + + type AppearanceUpdatedEvent { + event: EventType! + previousState: AppearanceEventPayload! + timestamp: Float! + updatedAppearance: AppearanceEventPayload! + } + + input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + type CreateAppearancesMutationResponse { + appearances: [Appearance!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsActorConnectFieldInput { + connect: [ActorConnectInput!] + where: ActorConnectWhere + } + + input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsActorDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + } + + input MovieActorsActorSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsAppearanceConnectFieldInput { + connect: [AppearanceConnectInput!] + where: AppearanceConnectWhere + } + + input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere + node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsAppearanceCreateFieldInput { + node: AppearanceCreateInput! + } + + input MovieActorsAppearanceDeleteFieldInput { + delete: AppearanceDeleteInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsAppearanceDisconnectFieldInput { + disconnect: AppearanceDisconnectInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsAppearanceFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + } + + input MovieActorsAppearanceSubscriptionWhere { + node: AppearanceSubscriptionWhere + } + + input MovieActorsAppearanceUpdateConnectionInput { + node: AppearanceUpdateInput + } + + input MovieActorsAppearanceUpdateFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + delete: [MovieActorsAppearanceDeleteFieldInput!] + disconnect: [MovieActorsAppearanceDisconnectFieldInput!] + update: MovieActorsAppearanceUpdateConnectionInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Appearance: [MovieActorsAppearanceConnectFieldInput!] + } + + type MovieActorsConnectedRelationship { + node: PersonEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Appearance: [MovieActorsAppearanceCreateFieldInput!] + } + + input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Appearance: MovieActorsAppearanceFieldInput + } + + input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Appearance: [MovieActorsAppearanceDeleteFieldInput!] + } + + input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Appearance: [MovieActorsAppearanceDisconnectFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsRelationshipSubscriptionWhere { + Actor: MovieActorsActorSubscriptionWhere + Appearance: MovieActorsAppearanceSubscriptionWhere + } + + input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Appearance: [MovieActorsAppearanceUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: MovieActorsConnectInput + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: MovieActorsDeleteInput + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: MovieActorsUpdateInput + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = Actor | Appearance + + union PersonEventPayload = ActorEventPayload | AppearanceEventPayload + + input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! + appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! + appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! + appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! + appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + type UpdateAppearancesMutationResponse { + appearances: [Appearance!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("enable value and aggregation filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Appearance { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + union Person = Actor | Appearance + + type Movie { + title: String + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Appearance { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! + } + + type AppearanceAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input AppearanceConnectInput { + movies: [AppearanceMoviesConnectFieldInput!] + } + + input AppearanceConnectWhere { + node: AppearanceWhere! + } + + type AppearanceConnectedRelationships { + movies: AppearanceMoviesConnectedRelationship + } + + input AppearanceCreateInput { + movies: AppearanceMoviesFieldInput + password: String! + username: String! + } + + type AppearanceCreatedEvent { + createdAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! + } + + input AppearanceDeleteInput { + movies: [AppearanceMoviesDeleteFieldInput!] + } + + type AppearanceDeletedEvent { + deletedAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! + } + + input AppearanceDisconnectInput { + movies: [AppearanceMoviesDisconnectFieldInput!] + } + + type AppearanceEdge { + cursor: String! + node: Appearance! + } + + type AppearanceEventPayload { + password: String! + username: String! + } + + type AppearanceMovieMoviesAggregationSelection { + count: Int! + node: AppearanceMovieMoviesNodeAggregateSelection + } + + type AppearanceMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input AppearanceMoviesAggregateInput { + AND: [AppearanceMoviesAggregateInput!] + NOT: AppearanceMoviesAggregateInput + OR: [AppearanceMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: AppearanceMoviesNodeAggregationWhereInput + } + + input AppearanceMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type AppearanceMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input AppearanceMoviesConnectionSort { + node: MovieSort + } + + input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input AppearanceMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input AppearanceMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceMoviesFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + } + + input AppearanceMoviesNodeAggregationWhereInput { + AND: [AppearanceMoviesNodeAggregationWhereInput!] + NOT: AppearanceMoviesNodeAggregationWhereInput + OR: [AppearanceMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type AppearanceMoviesRelationship { + cursor: String! + node: Movie! + } + + input AppearanceMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input AppearanceMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input AppearanceMoviesUpdateFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + delete: [AppearanceMoviesDeleteFieldInput!] + disconnect: [AppearanceMoviesDisconnectFieldInput!] + update: AppearanceMoviesUpdateConnectionInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AppearanceSort!] + } + + input AppearanceRelationInput { + movies: [AppearanceMoviesCreateFieldInput!] + } + + type AppearanceRelationshipCreatedEvent { + appearance: AppearanceEventPayload! + createdRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input AppearanceRelationshipCreatedSubscriptionWhere { + AND: [AppearanceRelationshipCreatedSubscriptionWhere!] + NOT: AppearanceRelationshipCreatedSubscriptionWhere + OR: [AppearanceRelationshipCreatedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + createdRelationship: AppearanceRelationshipsSubscriptionWhere + } + + type AppearanceRelationshipDeletedEvent { + appearance: AppearanceEventPayload! + deletedRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input AppearanceRelationshipDeletedSubscriptionWhere { + AND: [AppearanceRelationshipDeletedSubscriptionWhere!] + NOT: AppearanceRelationshipDeletedSubscriptionWhere + OR: [AppearanceRelationshipDeletedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + deletedRelationship: AppearanceRelationshipsSubscriptionWhere + } + + input AppearanceRelationshipsSubscriptionWhere { + movies: AppearanceMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. + \\"\\"\\" + input AppearanceSort { + password: SortDirection + username: SortDirection + } + + input AppearanceSubscriptionWhere { + AND: [AppearanceSubscriptionWhere!] + NOT: AppearanceSubscriptionWhere + OR: [AppearanceSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input AppearanceUpdateInput { + movies: [AppearanceMoviesUpdateFieldInput!] + password: String + username: String + } + + type AppearanceUpdatedEvent { + event: EventType! + previousState: AppearanceEventPayload! + timestamp: Float! + updatedAppearance: AppearanceEventPayload! + } + + input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + type CreateAppearancesMutationResponse { + appearances: [Appearance!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsActorConnectFieldInput { + connect: [ActorConnectInput!] + where: ActorConnectWhere + } + + input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsActorDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + } + + input MovieActorsActorSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsAppearanceConnectFieldInput { + connect: [AppearanceConnectInput!] + where: AppearanceConnectWhere + } + + input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere + node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsAppearanceCreateFieldInput { + node: AppearanceCreateInput! + } + + input MovieActorsAppearanceDeleteFieldInput { + delete: AppearanceDeleteInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsAppearanceDisconnectFieldInput { + disconnect: AppearanceDisconnectInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsAppearanceFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + } + + input MovieActorsAppearanceSubscriptionWhere { + node: AppearanceSubscriptionWhere + } + + input MovieActorsAppearanceUpdateConnectionInput { + node: AppearanceUpdateInput + } + + input MovieActorsAppearanceUpdateFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + delete: [MovieActorsAppearanceDeleteFieldInput!] + disconnect: [MovieActorsAppearanceDisconnectFieldInput!] + update: MovieActorsAppearanceUpdateConnectionInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Appearance: [MovieActorsAppearanceConnectFieldInput!] + } + + type MovieActorsConnectedRelationship { + node: PersonEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Appearance: [MovieActorsAppearanceCreateFieldInput!] + } + + input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Appearance: MovieActorsAppearanceFieldInput + } + + input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Appearance: [MovieActorsAppearanceDeleteFieldInput!] + } + + input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Appearance: [MovieActorsAppearanceDisconnectFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsRelationshipSubscriptionWhere { + Actor: MovieActorsActorSubscriptionWhere + Appearance: MovieActorsAppearanceSubscriptionWhere + } + + input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Appearance: [MovieActorsAppearanceUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: MovieActorsConnectInput + } + + input MovieConnectWhere { + node: MovieWhere! + } + + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + title: String + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + actors: MovieActorsDeleteInput + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + actors: MovieActorsUpdateInput + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = Actor | Appearance + + union PersonEventPayload = ActorEventPayload | AppearanceEventPayload + + input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! + appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! + appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! + appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! + appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + type UpdateAppearancesMutationResponse { + appearances: [Appearance!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("enable only value filters", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Appearance { + username: String! + password: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + union Person = Actor | Appearance + + type Movie { + title: String + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN) + @filterable(byValue: true, byAggregate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + subscriptions: plugin, + }, + }); + const schema = await neoSchema.getSchema(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + type ActorConnectedRelationships { + movies: ActorMoviesConnectedRelationship + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + password: String! + username: String! + } + + type ActorCreatedEvent { + createdActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + type ActorDeletedEvent { + deletedActor: ActorEventPayload! + event: EventType! + timestamp: Float! + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + type ActorRelationshipCreatedEvent { + actor: ActorEventPayload! + createdRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipCreatedSubscriptionWhere { + AND: [ActorRelationshipCreatedSubscriptionWhere!] + NOT: ActorRelationshipCreatedSubscriptionWhere + OR: [ActorRelationshipCreatedSubscriptionWhere!] + actor: ActorSubscriptionWhere + createdRelationship: ActorRelationshipsSubscriptionWhere + } + + type ActorRelationshipDeletedEvent { + actor: ActorEventPayload! + deletedRelationship: ActorConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input ActorRelationshipDeletedSubscriptionWhere { + AND: [ActorRelationshipDeletedSubscriptionWhere!] + NOT: ActorRelationshipDeletedSubscriptionWhere + OR: [ActorRelationshipDeletedSubscriptionWhere!] + actor: ActorSubscriptionWhere + deletedRelationship: ActorRelationshipsSubscriptionWhere + } + + input ActorRelationshipsSubscriptionWhere { + movies: ActorMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Appearance { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + password: String! + username: String! + } + + type AppearanceAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input AppearanceConnectInput { + movies: [AppearanceMoviesConnectFieldInput!] + } + + input AppearanceConnectWhere { + node: AppearanceWhere! + } + + type AppearanceConnectedRelationships { + movies: AppearanceMoviesConnectedRelationship + } + + input AppearanceCreateInput { + movies: AppearanceMoviesFieldInput + password: String! + username: String! + } + + type AppearanceCreatedEvent { + createdAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! + } + + input AppearanceDeleteInput { + movies: [AppearanceMoviesDeleteFieldInput!] + } + + type AppearanceDeletedEvent { + deletedAppearance: AppearanceEventPayload! + event: EventType! + timestamp: Float! + } + + input AppearanceDisconnectInput { + movies: [AppearanceMoviesDisconnectFieldInput!] + } + + type AppearanceEdge { + cursor: String! + node: Appearance! + } + + type AppearanceEventPayload { + password: String! + username: String! + } + + type AppearanceMovieMoviesAggregationSelection { + count: Int! + node: AppearanceMovieMoviesNodeAggregateSelection + } + + type AppearanceMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + input AppearanceMoviesAggregateInput { + AND: [AppearanceMoviesAggregateInput!] + NOT: AppearanceMoviesAggregateInput + OR: [AppearanceMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: AppearanceMoviesNodeAggregationWhereInput + } + + input AppearanceMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type AppearanceMoviesConnectedRelationship { + node: MovieEventPayload! + } + + type AppearanceMoviesConnection { + edges: [AppearanceMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input AppearanceMoviesConnectionSort { + node: MovieSort + } + + input AppearanceMoviesConnectionWhere { + AND: [AppearanceMoviesConnectionWhere!] + NOT: AppearanceMoviesConnectionWhere + OR: [AppearanceMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input AppearanceMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input AppearanceMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceMoviesFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + } + + input AppearanceMoviesNodeAggregationWhereInput { + AND: [AppearanceMoviesNodeAggregationWhereInput!] + NOT: AppearanceMoviesNodeAggregationWhereInput + OR: [AppearanceMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type AppearanceMoviesRelationship { + cursor: String! + node: Movie! + } + + input AppearanceMoviesRelationshipSubscriptionWhere { + node: MovieSubscriptionWhere + } + + input AppearanceMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input AppearanceMoviesUpdateFieldInput { + connect: [AppearanceMoviesConnectFieldInput!] + create: [AppearanceMoviesCreateFieldInput!] + delete: [AppearanceMoviesDeleteFieldInput!] + disconnect: [AppearanceMoviesDisconnectFieldInput!] + update: AppearanceMoviesUpdateConnectionInput + where: AppearanceMoviesConnectionWhere + } + + input AppearanceOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AppearanceSort!] + } + + input AppearanceRelationInput { + movies: [AppearanceMoviesCreateFieldInput!] + } + + type AppearanceRelationshipCreatedEvent { + appearance: AppearanceEventPayload! + createdRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input AppearanceRelationshipCreatedSubscriptionWhere { + AND: [AppearanceRelationshipCreatedSubscriptionWhere!] + NOT: AppearanceRelationshipCreatedSubscriptionWhere + OR: [AppearanceRelationshipCreatedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + createdRelationship: AppearanceRelationshipsSubscriptionWhere + } + + type AppearanceRelationshipDeletedEvent { + appearance: AppearanceEventPayload! + deletedRelationship: AppearanceConnectedRelationships! + event: EventType! + relationshipFieldName: String! + timestamp: Float! + } + + input AppearanceRelationshipDeletedSubscriptionWhere { + AND: [AppearanceRelationshipDeletedSubscriptionWhere!] + NOT: AppearanceRelationshipDeletedSubscriptionWhere + OR: [AppearanceRelationshipDeletedSubscriptionWhere!] + appearance: AppearanceSubscriptionWhere + deletedRelationship: AppearanceRelationshipsSubscriptionWhere + } + + input AppearanceRelationshipsSubscriptionWhere { + movies: AppearanceMoviesRelationshipSubscriptionWhere + } + + \\"\\"\\" + Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. + \\"\\"\\" + input AppearanceSort { + password: SortDirection + username: SortDirection + } + + input AppearanceSubscriptionWhere { + AND: [AppearanceSubscriptionWhere!] + NOT: AppearanceSubscriptionWhere + OR: [AppearanceSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input AppearanceUpdateInput { + movies: [AppearanceMoviesUpdateFieldInput!] + password: String + username: String + } + + type AppearanceUpdatedEvent { + event: EventType! + previousState: AppearanceEventPayload! + timestamp: Float! + updatedAppearance: AppearanceEventPayload! + } + + input AppearanceWhere { + AND: [AppearanceWhere!] + NOT: AppearanceWhere + OR: [AppearanceWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: AppearanceMoviesConnectionWhere + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type AppearancesConnection { + edges: [AppearanceEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + type CreateAppearancesMutationResponse { + appearances: [Appearance!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsActorConnectFieldInput { + connect: [ActorConnectInput!] + where: ActorConnectWhere + } + + input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsActorDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + } + + input MovieActorsActorSubscriptionWhere { + node: ActorSubscriptionWhere + } + + input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsAppearanceConnectFieldInput { + connect: [AppearanceConnectInput!] + where: AppearanceConnectWhere + } + + input MovieActorsAppearanceConnectionWhere { + AND: [MovieActorsAppearanceConnectionWhere!] + NOT: MovieActorsAppearanceConnectionWhere + OR: [MovieActorsAppearanceConnectionWhere!] + node: AppearanceWhere + node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsAppearanceCreateFieldInput { + node: AppearanceCreateInput! + } + + input MovieActorsAppearanceDeleteFieldInput { + delete: AppearanceDeleteInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsAppearanceDisconnectFieldInput { + disconnect: AppearanceDisconnectInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsAppearanceFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + } + + input MovieActorsAppearanceSubscriptionWhere { + node: AppearanceSubscriptionWhere + } + + input MovieActorsAppearanceUpdateConnectionInput { + node: AppearanceUpdateInput + } + + input MovieActorsAppearanceUpdateFieldInput { + connect: [MovieActorsAppearanceConnectFieldInput!] + create: [MovieActorsAppearanceCreateFieldInput!] + delete: [MovieActorsAppearanceDeleteFieldInput!] + disconnect: [MovieActorsAppearanceDisconnectFieldInput!] + update: MovieActorsAppearanceUpdateConnectionInput + where: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Appearance: [MovieActorsAppearanceConnectFieldInput!] + } + + type MovieActorsConnectedRelationship { + node: PersonEventPayload! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Appearance: MovieActorsAppearanceConnectionWhere + } + + input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Appearance: [MovieActorsAppearanceCreateFieldInput!] + } + + input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Appearance: MovieActorsAppearanceFieldInput + } + + input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Appearance: [MovieActorsAppearanceDeleteFieldInput!] + } + + input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Appearance: [MovieActorsAppearanceDisconnectFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - node: ActorEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated: MovieCreatedEvent! - movieDeleted: MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated: MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - }); - describe("on RELATIONSHIP FIELD", () => { - test("default arguments should disable aggregation", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + input MovieActorsRelationshipSubscriptionWhere { + Actor: MovieActorsActorSubscriptionWhere + Appearance: MovieActorsAppearanceSubscriptionWhere } - type Movie { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Appearance: [MovieActorsAppearanceUpdateFieldInput!] } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - node: ActorEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } - test("enable value and aggregation filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + input MovieConnectInput { + actors: MovieActorsConnectInput } - type Movie { - title: String - actors: [Actor!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: true) + input MovieConnectWhere { + node: MovieWhere! } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - node: ActorEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - test("enable only aggregation filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + type MovieConnectedRelationships { + actors: MovieActorsConnectedRelationship } - type Movie { - title: String - actors: [Actor!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: false, byAggregate: true) + input MovieCreateInput { + actors: MovieActorsCreateInput + title: String } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - node: ActorEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsAggregate: MovieActorsAggregateInput - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - test("enable only value filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! } - type Movie { - title: String - actors: [Actor!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: false) + input MovieDeleteInput { + actors: MovieActorsDeleteInput } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnectedRelationship { - node: ActorEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - }); - describe("on INTERFACE RELATIONSHIP FIELD, (aggregation does not exists on abstract types)", () => { - test("default arguments should disable aggregation", async () => { - const typeDefs = gql` - type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! } - interface Person { - username: String! + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput } - type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + type MovieEdge { + cursor: String! + node: Movie! } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload implements PersonEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsConnectFieldInput { - connect: PersonConnectInput - where: PersonConnectWhere -} - -type MovieActorsConnectedRelationship { - node: PersonEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: PersonSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - username: String! -} - -input PersonConnectInput { - _on: PersonImplementationsConnectInput -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - Actor: ActorCreateInput -} - -input PersonDeleteInput { - _on: PersonImplementationsDeleteInput -} - -input PersonDisconnectInput { - _on: PersonImplementationsDisconnectInput -} - -interface PersonEventPayload { - username: String! -} - -input PersonImplementationsConnectInput { - Actor: [ActorConnectInput!] -} - -input PersonImplementationsDeleteInput { - Actor: [ActorDeleteInput!] -} - -input PersonImplementationsDisconnectInput { - Actor: [ActorDisconnectInput!] -} - -input PersonImplementationsSubscriptionWhere { - Actor: ActorSubscriptionWhere -} - -input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput -} - -input PersonImplementationsWhere { - Actor: ActorWhere -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - username: SortDirection -} - -input PersonSubscriptionWhere { - AND: [PersonSubscriptionWhere!] - NOT: PersonSubscriptionWhere - OR: [PersonSubscriptionWhere!] - _on: PersonImplementationsSubscriptionWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - username: String -} - -input PersonWhere { - _on: PersonImplementationsWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + type MovieEventPayload { + title: String + } - test("enable value and aggregation filters", async () => { - const typeDefs = gql` - type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + 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!] } - interface Person { - username: String! + input MovieRelationInput { + actors: MovieActorsCreateFieldInput } - type Movie { - title: String - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: true) + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload implements PersonEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsConnectFieldInput { - connect: PersonConnectInput - where: PersonConnectWhere -} - -type MovieActorsConnectedRelationship { - node: PersonEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: PersonSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - username: String! -} - -input PersonConnectInput { - _on: PersonImplementationsConnectInput -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - Actor: ActorCreateInput -} - -input PersonDeleteInput { - _on: PersonImplementationsDeleteInput -} - -input PersonDisconnectInput { - _on: PersonImplementationsDisconnectInput -} - -interface PersonEventPayload { - username: String! -} - -input PersonImplementationsConnectInput { - Actor: [ActorConnectInput!] -} - -input PersonImplementationsDeleteInput { - Actor: [ActorDeleteInput!] -} - -input PersonImplementationsDisconnectInput { - Actor: [ActorDisconnectInput!] -} - -input PersonImplementationsSubscriptionWhere { - Actor: ActorSubscriptionWhere -} - -input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput -} - -input PersonImplementationsWhere { - Actor: ActorWhere -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - username: SortDirection -} - -input PersonSubscriptionWhere { - AND: [PersonSubscriptionWhere!] - NOT: PersonSubscriptionWhere - OR: [PersonSubscriptionWhere!] - _on: PersonImplementationsSubscriptionWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - username: String -} - -input PersonWhere { - _on: PersonImplementationsWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } - test("enable only value filters", async () => { - const typeDefs = gql` - type Actor implements Person { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! } - interface Person { - username: String! + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere } - type Movie { - title: String - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: false) + input MovieRelationshipsSubscriptionWhere { + actors: MovieActorsRelationshipSubscriptionWhere } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor implements Person { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload implements PersonEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsConnectFieldInput { - connect: PersonConnectInput - where: PersonConnectWhere -} - -type MovieActorsConnectedRelationship { - node: PersonEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsRelationshipSubscriptionWhere { - node: PersonSubscriptionWhere -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - username: String! -} - -input PersonConnectInput { - _on: PersonImplementationsConnectInput -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - Actor: ActorCreateInput -} - -input PersonDeleteInput { - _on: PersonImplementationsDeleteInput -} - -input PersonDisconnectInput { - _on: PersonImplementationsDisconnectInput -} - -interface PersonEventPayload { - username: String! -} - -input PersonImplementationsConnectInput { - Actor: [ActorConnectInput!] -} - -input PersonImplementationsDeleteInput { - Actor: [ActorDeleteInput!] -} - -input PersonImplementationsDisconnectInput { - Actor: [ActorDisconnectInput!] -} - -input PersonImplementationsSubscriptionWhere { - Actor: ActorSubscriptionWhere -} - -input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput -} - -input PersonImplementationsWhere { - Actor: ActorWhere -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - username: SortDirection -} - -input PersonSubscriptionWhere { - AND: [PersonSubscriptionWhere!] - NOT: PersonSubscriptionWhere - OR: [PersonSubscriptionWhere!] - _on: PersonImplementationsSubscriptionWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - username: String -} - -input PersonWhere { - _on: PersonImplementationsWhere - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - }); + \\"\\"\\" + 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 + } - describe("on UNION RELATIONSHIP FIELD, (aggregation does not exists on abstract types)", () => { - test("default arguments should disable aggregation", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String } - type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + input MovieUpdateInput { + actors: MovieActorsUpdateInput + title: String } - union Person = Actor | Appearance + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } - type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) @filterable + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input AppearanceConnectInput { - movies: [AppearanceMoviesConnectFieldInput!] -} - -input AppearanceConnectWhere { - node: AppearanceWhere! -} - -type AppearanceConnectedRelationships { - movies: AppearanceMoviesConnectedRelationship -} - -input AppearanceCreateInput { - movies: AppearanceMoviesFieldInput - password: String! - username: String! -} - -type AppearanceCreatedEvent { - createdAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! -} - -input AppearanceDeleteInput { - movies: [AppearanceMoviesDeleteFieldInput!] -} - -type AppearanceDeletedEvent { - deletedAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! -} - -input AppearanceDisconnectInput { - movies: [AppearanceMoviesDisconnectFieldInput!] -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceEventPayload { - password: String! - username: String! -} - -type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection -} - -type AppearanceMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input AppearanceMoviesAggregateInput { - AND: [AppearanceMoviesAggregateInput!] - NOT: AppearanceMoviesAggregateInput - OR: [AppearanceMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AppearanceMoviesNodeAggregationWhereInput -} - -input AppearanceMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type AppearanceMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input AppearanceMoviesConnectionSort { - node: MovieSort -} - -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input AppearanceMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input AppearanceMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceMoviesFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] -} - -input AppearanceMoviesNodeAggregationWhereInput { - AND: [AppearanceMoviesNodeAggregationWhereInput!] - NOT: AppearanceMoviesNodeAggregationWhereInput - OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -input AppearanceMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input AppearanceMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input AppearanceMoviesUpdateFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - delete: [AppearanceMoviesDeleteFieldInput!] - disconnect: [AppearanceMoviesDisconnectFieldInput!] - update: AppearanceMoviesUpdateConnectionInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AppearanceSort!] -} - -input AppearanceRelationInput { - movies: [AppearanceMoviesCreateFieldInput!] -} - -type AppearanceRelationshipCreatedEvent { - appearance: AppearanceEventPayload! - createdRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input AppearanceRelationshipCreatedSubscriptionWhere { - AND: [AppearanceRelationshipCreatedSubscriptionWhere!] - NOT: AppearanceRelationshipCreatedSubscriptionWhere - OR: [AppearanceRelationshipCreatedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - createdRelationship: AppearanceRelationshipsSubscriptionWhere -} - -type AppearanceRelationshipDeletedEvent { - appearance: AppearanceEventPayload! - deletedRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input AppearanceRelationshipDeletedSubscriptionWhere { - AND: [AppearanceRelationshipDeletedSubscriptionWhere!] - NOT: AppearanceRelationshipDeletedSubscriptionWhere - OR: [AppearanceRelationshipDeletedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - deletedRelationship: AppearanceRelationshipsSubscriptionWhere -} - -input AppearanceRelationshipsSubscriptionWhere { - movies: AppearanceMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. -\\"\\"\\" -input AppearanceSort { - password: SortDirection - username: SortDirection -} - -input AppearanceSubscriptionWhere { - AND: [AppearanceSubscriptionWhere!] - NOT: AppearanceSubscriptionWhere - OR: [AppearanceSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input AppearanceUpdateInput { - movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String -} - -type AppearanceUpdatedEvent { - event: EventType! - previousState: AppearanceEventPayload! - timestamp: Float! - updatedAppearance: AppearanceEventPayload! -} - -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: AppearanceMoviesAggregateInput - moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Appearances where all of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where none of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Appearances where one of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where some of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -type CreateAppearancesMutationResponse { - appearances: [Appearance!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsActorConnectFieldInput { - connect: [ActorConnectInput!] - where: ActorConnectWhere -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsActorDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] -} - -input MovieActorsActorSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsAppearanceConnectFieldInput { - connect: [AppearanceConnectInput!] - where: AppearanceConnectWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere - node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsAppearanceCreateFieldInput { - node: AppearanceCreateInput! -} - -input MovieActorsAppearanceDeleteFieldInput { - delete: AppearanceDeleteInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsAppearanceDisconnectFieldInput { - disconnect: AppearanceDisconnectInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsAppearanceFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] -} - -input MovieActorsAppearanceSubscriptionWhere { - node: AppearanceSubscriptionWhere -} - -input MovieActorsAppearanceUpdateConnectionInput { - node: AppearanceUpdateInput -} - -input MovieActorsAppearanceUpdateFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - delete: [MovieActorsAppearanceDeleteFieldInput!] - disconnect: [MovieActorsAppearanceDisconnectFieldInput!] - update: MovieActorsAppearanceUpdateConnectionInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Appearance: [MovieActorsAppearanceConnectFieldInput!] -} - -type MovieActorsConnectedRelationship { - node: PersonEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Appearance: [MovieActorsAppearanceCreateFieldInput!] -} - -input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Appearance: MovieActorsAppearanceFieldInput -} - -input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Appearance: [MovieActorsAppearanceDeleteFieldInput!] -} - -input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Appearance: [MovieActorsAppearanceDisconnectFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsRelationshipSubscriptionWhere { - Actor: MovieActorsActorSubscriptionWhere - Appearance: MovieActorsAppearanceSubscriptionWhere -} - -input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Appearance: [MovieActorsAppearanceUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: MovieActorsUpdateInput - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = Actor | Appearance - -union PersonEventPayload = ActorEventPayload | AppearanceEventPayload - -input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! - appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! - appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! - appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! - appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -type UpdateAppearancesMutationResponse { - appearances: [Appearance!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } - test("enable value and aggregation filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! } - type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String } union Person = Actor | Appearance - type Movie { - title: String - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: true) + union PersonEventPayload = ActorEventPayload | AppearanceEventPayload + + input PersonWhere { + Actor: ActorWhere + Appearance: AppearanceWhere } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input AppearanceConnectInput { - movies: [AppearanceMoviesConnectFieldInput!] -} - -input AppearanceConnectWhere { - node: AppearanceWhere! -} - -type AppearanceConnectedRelationships { - movies: AppearanceMoviesConnectedRelationship -} - -input AppearanceCreateInput { - movies: AppearanceMoviesFieldInput - password: String! - username: String! -} - -type AppearanceCreatedEvent { - createdAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! -} - -input AppearanceDeleteInput { - movies: [AppearanceMoviesDeleteFieldInput!] -} - -type AppearanceDeletedEvent { - deletedAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! -} - -input AppearanceDisconnectInput { - movies: [AppearanceMoviesDisconnectFieldInput!] -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceEventPayload { - password: String! - username: String! -} - -type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection -} - -type AppearanceMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input AppearanceMoviesAggregateInput { - AND: [AppearanceMoviesAggregateInput!] - NOT: AppearanceMoviesAggregateInput - OR: [AppearanceMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AppearanceMoviesNodeAggregationWhereInput -} - -input AppearanceMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type AppearanceMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input AppearanceMoviesConnectionSort { - node: MovieSort -} - -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input AppearanceMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input AppearanceMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceMoviesFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] -} - -input AppearanceMoviesNodeAggregationWhereInput { - AND: [AppearanceMoviesNodeAggregationWhereInput!] - NOT: AppearanceMoviesNodeAggregationWhereInput - OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -input AppearanceMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input AppearanceMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input AppearanceMoviesUpdateFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - delete: [AppearanceMoviesDeleteFieldInput!] - disconnect: [AppearanceMoviesDisconnectFieldInput!] - update: AppearanceMoviesUpdateConnectionInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AppearanceSort!] -} - -input AppearanceRelationInput { - movies: [AppearanceMoviesCreateFieldInput!] -} - -type AppearanceRelationshipCreatedEvent { - appearance: AppearanceEventPayload! - createdRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input AppearanceRelationshipCreatedSubscriptionWhere { - AND: [AppearanceRelationshipCreatedSubscriptionWhere!] - NOT: AppearanceRelationshipCreatedSubscriptionWhere - OR: [AppearanceRelationshipCreatedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - createdRelationship: AppearanceRelationshipsSubscriptionWhere -} - -type AppearanceRelationshipDeletedEvent { - appearance: AppearanceEventPayload! - deletedRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input AppearanceRelationshipDeletedSubscriptionWhere { - AND: [AppearanceRelationshipDeletedSubscriptionWhere!] - NOT: AppearanceRelationshipDeletedSubscriptionWhere - OR: [AppearanceRelationshipDeletedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - deletedRelationship: AppearanceRelationshipsSubscriptionWhere -} - -input AppearanceRelationshipsSubscriptionWhere { - movies: AppearanceMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. -\\"\\"\\" -input AppearanceSort { - password: SortDirection - username: SortDirection -} - -input AppearanceSubscriptionWhere { - AND: [AppearanceSubscriptionWhere!] - NOT: AppearanceSubscriptionWhere - OR: [AppearanceSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input AppearanceUpdateInput { - movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String -} - -type AppearanceUpdatedEvent { - event: EventType! - previousState: AppearanceEventPayload! - timestamp: Float! - updatedAppearance: AppearanceEventPayload! -} - -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: AppearanceMoviesAggregateInput - moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Appearances where all of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where none of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Appearances where one of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where some of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -type CreateAppearancesMutationResponse { - appearances: [Appearance!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsActorConnectFieldInput { - connect: [ActorConnectInput!] - where: ActorConnectWhere -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsActorDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] -} - -input MovieActorsActorSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsAppearanceConnectFieldInput { - connect: [AppearanceConnectInput!] - where: AppearanceConnectWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere - node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsAppearanceCreateFieldInput { - node: AppearanceCreateInput! -} - -input MovieActorsAppearanceDeleteFieldInput { - delete: AppearanceDeleteInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsAppearanceDisconnectFieldInput { - disconnect: AppearanceDisconnectInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsAppearanceFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] -} - -input MovieActorsAppearanceSubscriptionWhere { - node: AppearanceSubscriptionWhere -} - -input MovieActorsAppearanceUpdateConnectionInput { - node: AppearanceUpdateInput -} - -input MovieActorsAppearanceUpdateFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - delete: [MovieActorsAppearanceDeleteFieldInput!] - disconnect: [MovieActorsAppearanceDisconnectFieldInput!] - update: MovieActorsAppearanceUpdateConnectionInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Appearance: [MovieActorsAppearanceConnectFieldInput!] -} - -type MovieActorsConnectedRelationship { - node: PersonEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Appearance: [MovieActorsAppearanceCreateFieldInput!] -} - -input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Appearance: MovieActorsAppearanceFieldInput -} - -input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Appearance: [MovieActorsAppearanceDeleteFieldInput!] -} - -input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Appearance: [MovieActorsAppearanceDisconnectFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsRelationshipSubscriptionWhere { - Actor: MovieActorsActorSubscriptionWhere - Appearance: MovieActorsAppearanceSubscriptionWhere -} - -input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Appearance: [MovieActorsAppearanceUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: MovieActorsUpdateInput - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = Actor | Appearance - -union PersonEventPayload = ActorEventPayload | AppearanceEventPayload - -input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! - appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! - appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! - appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! - appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -type UpdateAppearancesMutationResponse { - appearances: [Appearance!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } - test("enable only value filters", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int } - type Appearance { - username: String! - password: String! - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + \\"\\"\\"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 } - union Person = Actor | Appearance + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } - type Movie { - title: String - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN) - @filterable(byValue: true, byAggregate: false) + type StringAggregateSelectionNullable { + longest: String + shortest: String } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - subscriptions: plugin, - }, - }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -type ActorConnectedRelationships { - movies: ActorMoviesConnectedRelationship -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - password: String! - username: String! -} - -type ActorCreatedEvent { - createdActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -type ActorDeletedEvent { - deletedActor: ActorEventPayload! - event: EventType! - timestamp: Float! -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -type ActorRelationshipCreatedEvent { - actor: ActorEventPayload! - createdRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipCreatedSubscriptionWhere { - AND: [ActorRelationshipCreatedSubscriptionWhere!] - NOT: ActorRelationshipCreatedSubscriptionWhere - OR: [ActorRelationshipCreatedSubscriptionWhere!] - actor: ActorSubscriptionWhere - createdRelationship: ActorRelationshipsSubscriptionWhere -} - -type ActorRelationshipDeletedEvent { - actor: ActorEventPayload! - deletedRelationship: ActorConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input ActorRelationshipDeletedSubscriptionWhere { - AND: [ActorRelationshipDeletedSubscriptionWhere!] - NOT: ActorRelationshipDeletedSubscriptionWhere - OR: [ActorRelationshipDeletedSubscriptionWhere!] - actor: ActorSubscriptionWhere - deletedRelationship: ActorRelationshipsSubscriptionWhere -} - -input ActorRelationshipsSubscriptionWhere { - movies: ActorMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Appearance { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! - password: String! - username: String! -} - -type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input AppearanceConnectInput { - movies: [AppearanceMoviesConnectFieldInput!] -} - -input AppearanceConnectWhere { - node: AppearanceWhere! -} - -type AppearanceConnectedRelationships { - movies: AppearanceMoviesConnectedRelationship -} - -input AppearanceCreateInput { - movies: AppearanceMoviesFieldInput - password: String! - username: String! -} - -type AppearanceCreatedEvent { - createdAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! -} - -input AppearanceDeleteInput { - movies: [AppearanceMoviesDeleteFieldInput!] -} - -type AppearanceDeletedEvent { - deletedAppearance: AppearanceEventPayload! - event: EventType! - timestamp: Float! -} - -input AppearanceDisconnectInput { - movies: [AppearanceMoviesDisconnectFieldInput!] -} - -type AppearanceEdge { - cursor: String! - node: Appearance! -} - -type AppearanceEventPayload { - password: String! - username: String! -} - -type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection -} - -type AppearanceMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -input AppearanceMoviesAggregateInput { - AND: [AppearanceMoviesAggregateInput!] - NOT: AppearanceMoviesAggregateInput - OR: [AppearanceMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AppearanceMoviesNodeAggregationWhereInput -} - -input AppearanceMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type AppearanceMoviesConnectedRelationship { - node: MovieEventPayload! -} - -type AppearanceMoviesConnection { - edges: [AppearanceMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input AppearanceMoviesConnectionSort { - node: MovieSort -} - -input AppearanceMoviesConnectionWhere { - AND: [AppearanceMoviesConnectionWhere!] - NOT: AppearanceMoviesConnectionWhere - OR: [AppearanceMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input AppearanceMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input AppearanceMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceMoviesFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] -} - -input AppearanceMoviesNodeAggregationWhereInput { - AND: [AppearanceMoviesNodeAggregationWhereInput!] - NOT: AppearanceMoviesNodeAggregationWhereInput - OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type AppearanceMoviesRelationship { - cursor: String! - node: Movie! -} - -input AppearanceMoviesRelationshipSubscriptionWhere { - node: MovieSubscriptionWhere -} - -input AppearanceMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input AppearanceMoviesUpdateFieldInput { - connect: [AppearanceMoviesConnectFieldInput!] - create: [AppearanceMoviesCreateFieldInput!] - delete: [AppearanceMoviesDeleteFieldInput!] - disconnect: [AppearanceMoviesDisconnectFieldInput!] - update: AppearanceMoviesUpdateConnectionInput - where: AppearanceMoviesConnectionWhere -} - -input AppearanceOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AppearanceSort objects to sort Appearances by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AppearanceSort!] -} - -input AppearanceRelationInput { - movies: [AppearanceMoviesCreateFieldInput!] -} - -type AppearanceRelationshipCreatedEvent { - appearance: AppearanceEventPayload! - createdRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input AppearanceRelationshipCreatedSubscriptionWhere { - AND: [AppearanceRelationshipCreatedSubscriptionWhere!] - NOT: AppearanceRelationshipCreatedSubscriptionWhere - OR: [AppearanceRelationshipCreatedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - createdRelationship: AppearanceRelationshipsSubscriptionWhere -} - -type AppearanceRelationshipDeletedEvent { - appearance: AppearanceEventPayload! - deletedRelationship: AppearanceConnectedRelationships! - event: EventType! - relationshipFieldName: String! - timestamp: Float! -} - -input AppearanceRelationshipDeletedSubscriptionWhere { - AND: [AppearanceRelationshipDeletedSubscriptionWhere!] - NOT: AppearanceRelationshipDeletedSubscriptionWhere - OR: [AppearanceRelationshipDeletedSubscriptionWhere!] - appearance: AppearanceSubscriptionWhere - deletedRelationship: AppearanceRelationshipsSubscriptionWhere -} - -input AppearanceRelationshipsSubscriptionWhere { - movies: AppearanceMoviesRelationshipSubscriptionWhere -} - -\\"\\"\\" -Fields to sort Appearances by. The order in which sorts are applied is not guaranteed when specifying many fields in one AppearanceSort object. -\\"\\"\\" -input AppearanceSort { - password: SortDirection - username: SortDirection -} - -input AppearanceSubscriptionWhere { - AND: [AppearanceSubscriptionWhere!] - NOT: AppearanceSubscriptionWhere - OR: [AppearanceSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input AppearanceUpdateInput { - movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String -} - -type AppearanceUpdatedEvent { - event: EventType! - previousState: AppearanceEventPayload! - timestamp: Float! - updatedAppearance: AppearanceEventPayload! -} - -input AppearanceWhere { - AND: [AppearanceWhere!] - NOT: AppearanceWhere - OR: [AppearanceWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: AppearanceMoviesAggregateInput - moviesConnection: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Appearances where all of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where none of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere - moviesConnection_NOT: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Appearances where one of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere - \\"\\"\\" - Return Appearances where some of the related AppearanceMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere - \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type AppearancesConnection { - edges: [AppearanceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -type CreateAppearancesMutationResponse { - appearances: [Appearance!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsActorConnectFieldInput { - connect: [ActorConnectInput!] - where: ActorConnectWhere -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsActorDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] -} - -input MovieActorsActorSubscriptionWhere { - node: ActorSubscriptionWhere -} - -input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsAppearanceConnectFieldInput { - connect: [AppearanceConnectInput!] - where: AppearanceConnectWhere -} - -input MovieActorsAppearanceConnectionWhere { - AND: [MovieActorsAppearanceConnectionWhere!] - NOT: MovieActorsAppearanceConnectionWhere - OR: [MovieActorsAppearanceConnectionWhere!] - node: AppearanceWhere - node_NOT: AppearanceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsAppearanceCreateFieldInput { - node: AppearanceCreateInput! -} - -input MovieActorsAppearanceDeleteFieldInput { - delete: AppearanceDeleteInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsAppearanceDisconnectFieldInput { - disconnect: AppearanceDisconnectInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsAppearanceFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] -} - -input MovieActorsAppearanceSubscriptionWhere { - node: AppearanceSubscriptionWhere -} - -input MovieActorsAppearanceUpdateConnectionInput { - node: AppearanceUpdateInput -} - -input MovieActorsAppearanceUpdateFieldInput { - connect: [MovieActorsAppearanceConnectFieldInput!] - create: [MovieActorsAppearanceCreateFieldInput!] - delete: [MovieActorsAppearanceDeleteFieldInput!] - disconnect: [MovieActorsAppearanceDisconnectFieldInput!] - update: MovieActorsAppearanceUpdateConnectionInput - where: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Appearance: [MovieActorsAppearanceConnectFieldInput!] -} - -type MovieActorsConnectedRelationship { - node: PersonEventPayload! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Appearance: MovieActorsAppearanceConnectionWhere -} - -input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Appearance: [MovieActorsAppearanceCreateFieldInput!] -} - -input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Appearance: MovieActorsAppearanceFieldInput -} - -input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Appearance: [MovieActorsAppearanceDeleteFieldInput!] -} - -input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Appearance: [MovieActorsAppearanceDisconnectFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsRelationshipSubscriptionWhere { - Actor: MovieActorsActorSubscriptionWhere - Appearance: MovieActorsAppearanceSubscriptionWhere -} - -input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Appearance: [MovieActorsAppearanceUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -type MovieConnectedRelationships { - actors: MovieActorsConnectedRelationship -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - title: String -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - actors: MovieActorsRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - actors: MovieActorsUpdateInput - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createAppearances(input: [AppearanceCreateInput!]!): CreateAppearancesMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteAppearances(delete: AppearanceDeleteInput, where: AppearanceWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateAppearances(connect: AppearanceConnectInput, create: AppearanceRelationInput, delete: AppearanceDeleteInput, disconnect: AppearanceDisconnectInput, update: AppearanceUpdateInput, where: AppearanceWhere): UpdateAppearancesMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = Actor | Appearance - -union PersonEventPayload = ActorEventPayload | AppearanceEventPayload - -input PersonWhere { - Actor: ActorWhere - Appearance: AppearanceWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - appearances(options: AppearanceOptions, where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! - appearancesConnection(after: String, first: Int, sort: [AppearanceSort], where: AppearanceWhere): AppearancesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! - actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! - actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! - actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! - appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! - appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! - appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! - appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -type UpdateAppearancesMutationResponse { - appearances: [Appearance!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + type Subscription { + actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! + actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! + actorRelationshipCreated(where: ActorRelationshipCreatedSubscriptionWhere): ActorRelationshipCreatedEvent! + actorRelationshipDeleted(where: ActorRelationshipDeletedSubscriptionWhere): ActorRelationshipDeletedEvent! + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + appearanceCreated(where: AppearanceSubscriptionWhere): AppearanceCreatedEvent! + appearanceDeleted(where: AppearanceSubscriptionWhere): AppearanceDeletedEvent! + appearanceRelationshipCreated(where: AppearanceRelationshipCreatedSubscriptionWhere): AppearanceRelationshipCreatedEvent! + appearanceRelationshipDeleted(where: AppearanceRelationshipDeletedSubscriptionWhere): AppearanceRelationshipDeletedEvent! + appearanceUpdated(where: AppearanceSubscriptionWhere): AppearanceUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + type UpdateAppearancesMutationResponse { + appearances: [Appearance!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); }); diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index 6a0fb1e037..b7d50a718c 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -37,152 +37,152 @@ describe("Plural option", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateTechsMutationResponse { - info: CreateInfo! - techs: [Tech!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createTechs(input: [TechCreateInput!]!): CreateTechsMutationResponse! - deleteTechs(where: TechWhere): DeleteInfo! - updateTechs(update: TechUpdateInput, where: TechWhere): UpdateTechsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - techs(options: TechOptions, where: TechWhere): [Tech!]! - techsAggregate(where: TechWhere): TechAggregateSelection! - techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Tech { - name: String - value: String -} - -type TechAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - value: StringAggregateSelectionNullable! -} - -input TechCreateInput { - name: String - value: String -} - -type TechEdge { - cursor: String! - node: Tech! -} - -input TechOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TechSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TechSort!] -} - -\\"\\"\\" -Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. -\\"\\"\\" -input TechSort { - name: SortDirection - value: SortDirection -} - -input TechUpdateInput { - name: String - value: String -} - -input TechWhere { - AND: [TechWhere!] - NOT: TechWhere - OR: [TechWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -} - -type TechsConnection { - edges: [TechEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateTechsMutationResponse { - info: UpdateInfo! - techs: [Tech!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateTechsMutationResponse { + info: CreateInfo! + techs: [Tech!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createTechs(input: [TechCreateInput!]!): CreateTechsMutationResponse! + deleteTechs(where: TechWhere): DeleteInfo! + updateTechs(update: TechUpdateInput, where: TechWhere): UpdateTechsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + techs(options: TechOptions, where: TechWhere): [Tech!]! + techsAggregate(where: TechWhere): TechAggregateSelection! + techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Tech { + name: String + value: String + } + + type TechAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + value: StringAggregateSelectionNullable! + } + + input TechCreateInput { + name: String + value: String + } + + type TechEdge { + cursor: String! + node: Tech! + } + + input TechOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TechSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TechSort!] + } + + \\"\\"\\" + Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. + \\"\\"\\" + input TechSort { + name: SortDirection + value: SortDirection + } + + input TechUpdateInput { + name: String + value: String + } + + input TechWhere { + AND: [TechWhere!] + NOT: TechWhere + OR: [TechWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + } + + type TechsConnection { + edges: [TechEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateTechsMutationResponse { + info: UpdateInfo! + techs: [Tech!]! + }" + `); }); test("Partial types with same plural in both", async () => { @@ -199,152 +199,152 @@ type UpdateTechsMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateTechsMutationResponse { - info: CreateInfo! - techs: [Tech!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createTechs(input: [TechCreateInput!]!): CreateTechsMutationResponse! - deleteTechs(where: TechWhere): DeleteInfo! - updateTechs(update: TechUpdateInput, where: TechWhere): UpdateTechsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - techs(options: TechOptions, where: TechWhere): [Tech!]! - techsAggregate(where: TechWhere): TechAggregateSelection! - techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Tech { - name: String - value: String -} - -type TechAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - value: StringAggregateSelectionNullable! -} - -input TechCreateInput { - name: String - value: String -} - -type TechEdge { - cursor: String! - node: Tech! -} - -input TechOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TechSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TechSort!] -} - -\\"\\"\\" -Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. -\\"\\"\\" -input TechSort { - name: SortDirection - value: SortDirection -} - -input TechUpdateInput { - name: String - value: String -} - -input TechWhere { - AND: [TechWhere!] - NOT: TechWhere - OR: [TechWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -} - -type TechsConnection { - edges: [TechEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateTechsMutationResponse { - info: UpdateInfo! - techs: [Tech!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateTechsMutationResponse { + info: CreateInfo! + techs: [Tech!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createTechs(input: [TechCreateInput!]!): CreateTechsMutationResponse! + deleteTechs(where: TechWhere): DeleteInfo! + updateTechs(update: TechUpdateInput, where: TechWhere): UpdateTechsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + techs(options: TechOptions, where: TechWhere): [Tech!]! + techsAggregate(where: TechWhere): TechAggregateSelection! + techsConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechsConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Tech { + name: String + value: String + } + + type TechAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + value: StringAggregateSelectionNullable! + } + + input TechCreateInput { + name: String + value: String + } + + type TechEdge { + cursor: String! + node: Tech! + } + + input TechOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TechSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TechSort!] + } + + \\"\\"\\" + Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. + \\"\\"\\" + input TechSort { + name: SortDirection + value: SortDirection + } + + input TechUpdateInput { + name: String + value: String + } + + input TechWhere { + AND: [TechWhere!] + NOT: TechWhere + OR: [TechWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + } + + type TechsConnection { + edges: [TechEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateTechsMutationResponse { + info: UpdateInfo! + techs: [Tech!]! + }" + `); }); test("Partial types with different plural", async () => { @@ -361,152 +361,152 @@ type UpdateTechsMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateTechnologiesMutationResponse { - info: CreateInfo! - technologies: [Tech!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createTechnologies(input: [TechCreateInput!]!): CreateTechnologiesMutationResponse! - deleteTechnologies(where: TechWhere): DeleteInfo! - updateTechnologies(update: TechUpdateInput, where: TechWhere): UpdateTechnologiesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - technologies(options: TechOptions, where: TechWhere): [Tech!]! - technologiesAggregate(where: TechWhere): TechAggregateSelection! - technologiesConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechnologiesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Tech { - name: String - value: String -} - -type TechAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! - value: StringAggregateSelectionNullable! -} - -input TechCreateInput { - name: String - value: String -} - -type TechEdge { - cursor: String! - node: Tech! -} - -input TechOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TechSort objects to sort Technologies by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TechSort!] -} - -\\"\\"\\" -Fields to sort Technologies by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. -\\"\\"\\" -input TechSort { - name: SortDirection - value: SortDirection -} - -input TechUpdateInput { - name: String - value: String -} - -input TechWhere { - AND: [TechWhere!] - NOT: TechWhere - OR: [TechWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -} - -type TechnologiesConnection { - edges: [TechEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateTechnologiesMutationResponse { - info: UpdateInfo! - technologies: [Tech!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateTechnologiesMutationResponse { + info: CreateInfo! + technologies: [Tech!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createTechnologies(input: [TechCreateInput!]!): CreateTechnologiesMutationResponse! + deleteTechnologies(where: TechWhere): DeleteInfo! + updateTechnologies(update: TechUpdateInput, where: TechWhere): UpdateTechnologiesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + technologies(options: TechOptions, where: TechWhere): [Tech!]! + technologiesAggregate(where: TechWhere): TechAggregateSelection! + technologiesConnection(after: String, first: Int, sort: [TechSort], where: TechWhere): TechnologiesConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Tech { + name: String + value: String + } + + type TechAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + value: StringAggregateSelectionNullable! + } + + input TechCreateInput { + name: String + value: String + } + + type TechEdge { + cursor: String! + node: Tech! + } + + input TechOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TechSort objects to sort Technologies by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TechSort!] + } + + \\"\\"\\" + Fields to sort Technologies by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechSort object. + \\"\\"\\" + input TechSort { + name: SortDirection + value: SortDirection + } + + input TechUpdateInput { + name: String + value: String + } + + input TechWhere { + AND: [TechWhere!] + NOT: TechWhere + OR: [TechWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + } + + type TechnologiesConnection { + edges: [TechEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateTechnologiesMutationResponse { + info: UpdateInfo! + technologies: [Tech!]! + }" + `); }); test("Collision between Type and plural", async () => { @@ -523,137 +523,137 @@ type UpdateTechnologiesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateTechsMutationResponse { - info: CreateInfo! - techs: [Techs!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createTechs(input: [TechsCreateInput!]!): CreateTechsMutationResponse! - deleteTechs(where: TechsWhere): DeleteInfo! - updateTechs(update: TechsUpdateInput, where: TechsWhere): UpdateTechsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - techs(options: TechsOptions, where: TechsWhere): [Techs!]! - techsAggregate(where: TechsWhere): TechsAggregateSelection! - techsConnection(after: String, first: Int, sort: [TechsSort], where: TechsWhere): TechsConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Techs { - value: String -} - -type TechsAggregateSelection { - count: Int! - value: StringAggregateSelectionNullable! -} - -type TechsConnection { - edges: [TechsEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input TechsCreateInput { - value: String -} - -type TechsEdge { - cursor: String! - node: Techs! -} - -input TechsOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TechsSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TechsSort!] -} - -\\"\\"\\" -Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechsSort object. -\\"\\"\\" -input TechsSort { - value: SortDirection -} - -input TechsUpdateInput { - value: String -} - -input TechsWhere { - AND: [TechsWhere!] - NOT: TechsWhere - OR: [TechsWhere!] - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateTechsMutationResponse { - info: UpdateInfo! - techs: [Techs!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateTechsMutationResponse { + info: CreateInfo! + techs: [Techs!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createTechs(input: [TechsCreateInput!]!): CreateTechsMutationResponse! + deleteTechs(where: TechsWhere): DeleteInfo! + updateTechs(update: TechsUpdateInput, where: TechsWhere): UpdateTechsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + techs(options: TechsOptions, where: TechsWhere): [Techs!]! + techsAggregate(where: TechsWhere): TechsAggregateSelection! + techsConnection(after: String, first: Int, sort: [TechsSort], where: TechsWhere): TechsConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Techs { + value: String + } + + type TechsAggregateSelection { + count: Int! + value: StringAggregateSelectionNullable! + } + + type TechsConnection { + edges: [TechsEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input TechsCreateInput { + value: String + } + + type TechsEdge { + cursor: String! + node: Techs! + } + + input TechsOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TechsSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TechsSort!] + } + + \\"\\"\\" + Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one TechsSort object. + \\"\\"\\" + input TechsSort { + value: SortDirection + } + + input TechsUpdateInput { + value: String + } + + input TechsWhere { + AND: [TechsWhere!] + NOT: TechsWhere + OR: [TechsWhere!] + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateTechsMutationResponse { + info: UpdateInfo! + techs: [Techs!]! + }" + `); }); test("Same plural on multiple nodes", async () => { @@ -670,137 +670,137 @@ type UpdateTechsMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateTechsMutationResponse { - info: CreateInfo! - techs: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createTechs(input: [UserCreateInput!]!): CreateTechsMutationResponse! - deleteTechs(where: UserWhere): DeleteInfo! - updateTechs(update: UserUpdateInput, where: UserWhere): UpdateTechsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - techs(options: UserOptions, where: UserWhere): [User!]! - techsAggregate(where: UserWhere): UserAggregateSelection! - techsConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): TechsConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type TechsConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateTechsMutationResponse { - info: UpdateInfo! - techs: [User!]! -} - -type User { - value: String -} - -type UserAggregateSelection { - count: Int! - value: StringAggregateSelectionNullable! -} - -input UserCreateInput { - value: String -} - -type UserEdge { - cursor: String! - node: User! -} - -input UserOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more UserSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [UserSort!] -} - -\\"\\"\\" -Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. -\\"\\"\\" -input UserSort { - value: SortDirection -} - -input UserUpdateInput { - value: String -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateTechsMutationResponse { + info: CreateInfo! + techs: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createTechs(input: [UserCreateInput!]!): CreateTechsMutationResponse! + deleteTechs(where: UserWhere): DeleteInfo! + updateTechs(update: UserUpdateInput, where: UserWhere): UpdateTechsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + techs(options: UserOptions, where: UserWhere): [User!]! + techsAggregate(where: UserWhere): UserAggregateSelection! + techsConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): TechsConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type TechsConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateTechsMutationResponse { + info: UpdateInfo! + techs: [User!]! + } + + type User { + value: String + } + + type UserAggregateSelection { + count: Int! + value: StringAggregateSelectionNullable! + } + + input UserCreateInput { + value: String + } + + type UserEdge { + cursor: String! + node: User! + } + + input UserOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more UserSort objects to sort Techs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [UserSort!] + } + + \\"\\"\\" + Fields to sort Techs by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. + \\"\\"\\" + input UserSort { + value: SortDirection + } + + input UserUpdateInput { + value: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + }" + `); }); test("Collision with pluralize", async () => { @@ -817,137 +817,137 @@ input UserWhere { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - value: String -} - -type UserAggregateSelection { - count: Int! - value: StringAggregateSelectionNullable! -} - -input UserCreateInput { - value: String -} - -type UserEdge { - cursor: String! - node: User! -} - -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 { - value: SortDirection -} - -input UserUpdateInput { - value: String -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(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(options: UserOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + value: String + } + + type UserAggregateSelection { + count: Int! + value: StringAggregateSelectionNullable! + } + + input UserCreateInput { + value: String + } + + type UserEdge { + cursor: String! + node: User! + } + + 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 { + value: SortDirection + } + + input UserUpdateInput { + value: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); test("Type collision with pluralize", async () => { @@ -964,136 +964,136 @@ type UsersConnection { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [Users!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createUsers(input: [UsersCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(where: UsersWhere): DeleteInfo! - updateUsers(update: UsersUpdateInput, where: UsersWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - users(options: UsersOptions, where: UsersWhere): [Users!]! - usersAggregate(where: UsersWhere): UsersAggregateSelection! - usersConnection(after: String, first: Int, sort: [UsersSort], where: UsersWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [Users!]! -} - -type Users { - value: String -} - -type UsersAggregateSelection { - count: Int! - value: StringAggregateSelectionNullable! -} - -type UsersConnection { - edges: [UsersEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UsersCreateInput { - value: String -} - -type UsersEdge { - cursor: String! - node: Users! -} - -input UsersOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more UsersSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [UsersSort!] -} - -\\"\\"\\" -Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UsersSort object. -\\"\\"\\" -input UsersSort { - value: SortDirection -} - -input UsersUpdateInput { - value: String -} - -input UsersWhere { - AND: [UsersWhere!] - NOT: UsersWhere - OR: [UsersWhere!] - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [Users!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createUsers(input: [UsersCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(where: UsersWhere): DeleteInfo! + updateUsers(update: UsersUpdateInput, where: UsersWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + users(options: UsersOptions, where: UsersWhere): [Users!]! + usersAggregate(where: UsersWhere): UsersAggregateSelection! + usersConnection(after: String, first: Int, sort: [UsersSort], where: UsersWhere): 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [Users!]! + } + + type Users { + value: String + } + + type UsersAggregateSelection { + count: Int! + value: StringAggregateSelectionNullable! + } + + type UsersConnection { + edges: [UsersEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UsersCreateInput { + value: String + } + + type UsersEdge { + cursor: String! + node: Users! + } + + input UsersOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more UsersSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [UsersSort!] + } + + \\"\\"\\" + Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UsersSort object. + \\"\\"\\" + input UsersSort { + value: SortDirection + } + + input UsersUpdateInput { + value: String + } + + input UsersWhere { + AND: [UsersWhere!] + NOT: UsersWhere + OR: [UsersWhere!] + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 1234775adb..95ecf6fe91 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -157,181 +157,181 @@ describe("@populatedBy tests", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - callback1: String! - callback2: String! - callback3: String! - id: ID -} - -type MovieAggregateSelection { - callback1: StringAggregateSelectionNonNullable! - callback2: StringAggregateSelectionNonNullable! - callback3: StringAggregateSelectionNonNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - callback1: SortDirection - callback2: SortDirection - callback3: SortDirection - id: SortDirection -} - -input MovieUpdateInput { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - callback1: String - callback1_CONTAINS: String - callback1_ENDS_WITH: String - callback1_IN: [String!] - callback1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_STARTS_WITH: String - callback2: String - callback2_CONTAINS: String - callback2_ENDS_WITH: String - callback2_IN: [String!] - callback2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_STARTS_WITH: String - callback3: String - callback3_CONTAINS: String - callback3_ENDS_WITH: String - callback3_IN: [String!] - callback3_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_STARTS_WITH: String - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + callback1: String! + callback2: String! + callback3: String! + id: ID + } + + type MovieAggregateSelection { + callback1: StringAggregateSelectionNonNullable! + callback2: StringAggregateSelectionNonNullable! + callback3: StringAggregateSelectionNonNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + callback1: SortDirection + callback2: SortDirection + callback3: SortDirection + id: SortDirection + } + + input MovieUpdateInput { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + callback1: String + callback1_CONTAINS: String + callback1_ENDS_WITH: String + callback1_IN: [String!] + callback1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_STARTS_WITH: String + callback2: String + callback2_CONTAINS: String + callback2_ENDS_WITH: String + callback2_IN: [String!] + callback2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_STARTS_WITH: String + callback3: String + callback3_CONTAINS: String + callback3_ENDS_WITH: String + callback3_IN: [String!] + callback3_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_STARTS_WITH: String + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("PopulatedBy - Int", async () => { @@ -364,177 +364,177 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie { - callback1: Int! - callback2: Int! - callback3: Int! - id: ID -} - -type MovieAggregateSelection { - callback1: IntAggregateSelectionNonNullable! - callback2: IntAggregateSelectionNonNullable! - callback3: IntAggregateSelectionNonNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - callback1: SortDirection - callback2: SortDirection - callback3: SortDirection - id: SortDirection -} - -input MovieUpdateInput { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - callback1: Int - callback1_GT: Int - callback1_GTE: Int - callback1_IN: [Int!] - callback1_LT: Int - callback1_LTE: Int - callback1_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2: Int - callback2_GT: Int - callback2_GTE: Int - callback2_IN: [Int!] - callback2_LT: Int - callback2_LTE: Int - callback2_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3: Int - callback3_GT: Int - callback3_GTE: Int - callback3_IN: [Int!] - callback3_LT: Int - callback3_LTE: Int - callback3_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie { + callback1: Int! + callback2: Int! + callback3: Int! + id: ID + } + + type MovieAggregateSelection { + callback1: IntAggregateSelectionNonNullable! + callback2: IntAggregateSelectionNonNullable! + callback3: IntAggregateSelectionNonNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + callback1: SortDirection + callback2: SortDirection + callback3: SortDirection + id: SortDirection + } + + input MovieUpdateInput { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + callback1: Int + callback1_GT: Int + callback1_GTE: Int + callback1_IN: [Int!] + callback1_LT: Int + callback1_LTE: Int + callback1_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2: Int + callback2_GT: Int + callback2_GTE: Int + callback2_IN: [Int!] + callback2_LT: Int + callback2_LTE: Int + callback2_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3: Int + callback3_GT: Int + callback3_GTE: Int + callback3_IN: [Int!] + callback3_LT: Int + callback3_LTE: Int + callback3_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); describe("Relationship property tests", () => { @@ -711,565 +711,565 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Genre { - id: ID! -} - -type GenreAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! -} - -input GenreConnectWhere { - node: GenreWhere! -} - -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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! - id: ID -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - genres: [MovieGenresConnectFieldInput!] -} - -input MovieCreateInput { - genres: MovieGenresFieldInput - id: ID -} - -input MovieDeleteInput { - genres: [MovieGenresDeleteFieldInput!] -} - -input MovieDisconnectInput { - genres: [MovieGenresDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieGenreGenresAggregationSelection { - count: Int! - edge: MovieGenreGenresEdgeAggregateSelection - node: MovieGenreGenresNodeAggregateSelection -} - -type MovieGenreGenresEdgeAggregateSelection { - callback1: StringAggregateSelectionNonNullable! - callback2: StringAggregateSelectionNonNullable! - callback3: StringAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! -} - -type MovieGenreGenresNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! -} - -input MovieGenresAggregateInput { - AND: [MovieGenresAggregateInput!] - NOT: MovieGenresAggregateInput - OR: [MovieGenresAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieGenresEdgeAggregationWhereInput - node: MovieGenresNodeAggregationWhereInput -} - -input MovieGenresConnectFieldInput { - edge: RelPropertiesCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere -} - -type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieGenresConnectionSort { - edge: RelPropertiesSort - node: GenreSort -} - -input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - edge: RelPropertiesWhere - edge_NOT: RelPropertiesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieGenresCreateFieldInput { - edge: RelPropertiesCreateInput! - node: GenreCreateInput! -} - -input MovieGenresDeleteFieldInput { - where: MovieGenresConnectionWhere -} - -input MovieGenresDisconnectFieldInput { - where: MovieGenresConnectionWhere -} - -input MovieGenresEdgeAggregationWhereInput { - AND: [MovieGenresEdgeAggregationWhereInput!] - NOT: MovieGenresEdgeAggregationWhereInput - OR: [MovieGenresEdgeAggregationWhereInput!] - callback1_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_AVERAGE_LENGTH_EQUAL: Float - callback1_AVERAGE_LENGTH_GT: Float - callback1_AVERAGE_LENGTH_GTE: Float - callback1_AVERAGE_LENGTH_LT: Float - callback1_AVERAGE_LENGTH_LTE: Float - callback1_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LONGEST_LENGTH_EQUAL: Int - callback1_LONGEST_LENGTH_GT: Int - callback1_LONGEST_LENGTH_GTE: Int - callback1_LONGEST_LENGTH_LT: Int - callback1_LONGEST_LENGTH_LTE: Int - callback1_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_SHORTEST_LENGTH_EQUAL: Int - callback1_SHORTEST_LENGTH_GT: Int - callback1_SHORTEST_LENGTH_GTE: Int - callback1_SHORTEST_LENGTH_LT: Int - callback1_SHORTEST_LENGTH_LTE: Int - callback1_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback1_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_LENGTH_EQUAL: Float - callback2_AVERAGE_LENGTH_GT: Float - callback2_AVERAGE_LENGTH_GTE: Float - callback2_AVERAGE_LENGTH_LT: Float - callback2_AVERAGE_LENGTH_LTE: Float - callback2_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LONGEST_LENGTH_EQUAL: Int - callback2_LONGEST_LENGTH_GT: Int - callback2_LONGEST_LENGTH_GTE: Int - callback2_LONGEST_LENGTH_LT: Int - callback2_LONGEST_LENGTH_LTE: Int - callback2_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_SHORTEST_LENGTH_EQUAL: Int - callback2_SHORTEST_LENGTH_GT: Int - callback2_SHORTEST_LENGTH_GTE: Int - callback2_SHORTEST_LENGTH_LT: Int - callback2_SHORTEST_LENGTH_LTE: Int - callback2_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback2_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_LENGTH_EQUAL: Float - callback3_AVERAGE_LENGTH_GT: Float - callback3_AVERAGE_LENGTH_GTE: Float - callback3_AVERAGE_LENGTH_LT: Float - callback3_AVERAGE_LENGTH_LTE: Float - callback3_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LONGEST_LENGTH_EQUAL: Int - callback3_LONGEST_LENGTH_GT: Int - callback3_LONGEST_LENGTH_GTE: Int - callback3_LONGEST_LENGTH_LT: Int - callback3_LONGEST_LENGTH_LTE: Int - callback3_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_SHORTEST_LENGTH_EQUAL: Int - callback3_SHORTEST_LENGTH_GT: Int - callback3_SHORTEST_LENGTH_GTE: Int - callback3_SHORTEST_LENGTH_LT: Int - callback3_SHORTEST_LENGTH_LTE: Int - callback3_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - callback3_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -input MovieGenresFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] -} - -input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type MovieGenresRelationship implements RelProperties { - callback1: String! - callback2: String! - callback3: String! - cursor: String! - id: ID! - node: Genre! -} - -input MovieGenresUpdateConnectionInput { - edge: RelPropertiesUpdateInput - node: GenreUpdateInput -} - -input MovieGenresUpdateFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - delete: [MovieGenresDeleteFieldInput!] - disconnect: [MovieGenresDisconnectFieldInput!] - update: MovieGenresUpdateConnectionInput - where: MovieGenresConnectionWhere -} - -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!] -} - -input MovieRelationInput { - genres: [MovieGenresCreateFieldInput!] -} - -\\"\\"\\" -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 { - genres: [MovieGenresUpdateFieldInput!] - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") - genresAggregate: MovieGenresAggregateInput - genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere - genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere - \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere - \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere - genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere - \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -interface RelProperties { - callback1: String! - callback2: String! - callback3: String! - id: ID! -} - -input RelPropertiesCreateInput { - id: ID! -} - -input RelPropertiesSort { - callback1: SortDirection - callback2: SortDirection - callback3: SortDirection - id: SortDirection -} - -input RelPropertiesUpdateInput { - id: ID -} - -input RelPropertiesWhere { - AND: [RelPropertiesWhere!] - NOT: RelPropertiesWhere - OR: [RelPropertiesWhere!] - callback1: String - callback1_CONTAINS: String - callback1_ENDS_WITH: String - callback1_IN: [String!] - callback1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_STARTS_WITH: String - callback2: String - callback2_CONTAINS: String - callback2_ENDS_WITH: String - callback2_IN: [String!] - callback2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_STARTS_WITH: String - callback3: String - callback3_CONTAINS: String - callback3_ENDS_WITH: String - callback3_IN: [String!] - callback3_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_STARTS_WITH: String - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Genre { + id: ID! + } + + type GenreAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + } + + input GenreConnectWhere { + node: GenreWhere! + } + + 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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection + genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! + id: ID + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + genres: [MovieGenresConnectFieldInput!] + } + + input MovieCreateInput { + genres: MovieGenresFieldInput + id: ID + } + + input MovieDeleteInput { + genres: [MovieGenresDeleteFieldInput!] + } + + input MovieDisconnectInput { + genres: [MovieGenresDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieGenreGenresAggregationSelection { + count: Int! + edge: MovieGenreGenresEdgeAggregateSelection + node: MovieGenreGenresNodeAggregateSelection + } + + type MovieGenreGenresEdgeAggregateSelection { + callback1: StringAggregateSelectionNonNullable! + callback2: StringAggregateSelectionNonNullable! + callback3: StringAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + } + + type MovieGenreGenresNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + } + + input MovieGenresAggregateInput { + AND: [MovieGenresAggregateInput!] + NOT: MovieGenresAggregateInput + OR: [MovieGenresAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieGenresEdgeAggregationWhereInput + node: MovieGenresNodeAggregationWhereInput + } + + input MovieGenresConnectFieldInput { + edge: RelPropertiesCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere + } + + type MovieGenresConnection { + edges: [MovieGenresRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieGenresConnectionSort { + edge: RelPropertiesSort + node: GenreSort + } + + input MovieGenresConnectionWhere { + AND: [MovieGenresConnectionWhere!] + NOT: MovieGenresConnectionWhere + OR: [MovieGenresConnectionWhere!] + edge: RelPropertiesWhere + edge_NOT: RelPropertiesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieGenresCreateFieldInput { + edge: RelPropertiesCreateInput! + node: GenreCreateInput! + } + + input MovieGenresDeleteFieldInput { + where: MovieGenresConnectionWhere + } + + input MovieGenresDisconnectFieldInput { + where: MovieGenresConnectionWhere + } + + input MovieGenresEdgeAggregationWhereInput { + AND: [MovieGenresEdgeAggregationWhereInput!] + NOT: MovieGenresEdgeAggregationWhereInput + OR: [MovieGenresEdgeAggregationWhereInput!] + callback1_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_AVERAGE_LENGTH_EQUAL: Float + callback1_AVERAGE_LENGTH_GT: Float + callback1_AVERAGE_LENGTH_GTE: Float + callback1_AVERAGE_LENGTH_LT: Float + callback1_AVERAGE_LENGTH_LTE: Float + callback1_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LONGEST_LENGTH_EQUAL: Int + callback1_LONGEST_LENGTH_GT: Int + callback1_LONGEST_LENGTH_GTE: Int + callback1_LONGEST_LENGTH_LT: Int + callback1_LONGEST_LENGTH_LTE: Int + callback1_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_SHORTEST_LENGTH_EQUAL: Int + callback1_SHORTEST_LENGTH_GT: Int + callback1_SHORTEST_LENGTH_GTE: Int + callback1_SHORTEST_LENGTH_LT: Int + callback1_SHORTEST_LENGTH_LTE: Int + callback1_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback1_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_LENGTH_EQUAL: Float + callback2_AVERAGE_LENGTH_GT: Float + callback2_AVERAGE_LENGTH_GTE: Float + callback2_AVERAGE_LENGTH_LT: Float + callback2_AVERAGE_LENGTH_LTE: Float + callback2_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LONGEST_LENGTH_EQUAL: Int + callback2_LONGEST_LENGTH_GT: Int + callback2_LONGEST_LENGTH_GTE: Int + callback2_LONGEST_LENGTH_LT: Int + callback2_LONGEST_LENGTH_LTE: Int + callback2_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_SHORTEST_LENGTH_EQUAL: Int + callback2_SHORTEST_LENGTH_GT: Int + callback2_SHORTEST_LENGTH_GTE: Int + callback2_SHORTEST_LENGTH_LT: Int + callback2_SHORTEST_LENGTH_LTE: Int + callback2_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback2_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_LENGTH_EQUAL: Float + callback3_AVERAGE_LENGTH_GT: Float + callback3_AVERAGE_LENGTH_GTE: Float + callback3_AVERAGE_LENGTH_LT: Float + callback3_AVERAGE_LENGTH_LTE: Float + callback3_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LONGEST_LENGTH_EQUAL: Int + callback3_LONGEST_LENGTH_GT: Int + callback3_LONGEST_LENGTH_GTE: Int + callback3_LONGEST_LENGTH_LT: Int + callback3_LONGEST_LENGTH_LTE: Int + callback3_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_SHORTEST_LENGTH_EQUAL: Int + callback3_SHORTEST_LENGTH_GT: Int + callback3_SHORTEST_LENGTH_GTE: Int + callback3_SHORTEST_LENGTH_LT: Int + callback3_SHORTEST_LENGTH_LTE: Int + callback3_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + callback3_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + input MovieGenresFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + } + + input MovieGenresNodeAggregationWhereInput { + AND: [MovieGenresNodeAggregationWhereInput!] + NOT: MovieGenresNodeAggregationWhereInput + OR: [MovieGenresNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type MovieGenresRelationship implements RelProperties { + callback1: String! + callback2: String! + callback3: String! + cursor: String! + id: ID! + node: Genre! + } + + input MovieGenresUpdateConnectionInput { + edge: RelPropertiesUpdateInput + node: GenreUpdateInput + } + + input MovieGenresUpdateFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + delete: [MovieGenresDeleteFieldInput!] + disconnect: [MovieGenresDisconnectFieldInput!] + update: MovieGenresUpdateConnectionInput + where: MovieGenresConnectionWhere + } + + 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!] + } + + input MovieRelationInput { + genres: [MovieGenresCreateFieldInput!] + } + + \\"\\"\\" + 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 { + genres: [MovieGenresUpdateFieldInput!] + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") + genresAggregate: MovieGenresAggregateInput + genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_ALL: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_NONE: MovieGenresConnectionWhere + genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SINGLE: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SOME: MovieGenresConnectionWhere + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + genres_ALL: GenreWhere + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + genres_NONE: GenreWhere + genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + genres_SINGLE: GenreWhere + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + genres_SOME: GenreWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + interface RelProperties { + callback1: String! + callback2: String! + callback3: String! + id: ID! + } + + input RelPropertiesCreateInput { + id: ID! + } + + input RelPropertiesSort { + callback1: SortDirection + callback2: SortDirection + callback3: SortDirection + id: SortDirection + } + + input RelPropertiesUpdateInput { + id: ID + } + + input RelPropertiesWhere { + AND: [RelPropertiesWhere!] + NOT: RelPropertiesWhere + OR: [RelPropertiesWhere!] + callback1: String + callback1_CONTAINS: String + callback1_ENDS_WITH: String + callback1_IN: [String!] + callback1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_STARTS_WITH: String + callback2: String + callback2_CONTAINS: String + callback2_ENDS_WITH: String + callback2_IN: [String!] + callback2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_STARTS_WITH: String + callback3: String + callback3_CONTAINS: String + callback3_ENDS_WITH: String + callback3_IN: [String!] + callback3_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_STARTS_WITH: String + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("PopulatedBy - Int", async () => { @@ -1311,531 +1311,531 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Genre { - id: ID! -} - -type GenreAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! -} - -input GenreConnectWhere { - node: GenreWhere! -} - -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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection - genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! - id: ID -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - genres: [MovieGenresConnectFieldInput!] -} - -input MovieCreateInput { - genres: MovieGenresFieldInput - id: ID -} - -input MovieDeleteInput { - genres: [MovieGenresDeleteFieldInput!] -} - -input MovieDisconnectInput { - genres: [MovieGenresDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieGenreGenresAggregationSelection { - count: Int! - edge: MovieGenreGenresEdgeAggregateSelection - node: MovieGenreGenresNodeAggregateSelection -} - -type MovieGenreGenresEdgeAggregateSelection { - callback1: IntAggregateSelectionNonNullable! - callback2: IntAggregateSelectionNonNullable! - callback3: IntAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! -} - -type MovieGenreGenresNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! -} - -input MovieGenresAggregateInput { - AND: [MovieGenresAggregateInput!] - NOT: MovieGenresAggregateInput - OR: [MovieGenresAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieGenresEdgeAggregationWhereInput - node: MovieGenresNodeAggregationWhereInput -} - -input MovieGenresConnectFieldInput { - edge: RelPropertiesCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere -} - -type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieGenresConnectionSort { - edge: RelPropertiesSort - node: GenreSort -} - -input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - edge: RelPropertiesWhere - edge_NOT: RelPropertiesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieGenresCreateFieldInput { - edge: RelPropertiesCreateInput! - node: GenreCreateInput! -} - -input MovieGenresDeleteFieldInput { - where: MovieGenresConnectionWhere -} - -input MovieGenresDisconnectFieldInput { - where: MovieGenresConnectionWhere -} - -input MovieGenresEdgeAggregationWhereInput { - AND: [MovieGenresEdgeAggregationWhereInput!] - NOT: MovieGenresEdgeAggregationWhereInput - OR: [MovieGenresEdgeAggregationWhereInput!] - callback1_AVERAGE_EQUAL: Float - callback1_AVERAGE_GT: Float - callback1_AVERAGE_GTE: Float - callback1_AVERAGE_LT: Float - callback1_AVERAGE_LTE: Float - callback1_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback1_MAX_EQUAL: Int - callback1_MAX_GT: Int - callback1_MAX_GTE: Int - callback1_MAX_LT: Int - callback1_MAX_LTE: Int - callback1_MIN_EQUAL: Int - callback1_MIN_GT: Int - callback1_MIN_GTE: Int - callback1_MIN_LT: Int - callback1_MIN_LTE: Int - callback1_SUM_EQUAL: Int - callback1_SUM_GT: Int - callback1_SUM_GTE: Int - callback1_SUM_LT: Int - callback1_SUM_LTE: Int - callback2_AVERAGE_EQUAL: Float - callback2_AVERAGE_GT: Float - callback2_AVERAGE_GTE: Float - callback2_AVERAGE_LT: Float - callback2_AVERAGE_LTE: Float - callback2_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback2_MAX_EQUAL: Int - callback2_MAX_GT: Int - callback2_MAX_GTE: Int - callback2_MAX_LT: Int - callback2_MAX_LTE: Int - callback2_MIN_EQUAL: Int - callback2_MIN_GT: Int - callback2_MIN_GTE: Int - callback2_MIN_LT: Int - callback2_MIN_LTE: Int - callback2_SUM_EQUAL: Int - callback2_SUM_GT: Int - callback2_SUM_GTE: Int - callback2_SUM_LT: Int - callback2_SUM_LTE: Int - callback3_AVERAGE_EQUAL: Float - callback3_AVERAGE_GT: Float - callback3_AVERAGE_GTE: Float - callback3_AVERAGE_LT: Float - callback3_AVERAGE_LTE: Float - callback3_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - callback3_MAX_EQUAL: Int - callback3_MAX_GT: Int - callback3_MAX_GTE: Int - callback3_MAX_LT: Int - callback3_MAX_LTE: Int - callback3_MIN_EQUAL: Int - callback3_MIN_GT: Int - callback3_MIN_GTE: Int - callback3_MIN_LT: Int - callback3_MIN_LTE: Int - callback3_SUM_EQUAL: Int - callback3_SUM_GT: Int - callback3_SUM_GTE: Int - callback3_SUM_LT: Int - callback3_SUM_LTE: Int - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -input MovieGenresFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] -} - -input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type MovieGenresRelationship implements RelProperties { - callback1: Int! - callback2: Int! - callback3: Int! - cursor: String! - id: ID! - node: Genre! -} - -input MovieGenresUpdateConnectionInput { - edge: RelPropertiesUpdateInput - node: GenreUpdateInput -} - -input MovieGenresUpdateFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - delete: [MovieGenresDeleteFieldInput!] - disconnect: [MovieGenresDisconnectFieldInput!] - update: MovieGenresUpdateConnectionInput - where: MovieGenresConnectionWhere -} - -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!] -} - -input MovieRelationInput { - genres: [MovieGenresCreateFieldInput!] -} - -\\"\\"\\" -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 { - genres: [MovieGenresUpdateFieldInput!] - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") - genresAggregate: MovieGenresAggregateInput - genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere - genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere - \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere - \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere - genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere - \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -interface RelProperties { - callback1: Int! - callback2: Int! - callback3: Int! - id: ID! -} - -input RelPropertiesCreateInput { - id: ID! -} - -input RelPropertiesSort { - callback1: SortDirection - callback2: SortDirection - callback3: SortDirection - id: SortDirection -} - -input RelPropertiesUpdateInput { - id: ID -} - -input RelPropertiesWhere { - AND: [RelPropertiesWhere!] - NOT: RelPropertiesWhere - OR: [RelPropertiesWhere!] - callback1: Int - callback1_GT: Int - callback1_GTE: Int - callback1_IN: [Int!] - callback1_LT: Int - callback1_LTE: Int - callback1_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback1_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2: Int - callback2_GT: Int - callback2_GTE: Int - callback2_IN: [Int!] - callback2_LT: Int - callback2_LTE: Int - callback2_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback2_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3: Int - callback3_GT: Int - callback3_GTE: Int - callback3_IN: [Int!] - callback3_LT: Int - callback3_LTE: Int - callback3_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - callback3_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Genre { + id: ID! + } + + type GenreAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + } + + input GenreConnectWhere { + node: GenreWhere! + } + + 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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie { + genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection + genresConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! + id: ID + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + genres: [MovieGenresConnectFieldInput!] + } + + input MovieCreateInput { + genres: MovieGenresFieldInput + id: ID + } + + input MovieDeleteInput { + genres: [MovieGenresDeleteFieldInput!] + } + + input MovieDisconnectInput { + genres: [MovieGenresDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieGenreGenresAggregationSelection { + count: Int! + edge: MovieGenreGenresEdgeAggregateSelection + node: MovieGenreGenresNodeAggregateSelection + } + + type MovieGenreGenresEdgeAggregateSelection { + callback1: IntAggregateSelectionNonNullable! + callback2: IntAggregateSelectionNonNullable! + callback3: IntAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + } + + type MovieGenreGenresNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + } + + input MovieGenresAggregateInput { + AND: [MovieGenresAggregateInput!] + NOT: MovieGenresAggregateInput + OR: [MovieGenresAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieGenresEdgeAggregationWhereInput + node: MovieGenresNodeAggregationWhereInput + } + + input MovieGenresConnectFieldInput { + edge: RelPropertiesCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere + } + + type MovieGenresConnection { + edges: [MovieGenresRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieGenresConnectionSort { + edge: RelPropertiesSort + node: GenreSort + } + + input MovieGenresConnectionWhere { + AND: [MovieGenresConnectionWhere!] + NOT: MovieGenresConnectionWhere + OR: [MovieGenresConnectionWhere!] + edge: RelPropertiesWhere + edge_NOT: RelPropertiesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieGenresCreateFieldInput { + edge: RelPropertiesCreateInput! + node: GenreCreateInput! + } + + input MovieGenresDeleteFieldInput { + where: MovieGenresConnectionWhere + } + + input MovieGenresDisconnectFieldInput { + where: MovieGenresConnectionWhere + } + + input MovieGenresEdgeAggregationWhereInput { + AND: [MovieGenresEdgeAggregationWhereInput!] + NOT: MovieGenresEdgeAggregationWhereInput + OR: [MovieGenresEdgeAggregationWhereInput!] + callback1_AVERAGE_EQUAL: Float + callback1_AVERAGE_GT: Float + callback1_AVERAGE_GTE: Float + callback1_AVERAGE_LT: Float + callback1_AVERAGE_LTE: Float + callback1_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback1_MAX_EQUAL: Int + callback1_MAX_GT: Int + callback1_MAX_GTE: Int + callback1_MAX_LT: Int + callback1_MAX_LTE: Int + callback1_MIN_EQUAL: Int + callback1_MIN_GT: Int + callback1_MIN_GTE: Int + callback1_MIN_LT: Int + callback1_MIN_LTE: Int + callback1_SUM_EQUAL: Int + callback1_SUM_GT: Int + callback1_SUM_GTE: Int + callback1_SUM_LT: Int + callback1_SUM_LTE: Int + callback2_AVERAGE_EQUAL: Float + callback2_AVERAGE_GT: Float + callback2_AVERAGE_GTE: Float + callback2_AVERAGE_LT: Float + callback2_AVERAGE_LTE: Float + callback2_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback2_MAX_EQUAL: Int + callback2_MAX_GT: Int + callback2_MAX_GTE: Int + callback2_MAX_LT: Int + callback2_MAX_LTE: Int + callback2_MIN_EQUAL: Int + callback2_MIN_GT: Int + callback2_MIN_GTE: Int + callback2_MIN_LT: Int + callback2_MIN_LTE: Int + callback2_SUM_EQUAL: Int + callback2_SUM_GT: Int + callback2_SUM_GTE: Int + callback2_SUM_LT: Int + callback2_SUM_LTE: Int + callback3_AVERAGE_EQUAL: Float + callback3_AVERAGE_GT: Float + callback3_AVERAGE_GTE: Float + callback3_AVERAGE_LT: Float + callback3_AVERAGE_LTE: Float + callback3_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + callback3_MAX_EQUAL: Int + callback3_MAX_GT: Int + callback3_MAX_GTE: Int + callback3_MAX_LT: Int + callback3_MAX_LTE: Int + callback3_MIN_EQUAL: Int + callback3_MIN_GT: Int + callback3_MIN_GTE: Int + callback3_MIN_LT: Int + callback3_MIN_LTE: Int + callback3_SUM_EQUAL: Int + callback3_SUM_GT: Int + callback3_SUM_GTE: Int + callback3_SUM_LT: Int + callback3_SUM_LTE: Int + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + input MovieGenresFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + } + + input MovieGenresNodeAggregationWhereInput { + AND: [MovieGenresNodeAggregationWhereInput!] + NOT: MovieGenresNodeAggregationWhereInput + OR: [MovieGenresNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type MovieGenresRelationship implements RelProperties { + callback1: Int! + callback2: Int! + callback3: Int! + cursor: String! + id: ID! + node: Genre! + } + + input MovieGenresUpdateConnectionInput { + edge: RelPropertiesUpdateInput + node: GenreUpdateInput + } + + input MovieGenresUpdateFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + delete: [MovieGenresDeleteFieldInput!] + disconnect: [MovieGenresDisconnectFieldInput!] + update: MovieGenresUpdateConnectionInput + where: MovieGenresConnectionWhere + } + + 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!] + } + + input MovieRelationInput { + genres: [MovieGenresCreateFieldInput!] + } + + \\"\\"\\" + 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 { + genres: [MovieGenresUpdateFieldInput!] + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") + genresAggregate: MovieGenresAggregateInput + genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_ALL: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_NONE: MovieGenresConnectionWhere + genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SINGLE: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SOME: MovieGenresConnectionWhere + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + genres_ALL: GenreWhere + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + genres_NONE: GenreWhere + genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + genres_SINGLE: GenreWhere + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + genres_SOME: GenreWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + interface RelProperties { + callback1: Int! + callback2: Int! + callback3: Int! + id: ID! + } + + input RelPropertiesCreateInput { + id: ID! + } + + input RelPropertiesSort { + callback1: SortDirection + callback2: SortDirection + callback3: SortDirection + id: SortDirection + } + + input RelPropertiesUpdateInput { + id: ID + } + + input RelPropertiesWhere { + AND: [RelPropertiesWhere!] + NOT: RelPropertiesWhere + OR: [RelPropertiesWhere!] + callback1: Int + callback1_GT: Int + callback1_GTE: Int + callback1_IN: [Int!] + callback1_LT: Int + callback1_LTE: Int + callback1_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback1_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2: Int + callback2_GT: Int + callback2_GTE: Int + callback2_IN: [Int!] + callback2_LT: Int + callback2_LTE: Int + callback2_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback2_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3: Int + callback3_GT: Int + callback3_GTE: Int + callback3_IN: [Int!] + callback3_LT: Int + callback3_LTE: Int + callback3_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + callback3_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + \\"\\"\\"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 UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); }); diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index b7c350802c..8af51a33d8 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -40,140 +40,140 @@ describe("@private directive", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(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(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User implements UserInterface { - id: ID -} - -type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input UserCreateInput { - id: ID -} - -type UserEdge { - cursor: String! - node: User! -} - -interface UserInterface { - id: ID -} - -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 { - id: SortDirection -} - -input UserUpdateInput { - id: ID -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(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(options: UserOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User implements UserInterface { + id: ID + } + + type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input UserCreateInput { + id: ID + } + + type UserEdge { + cursor: String! + node: User! + } + + interface UserInterface { + id: ID + } + + 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 { + id: SortDirection + } + + input UserUpdateInput { + id: ID + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index df58d7a760..f1f92e5291 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -222,435 +222,435 @@ describe("@relationship directive, aggregate argument", () => { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorUpdateInput { - password: String - username: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + password: String! + username: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + password: SortDirection + username: SortDirection + } + + input ActorUpdateInput { + password: String + username: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("argument set as true", async () => { @@ -670,446 +670,446 @@ type UpdateMoviesMutationResponse { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorUpdateInput { - password: String - username: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + password: String! + username: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + password: SortDirection + username: SortDirection + } + + input ActorUpdateInput { + password: String + username: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + password_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LENGTH_EQUAL: Float + password_AVERAGE_LENGTH_GT: Float + password_AVERAGE_LENGTH_GTE: Float + password_AVERAGE_LENGTH_LT: Float + password_AVERAGE_LENGTH_LTE: Float + password_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LENGTH_EQUAL: Int + password_LONGEST_LENGTH_GT: Int + password_LONGEST_LENGTH_GTE: Int + password_LONGEST_LENGTH_LT: Int + password_LONGEST_LENGTH_LTE: Int + password_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + password_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LENGTH_EQUAL: Int + password_SHORTEST_LENGTH_GT: Int + password_SHORTEST_LENGTH_GTE: Int + password_SHORTEST_LENGTH_LT: Int + password_SHORTEST_LENGTH_LTE: Int + password_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + password_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LENGTH_EQUAL: Float + username_AVERAGE_LENGTH_GT: Float + username_AVERAGE_LENGTH_GTE: Float + username_AVERAGE_LENGTH_LT: Float + username_AVERAGE_LENGTH_LTE: Float + username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LENGTH_EQUAL: Int + username_LONGEST_LENGTH_GT: Int + username_LONGEST_LENGTH_GTE: Int + username_LONGEST_LENGTH_LT: Int + username_LONGEST_LENGTH_LTE: Int + username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LENGTH_EQUAL: Int + username_SHORTEST_LENGTH_GT: Int + username_SHORTEST_LENGTH_GTE: Int + username_SHORTEST_LENGTH_LT: Int + username_SHORTEST_LENGTH_LTE: Int + username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); describe("on INTERFACE", () => { @@ -1135,1345 +1135,1345 @@ type UpdateMoviesMutationResponse { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor implements Person { - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorCreateInput { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorUpdateInput { - password: String - username: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsConnectFieldInput { - where: PersonConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - password: String! - username: String! -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - Actor: ActorCreateInput -} - -input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput -} - -input PersonImplementationsWhere { - Actor: ActorWhere -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - password: SortDirection - username: SortDirection -} - -input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - password: String - username: String -} - -input PersonWhere { - _on: PersonImplementationsWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - test("aggregate argument set as true, (no-op as abstract does not support aggregation)", async () => { - const typeDefs = gql` + "schema { + query: Query + mutation: Mutation + } + type Actor implements Person { - username: String! - password: String! + password: String! + username: String! } - interface Person { - username: String! - password: String! + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! } - type Movie { - title: String - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) + input ActorCreateInput { + password: String! + username: String! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor implements Person { - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorCreateInput { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorUpdateInput { - password: String - username: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsConnectFieldInput { - where: PersonConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - password: String! - username: String! -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - Actor: ActorCreateInput -} - -input PersonImplementationsUpdateInput { - Actor: ActorUpdateInput -} - -input PersonImplementationsWhere { - Actor: ActorWhere -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - password: SortDirection - username: SortDirection -} - -input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - password: String - username: String -} - -input PersonWhere { - _on: PersonImplementationsWhere - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - }); + type ActorEdge { + cursor: String! + node: Actor! + } - describe("on UNION", () => { - test("aggregate argument set as false, (no-op as abstract does not support aggregation)", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! + 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!] } - type Person { - name: String! + \\"\\"\\" + 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 { + password: SortDirection + username: SortDirection } - union CastMember = Actor | Person + input ActorUpdateInput { + password: String + username: String + } - type Movie { - title: String - actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: false) + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorUpdateInput { - password: String - username: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -union CastMember = Actor | Person - -input CastMemberWhere { - Actor: ActorWhere - Person: PersonWhere -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsActorConnectFieldInput { - where: ActorConnectWhere -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsActorDeleteFieldInput { - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorDisconnectFieldInput { - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] -} - -input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Person: [MovieActorsPersonConnectFieldInput!] -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Person: MovieActorsPersonConnectionWhere -} - -input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Person: [MovieActorsPersonCreateFieldInput!] -} - -input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Person: MovieActorsPersonFieldInput -} - -input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Person: [MovieActorsPersonDeleteFieldInput!] -} - -input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Person: [MovieActorsPersonDisconnectFieldInput!] -} - -input MovieActorsPersonConnectFieldInput { - where: PersonConnectWhere -} - -input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsPersonDeleteFieldInput { - where: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonDisconnectFieldInput { - where: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] -} - -input MovieActorsPersonUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsPersonUpdateFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - delete: [MovieActorsPersonDeleteFieldInput!] - disconnect: [MovieActorsPersonDisconnectFieldInput!] - update: MovieActorsPersonUpdateConnectionInput - where: MovieActorsPersonConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: CastMember! -} - -input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Person: [MovieActorsPersonUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - title: String -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput -} - -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!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -\\"\\"\\" -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: MovieActorsUpdateInput - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String! -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - name: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); - test("aggregate argument set as true, (no-op as abstract does not support aggregation)", async () => { - const typeDefs = gql` - type Actor { - username: String! - password: String! + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! } - type Person { - name: String! + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! } - union CastMember = Actor | Person + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } - type Movie { - title: String - actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsConnectFieldInput { + where: PersonConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + password: String! + username: String! + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + Actor: ActorCreateInput + } + + input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput + } + + input PersonImplementationsWhere { + Actor: ActorWhere + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + password: SortDirection + username: SortDirection + } + + input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + password: String + username: String + } + + input PersonWhere { + _on: PersonImplementationsWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + test("aggregate argument set as true, (no-op as abstract does not support aggregation)", async () => { + const typeDefs = gql` + type Actor implements Person { + username: String! + password: String! + } + + interface Person { + username: String! + password: String! + } + + type Movie { + title: String + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) + } + `; + + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor implements Person { + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorCreateInput { + password: String! + username: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + password: SortDirection + username: SortDirection + } + + input ActorUpdateInput { + password: String + username: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsConnectFieldInput { + where: PersonConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + password: String! + username: String! + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + Actor: ActorCreateInput + } + + input PersonImplementationsUpdateInput { + Actor: ActorUpdateInput + } + + input PersonImplementationsWhere { + Actor: ActorWhere + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + password: SortDirection + username: SortDirection + } + + input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + password: String + username: String + } + + input PersonWhere { + _on: PersonImplementationsWhere + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + }); + + describe("on UNION", () => { + test("aggregate argument set as false, (no-op as abstract does not support aggregation)", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + } + + type Person { + name: String! + } + + union CastMember = Actor | Person + + type Movie { + title: String + actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: false) + } + `; + + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const schema = await neoSchema.getSchema(); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + password: String! + username: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + password: SortDirection + username: SortDirection + } + + input ActorUpdateInput { + password: String + username: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + union CastMember = Actor | Person + + input CastMemberWhere { + Actor: ActorWhere + Person: PersonWhere + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsActorConnectFieldInput { + where: ActorConnectWhere + } + + input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsActorDeleteFieldInput { + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorDisconnectFieldInput { + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + } + + input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Person: [MovieActorsPersonConnectFieldInput!] + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Person: MovieActorsPersonConnectionWhere + } + + input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Person: [MovieActorsPersonCreateFieldInput!] + } + + input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Person: MovieActorsPersonFieldInput + } + + input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Person: [MovieActorsPersonDeleteFieldInput!] + } + + input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Person: [MovieActorsPersonDisconnectFieldInput!] + } + + input MovieActorsPersonConnectFieldInput { + where: PersonConnectWhere + } + + input MovieActorsPersonConnectionWhere { + AND: [MovieActorsPersonConnectionWhere!] + NOT: MovieActorsPersonConnectionWhere + OR: [MovieActorsPersonConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsPersonDeleteFieldInput { + where: MovieActorsPersonConnectionWhere + } + + input MovieActorsPersonDisconnectFieldInput { + where: MovieActorsPersonConnectionWhere + } + + input MovieActorsPersonFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + } + + input MovieActorsPersonUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsPersonUpdateFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + delete: [MovieActorsPersonDeleteFieldInput!] + disconnect: [MovieActorsPersonDisconnectFieldInput!] + update: MovieActorsPersonUpdateConnectionInput + where: MovieActorsPersonConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: CastMember! + } + + input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Person: [MovieActorsPersonUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: MovieActorsConnectInput + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + title: String + } + + input MovieDeleteInput { + actors: MovieActorsDeleteInput + } + + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + } + + 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!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + \\"\\"\\" + 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: MovieActorsUpdateInput + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String! + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + name: String! + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + test("aggregate argument set as true, (no-op as abstract does not support aggregation)", async () => { + const typeDefs = gql` + type Actor { + username: String! + password: String! + } + + type Person { + name: String! + } + + union CastMember = Actor | Person + + type Movie { + title: String + actors: [CastMember!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) } `; @@ -2481,498 +2481,498 @@ type UpdatePeopleMutationResponse { const schema = await neoSchema.getSchema(); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorUpdateInput { - password: String - username: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -union CastMember = Actor | Person - -input CastMemberWhere { - Actor: ActorWhere - Person: PersonWhere -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -input MovieActorsActorConnectFieldInput { - where: ActorConnectWhere -} - -input MovieActorsActorConnectionWhere { - AND: [MovieActorsActorConnectionWhere!] - NOT: MovieActorsActorConnectionWhere - OR: [MovieActorsActorConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsActorCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsActorDeleteFieldInput { - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorDisconnectFieldInput { - where: MovieActorsActorConnectionWhere -} - -input MovieActorsActorFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] -} - -input MovieActorsActorUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsActorUpdateFieldInput { - connect: [MovieActorsActorConnectFieldInput!] - create: [MovieActorsActorCreateFieldInput!] - delete: [MovieActorsActorDeleteFieldInput!] - disconnect: [MovieActorsActorDisconnectFieldInput!] - update: MovieActorsActorUpdateConnectionInput - where: MovieActorsActorConnectionWhere -} - -input MovieActorsConnectInput { - Actor: [MovieActorsActorConnectFieldInput!] - Person: [MovieActorsPersonConnectFieldInput!] -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - Actor: MovieActorsActorConnectionWhere - Person: MovieActorsPersonConnectionWhere -} - -input MovieActorsCreateFieldInput { - Actor: [MovieActorsActorCreateFieldInput!] - Person: [MovieActorsPersonCreateFieldInput!] -} - -input MovieActorsCreateInput { - Actor: MovieActorsActorFieldInput - Person: MovieActorsPersonFieldInput -} - -input MovieActorsDeleteInput { - Actor: [MovieActorsActorDeleteFieldInput!] - Person: [MovieActorsPersonDeleteFieldInput!] -} - -input MovieActorsDisconnectInput { - Actor: [MovieActorsActorDisconnectFieldInput!] - Person: [MovieActorsPersonDisconnectFieldInput!] -} - -input MovieActorsPersonConnectFieldInput { - where: PersonConnectWhere -} - -input MovieActorsPersonConnectionWhere { - AND: [MovieActorsPersonConnectionWhere!] - NOT: MovieActorsPersonConnectionWhere - OR: [MovieActorsPersonConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsPersonDeleteFieldInput { - where: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonDisconnectFieldInput { - where: MovieActorsPersonConnectionWhere -} - -input MovieActorsPersonFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] -} - -input MovieActorsPersonUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsPersonUpdateFieldInput { - connect: [MovieActorsPersonConnectFieldInput!] - create: [MovieActorsPersonCreateFieldInput!] - delete: [MovieActorsPersonDeleteFieldInput!] - disconnect: [MovieActorsPersonDisconnectFieldInput!] - update: MovieActorsPersonUpdateConnectionInput - where: MovieActorsPersonConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: CastMember! -} - -input MovieActorsUpdateInput { - Actor: [MovieActorsActorUpdateFieldInput!] - Person: [MovieActorsPersonUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - title: String -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput -} - -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!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -\\"\\"\\" -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: MovieActorsUpdateInput - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String! -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - name: String! -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + password: String! + username: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + password: SortDirection + username: SortDirection + } + + input ActorUpdateInput { + password: String + username: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + union CastMember = Actor | Person + + input CastMemberWhere { + Actor: ActorWhere + Person: PersonWhere + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: CastMemberWhere): [CastMember!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + input MovieActorsActorConnectFieldInput { + where: ActorConnectWhere + } + + input MovieActorsActorConnectionWhere { + AND: [MovieActorsActorConnectionWhere!] + NOT: MovieActorsActorConnectionWhere + OR: [MovieActorsActorConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsActorCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsActorDeleteFieldInput { + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorDisconnectFieldInput { + where: MovieActorsActorConnectionWhere + } + + input MovieActorsActorFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + } + + input MovieActorsActorUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsActorUpdateFieldInput { + connect: [MovieActorsActorConnectFieldInput!] + create: [MovieActorsActorCreateFieldInput!] + delete: [MovieActorsActorDeleteFieldInput!] + disconnect: [MovieActorsActorDisconnectFieldInput!] + update: MovieActorsActorUpdateConnectionInput + where: MovieActorsActorConnectionWhere + } + + input MovieActorsConnectInput { + Actor: [MovieActorsActorConnectFieldInput!] + Person: [MovieActorsPersonConnectFieldInput!] + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + Actor: MovieActorsActorConnectionWhere + Person: MovieActorsPersonConnectionWhere + } + + input MovieActorsCreateFieldInput { + Actor: [MovieActorsActorCreateFieldInput!] + Person: [MovieActorsPersonCreateFieldInput!] + } + + input MovieActorsCreateInput { + Actor: MovieActorsActorFieldInput + Person: MovieActorsPersonFieldInput + } + + input MovieActorsDeleteInput { + Actor: [MovieActorsActorDeleteFieldInput!] + Person: [MovieActorsPersonDeleteFieldInput!] + } + + input MovieActorsDisconnectInput { + Actor: [MovieActorsActorDisconnectFieldInput!] + Person: [MovieActorsPersonDisconnectFieldInput!] + } + + input MovieActorsPersonConnectFieldInput { + where: PersonConnectWhere + } + + input MovieActorsPersonConnectionWhere { + AND: [MovieActorsPersonConnectionWhere!] + NOT: MovieActorsPersonConnectionWhere + OR: [MovieActorsPersonConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsPersonDeleteFieldInput { + where: MovieActorsPersonConnectionWhere + } + + input MovieActorsPersonDisconnectFieldInput { + where: MovieActorsPersonConnectionWhere + } + + input MovieActorsPersonFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + } + + input MovieActorsPersonUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsPersonUpdateFieldInput { + connect: [MovieActorsPersonConnectFieldInput!] + create: [MovieActorsPersonCreateFieldInput!] + delete: [MovieActorsPersonDeleteFieldInput!] + disconnect: [MovieActorsPersonDisconnectFieldInput!] + update: MovieActorsPersonUpdateConnectionInput + where: MovieActorsPersonConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: CastMember! + } + + input MovieActorsUpdateInput { + Actor: [MovieActorsActorUpdateFieldInput!] + Person: [MovieActorsPersonUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: MovieActorsConnectInput + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + title: String + } + + input MovieDeleteInput { + actors: MovieActorsDeleteInput + } + + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + } + + 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!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + \\"\\"\\" + 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: MovieActorsUpdateInput + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String! + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + name: String! + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); }); }); }); 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 0eacc601fa..5f1f155392 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -45,3438 +45,338 @@ describe("Relationship nested operations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -\\"\\"\\" -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + } - test("Single relationship with nested operation CREATE specified", async () => { - const typeDefs = gql` - type Person { - name: String + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsFieldInput { - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - create: [MovieActorsCreateFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } - test("Single relationship with nested operation CONNECT specified", async () => { - const typeDefs = gql` - type Person { - name: String + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID } type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PersonConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } - test("Single relationship with nested operation UPDATE specified", async () => { - const typeDefs = gql` - type Person { - name: String + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) + input MovieActorsConnectionSort { + node: PersonSort } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } - test("Single relationship with nested operation DELETE specified", async () => { - const typeDefs = gql` - type Person { - name: String + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) + type MovieActorsRelationship { + cursor: String! + node: Person! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - delete: [MovieActorsDeleteFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } - test("Single relationship with nested operation DISCONNECT specified", async () => { - const typeDefs = gql` - type Person { - name: String + input MovieCreateInput { + id: ID } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) + type MovieEdge { + cursor: String! + node: Movie! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - disconnect: [MovieActorsDisconnectFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); + 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!] + } - test("Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field", async () => { - const typeDefs = gql` - type Person { - name: String + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection } - type Movie { - id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -\\"\\"\\" -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); + \\"\\"\\" + 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 + } - test("Single relationship to type with unique field with nested operation CONNECT_OR_CREATE specified", async () => { - const typeDefs = gql` - type Person { - id: ID! @id @unique - name: String + input MovieUpdateInput { + id: ID } - type Movie { - id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectOrCreateFieldInput { - onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! - where: PersonConnectOrCreateWhere! -} - -input MovieActorsConnectOrCreateFieldInputOnCreate { - node: PersonOnCreateInput! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsFieldInput { - connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectOrCreateInput { - actors: [MovieActorsConnectOrCreateFieldInput!] -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(connectOrCreate: MovieConnectOrCreateInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - id: ID! - name: String -} - -type PersonAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! -} - -input PersonConnectOrCreateWhere { - node: PersonUniqueWhere! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOnCreateInput { - name: String -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - id: SortDirection - name: SortDirection -} - -input PersonUniqueWhere { - id: ID -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } - test("Two relationships with nested operations specified on one", async () => { - const typeDefs = gql` type Person { - name: String + name: String } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PersonConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - producers: [MovieProducersDisconnectFieldInput!] -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -type MoviePersonProducersAggregationSelection { - count: Int! - node: MoviePersonProducersNodeAggregateSelection -} - -type MoviePersonProducersNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieProducersAggregateInput { - AND: [MovieProducersAggregateInput!] - NOT: MovieProducersAggregateInput - OR: [MovieProducersAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieProducersNodeAggregationWhereInput -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieProducersDisconnectFieldInput { - where: MovieProducersConnectionWhere -} - -input MovieProducersNodeAggregationWhereInput { - AND: [MovieProducersNodeAggregationWhereInput!] - NOT: MovieProducersNodeAggregationWhereInput - OR: [MovieProducersNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -input MovieProducersUpdateFieldInput { - disconnect: [MovieProducersDisconnectFieldInput!] - where: MovieProducersConnectionWhere -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID - producers: [MovieProducersUpdateFieldInput!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producers: PersonWhere @deprecated(reason: \\"Use \`producers_SOME\` instead.\\") - producersAggregate: MovieProducersAggregateInput - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere - \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere - producers_NOT: PersonWhere @deprecated(reason: \\"Use \`producers_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); }); - test("Two relationships with nested operations specified on both", async () => { + test("Single relationship with nested operation CREATE specified", async () => { const typeDefs = gql` type Person { name: String @@ -3485,8467 +385,11567 @@ type UpdatePeopleMutationResponse { type Movie { id: ID actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsFieldInput { - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - create: [MovieActorsCreateFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -input MovieDisconnectInput { - producers: [MovieProducersDisconnectFieldInput!] -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -type MoviePersonProducersAggregationSelection { - count: Int! - node: MoviePersonProducersNodeAggregateSelection -} - -type MoviePersonProducersNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieProducersAggregateInput { - AND: [MovieProducersAggregateInput!] - NOT: MovieProducersAggregateInput - OR: [MovieProducersAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieProducersNodeAggregationWhereInput -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieProducersDisconnectFieldInput { - where: MovieProducersConnectionWhere -} - -input MovieProducersNodeAggregationWhereInput { - AND: [MovieProducersNodeAggregationWhereInput!] - NOT: MovieProducersNodeAggregationWhereInput - OR: [MovieProducersNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -input MovieProducersUpdateFieldInput { - disconnect: [MovieProducersDisconnectFieldInput!] - where: MovieProducersConnectionWhere -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID - producers: [MovieProducersUpdateFieldInput!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producers: PersonWhere @deprecated(reason: \\"Use \`producers_SOME\` instead.\\") - producersAggregate: MovieProducersAggregateInput - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere - \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere - producers_NOT: PersonWhere @deprecated(reason: \\"Use \`producers_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); - }); + "schema { + query: Query + mutation: Mutation + } - describe("Related to a union type", () => { - test("Should not generate UpdateFieldInput input with no nested operations", async () => { - const typeDefs = gql` - type PersonOne { - name: String + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! } - type PersonTwo { - nameTwo: String + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! } - union Person = PersonOne | PersonTwo + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const updateFieldInput = schema.getType("MovieActorsUpdateFieldInput") as GraphQLNamedInputType; - expect(updateFieldInput).toBeUndefined(); + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + input MovieActorsConnectionSort { + node: PersonSort + } - test("Single relationship with nested operation CREATE specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } - type PersonTwo { - nameTwo: String + input MovieActorsCreateFieldInput { + node: PersonCreateInput! } - union Person = PersonOne | PersonTwo + input MovieActorsFieldInput { + create: [MovieActorsCreateFieldInput!] + } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsCreateFieldInput { - PersonOne: [MovieActorsPersonOneCreateFieldInput!] - PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] -} - -input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonOneCreateFieldInput { - node: PersonOneCreateInput! -} - -input MovieActorsPersonOneFieldInput { - create: [MovieActorsPersonOneCreateFieldInput!] -} - -input MovieActorsPersonOneUpdateFieldInput { - create: [MovieActorsPersonOneCreateFieldInput!] - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoCreateFieldInput { - node: PersonTwoCreateInput! -} - -input MovieActorsPersonTwoFieldInput { - create: [MovieActorsPersonTwoCreateFieldInput!] -} - -input MovieActorsPersonTwoUpdateFieldInput { - create: [MovieActorsPersonTwoCreateFieldInput!] - where: MovieActorsPersonTwoConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID -} - -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!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -\\"\\"\\" -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: MovieActorsUpdateInput - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + type MovieActorsRelationship { + cursor: String! + node: Person! + } - test("Single relationship with nested operation CONNECT specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String + input MovieActorsUpdateFieldInput { + create: [MovieActorsCreateFieldInput!] + where: MovieActorsConnectionWhere } - type PersonTwo { - nameTwo: String + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! } - union Person = PersonOne | PersonTwo + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) + type MovieEdge { + cursor: String! + node: Movie! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsConnectInput { - PersonOne: [MovieActorsPersonOneConnectFieldInput!] - PersonTwo: [MovieActorsPersonTwoConnectFieldInput!] -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput -} - -input MovieActorsPersonOneConnectFieldInput { - where: PersonOneConnectWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonOneFieldInput { - connect: [MovieActorsPersonOneConnectFieldInput!] -} - -input MovieActorsPersonOneUpdateFieldInput { - connect: [MovieActorsPersonOneConnectFieldInput!] - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonTwoConnectFieldInput { - where: PersonTwoConnectWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoFieldInput { - connect: [MovieActorsPersonTwoConnectFieldInput!] -} - -input MovieActorsPersonTwoUpdateFieldInput { - connect: [MovieActorsPersonTwoConnectFieldInput!] - where: MovieActorsPersonTwoConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID -} - -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: MovieActorsUpdateInput - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneConnectWhere { - node: PersonOneWhere! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoConnectWhere { - node: PersonTwoWhere! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + 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!] + } - test("Single relationship with nested operation UPDATE specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection } - type PersonTwo { - nameTwo: String + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! } - union Person = PersonOne | PersonTwo + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) + \\"\\"\\" + 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 } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonOneUpdateConnectionInput { - node: PersonOneUpdateInput -} - -input MovieActorsPersonOneUpdateFieldInput { - update: MovieActorsPersonOneUpdateConnectionInput - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoUpdateConnectionInput { - node: PersonTwoUpdateInput -} - -input MovieActorsPersonTwoUpdateFieldInput { - update: MovieActorsPersonTwoUpdateConnectionInput - where: MovieActorsPersonTwoConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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: MovieActorsUpdateInput - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + id: ID + } - test("Single relationship with nested operation DELETE specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID } - type PersonTwo { - nameTwo: String + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! } - union Person = PersonOne | PersonTwo + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsDeleteInput { - PersonOne: [MovieActorsPersonOneDeleteFieldInput!] - PersonTwo: [MovieActorsPersonTwoDeleteFieldInput!] -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonOneDeleteFieldInput { - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonOneUpdateFieldInput { - delete: [MovieActorsPersonOneDeleteFieldInput!] - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoDeleteFieldInput { - where: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonTwoUpdateFieldInput { - delete: [MovieActorsPersonTwoDeleteFieldInput!] - where: MovieActorsPersonTwoConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -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: MovieActorsUpdateInput - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Single relationship with nested operation CONNECT specified", async () => { + const typeDefs = gql` + type Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PersonConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Single relationship with nested operation UPDATE specified", async () => { + const typeDefs = gql` + type Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Single relationship with nested operation DELETE specified", async () => { + const typeDefs = gql` + type Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + delete: [MovieActorsDeleteFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Single relationship with nested operation DISCONNECT specified", async () => { + const typeDefs = gql` + type Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + disconnect: [MovieActorsDisconnectFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field", async () => { + const typeDefs = gql` + type Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + \\"\\"\\" + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Single relationship to type with unique field with nested operation CONNECT_OR_CREATE specified", async () => { + const typeDefs = gql` + type Person { + id: ID! @id @unique + name: String + } + + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectOrCreateFieldInput { + onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! + where: PersonConnectOrCreateWhere! + } + + input MovieActorsConnectOrCreateFieldInputOnCreate { + node: PersonOnCreateInput! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsFieldInput { + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectOrCreateInput { + actors: [MovieActorsConnectOrCreateFieldInput!] + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(connectOrCreate: MovieConnectOrCreateInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + id: ID! + name: String + } + + type PersonAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + } + + input PersonConnectOrCreateWhere { + node: PersonUniqueWhere! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOnCreateInput { + name: String + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + id: SortDirection + name: SortDirection + } + + input PersonUniqueWhere { + id: ID + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Two relationships with nested operations specified on one", async () => { + const typeDefs = gql` + type Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection + producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PersonConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + producers: [MovieProducersDisconnectFieldInput!] + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + type MoviePersonProducersAggregationSelection { + count: Int! + node: MoviePersonProducersNodeAggregateSelection + } + + type MoviePersonProducersNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieProducersAggregateInput { + AND: [MovieProducersAggregateInput!] + NOT: MovieProducersAggregateInput + OR: [MovieProducersAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieProducersNodeAggregationWhereInput + } + + type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieProducersConnectionSort { + node: PersonSort + } + + input MovieProducersConnectionWhere { + AND: [MovieProducersConnectionWhere!] + NOT: MovieProducersConnectionWhere + OR: [MovieProducersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieProducersDisconnectFieldInput { + where: MovieProducersConnectionWhere + } + + input MovieProducersNodeAggregationWhereInput { + AND: [MovieProducersNodeAggregationWhereInput!] + NOT: MovieProducersNodeAggregationWhereInput + OR: [MovieProducersNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieProducersRelationship { + cursor: String! + node: Person! + } + + input MovieProducersUpdateFieldInput { + disconnect: [MovieProducersDisconnectFieldInput!] + where: MovieProducersConnectionWhere + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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: ID + producers: [MovieProducersUpdateFieldInput!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producers: PersonWhere @deprecated(reason: \\"Use \`producers_SOME\` instead.\\") + producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + producers_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + producers_NONE: PersonWhere + producers_NOT: PersonWhere @deprecated(reason: \\"Use \`producers_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + producers_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + producers_SOME: PersonWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Two relationships with nested operations specified on both", async () => { + const typeDefs = gql` + type Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + producersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonProducersAggregationSelection + producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsFieldInput { + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + create: [MovieActorsCreateFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } + + input MovieDisconnectInput { + producers: [MovieProducersDisconnectFieldInput!] + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + type MoviePersonProducersAggregationSelection { + count: Int! + node: MoviePersonProducersNodeAggregateSelection + } + + type MoviePersonProducersNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieProducersAggregateInput { + AND: [MovieProducersAggregateInput!] + NOT: MovieProducersAggregateInput + OR: [MovieProducersAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieProducersNodeAggregationWhereInput + } + + type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieProducersConnectionSort { + node: PersonSort + } + + input MovieProducersConnectionWhere { + AND: [MovieProducersConnectionWhere!] + NOT: MovieProducersConnectionWhere + OR: [MovieProducersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieProducersDisconnectFieldInput { + where: MovieProducersConnectionWhere + } + + input MovieProducersNodeAggregationWhereInput { + AND: [MovieProducersNodeAggregationWhereInput!] + NOT: MovieProducersNodeAggregationWhereInput + OR: [MovieProducersNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieProducersRelationship { + cursor: String! + node: Person! + } + + input MovieProducersUpdateFieldInput { + disconnect: [MovieProducersDisconnectFieldInput!] + where: MovieProducersConnectionWhere + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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: ID + producers: [MovieProducersUpdateFieldInput!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producers: PersonWhere @deprecated(reason: \\"Use \`producers_SOME\` instead.\\") + producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + producers_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + producers_NONE: PersonWhere + producers_NOT: PersonWhere @deprecated(reason: \\"Use \`producers_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + producers_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + producers_SOME: PersonWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + }); + + describe("Related to a union type", () => { + test("Should not generate UpdateFieldInput input with no nested operations", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const schema = await neoSchema.getSchema(); + + const updateFieldInput = schema.getType("MovieActorsUpdateFieldInput") as GraphQLNamedInputType; + expect(updateFieldInput).toBeUndefined(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation CREATE specified", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsCreateFieldInput { + PersonOne: [MovieActorsPersonOneCreateFieldInput!] + PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] + } + + input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonOneCreateFieldInput { + node: PersonOneCreateInput! + } + + input MovieActorsPersonOneFieldInput { + create: [MovieActorsPersonOneCreateFieldInput!] + } + + input MovieActorsPersonOneUpdateFieldInput { + create: [MovieActorsPersonOneCreateFieldInput!] + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoCreateFieldInput { + node: PersonTwoCreateInput! + } + + input MovieActorsPersonTwoFieldInput { + create: [MovieActorsPersonTwoCreateFieldInput!] + } + + input MovieActorsPersonTwoUpdateFieldInput { + create: [MovieActorsPersonTwoCreateFieldInput!] + where: MovieActorsPersonTwoConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID + } + + 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!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + \\"\\"\\" + 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: MovieActorsUpdateInput + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation CONNECT specified", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsConnectInput { + PersonOne: [MovieActorsPersonOneConnectFieldInput!] + PersonTwo: [MovieActorsPersonTwoConnectFieldInput!] + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput + } + + input MovieActorsPersonOneConnectFieldInput { + where: PersonOneConnectWhere + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonOneFieldInput { + connect: [MovieActorsPersonOneConnectFieldInput!] + } + + input MovieActorsPersonOneUpdateFieldInput { + connect: [MovieActorsPersonOneConnectFieldInput!] + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonTwoConnectFieldInput { + where: PersonTwoConnectWhere + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoFieldInput { + connect: [MovieActorsPersonTwoConnectFieldInput!] + } + + input MovieActorsPersonTwoUpdateFieldInput { + connect: [MovieActorsPersonTwoConnectFieldInput!] + where: MovieActorsPersonTwoConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: MovieActorsConnectInput + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID + } + + 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: MovieActorsUpdateInput + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneConnectWhere { + node: PersonOneWhere! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoConnectWhere { + node: PersonTwoWhere! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation UPDATE specified", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonOneUpdateConnectionInput { + node: PersonOneUpdateInput + } + + input MovieActorsPersonOneUpdateFieldInput { + update: MovieActorsPersonOneUpdateConnectionInput + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoUpdateConnectionInput { + node: PersonTwoUpdateInput + } + + input MovieActorsPersonTwoUpdateFieldInput { + update: MovieActorsPersonTwoUpdateConnectionInput + where: MovieActorsPersonTwoConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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: MovieActorsUpdateInput + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation DELETE specified", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsDeleteInput { + PersonOne: [MovieActorsPersonOneDeleteFieldInput!] + PersonTwo: [MovieActorsPersonTwoDeleteFieldInput!] + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonOneDeleteFieldInput { + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonOneUpdateFieldInput { + delete: [MovieActorsPersonOneDeleteFieldInput!] + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoDeleteFieldInput { + where: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsPersonTwoUpdateFieldInput { + delete: [MovieActorsPersonTwoDeleteFieldInput!] + where: MovieActorsPersonTwoConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + input MovieDeleteInput { + actors: MovieActorsDeleteInput + } + + 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: MovieActorsUpdateInput + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation DISCONNECT specified", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsDisconnectInput { + PersonOne: [MovieActorsPersonOneDisconnectFieldInput!] + PersonTwo: [MovieActorsPersonTwoDisconnectFieldInput!] + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonOneDisconnectFieldInput { + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonOneUpdateFieldInput { + disconnect: [MovieActorsPersonOneDisconnectFieldInput!] + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoDisconnectFieldInput { + where: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsPersonTwoUpdateFieldInput { + disconnect: [MovieActorsPersonTwoDisconnectFieldInput!] + where: MovieActorsPersonTwoConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + } + + 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: MovieActorsUpdateInput + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship to type with unique field with nested operation CONNECT_OR_CREATE specified", async () => { + const typeDefs = gql` + type PersonOne { + id: ID! @id @unique + name: String + } + + type PersonTwo { + id: ID! @id @unique + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsConnectOrCreateInput { + PersonOne: [MovieActorsPersonOneConnectOrCreateFieldInput!] + PersonTwo: [MovieActorsPersonTwoConnectOrCreateFieldInput!] + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput + } + + input MovieActorsPersonOneConnectOrCreateFieldInput { + onCreate: MovieActorsPersonOneConnectOrCreateFieldInputOnCreate! + where: PersonOneConnectOrCreateWhere! + } + + input MovieActorsPersonOneConnectOrCreateFieldInputOnCreate { + node: PersonOneOnCreateInput! + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonOneFieldInput { + connectOrCreate: [MovieActorsPersonOneConnectOrCreateFieldInput!] + } + + input MovieActorsPersonOneUpdateFieldInput { + connectOrCreate: [MovieActorsPersonOneConnectOrCreateFieldInput!] + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonTwoConnectOrCreateFieldInput { + onCreate: MovieActorsPersonTwoConnectOrCreateFieldInputOnCreate! + where: PersonTwoConnectOrCreateWhere! + } + + input MovieActorsPersonTwoConnectOrCreateFieldInputOnCreate { + node: PersonTwoOnCreateInput! + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoFieldInput { + connectOrCreate: [MovieActorsPersonTwoConnectOrCreateFieldInput!] + } + + input MovieActorsPersonTwoUpdateFieldInput { + connectOrCreate: [MovieActorsPersonTwoConnectOrCreateFieldInput!] + where: MovieActorsPersonTwoConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectOrCreateInput { + actors: MovieActorsConnectOrCreateInput + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID + } + + 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: MovieActorsUpdateInput + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connectOrCreate: MovieConnectOrCreateInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + id: ID! + name: String + } + + type PersonOneAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + } + + input PersonOneConnectOrCreateWhere { + node: PersonOneUniqueWhere! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOnCreateInput { + name: String + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + id: SortDirection + name: SortDirection + } + + input PersonOneUniqueWhere { + id: ID + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + id: ID! + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoConnectOrCreateWhere { + node: PersonTwoUniqueWhere! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOnCreateInput { + nameTwo: String + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + id: SortDirection + nameTwo: SortDirection + } + + input PersonTwoUniqueWhere { + id: ID + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Two relationships with nested operations specified on one", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! + } + + input MovieActorsConnectInput { + PersonOne: [MovieActorsPersonOneConnectFieldInput!] + PersonTwo: [MovieActorsPersonTwoConnectFieldInput!] + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsCreateFieldInput { + PersonOne: [MovieActorsPersonOneCreateFieldInput!] + PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] + } + + input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput + } + + input MovieActorsDeleteInput { + PersonOne: [MovieActorsPersonOneDeleteFieldInput!] + PersonTwo: [MovieActorsPersonTwoDeleteFieldInput!] + } + + input MovieActorsDisconnectInput { + PersonOne: [MovieActorsPersonOneDisconnectFieldInput!] + PersonTwo: [MovieActorsPersonTwoDisconnectFieldInput!] + } + + input MovieActorsPersonOneConnectFieldInput { + where: PersonOneConnectWhere + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonOneCreateFieldInput { + node: PersonOneCreateInput! + } + + input MovieActorsPersonOneDeleteFieldInput { + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonOneDisconnectFieldInput { + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonOneFieldInput { + connect: [MovieActorsPersonOneConnectFieldInput!] + create: [MovieActorsPersonOneCreateFieldInput!] + } + + input MovieActorsPersonOneUpdateConnectionInput { + node: PersonOneUpdateInput + } + + input MovieActorsPersonOneUpdateFieldInput { + connect: [MovieActorsPersonOneConnectFieldInput!] + create: [MovieActorsPersonOneCreateFieldInput!] + delete: [MovieActorsPersonOneDeleteFieldInput!] + disconnect: [MovieActorsPersonOneDisconnectFieldInput!] + update: MovieActorsPersonOneUpdateConnectionInput + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonTwoConnectFieldInput { + where: PersonTwoConnectWhere + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoCreateFieldInput { + node: PersonTwoCreateInput! + } + + input MovieActorsPersonTwoDeleteFieldInput { + where: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsPersonTwoDisconnectFieldInput { + where: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsPersonTwoFieldInput { + connect: [MovieActorsPersonTwoConnectFieldInput!] + create: [MovieActorsPersonTwoCreateFieldInput!] + } + + input MovieActorsPersonTwoUpdateConnectionInput { + node: PersonTwoUpdateInput + } + + input MovieActorsPersonTwoUpdateFieldInput { + connect: [MovieActorsPersonTwoConnectFieldInput!] + create: [MovieActorsPersonTwoCreateFieldInput!] + delete: [MovieActorsPersonTwoDeleteFieldInput!] + disconnect: [MovieActorsPersonTwoDisconnectFieldInput!] + update: MovieActorsPersonTwoUpdateConnectionInput + where: MovieActorsPersonTwoConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: MovieActorsConnectInput + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID + } + + input MovieDeleteInput { + actors: MovieActorsDeleteInput + } + + input MovieDisconnectInput { + actors: MovieActorsDisconnectInput + producers: MovieProducersDisconnectInput + } + + 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!] + } + + type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieProducersConnectionWhere { + PersonOne: MovieProducersPersonOneConnectionWhere + PersonTwo: MovieProducersPersonTwoConnectionWhere + } + + input MovieProducersDisconnectInput { + PersonOne: [MovieProducersPersonOneDisconnectFieldInput!] + PersonTwo: [MovieProducersPersonTwoDisconnectFieldInput!] + } + + input MovieProducersPersonOneConnectionWhere { + AND: [MovieProducersPersonOneConnectionWhere!] + NOT: MovieProducersPersonOneConnectionWhere + OR: [MovieProducersPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieProducersPersonOneDisconnectFieldInput { + where: MovieProducersPersonOneConnectionWhere + } + + input MovieProducersPersonOneUpdateFieldInput { + disconnect: [MovieProducersPersonOneDisconnectFieldInput!] + where: MovieProducersPersonOneConnectionWhere + } + + input MovieProducersPersonTwoConnectionWhere { + AND: [MovieProducersPersonTwoConnectionWhere!] + NOT: MovieProducersPersonTwoConnectionWhere + OR: [MovieProducersPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieProducersPersonTwoDisconnectFieldInput { + where: MovieProducersPersonTwoConnectionWhere + } + + input MovieProducersPersonTwoUpdateFieldInput { + disconnect: [MovieProducersPersonTwoDisconnectFieldInput!] + where: MovieProducersPersonTwoConnectionWhere + } + + type MovieProducersRelationship { + cursor: String! + node: Person! + } + + input MovieProducersUpdateInput { + PersonOne: [MovieProducersPersonOneUpdateFieldInput!] + PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + \\"\\"\\" + 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: MovieActorsUpdateInput + id: ID + producers: MovieProducersUpdateInput + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneConnectWhere { + node: PersonOneWhere! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoConnectWhere { + node: PersonTwoWhere! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Two relationships with nested operations specified on both", async () => { + const typeDefs = gql` + type PersonOne { + name: String + } + + type PersonTwo { + nameTwo: String + } + + union Person = PersonOne | PersonTwo + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsCreateFieldInput { + PersonOne: [MovieActorsPersonOneCreateFieldInput!] + PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] + } + + input MovieActorsCreateInput { + PersonOne: MovieActorsPersonOneFieldInput + PersonTwo: MovieActorsPersonTwoFieldInput + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonOneCreateFieldInput { + node: PersonOneCreateInput! + } + + input MovieActorsPersonOneFieldInput { + create: [MovieActorsPersonOneCreateFieldInput!] + } + + input MovieActorsPersonOneUpdateFieldInput { + create: [MovieActorsPersonOneCreateFieldInput!] + where: MovieActorsPersonOneConnectionWhere + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoCreateFieldInput { + node: PersonTwoCreateInput! + } + + input MovieActorsPersonTwoFieldInput { + create: [MovieActorsPersonTwoCreateFieldInput!] + } + + input MovieActorsPersonTwoUpdateFieldInput { + create: [MovieActorsPersonTwoCreateFieldInput!] + where: MovieActorsPersonTwoConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateInput { + PersonOne: [MovieActorsPersonOneUpdateFieldInput!] + PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + actors: MovieActorsCreateInput + id: ID + } + + input MovieDisconnectInput { + producers: MovieProducersDisconnectInput + } + + 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!] + } + + type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieProducersConnectionWhere { + PersonOne: MovieProducersPersonOneConnectionWhere + PersonTwo: MovieProducersPersonTwoConnectionWhere + } + + input MovieProducersDisconnectInput { + PersonOne: [MovieProducersPersonOneDisconnectFieldInput!] + PersonTwo: [MovieProducersPersonTwoDisconnectFieldInput!] + } + + input MovieProducersPersonOneConnectionWhere { + AND: [MovieProducersPersonOneConnectionWhere!] + NOT: MovieProducersPersonOneConnectionWhere + OR: [MovieProducersPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieProducersPersonOneDisconnectFieldInput { + where: MovieProducersPersonOneConnectionWhere + } + + input MovieProducersPersonOneUpdateFieldInput { + disconnect: [MovieProducersPersonOneDisconnectFieldInput!] + where: MovieProducersPersonOneConnectionWhere + } + + input MovieProducersPersonTwoConnectionWhere { + AND: [MovieProducersPersonTwoConnectionWhere!] + NOT: MovieProducersPersonTwoConnectionWhere + OR: [MovieProducersPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieProducersPersonTwoDisconnectFieldInput { + where: MovieProducersPersonTwoConnectionWhere + } + + input MovieProducersPersonTwoUpdateFieldInput { + disconnect: [MovieProducersPersonTwoDisconnectFieldInput!] + where: MovieProducersPersonTwoConnectionWhere + } + + type MovieProducersRelationship { + cursor: String! + node: Person! + } + + input MovieProducersUpdateInput { + PersonOne: [MovieProducersPersonOneUpdateFieldInput!] + PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] + } + + input MovieRelationInput { + actors: MovieActorsCreateFieldInput + } + + \\"\\"\\" + 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: MovieActorsUpdateInput + id: ID + producers: MovieProducersUpdateInput + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + }); + + describe("Related to an interface type", () => { + test("Should not generate UpdateFieldInput input with no nested operations", async () => { + const typeDefs = gql` + interface Person { + name: String + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonTwo implements Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const schema = await neoSchema.getSchema(); + + const updateFieldInput = schema.getType("MovieActorsUpdateFieldInput") as GraphQLNamedInputType; + expect(updateFieldInput).toBeUndefined(); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + name: String + } + + input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + type PersonTwo implements Person { + name: String + } + + type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + name: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + name: SortDirection + } + + input PersonTwoUpdateInput { + name: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation CREATE specified", async () => { + const typeDefs = gql` + interface Person { + name: String + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonTwo implements Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsFieldInput { + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + create: [MovieActorsCreateFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + name: String + } + + input PersonCreateInput { + PersonOne: PersonOneCreateInput + PersonTwo: PersonTwoCreateInput + } + + input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + type PersonTwo implements Person { + name: String + } + + type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + name: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + name: SortDirection + } + + input PersonTwoUpdateInput { + name: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation CONNECT specified", async () => { + const typeDefs = gql` + interface Person { + name: String + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonTwo implements Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsConnectFieldInput { + where: PersonConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } + + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + name: String + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + type PersonTwo implements Person { + name: String + } + + type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + name: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + name: SortDirection + } + + input PersonTwoUpdateInput { + name: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation UPDATE specified", async () => { + const typeDefs = gql` + interface Person { + name: String + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonTwo implements Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + name: String + } + + input PersonImplementationsUpdateInput { + PersonOne: PersonOneUpdateInput + PersonTwo: PersonTwoUpdateInput + } + + input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + type PersonTwo implements Person { + name: String + } + + type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + name: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + name: SortDirection + } + + input PersonTwoUpdateInput { + name: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + name: String + } + + input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation DELETE specified", async () => { + const typeDefs = gql` + interface Person { + name: String + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonTwo implements Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + delete: [MovieActorsDeleteFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + name: String + } + + input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + type PersonTwo implements Person { + name: String + } + + type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + name: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + name: SortDirection + } + + input PersonTwoUpdateInput { + name: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Single relationship with nested operation DISCONNECT specified", async () => { + const typeDefs = gql` + interface Person { + name: String + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonTwo implements Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateFieldInput { + disconnect: [MovieActorsDisconnectFieldInput!] + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + name: String + } + + input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + type PersonTwo implements Person { + name: String + } + + type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + name: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + name: SortDirection + } + + input PersonTwoUpdateInput { + name: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); + }); + + test("Two relationships with nested operations specified on one", async () => { + const typeDefs = gql` + interface Person { + name: String + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonTwo implements Person { + name: String + } + + type Movie { + id: ID + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + } + + input MovieActorsConnectFieldInput { + where: PersonConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: PersonCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + input MovieActorsUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + producers: [MovieProducersDisconnectFieldInput!] + } + + 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!] + } + + type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieProducersConnectionSort { + node: PersonSort + } + + input MovieProducersConnectionWhere { + AND: [MovieProducersConnectionWhere!] + NOT: MovieProducersConnectionWhere + OR: [MovieProducersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieProducersDisconnectFieldInput { + where: MovieProducersConnectionWhere + } + + type MovieProducersRelationship { + cursor: String! + node: Person! + } + + input MovieProducersUpdateFieldInput { + disconnect: [MovieProducersDisconnectFieldInput!] + where: MovieProducersConnectionWhere + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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: ID + producers: [MovieProducersUpdateFieldInput!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Person { + name: String + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + PersonOne: PersonOneCreateInput + PersonTwo: PersonTwoCreateInput + } + + input PersonImplementationsUpdateInput { + PersonOne: PersonOneUpdateInput + PersonTwo: PersonTwoUpdateInput + } + + input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + type PersonTwo implements Person { + name: String + } + + type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + name: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + name: SortDirection + } + + input PersonTwoUpdateInput { + name: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonUpdateInput { + _on: PersonImplementationsUpdateInput + name: String + } + + input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"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 + } - test("Single relationship with nested operation DISCONNECT specified", async () => { - const typeDefs = gql` - type PersonOne { - name: String + type StringAggregateSelectionNullable { + longest: String + shortest: String } - type PersonTwo { - nameTwo: String + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! } - union Person = PersonOne | PersonTwo + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsDisconnectInput { - PersonOne: [MovieActorsPersonOneDisconnectFieldInput!] - PersonTwo: [MovieActorsPersonTwoDisconnectFieldInput!] -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonOneDisconnectFieldInput { - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonOneUpdateFieldInput { - disconnect: [MovieActorsPersonOneDisconnectFieldInput!] - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoDisconnectFieldInput { - where: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonTwoUpdateFieldInput { - disconnect: [MovieActorsPersonTwoDisconnectFieldInput!] - where: MovieActorsPersonTwoConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput -} - -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: MovieActorsUpdateInput - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); }); - test("Should not generate any nested operations if only CONNECT_OR_CREATE is specified and the related type does not have a unique field", async () => { + test("Two relationships with nested operations specified on both", async () => { const typeDefs = gql` - type PersonOne { + interface Person { name: String } - type PersonTwo { - nameTwo: String + type PersonOne implements Person { + name: String + someExtraProp: [Int!]! } - union Person = PersonOne | PersonTwo + type PersonTwo implements Person { + name: String + } type Movie { id: ID actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) + @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE, DELETE]) + producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + } - test("Single relationship to type with unique field with nested operation CONNECT_OR_CREATE specified", async () => { - const typeDefs = gql` - type PersonOne { - id: ID! @id @unique - name: String + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! } - type PersonTwo { - id: ID! @id @unique - nameTwo: String + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! } - union Person = PersonOne | PersonTwo + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } - type Movie { - id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT_OR_CREATE]) + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsConnectOrCreateInput { - PersonOne: [MovieActorsPersonOneConnectOrCreateFieldInput!] - PersonTwo: [MovieActorsPersonTwoConnectOrCreateFieldInput!] -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput -} - -input MovieActorsPersonOneConnectOrCreateFieldInput { - onCreate: MovieActorsPersonOneConnectOrCreateFieldInputOnCreate! - where: PersonOneConnectOrCreateWhere! -} - -input MovieActorsPersonOneConnectOrCreateFieldInputOnCreate { - node: PersonOneOnCreateInput! -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonOneFieldInput { - connectOrCreate: [MovieActorsPersonOneConnectOrCreateFieldInput!] -} - -input MovieActorsPersonOneUpdateFieldInput { - connectOrCreate: [MovieActorsPersonOneConnectOrCreateFieldInput!] - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonTwoConnectOrCreateFieldInput { - onCreate: MovieActorsPersonTwoConnectOrCreateFieldInputOnCreate! - where: PersonTwoConnectOrCreateWhere! -} - -input MovieActorsPersonTwoConnectOrCreateFieldInputOnCreate { - node: PersonTwoOnCreateInput! -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoFieldInput { - connectOrCreate: [MovieActorsPersonTwoConnectOrCreateFieldInput!] -} - -input MovieActorsPersonTwoUpdateFieldInput { - connectOrCreate: [MovieActorsPersonTwoConnectOrCreateFieldInput!] - where: MovieActorsPersonTwoConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectOrCreateInput { - actors: MovieActorsConnectOrCreateInput -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID -} - -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: MovieActorsUpdateInput - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connectOrCreate: MovieConnectOrCreateInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - id: ID! - name: String -} - -type PersonOneAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! -} - -input PersonOneConnectOrCreateWhere { - node: PersonOneUniqueWhere! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOnCreateInput { - name: String -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - id: SortDirection - name: SortDirection -} - -input PersonOneUniqueWhere { - id: ID -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - id: ID! - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoConnectOrCreateWhere { - node: PersonTwoUniqueWhere! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOnCreateInput { - nameTwo: String -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - id: SortDirection - nameTwo: SortDirection -} - -input PersonTwoUniqueWhere { - id: ID -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } - test("Two relationships with nested operations specified on one", async () => { - const typeDefs = gql` - type PersonOne { - name: String + type IDAggregateSelectionNullable { + longest: ID + shortest: ID } - type PersonTwo { - nameTwo: String + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } - union Person = PersonOne | PersonTwo + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + input MovieActorsConnectionSort { + node: PersonSort } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -input MovieActorsConnectInput { - PersonOne: [MovieActorsPersonOneConnectFieldInput!] - PersonTwo: [MovieActorsPersonTwoConnectFieldInput!] -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsCreateFieldInput { - PersonOne: [MovieActorsPersonOneCreateFieldInput!] - PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] -} - -input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput -} - -input MovieActorsDeleteInput { - PersonOne: [MovieActorsPersonOneDeleteFieldInput!] - PersonTwo: [MovieActorsPersonTwoDeleteFieldInput!] -} - -input MovieActorsDisconnectInput { - PersonOne: [MovieActorsPersonOneDisconnectFieldInput!] - PersonTwo: [MovieActorsPersonTwoDisconnectFieldInput!] -} - -input MovieActorsPersonOneConnectFieldInput { - where: PersonOneConnectWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonOneCreateFieldInput { - node: PersonOneCreateInput! -} - -input MovieActorsPersonOneDeleteFieldInput { - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonOneDisconnectFieldInput { - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonOneFieldInput { - connect: [MovieActorsPersonOneConnectFieldInput!] - create: [MovieActorsPersonOneCreateFieldInput!] -} - -input MovieActorsPersonOneUpdateConnectionInput { - node: PersonOneUpdateInput -} - -input MovieActorsPersonOneUpdateFieldInput { - connect: [MovieActorsPersonOneConnectFieldInput!] - create: [MovieActorsPersonOneCreateFieldInput!] - delete: [MovieActorsPersonOneDeleteFieldInput!] - disconnect: [MovieActorsPersonOneDisconnectFieldInput!] - update: MovieActorsPersonOneUpdateConnectionInput - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonTwoConnectFieldInput { - where: PersonTwoConnectWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoCreateFieldInput { - node: PersonTwoCreateInput! -} - -input MovieActorsPersonTwoDeleteFieldInput { - where: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonTwoDisconnectFieldInput { - where: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonTwoFieldInput { - connect: [MovieActorsPersonTwoConnectFieldInput!] - create: [MovieActorsPersonTwoCreateFieldInput!] -} - -input MovieActorsPersonTwoUpdateConnectionInput { - node: PersonTwoUpdateInput -} - -input MovieActorsPersonTwoUpdateFieldInput { - connect: [MovieActorsPersonTwoConnectFieldInput!] - create: [MovieActorsPersonTwoCreateFieldInput!] - delete: [MovieActorsPersonTwoDeleteFieldInput!] - disconnect: [MovieActorsPersonTwoDisconnectFieldInput!] - update: MovieActorsPersonTwoUpdateConnectionInput - where: MovieActorsPersonTwoConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: MovieActorsConnectInput -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID -} - -input MovieDeleteInput { - actors: MovieActorsDeleteInput -} - -input MovieDisconnectInput { - actors: MovieActorsDisconnectInput - producers: MovieProducersDisconnectInput -} - -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!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionWhere { - PersonOne: MovieProducersPersonOneConnectionWhere - PersonTwo: MovieProducersPersonTwoConnectionWhere -} - -input MovieProducersDisconnectInput { - PersonOne: [MovieProducersPersonOneDisconnectFieldInput!] - PersonTwo: [MovieProducersPersonTwoDisconnectFieldInput!] -} - -input MovieProducersPersonOneConnectionWhere { - AND: [MovieProducersPersonOneConnectionWhere!] - NOT: MovieProducersPersonOneConnectionWhere - OR: [MovieProducersPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieProducersPersonOneDisconnectFieldInput { - where: MovieProducersPersonOneConnectionWhere -} - -input MovieProducersPersonOneUpdateFieldInput { - disconnect: [MovieProducersPersonOneDisconnectFieldInput!] - where: MovieProducersPersonOneConnectionWhere -} - -input MovieProducersPersonTwoConnectionWhere { - AND: [MovieProducersPersonTwoConnectionWhere!] - NOT: MovieProducersPersonTwoConnectionWhere - OR: [MovieProducersPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieProducersPersonTwoDisconnectFieldInput { - where: MovieProducersPersonTwoConnectionWhere -} - -input MovieProducersPersonTwoUpdateFieldInput { - disconnect: [MovieProducersPersonTwoDisconnectFieldInput!] - where: MovieProducersPersonTwoConnectionWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -input MovieProducersUpdateInput { - PersonOne: [MovieProducersPersonOneUpdateFieldInput!] - PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -\\"\\"\\" -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: MovieActorsUpdateInput - id: ID - producers: MovieProducersUpdateInput -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneConnectWhere { - node: PersonOneWhere! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoConnectWhere { - node: PersonTwoWhere! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } - test("Two relationships with nested operations specified on both", async () => { - const typeDefs = gql` - type PersonOne { - name: String + input MovieActorsCreateFieldInput { + node: PersonCreateInput! } - type PersonTwo { - nameTwo: String + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere } - union Person = PersonOne | PersonTwo + input MovieActorsFieldInput { + create: [MovieActorsCreateFieldInput!] + } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + type MovieActorsRelationship { + cursor: String! + node: Person! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsCreateFieldInput { - PersonOne: [MovieActorsPersonOneCreateFieldInput!] - PersonTwo: [MovieActorsPersonTwoCreateFieldInput!] -} - -input MovieActorsCreateInput { - PersonOne: MovieActorsPersonOneFieldInput - PersonTwo: MovieActorsPersonTwoFieldInput -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonOneCreateFieldInput { - node: PersonOneCreateInput! -} - -input MovieActorsPersonOneFieldInput { - create: [MovieActorsPersonOneCreateFieldInput!] -} - -input MovieActorsPersonOneUpdateFieldInput { - create: [MovieActorsPersonOneCreateFieldInput!] - where: MovieActorsPersonOneConnectionWhere -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoCreateFieldInput { - node: PersonTwoCreateInput! -} - -input MovieActorsPersonTwoFieldInput { - create: [MovieActorsPersonTwoCreateFieldInput!] -} - -input MovieActorsPersonTwoUpdateFieldInput { - create: [MovieActorsPersonTwoCreateFieldInput!] - where: MovieActorsPersonTwoConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateInput { - PersonOne: [MovieActorsPersonOneUpdateFieldInput!] - PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - actors: MovieActorsCreateInput - id: ID -} - -input MovieDisconnectInput { - producers: MovieProducersDisconnectInput -} - -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!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionWhere { - PersonOne: MovieProducersPersonOneConnectionWhere - PersonTwo: MovieProducersPersonTwoConnectionWhere -} - -input MovieProducersDisconnectInput { - PersonOne: [MovieProducersPersonOneDisconnectFieldInput!] - PersonTwo: [MovieProducersPersonTwoDisconnectFieldInput!] -} - -input MovieProducersPersonOneConnectionWhere { - AND: [MovieProducersPersonOneConnectionWhere!] - NOT: MovieProducersPersonOneConnectionWhere - OR: [MovieProducersPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieProducersPersonOneDisconnectFieldInput { - where: MovieProducersPersonOneConnectionWhere -} - -input MovieProducersPersonOneUpdateFieldInput { - disconnect: [MovieProducersPersonOneDisconnectFieldInput!] - where: MovieProducersPersonOneConnectionWhere -} - -input MovieProducersPersonTwoConnectionWhere { - AND: [MovieProducersPersonTwoConnectionWhere!] - NOT: MovieProducersPersonTwoConnectionWhere - OR: [MovieProducersPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieProducersPersonTwoDisconnectFieldInput { - where: MovieProducersPersonTwoConnectionWhere -} - -input MovieProducersPersonTwoUpdateFieldInput { - disconnect: [MovieProducersPersonTwoDisconnectFieldInput!] - where: MovieProducersPersonTwoConnectionWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -input MovieProducersUpdateInput { - PersonOne: [MovieProducersPersonOneUpdateFieldInput!] - PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] -} - -input MovieRelationInput { - actors: MovieActorsCreateFieldInput -} - -\\"\\"\\" -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: MovieActorsUpdateInput - id: ID - producers: MovieProducersUpdateInput -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); - }); + input MovieActorsUpdateFieldInput { + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + where: MovieActorsConnectionWhere + } - describe("Related to an interface type", () => { - test("Should not generate UpdateFieldInput input with no nested operations", async () => { - const typeDefs = gql` - interface Person { - name: String + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! } - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID } - type PersonTwo implements Person { - name: String + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: []) + input MovieDisconnectInput { + producers: [MovieProducersDisconnectFieldInput!] } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const updateFieldInput = schema.getType("MovieActorsUpdateFieldInput") as GraphQLNamedInputType; - expect(updateFieldInput).toBeUndefined(); + type MovieEdge { + cursor: String! + node: Movie! + } - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(schema)); + 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!] + } - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - name: String -} - -input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoUpdateInput { - name: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + type MovieProducersConnection { + edges: [MovieProducersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } - test("Single relationship with nested operation CREATE specified", async () => { - const typeDefs = gql` - interface Person { - name: String + input MovieProducersConnectionSort { + node: PersonSort } - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! + input MovieProducersConnectionWhere { + AND: [MovieProducersConnectionWhere!] + NOT: MovieProducersConnectionWhere + OR: [MovieProducersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } - type PersonTwo implements Person { - name: String + input MovieProducersDisconnectFieldInput { + where: MovieProducersConnectionWhere } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE]) + type MovieProducersRelationship { + cursor: String! + node: Person! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsFieldInput { - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - create: [MovieActorsCreateFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - name: String -} - -input PersonCreateInput { - PersonOne: PersonOneCreateInput - PersonTwo: PersonTwoCreateInput -} - -input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoUpdateInput { - name: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + input MovieProducersUpdateFieldInput { + disconnect: [MovieProducersDisconnectFieldInput!] + where: MovieProducersConnectionWhere + } - test("Single relationship with nested operation CONNECT specified", async () => { - const typeDefs = gql` - interface Person { - name: String + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] } - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! + \\"\\"\\" + 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 } - type PersonTwo implements Person { - name: String + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + id: ID + producers: [MovieProducersUpdateFieldInput!] } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CONNECT]) + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_ALL: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SINGLE: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + producersConnection_SOME: MovieProducersConnectionWhere } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsConnectFieldInput { - where: PersonConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - name: String -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoUpdateInput { - name: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } - test("Single relationship with nested operation UPDATE specified", async () => { - const typeDefs = gql` interface Person { - name: String + name: String + } + + input PersonCreateInput { + PersonOne: PersonOneCreateInput + PersonTwo: PersonTwoCreateInput + } + + input PersonImplementationsWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere } type PersonOne implements Person { - name: String - someExtraProp: [Int!]! + name: String + someExtraProp: [Int!]! } - type PersonTwo implements Person { - name: String + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [UPDATE]) + input PersonOneCreateInput { + name: String + someExtraProp: [Int!]! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - name: String -} - -input PersonImplementationsUpdateInput { - PersonOne: PersonOneUpdateInput - PersonTwo: PersonTwoUpdateInput -} - -input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoUpdateInput { - name: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - name: String -} - -input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + type PersonOneEdge { + cursor: String! + node: PersonOne! + } - test("Single relationship with nested operation DELETE specified", async () => { - const typeDefs = gql` - interface Person { - name: String + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] } - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection } - type PersonTwo implements Person { - name: String + input PersonOneUpdateInput { + name: String + someExtraProp: [Int!] + someExtraProp_POP: Int + someExtraProp_PUSH: [Int!] } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DELETE]) + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + someExtraProp: [Int!] + someExtraProp_INCLUDES: Int + someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - delete: [MovieActorsDeleteFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(delete: MovieDeleteInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - name: String -} - -input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoUpdateInput { - name: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } - test("Single relationship with nested operation DISCONNECT specified", async () => { - const typeDefs = gql` - interface Person { - name: String + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort] } - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection } type PersonTwo implements Person { - name: String + name: String } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [DISCONNECT]) + type PersonTwoAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - disconnect: [MovieActorsDisconnectFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - name: String -} - -input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoUpdateInput { - name: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + input PersonTwoCreateInput { + name: String + } - test("Two relationships with nested operations specified on one", async () => { - const typeDefs = gql` - interface Person { - name: String + type PersonTwoEdge { + cursor: String! + node: PersonTwo! } - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] } - type PersonTwo implements Person { - name: String + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + name: SortDirection } - type Movie { - id: ID - actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + input PersonTwoUpdateInput { + name: String } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -input MovieActorsConnectFieldInput { - where: PersonConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - producers: [MovieProducersDisconnectFieldInput!] -} - -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!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieProducersDisconnectFieldInput { - where: MovieProducersConnectionWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -input MovieProducersUpdateFieldInput { - disconnect: [MovieProducersDisconnectFieldInput!] - where: MovieProducersConnectionWhere -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID - producers: [MovieProducersUpdateFieldInput!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - name: String -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - PersonOne: PersonOneCreateInput - PersonTwo: PersonTwoCreateInput -} - -input PersonImplementationsUpdateInput { - PersonOne: PersonOneUpdateInput - PersonTwo: PersonTwoUpdateInput -} - -input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoUpdateInput { - name: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonUpdateInput { - _on: PersonImplementationsUpdateInput - name: String -} - -input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); - }); + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } - test("Two relationships with nested operations specified on both", async () => { - const typeDefs = gql` - interface Person { - name: String + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! } - type PersonOne implements Person { - name: String - someExtraProp: [Int!]! + input PersonWhere { + _on: PersonImplementationsWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String } - type PersonTwo implements Person { - name: String + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - type Movie { - id: ID - actors: [Person!]! - @relationship(type: "ACTED_IN", direction: IN, nestedOperations: [CREATE, DELETE]) - producers: [Person!]! @relationship(type: "PRODUCED", direction: IN, nestedOperations: [DISCONNECT]) + \\"\\"\\"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 } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - producers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - create: [MovieActorsCreateFieldInput!] -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -input MovieActorsUpdateFieldInput { - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -input MovieDisconnectInput { - producers: [MovieProducersDisconnectFieldInput!] -} - -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!] -} - -type MovieProducersConnection { - edges: [MovieProducersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieProducersConnectionSort { - node: PersonSort -} - -input MovieProducersConnectionWhere { - AND: [MovieProducersConnectionWhere!] - NOT: MovieProducersConnectionWhere - OR: [MovieProducersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieProducersDisconnectFieldInput { - where: MovieProducersConnectionWhere -} - -type MovieProducersRelationship { - cursor: String! - node: Person! -} - -input MovieProducersUpdateFieldInput { - disconnect: [MovieProducersDisconnectFieldInput!] - where: MovieProducersConnectionWhere -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID - producers: [MovieProducersUpdateFieldInput!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - producersConnection: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere - producersConnection_NOT: MovieProducersConnectionWhere @deprecated(reason: \\"Use \`producersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieProducersConnections match this filter - \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Person { - name: String -} - -input PersonCreateInput { - PersonOne: PersonOneCreateInput - PersonTwo: PersonTwoCreateInput -} - -input PersonImplementationsWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type PersonOne implements Person { - name: String - someExtraProp: [Int!]! -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String - someExtraProp: [Int!]! -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - someExtraProp: [Int!] - someExtraProp_INCLUDES: Int - someExtraProp_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - someExtraProp_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -type PersonTwo implements Person { - name: String -} - -type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - name: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - name: SortDirection -} - -input PersonTwoUpdateInput { - name: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - _on: PersonImplementationsWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); }); }); }); diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index b59b811348..226a907da1 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -45,725 +45,725 @@ describe("Relationship-properties", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - leadRole: Boolean! - screenTime: Int! - startDate: Date! -} - -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 - leadRole_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - startDate: Date - startDate_GT: Date - startDate_GTE: Date - startDate_IN: [Date!] - startDate_LT: Date - startDate_LTE: Date - startDate_NOT: Date @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - startDate_NOT_IN: [Date!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -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: IntAggregateSelectionNonNullable! -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorMoviesEdgeAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! -} - -input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere -} - -input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere -} - -input ActorMoviesEdgeAggregationWhereInput { - AND: [ActorMoviesEdgeAggregationWhereInput!] - NOT: ActorMoviesEdgeAggregationWhereInput - OR: [ActorMoviesEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] -} - -input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship implements ActedIn { - cursor: String! - leadRole: Boolean! - node: Movie! - screenTime: Int! - startDate: Date! -} - -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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" -scalar Date - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelectionNonNullable! -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship implements ActedIn { - cursor: String! - leadRole: Boolean! - node: Actor! - screenTime: Int! - startDate: Date! -} - -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: StringAggregateSelectionNonNullable! -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + leadRole: Boolean! + screenTime: Int! + startDate: Date! + } + + 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 + leadRole_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + startDate: Date + startDate_GT: Date + startDate_GTE: Date + startDate_IN: [Date!] + startDate_LT: Date + startDate_LTE: Date + startDate_NOT: Date @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + startDate_NOT_IN: [Date!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + 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: IntAggregateSelectionNonNullable! + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship implements ActedIn { + cursor: String! + leadRole: Boolean! + node: Movie! + screenTime: Int! + startDate: Date! + } + + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" + scalar Date + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + leadRole: Boolean! + node: Actor! + screenTime: Int! + startDate: Date! + } + + 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: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("should filter out generated fields", async () => { @@ -788,775 +788,775 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - id: ID! - screenTime: Int! - timestamp: DateTime! -} - -input ActedInCreateInput { - screenTime: Int! -} - -input ActedInSort { - id: SortDirection - screenTime: SortDirection - timestamp: SortDirection -} - -input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - timestamp: DateTime - timestamp_GT: DateTime - timestamp_GTE: DateTime - timestamp_IN: [DateTime!] - timestamp_LT: DateTime - timestamp_LTE: DateTime - timestamp_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -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 { - id: IDAggregateSelectionNonNullable! - screenTime: IntAggregateSelectionNonNullable! - timestamp: DateTimeAggregateSelectionNonNullable! -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorMoviesEdgeAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! -} - -input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere -} - -input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere -} - -input ActorMoviesEdgeAggregationWhereInput { - AND: [ActorMoviesEdgeAggregationWhereInput!] - NOT: ActorMoviesEdgeAggregationWhereInput - OR: [ActorMoviesEdgeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 - timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime -} - -input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] -} - -input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship implements ActedIn { - cursor: String! - id: ID! - node: Movie! - screenTime: Int! - timestamp: DateTime! -} - -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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsEdgeAggregateSelection { - id: IDAggregateSelectionNonNullable! - screenTime: IntAggregateSelectionNonNullable! - timestamp: DateTimeAggregateSelectionNonNullable! -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 - timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship implements ActedIn { - cursor: String! - id: ID! - node: Actor! - screenTime: Int! - timestamp: DateTime! -} - -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: StringAggregateSelectionNonNullable! -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + id: ID! + screenTime: Int! + timestamp: DateTime! + } + + input ActedInCreateInput { + screenTime: Int! + } + + input ActedInSort { + id: SortDirection + screenTime: SortDirection + timestamp: SortDirection + } + + input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + timestamp: DateTime + timestamp_GT: DateTime + timestamp_GTE: DateTime + timestamp_IN: [DateTime!] + timestamp_LT: DateTime + timestamp_LTE: DateTime + timestamp_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + 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 { + id: IDAggregateSelectionNonNullable! + screenTime: IntAggregateSelectionNonNullable! + timestamp: DateTimeAggregateSelectionNonNullable! + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 + timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_MAX_EQUAL: DateTime + timestamp_MAX_GT: DateTime + timestamp_MAX_GTE: DateTime + timestamp_MAX_LT: DateTime + timestamp_MAX_LTE: DateTime + timestamp_MIN_EQUAL: DateTime + timestamp_MIN_GT: DateTime + timestamp_MIN_GTE: DateTime + timestamp_MIN_LT: DateTime + timestamp_MIN_LTE: DateTime + } + + input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship implements ActedIn { + cursor: String! + id: ID! + node: Movie! + screenTime: Int! + timestamp: DateTime! + } + + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + id: IDAggregateSelectionNonNullable! + screenTime: IntAggregateSelectionNonNullable! + timestamp: DateTimeAggregateSelectionNonNullable! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 + timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_MAX_EQUAL: DateTime + timestamp_MAX_GT: DateTime + timestamp_MAX_GTE: DateTime + timestamp_MAX_LT: DateTime + timestamp_MAX_LTE: DateTime + timestamp_MIN_EQUAL: DateTime + timestamp_MIN_GT: DateTime + timestamp_MIN_GTE: DateTime + timestamp_MIN_LT: DateTime + timestamp_MIN_LTE: DateTime + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + id: ID! + node: Actor! + screenTime: Int! + timestamp: DateTime! + } + + 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: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("should not create or use {Create,Update}Input if only generated fields", async () => { @@ -1580,687 +1580,687 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - id: ID! - timestamp: DateTime! -} - -input ActedInSort { - id: SortDirection - timestamp: SortDirection -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - timestamp: DateTime - timestamp_GT: DateTime - timestamp_GTE: DateTime - timestamp_IN: [DateTime!] - timestamp_LT: DateTime - timestamp_LTE: DateTime - timestamp_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -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 { - id: IDAggregateSelectionNonNullable! - timestamp: DateTimeAggregateSelectionNonNullable! -} - -type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorMoviesEdgeAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere -} - -input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere -} - -input ActorMoviesEdgeAggregationWhereInput { - AND: [ActorMoviesEdgeAggregationWhereInput!] - NOT: ActorMoviesEdgeAggregationWhereInput - OR: [ActorMoviesEdgeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime -} - -input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] -} - -input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship implements ActedIn { - cursor: String! - id: ID! - node: Movie! - timestamp: DateTime! -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsEdgeAggregateSelection { - id: IDAggregateSelectionNonNullable! - timestamp: DateTimeAggregateSelectionNonNullable! -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship implements ActedIn { - cursor: String! - id: ID! - node: Actor! - timestamp: DateTime! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + id: ID! + timestamp: DateTime! + } + + input ActedInSort { + id: SortDirection + timestamp: SortDirection + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + timestamp: DateTime + timestamp_GT: DateTime + timestamp_GTE: DateTime + timestamp_IN: [DateTime!] + timestamp_LT: DateTime + timestamp_LTE: DateTime + timestamp_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + timestamp_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + 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 { + id: IDAggregateSelectionNonNullable! + timestamp: DateTimeAggregateSelectionNonNullable! + } + + type ActorMovieMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_MAX_EQUAL: DateTime + timestamp_MAX_GT: DateTime + timestamp_MAX_GTE: DateTime + timestamp_MAX_LT: DateTime + timestamp_MAX_LTE: DateTime + timestamp_MIN_EQUAL: DateTime + timestamp_MIN_GT: DateTime + timestamp_MIN_GTE: DateTime + timestamp_MIN_LT: DateTime + timestamp_MIN_LTE: DateTime + } + + input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship implements ActedIn { + cursor: String! + id: ID! + node: Movie! + timestamp: DateTime! + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + id: IDAggregateSelectionNonNullable! + timestamp: DateTimeAggregateSelectionNonNullable! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + timestamp_MAX_EQUAL: DateTime + timestamp_MAX_GT: DateTime + timestamp_MAX_GTE: DateTime + timestamp_MAX_LT: DateTime + timestamp_MAX_LTE: DateTime + timestamp_MIN_EQUAL: DateTime + timestamp_MIN_GT: DateTime + timestamp_MIN_GTE: DateTime + timestamp_MIN_LT: DateTime + timestamp_MIN_LTE: DateTime + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + id: ID! + node: Actor! + timestamp: DateTime! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index a28e86da35..3fe621b6c4 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -38,395 +38,395 @@ describe("Relationship", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - name: String -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - name: String -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + name: String + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + name: String + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Multi Relationship", async () => { @@ -445,543 +445,543 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -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! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - 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_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesUpdateConnectionInput { - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + 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! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + 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_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesUpdateConnectionInput { + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index d49c3514c8..bf6bc890c6 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -40,156 +40,156 @@ describe("@selectable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Disable aggregation fields", async () => { @@ -202,151 +202,151 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Disable read and aggregate fields", async () => { @@ -359,150 +359,150 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - title: String! -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + title: String! + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Disable read fields on subscriptions", async () => { @@ -515,220 +515,220 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionMechanism } }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - description: String - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + description: String + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); describe("relationships fields to a concrete type", () => { @@ -749,2414 +749,2414 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - name: String! -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input ActorActedInUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String + "schema { + query: Query + mutation: Mutation } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Movie!]! - @relationship(type: "ACTED_IN", direction: OUT) - @selectable(onRead: true, onAggregate: true) + type Actor { + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + name: String! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: MovieSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorActedInRelationship { - cursor: String! - node: Movie! -} - -input ActorActedInUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - }); - describe("relationships fields to a union type", () => { - test("Disable read on relationship field", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput } - type Series @query(aggregate: true) { - name: String! - description: String + input ActorActedInConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere } - union Production = Movie | Series + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @selectable(onRead: false, onAggregate: true) + input ActorActedInCreateFieldInput { + node: MovieCreateInput! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - name: String! -} - -input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] -} - -input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere -} - -input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput -} - -input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] -} - -input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] -} - -input ActorActedInMovieConnectFieldInput { - where: MovieConnectWhere -} - -input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] -} - -input ActorActedInMovieUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere -} - -input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! -} - -input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInSeriesUpdateConnectionInput { - node: SeriesUpdateInput -} - -input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: ActorActedInConnectInput -} - -input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! -} - -input ActorDeleteInput { - actedIn: ActorActedInDeleteInput -} - -input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput -} - -\\"\\"\\" -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 { - actedIn: ActorActedInUpdateInput - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series { - description: String - name: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! -} - -input SeriesConnectWhere { - node: SeriesWhere! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - name: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - name: SortDirection -} - -input SeriesUpdateInput { - description: String - name: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); - test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere } - type Series @query(aggregate: true) { - name: String! - description: String + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere } - union Production = Movie | Series + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @selectable(onRead: true, onAggregate: false) + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere -} - -input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput -} - -input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] -} - -input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] -} - -input ActorActedInMovieConnectFieldInput { - where: MovieConnectWhere -} - -input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] -} - -input ActorActedInMovieUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere -} - -input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! -} - -input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInSeriesUpdateConnectionInput { - node: SeriesUpdateInput -} - -input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: ActorActedInConnectInput -} - -input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! -} - -input ActorDeleteInput { - actedIn: ActorActedInDeleteInput -} - -input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput -} - -\\"\\"\\" -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 { - actedIn: ActorActedInUpdateInput - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Production = Movie | Series - -input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -type Series { - description: String - name: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! -} - -input SeriesConnectWhere { - node: SeriesWhere! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - name: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - name: SortDirection -} - -input SeriesUpdateInput { - description: String - name: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); - }); - describe("relationships fields to an interface type", () => { - test("Disable read on relationship field", async () => { - const typeDefs = gql` - interface Production { - title: String! - description: String + input ActorActedInUpdateConnectionInput { + node: MovieUpdateInput } - type Movie implements Production @query(aggregate: true) { - title: String! - description: String + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere } - type Series implements Production @query(aggregate: true) { - title: String! - description: String + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @selectable(onRead: false, onAggregate: true) + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - name: String! -} - -input ActorActedInConnectFieldInput { - where: ProductionConnectWhere -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -input ActorActedInUpdateConnectionInput { - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie implements Production { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - description: String - title: String! -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - description: String - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - description: String - title: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - title: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - description: String - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); - test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { - const typeDefs = gql` - interface Production { - title: String! + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + } + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Movie!]! + @relationship(type: "ACTED_IN", direction: OUT) + @selectable(onRead: true, onAggregate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput + } + + input ActorActedInConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: MovieSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorActedInRelationship { + cursor: String! + node: Movie! + } + + input ActorActedInUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + }); + + describe("relationships fields to a union type", () => { + test("Disable read on relationship field", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + } + + type Series @query(aggregate: true) { + name: String! + description: String + } + + union Production = Movie | Series + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @selectable(onRead: false, onAggregate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + name: String! + } + + input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] + } + + input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere + } + + input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput + } + + input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] + } + + input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] + } + + input ActorActedInMovieConnectFieldInput { + where: MovieConnectWhere + } + + input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + } + + input ActorActedInMovieUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere + } + + input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! + } + + input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInSeriesUpdateConnectionInput { + node: SeriesUpdateInput + } + + input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: ActorActedInConnectInput + } + + input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! + } + + input ActorDeleteInput { + actedIn: ActorActedInDeleteInput + } + + input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput + } + + \\"\\"\\" + 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 { + actedIn: ActorActedInUpdateInput + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series { + description: String + name: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + } + + input SeriesConnectWhere { + node: SeriesWhere! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + name: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + name: SortDirection + } + + input SeriesUpdateInput { + description: String + name: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + } + + type Series @query(aggregate: true) { + name: String! + description: String + } + + union Production = Movie | Series + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @selectable(onRead: true, onAggregate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere + } + + input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput + } + + input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] + } + + input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] + } + + input ActorActedInMovieConnectFieldInput { + where: MovieConnectWhere + } + + input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + } + + input ActorActedInMovieUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere + } + + input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! + } + + input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInSeriesUpdateConnectionInput { + node: SeriesUpdateInput + } + + input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: ActorActedInConnectInput + } + + input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! + } + + input ActorDeleteInput { + actedIn: ActorActedInDeleteInput + } + + input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput + } + + \\"\\"\\" + 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 { + actedIn: ActorActedInUpdateInput + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Production = Movie | Series + + input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + type Series { + description: String + name: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + } + + input SeriesConnectWhere { + node: SeriesWhere! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + name: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + name: SortDirection + } + + input SeriesUpdateInput { + description: String + name: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + }); + + describe("relationships fields to an interface type", () => { + test("Disable read on relationship field", async () => { + const typeDefs = gql` + interface Production { + title: String! + description: String + } + + type Movie implements Production @query(aggregate: true) { + title: String! + description: String + } + + type Series implements Production @query(aggregate: true) { + title: String! + description: String + } + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @selectable(onRead: false, onAggregate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + name: String! + } + + input ActorActedInConnectFieldInput { + where: ProductionConnectWhere + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + input ActorActedInUpdateConnectionInput { + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie implements Production { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + description: String + title: String! + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + description: String + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + description: String + title: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + title: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + description: String + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + test("Disable aggregation on relationship field (no-op as controlled by @relationship(aggregate: false))", async () => { + const typeDefs = gql` + interface Production { + title: String! description: String } @@ -3180,490 +3180,490 @@ type UpdateSeriesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -input ActorActedInUpdateConnectionInput { - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie implements Production { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - description: String - title: String! -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 { - description: SortDirection - title: SortDirection -} - -input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - description: String - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - description: String - title: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - title: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - description: String - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectFieldInput { + where: ProductionConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: ProductionSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + input ActorActedInUpdateConnectionInput { + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie implements Production { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + description: String + title: String! + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 { + description: SortDirection + title: SortDirection + } + + input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + description: String + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + description: String + title: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + title: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + description: String + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); }); }); diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 5d462fac8e..159c64bf96 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -40,156 +40,156 @@ describe("@settable", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Disable update fields", async () => { @@ -202,156 +202,156 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Disable create and update fields", async () => { @@ -364,220 +364,220 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionMechanism } }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - title: String! -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type Subscription { - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + title: String! + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type Subscription { + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); describe("Relationships to a concrete type", () => { @@ -598,5548 +598,6446 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: MovieSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorActedInRelationship { - cursor: String! - node: Movie! -} - -input ActorActedInUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + } - test("Prevent relationship field update", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String + type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Movie!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: true, onUpdate: false) + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: MovieSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorActedInRelationship { - cursor: String! - node: Movie! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(where: MovieWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - test("Prevent update on nested relationships", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + input ActorActedInConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: MovieSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorActedInRelationship { - cursor: String! - node: Movie! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - description: String - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - description: String - 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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - test("Prevent create on nested relationships", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + input ActorActedInConnectionSort { + node: MovieSort } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: MovieSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorActedInRelationship { - cursor: String! - node: Movie! -} - -input ActorActedInUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - description: String - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - description: String - 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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); - }); - describe("Relationships to a union type", () => { - test("Prevent relationship field creation", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String + + input ActorActedInCreateFieldInput { + node: MovieCreateInput! } - type Series @query(aggregate: true) { - name: String! - description: String + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere } - union Production = Movie | Series + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: false, onUpdate: true) + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere -} - -input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] -} - -input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] -} - -input ActorActedInMovieConnectFieldInput { - where: MovieConnectWhere -} - -input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere -} - -input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! -} - -input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesUpdateConnectionInput { - node: SeriesUpdateInput -} - -input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: ActorActedInConnectInput -} - -input ActorCreateInput { - name: String! -} - -input ActorDeleteInput { - actedIn: ActorActedInDeleteInput -} - -input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput -} - -\\"\\"\\" -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 { - actedIn: ActorActedInUpdateInput - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Production = Movie | Series - -input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -type Series { - description: String - name: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! -} - -input SeriesConnectWhere { - node: SeriesWhere! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - name: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - name: SortDirection -} - -input SeriesUpdateInput { - description: String - name: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); - test("Prevent relationship field update", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String + type ActorActedInRelationship { + cursor: String! + node: Movie! } - type Series @query(aggregate: true) { - name: String! - description: String + input ActorActedInUpdateConnectionInput { + node: MovieUpdateInput } - union Production = Movie | Series + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: true, onUpdate: false) + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere -} - -input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput -} - -input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] -} - -input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] -} - -input ActorActedInMovieConnectFieldInput { - where: MovieConnectWhere -} - -input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInMovieDeleteFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieDisconnectFieldInput { - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere -} - -input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! -} - -input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: ActorActedInConnectInput -} - -input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! -} - -input ActorDeleteInput { - actedIn: ActorActedInDeleteInput -} - -input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput -} - -\\"\\"\\" -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Production = Movie | Series - -input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -type Series { - description: String - name: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! -} - -input SeriesConnectWhere { - node: SeriesWhere! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - name: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - name: SortDirection -} - -input SeriesUpdateInput { - description: String - name: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); - test("Prevent update on nested relationships", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] } - type Series @query(aggregate: true) { - name: String! - description: String + input ActorCreateInput { + name: String! } - union Production = Movie | Series + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere -} - -input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInCreateInput { - Movie: ActorActedInMovieFieldInput - Series: ActorActedInSeriesFieldInput -} - -input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] -} - -input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] -} - -input ActorActedInMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere -} - -input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInMovieDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere -} - -input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! -} - -input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: ActorActedInConnectInput -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - actedIn: ActorActedInCreateInput - name: String! -} - -input ActorDeleteInput { - actedIn: ActorActedInDeleteInput -} - -input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput -} - -\\"\\"\\" -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - description: String - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - description: String - 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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Production = Movie | Series - -input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -type Series { - description: String - name: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! -} - -input SeriesConnectWhere { - node: SeriesWhere! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - name: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - name: SortDirection -} - -input SeriesUpdateInput { - description: String - name: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); - test("Prevent create on nested relationships", async () => { - const typeDefs = gql` - type Movie @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + type ActorEdge { + cursor: String! + node: Actor! } - type Series @query(aggregate: true) { - name: String! - description: String + type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection } - union Production = Movie | Series + type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) + 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!] } - `; + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("Prevent relationship field update", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + } + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Movie!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: true, onUpdate: false) + } + `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectInput { - Movie: [ActorActedInMovieConnectFieldInput!] - Series: [ActorActedInSeriesConnectFieldInput!] -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionWhere { - Movie: ActorActedInMovieConnectionWhere - Series: ActorActedInSeriesConnectionWhere -} - -input ActorActedInCreateFieldInput { - Movie: [ActorActedInMovieCreateFieldInput!] - Series: [ActorActedInSeriesCreateFieldInput!] -} - -input ActorActedInDeleteInput { - Movie: [ActorActedInMovieDeleteFieldInput!] - Series: [ActorActedInSeriesDeleteFieldInput!] -} - -input ActorActedInDisconnectInput { - Movie: [ActorActedInMovieDisconnectFieldInput!] - Series: [ActorActedInSeriesDisconnectFieldInput!] -} - -input ActorActedInMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere -} - -input ActorActedInMovieConnectionWhere { - AND: [ActorActedInMovieConnectionWhere!] - NOT: ActorActedInMovieConnectionWhere - OR: [ActorActedInMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInMovieCreateFieldInput { - node: MovieCreateInput! -} - -input ActorActedInMovieDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInMovieConnectionWhere -} - -input ActorActedInMovieUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorActedInMovieUpdateFieldInput { - connect: [ActorActedInMovieConnectFieldInput!] - create: [ActorActedInMovieCreateFieldInput!] - delete: [ActorActedInMovieDeleteFieldInput!] - disconnect: [ActorActedInMovieDisconnectFieldInput!] - update: ActorActedInMovieUpdateConnectionInput - where: ActorActedInMovieConnectionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -input ActorActedInSeriesConnectFieldInput { - where: SeriesConnectWhere -} - -input ActorActedInSeriesConnectionWhere { - AND: [ActorActedInSeriesConnectionWhere!] - NOT: ActorActedInSeriesConnectionWhere - OR: [ActorActedInSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInSeriesCreateFieldInput { - node: SeriesCreateInput! -} - -input ActorActedInSeriesDeleteFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesDisconnectFieldInput { - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInSeriesUpdateConnectionInput { - node: SeriesUpdateInput -} - -input ActorActedInSeriesUpdateFieldInput { - connect: [ActorActedInSeriesConnectFieldInput!] - create: [ActorActedInSeriesCreateFieldInput!] - delete: [ActorActedInSeriesDeleteFieldInput!] - disconnect: [ActorActedInSeriesDisconnectFieldInput!] - update: ActorActedInSeriesUpdateConnectionInput - where: ActorActedInSeriesConnectionWhere -} - -input ActorActedInUpdateInput { - Movie: [ActorActedInMovieUpdateFieldInput!] - Series: [ActorActedInSeriesUpdateFieldInput!] -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: ActorActedInConnectInput -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - name: String! -} - -input ActorDeleteInput { - actedIn: ActorActedInDeleteInput -} - -input ActorDisconnectInput { - actedIn: ActorActedInDisconnectInput -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: ActorActedInCreateFieldInput -} - -\\"\\"\\" -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 { - actedIn: ActorActedInUpdateInput - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - description: String - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - description: String - 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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Production = Movie | Series - -input ProductionWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -type Series { - description: String - name: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - name: StringAggregateSelectionNonNullable! -} - -input SeriesConnectWhere { - node: SeriesWhere! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - name: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - name: SortDirection -} - -input SeriesUpdateInput { - description: String - name: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput + } + + input ActorActedInConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: MovieSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorActedInRelationship { + cursor: String! + node: Movie! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(where: MovieWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); - }); - describe("Relationships to an interface type", () => { - test("Prevent relationship field creation", async () => { + test("Prevent update on nested relationships", async () => { const typeDefs = gql` - interface Production { + type Movie @query(aggregate: true) { title: String! description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput + } + + input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: MovieSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorActedInRelationship { + cursor: String! + node: Movie! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + description: String + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + description: String + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("Prevent create on nested relationships", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorActedInNodeAggregationWhereInput + } + + input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: MovieSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere + } + + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + description_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LENGTH_EQUAL: Float + description_AVERAGE_LENGTH_GT: Float + description_AVERAGE_LENGTH_GTE: Float + description_AVERAGE_LENGTH_LT: Float + description_AVERAGE_LENGTH_LTE: Float + description_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LENGTH_EQUAL: Int + description_LONGEST_LENGTH_GT: Int + description_LONGEST_LENGTH_GTE: Int + description_LONGEST_LENGTH_LT: Int + description_LONGEST_LENGTH_LTE: Int + description_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + description_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LENGTH_EQUAL: Int + description_SHORTEST_LENGTH_GT: Int + description_SHORTEST_LENGTH_GTE: Int + description_SHORTEST_LENGTH_LT: Int + description_SHORTEST_LENGTH_LTE: Int + description_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + description_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorActedInRelationship { + cursor: String! + node: Movie! + } + + input ActorActedInUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInNodeAggregateSelection { + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + description: String + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + description: String + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + }); + describe("Relationships to a union type", () => { + test("Prevent relationship field creation", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + } + + type Series @query(aggregate: true) { + name: String! + description: String + } + + union Production = Movie | Series + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: false, onUpdate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere + } + + input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] + } + + input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] + } + + input ActorActedInMovieConnectFieldInput { + where: MovieConnectWhere + } + + input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere + } + + input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! + } + + input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesUpdateConnectionInput { + node: SeriesUpdateInput + } + + input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: ActorActedInConnectInput + } + + input ActorCreateInput { + name: String! + } + + input ActorDeleteInput { + actedIn: ActorActedInDeleteInput + } + + input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput + } + + \\"\\"\\" + 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 { + actedIn: ActorActedInUpdateInput + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Production = Movie | Series + + input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + type Series { + description: String + name: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + } + + input SeriesConnectWhere { + node: SeriesWhere! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + name: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + name: SortDirection + } + + input SeriesUpdateInput { + description: String + name: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + + test("Prevent relationship field update", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + } + + type Series @query(aggregate: true) { + name: String! + description: String + } + + union Production = Movie | Series + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: true, onUpdate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere + } + + input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput + } + + input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] + } + + input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] + } + + input ActorActedInMovieConnectFieldInput { + where: MovieConnectWhere + } + + input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInMovieDeleteFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieDisconnectFieldInput { + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere + } + + input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! + } + + input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: ActorActedInConnectInput + } + + input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! + } + + input ActorDeleteInput { + actedIn: ActorActedInDeleteInput + } + + input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput + } + + \\"\\"\\" + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Production = Movie | Series + + input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + type Series { + description: String + name: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + } + + input SeriesConnectWhere { + node: SeriesWhere! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + name: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + name: SortDirection + } + + input SeriesUpdateInput { + description: String + name: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + + test("Prevent update on nested relationships", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type Series @query(aggregate: true) { + name: String! + description: String + } + + union Production = Movie | Series + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere + } + + input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInCreateInput { + Movie: ActorActedInMovieFieldInput + Series: ActorActedInSeriesFieldInput + } + + input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] + } + + input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] + } + + input ActorActedInMovieConnectFieldInput { + connect: [MovieConnectInput!] + where: MovieConnectWhere + } + + input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInMovieDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere + } + + input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! + } + + input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: ActorActedInConnectInput + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInCreateInput + name: String! + } + + input ActorDeleteInput { + actedIn: ActorActedInDeleteInput + } + + input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput + } + + \\"\\"\\" + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + description: String + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + description: String + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Production = Movie | Series + + input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + type Series { + description: String + name: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + } + + input SeriesConnectWhere { + node: SeriesWhere! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + name: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + name: SortDirection + } + + input SeriesUpdateInput { + description: String + name: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + + test("Prevent create on nested relationships", async () => { + const typeDefs = gql` + type Movie @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type Series @query(aggregate: true) { + name: String! + description: String + } + + union Production = Movie | Series + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: QueryOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectInput { + Movie: [ActorActedInMovieConnectFieldInput!] + Series: [ActorActedInSeriesConnectFieldInput!] + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionWhere { + Movie: ActorActedInMovieConnectionWhere + Series: ActorActedInSeriesConnectionWhere + } + + input ActorActedInCreateFieldInput { + Movie: [ActorActedInMovieCreateFieldInput!] + Series: [ActorActedInSeriesCreateFieldInput!] + } + + input ActorActedInDeleteInput { + Movie: [ActorActedInMovieDeleteFieldInput!] + Series: [ActorActedInSeriesDeleteFieldInput!] + } + + input ActorActedInDisconnectInput { + Movie: [ActorActedInMovieDisconnectFieldInput!] + Series: [ActorActedInSeriesDisconnectFieldInput!] + } + + input ActorActedInMovieConnectFieldInput { + connect: [MovieConnectInput!] + where: MovieConnectWhere + } + + input ActorActedInMovieConnectionWhere { + AND: [ActorActedInMovieConnectionWhere!] + NOT: ActorActedInMovieConnectionWhere + OR: [ActorActedInMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInMovieCreateFieldInput { + node: MovieCreateInput! + } + + input ActorActedInMovieDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInMovieConnectionWhere + } + + input ActorActedInMovieUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorActedInMovieUpdateFieldInput { + connect: [ActorActedInMovieConnectFieldInput!] + create: [ActorActedInMovieCreateFieldInput!] + delete: [ActorActedInMovieDeleteFieldInput!] + disconnect: [ActorActedInMovieDisconnectFieldInput!] + update: ActorActedInMovieUpdateConnectionInput + where: ActorActedInMovieConnectionWhere + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + input ActorActedInSeriesConnectFieldInput { + where: SeriesConnectWhere + } + + input ActorActedInSeriesConnectionWhere { + AND: [ActorActedInSeriesConnectionWhere!] + NOT: ActorActedInSeriesConnectionWhere + OR: [ActorActedInSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInSeriesCreateFieldInput { + node: SeriesCreateInput! + } + + input ActorActedInSeriesDeleteFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesDisconnectFieldInput { + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInSeriesUpdateConnectionInput { + node: SeriesUpdateInput + } + + input ActorActedInSeriesUpdateFieldInput { + connect: [ActorActedInSeriesConnectFieldInput!] + create: [ActorActedInSeriesCreateFieldInput!] + delete: [ActorActedInSeriesDeleteFieldInput!] + disconnect: [ActorActedInSeriesDisconnectFieldInput!] + update: ActorActedInSeriesUpdateConnectionInput + where: ActorActedInSeriesConnectionWhere + } + + input ActorActedInUpdateInput { + Movie: [ActorActedInMovieUpdateFieldInput!] + Series: [ActorActedInSeriesUpdateFieldInput!] + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: ActorActedInConnectInput + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + name: String! + } + + input ActorDeleteInput { + actedIn: ActorActedInDeleteInput + } + + input ActorDisconnectInput { + actedIn: ActorActedInDisconnectInput + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: ActorActedInCreateFieldInput + } + + \\"\\"\\" + 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 { + actedIn: ActorActedInUpdateInput + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + description: String + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + description: String + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Production = Movie | Series + + input ProductionWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + type Series { + description: String + name: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + } + + input SeriesConnectWhere { + node: SeriesWhere! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + name: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + name: SortDirection + } + + input SeriesUpdateInput { + description: String + name: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + }); + + describe("Relationships to an interface type", () => { + test("Prevent relationship field creation", async () => { + const typeDefs = gql` + interface Production { + title: String! + description: String + } + + type Movie implements Production @query(aggregate: true) { + title: String! + description: String + } + + type Series implements Production @query(aggregate: true) { + title: String! + description: String + } + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: false, onUpdate: true) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectFieldInput { + where: ProductionConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: ProductionSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + input ActorActedInUpdateConnectionInput { + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie implements Production { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + description: String + title: String! + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 { + description: SortDirection + title: SortDirection + } + + input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + description: String + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + description: String + title: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + title: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + description: String + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + + test("Prevent relationship field update", async () => { + const typeDefs = gql` + interface Production { + title: String! + description: String + } + + type Movie implements Production @query(aggregate: true) { + title: String! + description: String + } + + type Series implements Production @query(aggregate: true) { + title: String! + description: String + } + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! + @relationship(type: "ACTED_IN", direction: OUT) + @settable(onCreate: true, onUpdate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectFieldInput { + where: ProductionConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: ProductionSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie implements Production { + description: String + title: String! + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + description: String + title: String! + } + + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + description: String + title: String! + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 { + description: SortDirection + title: SortDirection + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + description: String + title: String! + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + description: String + title: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + description: String + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + + test("Prevent update on nested relationships", async () => { + const typeDefs = gql` + interface Production { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type Movie implements Production @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type Series implements Production @query(aggregate: true) { + title: String! + description: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type Actor @query(aggregate: true) { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: ProductionSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] + } + + input MovieCreateInput { + actors: ProductionActorsFieldInput + description: String + title: String! + } + + input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] + } + + input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! + } + + input ProductionActorsAggregateInput { + AND: [ProductionActorsAggregateInput!] + NOT: ProductionActorsAggregateInput + OR: [ProductionActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ProductionActorsNodeAggregationWhereInput + } + + input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ProductionActorsConnectionSort { + node: ActorSort + } + + input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ProductionActorsCreateFieldInput { + node: ActorCreateInput! + } + + input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + } + + input ProductionActorsNodeAggregationWhereInput { + AND: [ProductionActorsNodeAggregationWhereInput!] + NOT: ProductionActorsNodeAggregationWhereInput + OR: [ProductionActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ProductionActorsRelationship { + cursor: String! + node: Actor! + } + + input ProductionActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere + } + + input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + actors: [ProductionActorsConnectFieldInput!] + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + actors: [ProductionActorsDeleteFieldInput!] + } + + input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + actors: [ProductionActorsDisconnectFieldInput!] + } + + input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] + } + + input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] + } + + input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 { + description: SortDirection + title: SortDirection + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! + } + + type SeriesActorActorsAggregationSelection { + count: Int! + node: SeriesActorActorsNodeAggregateSelection + } + + type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesActorsNodeAggregationWhereInput + } + + input SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + actors: ProductionActorsFieldInput + description: String + title: String! + } + + input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] + } + + input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String } - type Movie implements Production @query(aggregate: true) { - title: String! - description: String + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String } - type Series implements Production @query(aggregate: true) { - title: String! - description: String + \\"\\"\\"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 Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: false, onUpdate: true) + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -input ActorActedInUpdateConnectionInput { - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie implements Production { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - description: String - title: String! -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 { - description: SortDirection - title: SortDirection -} - -input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - description: String - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - description: String - title: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - title: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - description: String - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); - test("Prevent relationship field update", async () => { - const typeDefs = gql` - interface Production { - title: String! - description: String + type StringAggregateSelectionNullable { + longest: String + shortest: String } - type Movie implements Production @query(aggregate: true) { - title: String! - description: String + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! } - type Series implements Production @query(aggregate: true) { - title: String! - description: String + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! - @relationship(type: "ACTED_IN", direction: OUT) - @settable(onCreate: true, onUpdate: false) + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie implements Production { - description: String - title: String! -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - description: String - title: String! -} - -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - description: String - title: String! -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 { - description: SortDirection - title: SortDirection -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - description: String - title: String! -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - description: String - title: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - description: String - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); - test("Prevent update on nested relationships", async () => { + test("Prevent create on nested relationships", async () => { const typeDefs = gql` interface Production { title: String! @@ -6161,1798 +7059,900 @@ type UpdateSeriesMutationResponse { type Actor @query(aggregate: true) { name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onUpdate: false) + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) } `; const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - description: String - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] -} - -input MovieCreateInput { - actors: ProductionActorsFieldInput - description: String - title: String! -} - -input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] -} - -input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - description: String - title: String! -} - -input ProductionActorsAggregateInput { - AND: [ProductionActorsAggregateInput!] - NOT: ProductionActorsAggregateInput - OR: [ProductionActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ProductionActorsNodeAggregationWhereInput -} - -input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ProductionActorsConnectionSort { - node: ActorSort -} - -input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ProductionActorsCreateFieldInput { - node: ActorCreateInput! -} - -input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] -} - -input ProductionActorsNodeAggregationWhereInput { - AND: [ProductionActorsNodeAggregationWhereInput!] - NOT: ProductionActorsNodeAggregationWhereInput - OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ProductionActorsRelationship { - cursor: String! - node: Actor! -} - -input ProductionActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere -} - -input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - actors: [ProductionActorsConnectFieldInput!] -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - actors: [ProductionActorsDeleteFieldInput!] -} - -input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - actors: [ProductionActorsDisconnectFieldInput!] -} - -input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] -} - -input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] -} - -input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 { - description: SortDirection - title: SortDirection -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: ProductionActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Productions where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Productions where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - description: String - title: String! -} - -type SeriesActorActorsAggregationSelection { - count: Int! - node: SeriesActorActorsNodeAggregateSelection -} - -type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesActorsNodeAggregationWhereInput -} - -input SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - actors: ProductionActorsFieldInput - description: String - title: String! -} - -input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] -} - -input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + node: ProductionSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere + } + + type ActorActedInRelationship { + cursor: String! + node: Production! + } + + input ActorActedInUpdateConnectionInput { + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] + } + + input MovieCreateInput { + actors: ProductionActorsFieldInput + description: String + title: String! + } + + input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] + } + + input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + description: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } - test("Prevent create on nested relationships", async () => { - const typeDefs = gql` interface Production { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! } - type Movie implements Production @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + input ProductionActorsAggregateInput { + AND: [ProductionActorsAggregateInput!] + NOT: ProductionActorsAggregateInput + OR: [ProductionActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ProductionActorsNodeAggregationWhereInput } - type Series implements Production @query(aggregate: true) { - title: String! - description: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere } - type Actor @query(aggregate: true) { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) @settable(onCreate: false) + type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere -} - -type ActorActedInRelationship { - cursor: String! - node: Production! -} - -input ActorActedInUpdateConnectionInput { - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - description: String - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] -} - -input MovieCreateInput { - actors: ProductionActorsFieldInput - description: String - title: String! -} - -input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] -} - -input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - description: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - description: String - title: String! -} - -input ProductionActorsAggregateInput { - AND: [ProductionActorsAggregateInput!] - NOT: ProductionActorsAggregateInput - OR: [ProductionActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ProductionActorsNodeAggregationWhereInput -} - -input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ProductionActorsConnectionSort { - node: ActorSort -} - -input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ProductionActorsCreateFieldInput { - node: ActorCreateInput! -} - -input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] -} - -input ProductionActorsNodeAggregationWhereInput { - AND: [ProductionActorsNodeAggregationWhereInput!] - NOT: ProductionActorsNodeAggregationWhereInput - OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ProductionActorsRelationship { - cursor: String! - node: Actor! -} - -input ProductionActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere -} - -input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - actors: [ProductionActorsConnectFieldInput!] -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - actors: [ProductionActorsDeleteFieldInput!] -} - -input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - actors: [ProductionActorsDisconnectFieldInput!] -} - -input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] -} - -input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] -} - -input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 { - description: SortDirection - title: SortDirection -} - -input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: ProductionActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Productions where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Productions where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - description: String - title: String! -} - -type SeriesActorActorsAggregationSelection { - count: Int! - node: SeriesActorActorsNodeAggregateSelection -} - -type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesActorsNodeAggregationWhereInput -} - -input SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNonNullable! -} - -input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - actors: ProductionActorsFieldInput - description: String - title: String! -} - -input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] -} - -input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - description: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + + input ProductionActorsConnectionSort { + node: ActorSort + } + + input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ProductionActorsCreateFieldInput { + node: ActorCreateInput! + } + + input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + } + + input ProductionActorsNodeAggregationWhereInput { + AND: [ProductionActorsNodeAggregationWhereInput!] + NOT: ProductionActorsNodeAggregationWhereInput + OR: [ProductionActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ProductionActorsRelationship { + cursor: String! + node: Actor! + } + + input ProductionActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere + } + + input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + actors: [ProductionActorsConnectFieldInput!] + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + actors: [ProductionActorsDeleteFieldInput!] + } + + input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + actors: [ProductionActorsDisconnectFieldInput!] + } + + input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] + } + + input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] + } + + input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 { + description: SortDirection + title: SortDirection + } + + input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + description: String + title: String! + } + + type SeriesActorActorsAggregationSelection { + count: Int! + node: SeriesActorActorsNodeAggregateSelection + } + + type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesActorsNodeAggregationWhereInput + } + + input SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type SeriesAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + actors: ProductionActorsFieldInput + description: String + title: String! + } + + input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] + } + + input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + description: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + description: String + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); }); }); diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 17786257c4..31ce15e289 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -35,166 +35,166 @@ describe("Timestamps", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - createdAt: DateTime! - id: ID - updatedAt: DateTime! -} - -type MovieAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNullable! - updatedAt: DateTimeAggregateSelectionNonNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - createdAt: SortDirection - id: SortDirection - updatedAt: SortDirection -} - -input MovieUpdateInput { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - updatedAt: DateTime - updatedAt_GT: DateTime - updatedAt_GTE: DateTime - updatedAt_IN: [DateTime!] - updatedAt_LT: DateTime - updatedAt_LTE: DateTime - updatedAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - updatedAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + createdAt: DateTime! + id: ID + updatedAt: DateTime! + } + + type MovieAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNullable! + updatedAt: DateTimeAggregateSelectionNonNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + createdAt: SortDirection + id: SortDirection + updatedAt: SortDirection + } + + input MovieUpdateInput { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime!] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + updatedAt: DateTime + updatedAt_GT: DateTime + updatedAt_GTE: DateTime + updatedAt_IN: [DateTime!] + updatedAt_LT: DateTime + updatedAt_LTE: DateTime + updatedAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + updatedAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/enum.test.ts b/packages/graphql/tests/schema/enum.test.ts index 0a64e2d24c..86912522a8 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -39,130 +39,130 @@ describe("Enum", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - status: Status -} - -type MovieAggregateSelection { - count: Int! -} - -input MovieCreateInput { - status: Status -} - -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 { - status: SortDirection -} - -input MovieUpdateInput { - status: Status -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - status: Status - status_IN: [Status] - status_NOT: Status @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - status_NOT_IN: [Status] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -enum Status { - ACTIVE - INACTIVE - PENDING -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + status: Status + } + + type MovieAggregateSelection { + count: Int! + } + + input MovieCreateInput { + status: Status + } + + 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 { + status: SortDirection + } + + input MovieUpdateInput { + status: Status + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + status: Status + status_IN: [Status] + status_NOT: Status @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + status_NOT_IN: [Status] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + enum Status { + ACTIVE + INACTIVE + PENDING + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index 3550bace73..87ed620bd1 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -37,156 +37,156 @@ describe("Extend", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID - name: String -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID - name: String -} - -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 - name: SortDirection -} - -input MovieUpdateInput { - id: ID - name: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + name: String + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + name: StringAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + name: String + } + + 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 + name: SortDirection + } + + input MovieUpdateInput { + id: ID + name: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index 87df84fe5a..59a749ac74 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -44,591 +44,591 @@ describe("Apollo Federation", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@shareable\\"]) { - query: Query - mutation: Mutation -} - -directive @federation__extends on INTERFACE | OBJECT - -directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - -directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @federation__key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - -directive @federation__override(from: String!) on FIELD_DEFINITION - -directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - -directive @shareable on FIELD_DEFINITION | OBJECT - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! -} - -type CreateUsersMutationResponse @shareable { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! @shareable - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! @shareable - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! @shareable -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - author: User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! - content: String! -} - -type PostAggregateSelection { - content: StringAggregateSelectionNonNullable! - count: Int! -} - -input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput -} - -input PostAuthorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type PostAuthorConnection { - edges: [PostAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PostAuthorConnectionSort { - node: UserSort -} - -input PostAuthorConnectionWhere { - AND: [PostAuthorConnectionWhere!] - NOT: PostAuthorConnectionWhere - OR: [PostAuthorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PostAuthorCreateFieldInput { - node: UserCreateInput! -} - -input PostAuthorDeleteFieldInput { - delete: UserDeleteInput - where: PostAuthorConnectionWhere -} - -input PostAuthorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: PostAuthorConnectionWhere -} - -input PostAuthorFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput -} - -input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type PostAuthorRelationship { - cursor: String! - node: User! -} - -input PostAuthorUpdateConnectionInput { - node: UserUpdateInput -} - -input PostAuthorUpdateFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - delete: PostAuthorDeleteFieldInput - disconnect: PostAuthorDisconnectFieldInput - update: PostAuthorUpdateConnectionInput - where: PostAuthorConnectionWhere -} - -input PostConnectInput { - author: PostAuthorConnectFieldInput -} - -input PostConnectWhere { - node: PostWhere! -} - -input PostCreateInput { - author: PostAuthorFieldInput - content: String! -} - -input PostDeleteInput { - author: PostAuthorDeleteFieldInput -} - -input PostDisconnectInput { - author: PostAuthorDisconnectFieldInput -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] -} - -input PostRelationInput { - author: PostAuthorCreateFieldInput -} - -\\"\\"\\" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -\\"\\"\\" -input PostSort { - content: SortDirection -} - -input PostUpdateInput { - author: PostAuthorUpdateFieldInput - content: String -} - -type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection -} - -type PostUserAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - author: UserWhere - authorAggregate: PostAuthorAggregateInput - authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String!] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - _service: _Service! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! @shareable - usersAggregate(where: UserWhere): UserAggregateSelection! @shareable - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! @shareable -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! -} - -type UpdateUsersMutationResponse @shareable { - info: UpdateInfo! - users: [User!]! -} - -type User @shareable { - name: String! - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! -} - -type UserAggregateSelection @shareable { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input UserConnectInput { - posts: [UserPostsConnectFieldInput!] -} - -input UserConnectWhere { - node: UserWhere! -} - -input UserCreateInput { - name: String! - posts: UserPostsFieldInput -} - -input UserDeleteInput { - posts: [UserPostsDeleteFieldInput!] -} - -input UserDisconnectInput { - posts: [UserPostsDisconnectFieldInput!] -} - -type UserEdge @shareable { - cursor: String! - node: User! -} - -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!] -} - -type UserPostPostsAggregationSelection { - count: Int! - node: UserPostPostsNodeAggregateSelection -} - -type UserPostPostsNodeAggregateSelection { - content: StringAggregateSelectionNonNullable! -} - -input UserPostsAggregateInput { - AND: [UserPostsAggregateInput!] - NOT: UserPostsAggregateInput - OR: [UserPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserPostsNodeAggregationWhereInput -} - -input UserPostsConnectFieldInput { - connect: [PostConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere -} - -type UserPostsConnection { - edges: [UserPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserPostsConnectionSort { - node: PostSort -} - -input UserPostsConnectionWhere { - AND: [UserPostsConnectionWhere!] - NOT: UserPostsConnectionWhere - OR: [UserPostsConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input UserPostsCreateFieldInput { - node: PostCreateInput! -} - -input UserPostsDeleteFieldInput { - delete: PostDeleteInput - where: UserPostsConnectionWhere -} - -input UserPostsDisconnectFieldInput { - disconnect: PostDisconnectInput - where: UserPostsConnectionWhere -} - -input UserPostsFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] -} - -input UserPostsNodeAggregationWhereInput { - AND: [UserPostsNodeAggregationWhereInput!] - NOT: UserPostsNodeAggregationWhereInput - OR: [UserPostsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type UserPostsRelationship { - cursor: String! - node: Post! -} - -input UserPostsUpdateConnectionInput { - node: PostUpdateInput -} - -input UserPostsUpdateFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - delete: [UserPostsDeleteFieldInput!] - disconnect: [UserPostsDisconnectFieldInput!] - update: UserPostsUpdateConnectionInput - where: UserPostsConnectionWhere -} - -input UserRelationInput { - posts: [UserPostsCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: String - posts: [UserPostsUpdateFieldInput!] -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: UserPostsAggregateInput - postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere - postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere - \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere - \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere - posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere - \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere -} - -type UsersConnection @shareable { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -scalar _Any - -type _Service { - sdl: String -} - -scalar federation__FieldSet - -scalar link__Import - -enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY -}" -`); + "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@shareable\\"]) { + query: Query + mutation: Mutation + } + + directive @federation__extends on INTERFACE | OBJECT + + directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + + directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @federation__key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + + directive @federation__override(from: String!) on FIELD_DEFINITION + + directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + + directive @shareable on FIELD_DEFINITION | OBJECT + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse @shareable { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! @shareable + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! @shareable + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! @shareable + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + author: User! + authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + content: String! + } + + type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! + } + + input PostAuthorAggregateInput { + AND: [PostAuthorAggregateInput!] + NOT: PostAuthorAggregateInput + OR: [PostAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostAuthorNodeAggregationWhereInput + } + + input PostAuthorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostAuthorConnectionSort { + node: UserSort + } + + input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PostAuthorCreateFieldInput { + node: UserCreateInput! + } + + input PostAuthorDeleteFieldInput { + delete: UserDeleteInput + where: PostAuthorConnectionWhere + } + + input PostAuthorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostAuthorConnectionWhere + } + + input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + } + + input PostAuthorNodeAggregationWhereInput { + AND: [PostAuthorNodeAggregationWhereInput!] + NOT: PostAuthorNodeAggregationWhereInput + OR: [PostAuthorNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type PostAuthorRelationship { + cursor: String! + node: User! + } + + input PostAuthorUpdateConnectionInput { + node: UserUpdateInput + } + + input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere + } + + input PostConnectInput { + author: PostAuthorConnectFieldInput + } + + input PostConnectWhere { + node: PostWhere! + } + + input PostCreateInput { + author: PostAuthorFieldInput + content: String! + } + + input PostDeleteInput { + author: PostAuthorDeleteFieldInput + } + + input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + input PostRelationInput { + author: PostAuthorCreateFieldInput + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + content: SortDirection + } + + input PostUpdateInput { + author: PostAuthorUpdateFieldInput + content: String + } + + type PostUserAuthorAggregationSelection { + count: Int! + node: PostUserAuthorNodeAggregateSelection + } + + type PostUserAuthorNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + _service: _Service! + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! @shareable + usersAggregate(where: UserWhere): UserAggregateSelection! @shareable + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! @shareable + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse @shareable { + info: UpdateInfo! + users: [User!]! + } + + type User @shareable { + name: String! + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + } + + type UserAggregateSelection @shareable { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input UserConnectInput { + posts: [UserPostsConnectFieldInput!] + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + name: String! + posts: UserPostsFieldInput + } + + input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] + } + + input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] + } + + type UserEdge @shareable { + cursor: String! + node: User! + } + + 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!] + } + + type UserPostPostsAggregationSelection { + count: Int! + node: UserPostPostsNodeAggregateSelection + } + + type UserPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNonNullable! + } + + input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput + } + + input UserPostsConnectFieldInput { + connect: [PostConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere + } + + type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserPostsConnectionSort { + node: PostSort + } + + input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserPostsCreateFieldInput { + node: PostCreateInput! + } + + input UserPostsDeleteFieldInput { + delete: PostDeleteInput + where: UserPostsConnectionWhere + } + + input UserPostsDisconnectFieldInput { + disconnect: PostDisconnectInput + where: UserPostsConnectionWhere + } + + input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + } + + input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type UserPostsRelationship { + cursor: String! + node: Post! + } + + input UserPostsUpdateConnectionInput { + node: PostUpdateInput + } + + input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere + } + + input UserRelationInput { + posts: [UserPostsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: String + posts: [UserPostsUpdateFieldInput!] + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere + } + + type UsersConnection @shareable { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + scalar _Any + + type _Service { + sdl: String + } + + scalar federation__FieldSet + + scalar link__Import + + enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY + }" + `); }); test("@key(resolvable: false)", async () => { @@ -651,410 +651,410 @@ enum link__Purpose { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\"]) { - query: Query - mutation: Mutation -} - -directive @federation__extends on INTERFACE | OBJECT - -directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - -directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @federation__override(from: String!) on FIELD_DEFINITION - -directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__shareable on FIELD_DEFINITION | OBJECT - -directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - -directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo @federation__shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo @federation__shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo @federation__shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - author: User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! - content: String! -} - -type PostAggregateSelection { - content: StringAggregateSelectionNonNullable! - count: Int! -} - -input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput -} - -input PostAuthorConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type PostAuthorConnection { - edges: [PostAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PostAuthorConnectionSort { - node: UserSort -} - -input PostAuthorConnectionWhere { - AND: [PostAuthorConnectionWhere!] - NOT: PostAuthorConnectionWhere - OR: [PostAuthorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PostAuthorCreateFieldInput { - node: UserCreateInput! -} - -input PostAuthorDeleteFieldInput { - where: PostAuthorConnectionWhere -} - -input PostAuthorDisconnectFieldInput { - where: PostAuthorConnectionWhere -} - -input PostAuthorFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput -} - -input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type PostAuthorRelationship { - cursor: String! - node: User! -} - -input PostAuthorUpdateConnectionInput { - node: UserUpdateInput -} - -input PostAuthorUpdateFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - delete: PostAuthorDeleteFieldInput - disconnect: PostAuthorDisconnectFieldInput - update: PostAuthorUpdateConnectionInput - where: PostAuthorConnectionWhere -} - -input PostConnectInput { - author: PostAuthorConnectFieldInput -} - -input PostCreateInput { - author: PostAuthorFieldInput - content: String! -} - -input PostDeleteInput { - author: PostAuthorDeleteFieldInput -} - -input PostDisconnectInput { - author: PostAuthorDisconnectFieldInput -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] -} - -input PostRelationInput { - author: PostAuthorCreateFieldInput -} - -\\"\\"\\" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -\\"\\"\\" -input PostSort { - content: SortDirection -} - -input PostUpdateInput { - author: PostAuthorUpdateFieldInput - content: String -} - -type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection -} - -type PostUserAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - author: UserWhere - authorAggregate: PostAuthorAggregateInput - authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String!] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - _entities(representations: [_Any!]!): [_Entity]! - _service: _Service! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable @federation__shareable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo @federation__shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User @key(fields: \\"name\\", resolvable: false) { - name: String! -} - -type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input UserConnectWhere { - node: UserWhere! -} - -input UserCreateInput { - name: String! -} - -type UserEdge { - cursor: String! - node: User! -} - -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 { - name: String -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -scalar _Any - -union _Entity = User - -type _Service { - sdl: String -} - -scalar federation__FieldSet - -scalar link__Import - -enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY -}" -`); + "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\"]) { + query: Query + mutation: Mutation + } + + directive @federation__extends on INTERFACE | OBJECT + + directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + + directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @federation__override(from: String!) on FIELD_DEFINITION + + directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__shareable on FIELD_DEFINITION | OBJECT + + directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + + directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo @federation__shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo @federation__shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo @federation__shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + author: User! + authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + content: String! + } + + type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! + } + + input PostAuthorAggregateInput { + AND: [PostAuthorAggregateInput!] + NOT: PostAuthorAggregateInput + OR: [PostAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostAuthorNodeAggregationWhereInput + } + + input PostAuthorConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostAuthorConnectionSort { + node: UserSort + } + + input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PostAuthorCreateFieldInput { + node: UserCreateInput! + } + + input PostAuthorDeleteFieldInput { + where: PostAuthorConnectionWhere + } + + input PostAuthorDisconnectFieldInput { + where: PostAuthorConnectionWhere + } + + input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + } + + input PostAuthorNodeAggregationWhereInput { + AND: [PostAuthorNodeAggregationWhereInput!] + NOT: PostAuthorNodeAggregationWhereInput + OR: [PostAuthorNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type PostAuthorRelationship { + cursor: String! + node: User! + } + + input PostAuthorUpdateConnectionInput { + node: UserUpdateInput + } + + input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere + } + + input PostConnectInput { + author: PostAuthorConnectFieldInput + } + + input PostCreateInput { + author: PostAuthorFieldInput + content: String! + } + + input PostDeleteInput { + author: PostAuthorDeleteFieldInput + } + + input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + input PostRelationInput { + author: PostAuthorCreateFieldInput + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + content: SortDirection + } + + input PostUpdateInput { + author: PostAuthorUpdateFieldInput + content: String + } + + type PostUserAuthorAggregationSelection { + count: Int! + node: PostUserAuthorNodeAggregateSelection + } + + type PostUserAuthorNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + _entities(representations: [_Any!]!): [_Entity]! + _service: _Service! + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, 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 StringAggregateSelectionNonNullable @federation__shareable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo @federation__shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User @key(fields: \\"name\\", resolvable: false) { + name: String! + } + + type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + name: String! + } + + type UserEdge { + cursor: String! + node: User! + } + + 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 { + name: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + scalar _Any + + union _Entity = User + + type _Service { + sdl: String + } + + scalar federation__FieldSet + + scalar link__Import + + enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY + }" + `); }); }); diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index 5429920514..cec530deee 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -41,218 +41,218 @@ describe("@fulltext schema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} + "schema { + query: Query + mutation: Mutation + } -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } -\\"\\"\\"The input for filtering a float\\"\\"\\" -input FloatWhere { - max: Float - min: Float -} + \\"\\"\\"The input for filtering a float\\"\\"\\" + input FloatWhere { + max: Float + min: Float + } -type Movie { - description: String - title: String -} + type Movie { + description: String + title: String + } -type MovieAggregateSelection { - count: Int! - description: StringAggregateSelectionNullable! - title: StringAggregateSelectionNullable! -} + type MovieAggregateSelection { + count: Int! + description: StringAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + } -input MovieCreateInput { - description: String - title: String -} + input MovieCreateInput { + description: String + title: String + } -type MovieEdge { - cursor: String! - node: Movie! -} + type MovieEdge { + cursor: String! + node: Movie! + } -input MovieFulltext { - MovieDescription: MovieMovieDescriptionFulltext - MovieTitle: MovieMovieTitleFulltext -} + input MovieFulltext { + MovieDescription: MovieMovieDescriptionFulltext + MovieTitle: MovieMovieTitleFulltext + } -\\"\\"\\"The result of a fulltext search on an index of Movie\\"\\"\\" -type MovieFulltextResult { - movie: Movie! - score: Float! -} + \\"\\"\\"The result of a fulltext search on an index of Movie\\"\\"\\" + type MovieFulltextResult { + movie: Movie! + score: Float! + } -\\"\\"\\"The input for sorting a fulltext query on an index of Movie\\"\\"\\" -input MovieFulltextSort { - movie: MovieSort - score: SortDirection -} + \\"\\"\\"The input for sorting a fulltext query on an index of Movie\\"\\"\\" + input MovieFulltextSort { + movie: MovieSort + score: SortDirection + } -\\"\\"\\"The input for filtering a fulltext query on an index of Movie\\"\\"\\" -input MovieFulltextWhere { - movie: MovieWhere - score: FloatWhere -} + \\"\\"\\"The input for filtering a fulltext query on an index of Movie\\"\\"\\" + input MovieFulltextWhere { + movie: MovieWhere + score: FloatWhere + } -input MovieMovieDescriptionFulltext { - phrase: String! -} + input MovieMovieDescriptionFulltext { + phrase: String! + } -input MovieMovieTitleFulltext { - phrase: String! -} + input MovieMovieTitleFulltext { + phrase: String! + } -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!] -} + 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 { - description: SortDirection - title: SortDirection -} + \\"\\"\\" + 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 { + description: SortDirection + title: SortDirection + } -input MovieUpdateInput { - description: String - title: String -} + input MovieUpdateInput { + description: String + title: String + } -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } -type Query { - movies( - \\"\\"\\" - Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. - \\"\\"\\" - fulltext: MovieFulltext - options: MovieOptions - where: MovieWhere - ): [Movie!]! - moviesAggregate( - \\"\\"\\" - Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. - \\"\\"\\" - fulltext: MovieFulltext - where: MovieWhere - ): MovieAggregateSelection! - moviesConnection( - after: String - first: Int - \\"\\"\\" - Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. - \\"\\"\\" - fulltext: MovieFulltext - sort: [MovieSort] - where: MovieWhere - ): MoviesConnection! - \\"\\"\\" - Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the \`fulltext\` argument under other queries for this functionality. - \\"\\"\\" - moviesFulltextMovieDescription(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! - \\"\\"\\" - Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the \`fulltext\` argument under other queries for this functionality. - \\"\\"\\" - moviesFulltextMovieTitle(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! -} + type Query { + movies( + \\"\\"\\" + Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. + \\"\\"\\" + fulltext: MovieFulltext + options: MovieOptions + where: MovieWhere + ): [Movie!]! + moviesAggregate( + \\"\\"\\" + Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. + \\"\\"\\" + fulltext: MovieFulltext + where: MovieWhere + ): MovieAggregateSelection! + moviesConnection( + after: String + first: Int + \\"\\"\\" + Query a full-text index. Allows for the aggregation of results, but does not return the query score. Use the root full-text query fields if you require the score. + \\"\\"\\" + fulltext: MovieFulltext + sort: [MovieSort] + where: MovieWhere + ): MoviesConnection! + \\"\\"\\" + Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the \`fulltext\` argument under other queries for this functionality. + \\"\\"\\" + moviesFulltextMovieDescription(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! + \\"\\"\\" + Query a full-text index. This query returns the query score, but does not allow for aggregations. Use the \`fulltext\` argument under other queries for this functionality. + \\"\\"\\" + moviesFulltextMovieTitle(limit: Int, offset: Int, phrase: String!, sort: [MovieFulltextSort!], where: MovieFulltextWhere): [MovieFulltextResult!]! + } -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} + \\"\\"\\"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 StringAggregateSelectionNullable { - longest: String - shortest: String -} + type StringAggregateSelectionNullable { + longest: String + shortest: String + } -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index 08d57d3a60..791aed5718 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -34,169 +34,169 @@ describe("Node Interface Types", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Movie implements Node { - id: ID! - imdb: ID! - title: String! -} - -type MovieAggregateSelection { - count: Int! - imdb: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - imdb: ID! - title: String! -} - -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 { - imdb: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - imdb: ID - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - imdb: ID - imdb_CONTAINS: ID - imdb_ENDS_WITH: ID - imdb_IN: [ID!] - imdb_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdb_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"An object with an ID\\"\\"\\" -interface Node { - \\"\\"\\"The id of the object.\\"\\"\\" - id: ID! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - \\"\\"\\"Fetches an object given its ID\\"\\"\\" - node( - \\"\\"\\"The ID of an object\\"\\"\\" - id: ID! - ): Node -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Movie implements Node { + id: ID! + imdb: ID! + title: String! + } + + type MovieAggregateSelection { + count: Int! + imdb: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + imdb: ID! + title: String! + } + + 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 { + imdb: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + imdb: ID + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + imdb: ID + imdb_CONTAINS: ID + imdb_ENDS_WITH: ID + imdb_IN: [ID!] + imdb_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdb_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"An object with an ID\\"\\"\\" + interface Node { + \\"\\"\\"The id of the object.\\"\\"\\" + id: ID! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + \\"\\"\\"Fetches an object given its ID\\"\\"\\" + node( + \\"\\"\\"The ID of an object\\"\\"\\" + id: ID! + ): Node + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index 47c3e05a5d..56af4e18d2 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -198,14 +198,14 @@ describe("inheritance", () => { info: CreateInfo! } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -434,7 +434,7 @@ describe("inheritance", () => { actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -452,7 +452,7 @@ describe("inheritance", () => { info: UpdateInfo! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index a89fb80e61..216598dd0c 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -41,141 +41,141 @@ describe("Inputs", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -input NodeInput { - id: ID -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - name(input: NodeInput): String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + input NodeInput { + id: ID + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + name(input: NodeInput): String + } + + \\"\\"\\"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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 42cca69819..b3441484ce 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -52,518 +52,518 @@ describe("Interface Relationships", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - screenTime: Int! -} - -input ActedInCreateInput { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - edge: ActedInCreateInput! - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - screenTime: Int! -} - -input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie implements Production { - runtime: Int! - title: String! -} - -type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - runtime: Int! - title: String! -} - -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 { - runtime: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - title: String! -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - episodes: Int! - title: String! -} - -type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - episodes: Int! - title: String! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - episodes: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - episodes: Int - episodes_DECREMENT: Int - episodes_INCREMENT: Int - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + screenTime: Int! + } + + input ActedInCreateInput { + screenTime: Int! + } + + input ActedInSort { + screenTime: SortDirection + } + + input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! + } + + input ActorActedInConnectFieldInput { + edge: ActedInCreateInput! + where: ProductionConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! + } + + input ActorActedInDeleteFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + screenTime: Int! + } + + input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie implements Production { + runtime: Int! + title: String! + } + + type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + runtime: Int! + title: String! + } + + 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 { + runtime: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + title: String! + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + episodes: Int! + title: String! + } + + type SeriesAggregateSelection { + count: Int! + episodes: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + episodes: Int! + title: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + episodes: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + episodes: Int + episodes_DECREMENT: Int + episodes_INCREMENT: Int + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + episodes: Int + episodes_GT: Int + episodes_GTE: Int + episodes_IN: [Int!] + episodes_LT: Int + episodes_LTE: Int + episodes_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); test("Interface Relationships - multiple", async () => { @@ -604,3586 +604,3586 @@ type UpdateSeriesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - screenTime: Int! -} - -input ActedInCreateInput { - screenTime: Int! -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInUpdateInput { - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Actor { - actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! -} - -input ActorActedInConnectFieldInput { - connect: ProductionConnectInput - edge: ActedInCreateInput! - where: ProductionConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: ProductionDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: ActorActedInConnectionWhere -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Production! - screenTime: Int! -} - -input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -type CreateEpisodesMutationResponse { - episodes: [Episode!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Episode { - runtime: Int! - series(directed: Boolean = true, options: SeriesOptions, where: SeriesWhere): Series! - seriesAggregate(directed: Boolean = true, where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection - seriesConnection(after: String, directed: Boolean = true, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! -} - -type EpisodeAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! -} - -input EpisodeConnectInput { - series: EpisodeSeriesConnectFieldInput -} - -input EpisodeConnectWhere { - node: EpisodeWhere! -} - -input EpisodeCreateInput { - runtime: Int! - series: EpisodeSeriesFieldInput -} - -input EpisodeDeleteInput { - series: EpisodeSeriesDeleteFieldInput -} - -input EpisodeDisconnectInput { - series: EpisodeSeriesDisconnectFieldInput -} - -type EpisodeEdge { - cursor: String! - node: Episode! -} - -input EpisodeOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more EpisodeSort objects to sort Episodes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [EpisodeSort!] -} - -input EpisodeRelationInput { - series: EpisodeSeriesCreateFieldInput -} - -input EpisodeSeriesAggregateInput { - AND: [EpisodeSeriesAggregateInput!] - NOT: EpisodeSeriesAggregateInput - OR: [EpisodeSeriesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: EpisodeSeriesNodeAggregationWhereInput -} - -input EpisodeSeriesConnectFieldInput { - connect: SeriesConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: SeriesConnectWhere -} - -type EpisodeSeriesConnection { - edges: [EpisodeSeriesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input EpisodeSeriesConnectionSort { - node: SeriesSort -} - -input EpisodeSeriesConnectionWhere { - AND: [EpisodeSeriesConnectionWhere!] - NOT: EpisodeSeriesConnectionWhere - OR: [EpisodeSeriesConnectionWhere!] - node: SeriesWhere - node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input EpisodeSeriesCreateFieldInput { - node: SeriesCreateInput! -} - -input EpisodeSeriesDeleteFieldInput { - delete: SeriesDeleteInput - where: EpisodeSeriesConnectionWhere -} - -input EpisodeSeriesDisconnectFieldInput { - disconnect: SeriesDisconnectInput - where: EpisodeSeriesConnectionWhere -} - -input EpisodeSeriesFieldInput { - connect: EpisodeSeriesConnectFieldInput - create: EpisodeSeriesCreateFieldInput -} - -input EpisodeSeriesNodeAggregationWhereInput { - AND: [EpisodeSeriesNodeAggregationWhereInput!] - NOT: EpisodeSeriesNodeAggregationWhereInput - OR: [EpisodeSeriesNodeAggregationWhereInput!] - episodeCount_AVERAGE_EQUAL: Float - episodeCount_AVERAGE_GT: Float - episodeCount_AVERAGE_GTE: Float - episodeCount_AVERAGE_LT: Float - episodeCount_AVERAGE_LTE: Float - episodeCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_MAX_EQUAL: Int - episodeCount_MAX_GT: Int - episodeCount_MAX_GTE: Int - episodeCount_MAX_LT: Int - episodeCount_MAX_LTE: Int - episodeCount_MIN_EQUAL: Int - episodeCount_MIN_GT: Int - episodeCount_MIN_GTE: Int - episodeCount_MIN_LT: Int - episodeCount_MIN_LTE: Int - episodeCount_SUM_EQUAL: Int - episodeCount_SUM_GT: Int - episodeCount_SUM_GTE: Int - episodeCount_SUM_LT: Int - episodeCount_SUM_LTE: Int - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type EpisodeSeriesRelationship { - cursor: String! - node: Series! -} - -type EpisodeSeriesSeriesAggregationSelection { - count: Int! - node: EpisodeSeriesSeriesNodeAggregateSelection -} - -type EpisodeSeriesSeriesNodeAggregateSelection { - episodeCount: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input EpisodeSeriesUpdateConnectionInput { - node: SeriesUpdateInput -} - -input EpisodeSeriesUpdateFieldInput { - connect: EpisodeSeriesConnectFieldInput - create: EpisodeSeriesCreateFieldInput - delete: EpisodeSeriesDeleteFieldInput - disconnect: EpisodeSeriesDisconnectFieldInput - update: EpisodeSeriesUpdateConnectionInput - where: EpisodeSeriesConnectionWhere -} - -\\"\\"\\" -Fields to sort Episodes by. The order in which sorts are applied is not guaranteed when specifying many fields in one EpisodeSort object. -\\"\\"\\" -input EpisodeSort { - runtime: SortDirection -} - -input EpisodeUpdateInput { - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - series: EpisodeSeriesUpdateFieldInput -} - -input EpisodeWhere { - AND: [EpisodeWhere!] - NOT: EpisodeWhere - OR: [EpisodeWhere!] - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - series: SeriesWhere - seriesAggregate: EpisodeSeriesAggregateInput - seriesConnection: EpisodeSeriesConnectionWhere - seriesConnection_NOT: EpisodeSeriesConnectionWhere - series_NOT: SeriesWhere -} - -type EpisodesConnection { - edges: [EpisodeEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - runtime: Int! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelectionNonNullable! -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [ProductionActorsConnectFieldInput!] -} - -input MovieCreateInput { - actors: ProductionActorsFieldInput - runtime: Int! - title: String! -} - -input MovieDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] -} - -input MovieDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [ProductionActorsCreateFieldInput!] -} - -\\"\\"\\" -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 { - runtime: SortDirection - title: SortDirection -} - -input MovieUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - runtime: Int - runtime_DECREMENT: Int - runtime_INCREMENT: Int - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - runtime: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createEpisodes(input: [EpisodeCreateInput!]!): CreateEpisodesMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteEpisodes(delete: EpisodeDeleteInput, where: EpisodeWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateEpisodes(connect: EpisodeConnectInput, create: EpisodeRelationInput, delete: EpisodeDeleteInput, disconnect: EpisodeDisconnectInput, update: EpisodeUpdateInput, where: EpisodeWhere): UpdateEpisodesMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - title: String! -} - -input ProductionActorsAggregateInput { - AND: [ProductionActorsAggregateInput!] - NOT: ProductionActorsAggregateInput - OR: [ProductionActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ProductionActorsEdgeAggregationWhereInput - node: ProductionActorsNodeAggregationWhereInput -} - -input ProductionActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type ProductionActorsConnection { - edges: [ProductionActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ProductionActorsConnectionSort { - edge: ActedInSort - node: ActorSort -} - -input ProductionActorsConnectionWhere { - AND: [ProductionActorsConnectionWhere!] - NOT: ProductionActorsConnectionWhere - OR: [ProductionActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ProductionActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! -} - -input ProductionActorsDeleteFieldInput { - delete: ActorDeleteInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: ProductionActorsConnectionWhere -} - -input ProductionActorsEdgeAggregationWhereInput { - AND: [ProductionActorsEdgeAggregationWhereInput!] - NOT: ProductionActorsEdgeAggregationWhereInput - OR: [ProductionActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 ProductionActorsFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] -} - -input ProductionActorsNodeAggregationWhereInput { - AND: [ProductionActorsNodeAggregationWhereInput!] - NOT: ProductionActorsNodeAggregationWhereInput - OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ProductionActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - screenTime: Int! -} - -input ProductionActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput -} - -input ProductionActorsUpdateFieldInput { - connect: [ProductionActorsConnectFieldInput!] - create: [ProductionActorsCreateFieldInput!] - delete: [ProductionActorsDeleteFieldInput!] - disconnect: [ProductionActorsDisconnectFieldInput!] - update: ProductionActorsUpdateConnectionInput - where: ProductionActorsConnectionWhere -} - -input ProductionConnectInput { - _on: ProductionImplementationsConnectInput - actors: [ProductionActorsConnectFieldInput!] -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput - actors: [ProductionActorsDeleteFieldInput!] -} - -input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput - actors: [ProductionActorsDisconnectFieldInput!] -} - -input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] -} - -input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] -} - -input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -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 ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - actors: [ProductionActorsUpdateFieldInput!] - title: String -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: ProductionActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Productions where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Productions where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Productions where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - episodes(options: EpisodeOptions, where: EpisodeWhere): [Episode!]! - episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! - episodesConnection(after: String, first: Int, sort: [EpisodeSort], where: EpisodeWhere): EpisodesConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements Production { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! - episodeCount: Int! - episodes(directed: Boolean = true, options: EpisodeOptions, where: EpisodeWhere): [Episode!]! - episodesAggregate(directed: Boolean = true, where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection - episodesConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! - title: String! -} - -type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection -} - -type SeriesActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelectionNonNullable! -} - -type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input SeriesActorsAggregateInput { - AND: [SeriesActorsAggregateInput!] - NOT: SeriesActorsAggregateInput - OR: [SeriesActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: SeriesActorsEdgeAggregationWhereInput - node: SeriesActorsNodeAggregationWhereInput -} - -input SeriesActorsEdgeAggregationWhereInput { - AND: [SeriesActorsEdgeAggregationWhereInput!] - NOT: SeriesActorsEdgeAggregationWhereInput - OR: [SeriesActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - 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 SeriesActorsNodeAggregationWhereInput { - AND: [SeriesActorsNodeAggregationWhereInput!] - NOT: SeriesActorsNodeAggregationWhereInput - OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type SeriesAggregateSelection { - count: Int! - episodeCount: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input SeriesConnectInput { - actors: [ProductionActorsConnectFieldInput!] - episodes: [SeriesEpisodesConnectFieldInput!] -} - -input SeriesConnectWhere { - node: SeriesWhere! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - actors: ProductionActorsFieldInput - episodeCount: Int! - episodes: SeriesEpisodesFieldInput - title: String! -} - -input SeriesDeleteInput { - actors: [ProductionActorsDeleteFieldInput!] - episodes: [SeriesEpisodesDeleteFieldInput!] -} - -input SeriesDisconnectInput { - actors: [ProductionActorsDisconnectFieldInput!] - episodes: [SeriesEpisodesDisconnectFieldInput!] -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -type SeriesEpisodeEpisodesAggregationSelection { - count: Int! - node: SeriesEpisodeEpisodesNodeAggregateSelection -} - -type SeriesEpisodeEpisodesNodeAggregateSelection { - runtime: IntAggregateSelectionNonNullable! -} - -input SeriesEpisodesAggregateInput { - AND: [SeriesEpisodesAggregateInput!] - NOT: SeriesEpisodesAggregateInput - OR: [SeriesEpisodesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesEpisodesNodeAggregationWhereInput -} - -input SeriesEpisodesConnectFieldInput { - connect: [EpisodeConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: EpisodeConnectWhere -} - -type SeriesEpisodesConnection { - edges: [SeriesEpisodesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesEpisodesConnectionSort { - node: EpisodeSort -} - -input SeriesEpisodesConnectionWhere { - AND: [SeriesEpisodesConnectionWhere!] - NOT: SeriesEpisodesConnectionWhere - OR: [SeriesEpisodesConnectionWhere!] - node: EpisodeWhere - node_NOT: EpisodeWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input SeriesEpisodesCreateFieldInput { - node: EpisodeCreateInput! -} - -input SeriesEpisodesDeleteFieldInput { - delete: EpisodeDeleteInput - where: SeriesEpisodesConnectionWhere -} - -input SeriesEpisodesDisconnectFieldInput { - disconnect: EpisodeDisconnectInput - where: SeriesEpisodesConnectionWhere -} - -input SeriesEpisodesFieldInput { - connect: [SeriesEpisodesConnectFieldInput!] - create: [SeriesEpisodesCreateFieldInput!] -} - -input SeriesEpisodesNodeAggregationWhereInput { - AND: [SeriesEpisodesNodeAggregationWhereInput!] - NOT: SeriesEpisodesNodeAggregationWhereInput - OR: [SeriesEpisodesNodeAggregationWhereInput!] - runtime_AVERAGE_EQUAL: Float - runtime_AVERAGE_GT: Float - runtime_AVERAGE_GTE: Float - runtime_AVERAGE_LT: Float - runtime_AVERAGE_LTE: Float - runtime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - runtime_MAX_EQUAL: Int - runtime_MAX_GT: Int - runtime_MAX_GTE: Int - runtime_MAX_LT: Int - runtime_MAX_LTE: Int - runtime_MIN_EQUAL: Int - runtime_MIN_GT: Int - runtime_MIN_GTE: Int - runtime_MIN_LT: Int - runtime_MIN_LTE: Int - runtime_SUM_EQUAL: Int - runtime_SUM_GT: Int - runtime_SUM_GTE: Int - runtime_SUM_LT: Int - runtime_SUM_LTE: Int -} - -type SeriesEpisodesRelationship { - cursor: String! - node: Episode! -} - -input SeriesEpisodesUpdateConnectionInput { - node: EpisodeUpdateInput -} - -input SeriesEpisodesUpdateFieldInput { - connect: [SeriesEpisodesConnectFieldInput!] - create: [SeriesEpisodesCreateFieldInput!] - delete: [SeriesEpisodesDeleteFieldInput!] - disconnect: [SeriesEpisodesDisconnectFieldInput!] - update: SeriesEpisodesUpdateConnectionInput - where: SeriesEpisodesConnectionWhere -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -input SeriesRelationInput { - actors: [ProductionActorsCreateFieldInput!] - episodes: [SeriesEpisodesCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - episodeCount: SortDirection - title: SortDirection -} - -input SeriesUpdateInput { - actors: [ProductionActorsUpdateFieldInput!] - episodeCount: Int - episodeCount_DECREMENT: Int - episodeCount_INCREMENT: Int - episodes: [SeriesEpisodesUpdateFieldInput!] - title: String -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: SeriesActorsAggregateInput - actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where none of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere - actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere - \\"\\"\\" - Return Series where some of the related ProductionActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere - \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodeCount: Int - episodeCount_GT: Int - episodeCount_GTE: Int - episodeCount_IN: [Int!] - episodeCount_LT: Int - episodeCount_LTE: Int - episodeCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodeCount_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - episodes: EpisodeWhere @deprecated(reason: \\"Use \`episodes_SOME\` instead.\\") - episodesAggregate: SeriesEpisodesAggregateInput - episodesConnection: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Use \`episodesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Series where all of the related SeriesEpisodesConnections match this filter - \\"\\"\\" - episodesConnection_ALL: SeriesEpisodesConnectionWhere - \\"\\"\\" - Return Series where none of the related SeriesEpisodesConnections match this filter - \\"\\"\\" - episodesConnection_NONE: SeriesEpisodesConnectionWhere - episodesConnection_NOT: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Use \`episodesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Series where one of the related SeriesEpisodesConnections match this filter - \\"\\"\\" - episodesConnection_SINGLE: SeriesEpisodesConnectionWhere - \\"\\"\\" - Return Series where some of the related SeriesEpisodesConnections match this filter - \\"\\"\\" - episodesConnection_SOME: SeriesEpisodesConnectionWhere - \\"\\"\\"Return Series where all of the related Episodes match this filter\\"\\"\\" - episodes_ALL: EpisodeWhere - \\"\\"\\"Return Series where none of the related Episodes match this filter\\"\\"\\" - episodes_NONE: EpisodeWhere - episodes_NOT: EpisodeWhere @deprecated(reason: \\"Use \`episodes_NONE\` instead.\\") - \\"\\"\\"Return Series where one of the related Episodes match this filter\\"\\"\\" - episodes_SINGLE: EpisodeWhere - \\"\\"\\"Return Series where some of the related Episodes match this filter\\"\\"\\" - episodes_SOME: EpisodeWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -type UpdateEpisodesMutationResponse { - episodes: [Episode!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + } - test("Interface Relationships - nested interface relationships", async () => { - const typeDefs = gql` - interface Interface1 { - field1: String! - interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) + interface ActedIn { + screenTime: Int! } - interface Interface2 { - field2: String + input ActedInCreateInput { + screenTime: Int! } - type Type1Interface1 implements Interface1 { - field1: String! - interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) + input ActedInSort { + screenTime: SortDirection } - type Type2Interface1 implements Interface1 { - field1: String! - interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) + input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int } - type Type1Interface2 implements Interface2 { - field2: String! + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } - type Type2Interface2 implements Interface2 { - field2: String! + type Actor { + actedIn(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String! } - type Type1 { - field1: String! - interface1: [Interface1!]! @relationship(type: "INTERFACE_ONE", direction: OUT) + input ActorActedInConnectFieldInput { + connect: ProductionConnectInput + edge: ActedInCreateInput! + where: ProductionConnectWhere } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateType1Interface1sMutationResponse { - info: CreateInfo! - type1Interface1s: [Type1Interface1!]! -} - -type CreateType1Interface2sMutationResponse { - info: CreateInfo! - type1Interface2s: [Type1Interface2!]! -} - -type CreateType1sMutationResponse { - info: CreateInfo! - type1s: [Type1!]! -} - -type CreateType2Interface1sMutationResponse { - info: CreateInfo! - type2Interface1s: [Type2Interface1!]! -} - -type CreateType2Interface2sMutationResponse { - info: CreateInfo! - type2Interface2s: [Type2Interface2!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -interface Interface1 { - field1: String! - interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! - interface2Connection(after: String, directed: Boolean = true, first: Int, where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! -} - -input Interface1ConnectInput { - _on: Interface1ImplementationsConnectInput - interface2: [Interface1Interface2ConnectFieldInput!] -} - -input Interface1ConnectWhere { - node: Interface1Where! -} - -input Interface1CreateInput { - Type1Interface1: Type1Interface1CreateInput - Type2Interface1: Type2Interface1CreateInput -} - -input Interface1DeleteInput { - _on: Interface1ImplementationsDeleteInput - interface2: [Interface1Interface2DeleteFieldInput!] -} - -input Interface1DisconnectInput { - _on: Interface1ImplementationsDisconnectInput - interface2: [Interface1Interface2DisconnectFieldInput!] -} - -input Interface1ImplementationsConnectInput { - Type1Interface1: [Type1Interface1ConnectInput!] - Type2Interface1: [Type2Interface1ConnectInput!] -} - -input Interface1ImplementationsDeleteInput { - Type1Interface1: [Type1Interface1DeleteInput!] - Type2Interface1: [Type2Interface1DeleteInput!] -} - -input Interface1ImplementationsDisconnectInput { - Type1Interface1: [Type1Interface1DisconnectInput!] - Type2Interface1: [Type2Interface1DisconnectInput!] -} - -input Interface1ImplementationsUpdateInput { - Type1Interface1: Type1Interface1UpdateInput - Type2Interface1: Type2Interface1UpdateInput -} - -input Interface1ImplementationsWhere { - Type1Interface1: Type1Interface1Where - Type2Interface1: Type2Interface1Where -} - -input Interface1Interface2ConnectFieldInput { - where: Interface2ConnectWhere -} - -type Interface1Interface2Connection { - edges: [Interface1Interface2Relationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input Interface1Interface2ConnectionSort { - node: Interface2Sort -} - -input Interface1Interface2ConnectionWhere { - AND: [Interface1Interface2ConnectionWhere!] - NOT: Interface1Interface2ConnectionWhere - OR: [Interface1Interface2ConnectionWhere!] - node: Interface2Where - node_NOT: Interface2Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input Interface1Interface2CreateFieldInput { - node: Interface2CreateInput! -} - -input Interface1Interface2DeleteFieldInput { - where: Interface1Interface2ConnectionWhere -} - -input Interface1Interface2DisconnectFieldInput { - where: Interface1Interface2ConnectionWhere -} - -input Interface1Interface2FieldInput { - connect: [Interface1Interface2ConnectFieldInput!] - create: [Interface1Interface2CreateFieldInput!] -} - -type Interface1Interface2Relationship { - cursor: String! - node: Interface2! -} - -input Interface1Interface2UpdateConnectionInput { - node: Interface2UpdateInput -} - -input Interface1Interface2UpdateFieldInput { - connect: [Interface1Interface2ConnectFieldInput!] - create: [Interface1Interface2CreateFieldInput!] - delete: [Interface1Interface2DeleteFieldInput!] - disconnect: [Interface1Interface2DisconnectFieldInput!] - update: Interface1Interface2UpdateConnectionInput - where: Interface1Interface2ConnectionWhere -} - -input Interface1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Interface1Sort objects to sort Interface1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Interface1Sort] -} - -\\"\\"\\" -Fields to sort Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface1Sort object. -\\"\\"\\" -input Interface1Sort { - field1: SortDirection -} - -input Interface1UpdateInput { - _on: Interface1ImplementationsUpdateInput - field1: String - interface2: [Interface1Interface2UpdateFieldInput!] -} - -input Interface1Where { - _on: Interface1ImplementationsWhere - field1: String - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_IN: [String!] - field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_STARTS_WITH: String - interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") - \\"\\"\\" - Return Interface1s where all of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Interface1s where none of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere - interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") - \\"\\"\\" - Return Interface1s where one of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Interface1s where some of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere -} - -interface Interface2 { - field2: String -} - -input Interface2ConnectWhere { - node: Interface2Where! -} - -input Interface2CreateInput { - Type1Interface2: Type1Interface2CreateInput - Type2Interface2: Type2Interface2CreateInput -} - -input Interface2ImplementationsUpdateInput { - Type1Interface2: Type1Interface2UpdateInput - Type2Interface2: Type2Interface2UpdateInput -} - -input Interface2ImplementationsWhere { - Type1Interface2: Type1Interface2Where - Type2Interface2: Type2Interface2Where -} - -input Interface2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Interface2Sort objects to sort Interface2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Interface2Sort] -} - -\\"\\"\\" -Fields to sort Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface2Sort object. -\\"\\"\\" -input Interface2Sort { - field2: SortDirection -} - -input Interface2UpdateInput { - _on: Interface2ImplementationsUpdateInput - field2: String -} - -input Interface2Where { - _on: Interface2ImplementationsWhere - field2: String - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_IN: [String] - field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_STARTS_WITH: String -} - -type Mutation { - createType1Interface1s(input: [Type1Interface1CreateInput!]!): CreateType1Interface1sMutationResponse! - createType1Interface2s(input: [Type1Interface2CreateInput!]!): CreateType1Interface2sMutationResponse! - createType1s(input: [Type1CreateInput!]!): CreateType1sMutationResponse! - createType2Interface1s(input: [Type2Interface1CreateInput!]!): CreateType2Interface1sMutationResponse! - createType2Interface2s(input: [Type2Interface2CreateInput!]!): CreateType2Interface2sMutationResponse! - deleteType1Interface1s(delete: Type1Interface1DeleteInput, where: Type1Interface1Where): DeleteInfo! - deleteType1Interface2s(where: Type1Interface2Where): DeleteInfo! - deleteType1s(delete: Type1DeleteInput, where: Type1Where): DeleteInfo! - deleteType2Interface1s(delete: Type2Interface1DeleteInput, where: Type2Interface1Where): DeleteInfo! - deleteType2Interface2s(where: Type2Interface2Where): DeleteInfo! - updateType1Interface1s(connect: Type1Interface1ConnectInput, create: Type1Interface1RelationInput, delete: Type1Interface1DeleteInput, disconnect: Type1Interface1DisconnectInput, update: Type1Interface1UpdateInput, where: Type1Interface1Where): UpdateType1Interface1sMutationResponse! - updateType1Interface2s(update: Type1Interface2UpdateInput, where: Type1Interface2Where): UpdateType1Interface2sMutationResponse! - updateType1s(connect: Type1ConnectInput, create: Type1RelationInput, delete: Type1DeleteInput, disconnect: Type1DisconnectInput, update: Type1UpdateInput, where: Type1Where): UpdateType1sMutationResponse! - updateType2Interface1s(connect: Type2Interface1ConnectInput, create: Type2Interface1RelationInput, delete: Type2Interface1DeleteInput, disconnect: Type2Interface1DisconnectInput, update: Type2Interface1UpdateInput, where: Type2Interface1Where): UpdateType2Interface1sMutationResponse! - updateType2Interface2s(update: Type2Interface2UpdateInput, where: Type2Interface2Where): UpdateType2Interface2sMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - type1Interface1s(options: Type1Interface1Options, where: Type1Interface1Where): [Type1Interface1!]! - type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! - type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort], where: Type1Interface1Where): Type1Interface1sConnection! - type1Interface2s(options: Type1Interface2Options, where: Type1Interface2Where): [Type1Interface2!]! - type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! - type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort], where: Type1Interface2Where): Type1Interface2sConnection! - type1s(options: Type1Options, where: Type1Where): [Type1!]! - type1sAggregate(where: Type1Where): Type1AggregateSelection! - type1sConnection(after: String, first: Int, sort: [Type1Sort], where: Type1Where): Type1sConnection! - type2Interface1s(options: Type2Interface1Options, where: Type2Interface1Where): [Type2Interface1!]! - type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! - type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort], where: Type2Interface1Where): Type2Interface1sConnection! - type2Interface2s(options: Type2Interface2Options, where: Type2Interface2Where): [Type2Interface2!]! - type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! - type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort], where: Type2Interface2Where): Type2Interface2sConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type Type1 { - field1: String! - interface1(directed: Boolean = true, options: Interface1Options, where: Interface1Where): [Interface1!]! - interface1Connection(after: String, directed: Boolean = true, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! -} - -type Type1AggregateSelection { - count: Int! - field1: StringAggregateSelectionNonNullable! -} - -input Type1ConnectInput { - interface1: [Type1Interface1ConnectFieldInput!] -} - -input Type1CreateInput { - field1: String! - interface1: Type1Interface1FieldInput -} - -input Type1DeleteInput { - interface1: [Type1Interface1DeleteFieldInput!] -} - -input Type1DisconnectInput { - interface1: [Type1Interface1DisconnectFieldInput!] -} - -type Type1Edge { - cursor: String! - node: Type1! -} - -type Type1Interface1 implements Interface1 { - field1: String! - interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! - interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! -} - -type Type1Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelectionNonNullable! -} - -input Type1Interface1ConnectFieldInput { - connect: Interface1ConnectInput - where: Interface1ConnectWhere -} - -input Type1Interface1ConnectInput { - interface2: [Type1Interface1Interface2ConnectFieldInput!] -} - -type Type1Interface1Connection { - edges: [Type1Interface1Relationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input Type1Interface1ConnectionSort { - node: Interface1Sort -} - -input Type1Interface1ConnectionWhere { - AND: [Type1Interface1ConnectionWhere!] - NOT: Type1Interface1ConnectionWhere - OR: [Type1Interface1ConnectionWhere!] - node: Interface1Where - node_NOT: Interface1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input Type1Interface1CreateFieldInput { - node: Interface1CreateInput! -} - -input Type1Interface1CreateInput { - field1: String! - interface2: Interface1Interface2FieldInput -} - -input Type1Interface1DeleteFieldInput { - delete: Interface1DeleteInput - where: Type1Interface1ConnectionWhere -} - -input Type1Interface1DeleteInput { - interface2: [Type1Interface1Interface2DeleteFieldInput!] -} - -input Type1Interface1DisconnectFieldInput { - disconnect: Interface1DisconnectInput - where: Type1Interface1ConnectionWhere -} - -input Type1Interface1DisconnectInput { - interface2: [Type1Interface1Interface2DisconnectFieldInput!] -} - -type Type1Interface1Edge { - cursor: String! - node: Type1Interface1! -} - -input Type1Interface1FieldInput { - connect: [Type1Interface1ConnectFieldInput!] - create: [Type1Interface1CreateFieldInput!] -} - -input Type1Interface1Interface2ConnectFieldInput { - where: Interface2ConnectWhere -} - -input Type1Interface1Interface2CreateFieldInput { - node: Interface2CreateInput! -} - -input Type1Interface1Interface2DeleteFieldInput { - where: Interface1Interface2ConnectionWhere -} - -input Type1Interface1Interface2DisconnectFieldInput { - where: Interface1Interface2ConnectionWhere -} - -input Type1Interface1Interface2UpdateConnectionInput { - node: Interface2UpdateInput -} - -input Type1Interface1Interface2UpdateFieldInput { - connect: [Type1Interface1Interface2ConnectFieldInput!] - create: [Type1Interface1Interface2CreateFieldInput!] - delete: [Type1Interface1Interface2DeleteFieldInput!] - disconnect: [Type1Interface1Interface2DisconnectFieldInput!] - update: Type1Interface1Interface2UpdateConnectionInput - where: Interface1Interface2ConnectionWhere -} - -input Type1Interface1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type1Interface1Sort objects to sort Type1Interface1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type1Interface1Sort!] -} - -input Type1Interface1RelationInput { - interface2: [Type1Interface1Interface2CreateFieldInput!] -} - -type Type1Interface1Relationship { - cursor: String! - node: Interface1! -} - -\\"\\"\\" -Fields to sort Type1Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface1Sort object. -\\"\\"\\" -input Type1Interface1Sort { - field1: SortDirection -} - -input Type1Interface1UpdateConnectionInput { - node: Interface1UpdateInput -} - -input Type1Interface1UpdateFieldInput { - connect: [Type1Interface1ConnectFieldInput!] - create: [Type1Interface1CreateFieldInput!] - delete: [Type1Interface1DeleteFieldInput!] - disconnect: [Type1Interface1DisconnectFieldInput!] - update: Type1Interface1UpdateConnectionInput - where: Type1Interface1ConnectionWhere -} - -input Type1Interface1UpdateInput { - field1: String - interface2: [Type1Interface1Interface2UpdateFieldInput!] -} - -input Type1Interface1Where { - AND: [Type1Interface1Where!] - NOT: Type1Interface1Where - OR: [Type1Interface1Where!] - field1: String - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_IN: [String!] - field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_STARTS_WITH: String - interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") - \\"\\"\\" - Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere - interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") - \\"\\"\\" - Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere -} - -type Type1Interface1sConnection { - edges: [Type1Interface1Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Type1Interface2 implements Interface2 { - field2: String! -} - -type Type1Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelectionNonNullable! -} - -input Type1Interface2CreateInput { - field2: String! -} - -type Type1Interface2Edge { - cursor: String! - node: Type1Interface2! -} - -input Type1Interface2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type1Interface2Sort objects to sort Type1Interface2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type1Interface2Sort!] -} - -\\"\\"\\" -Fields to sort Type1Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface2Sort object. -\\"\\"\\" -input Type1Interface2Sort { - field2: SortDirection -} - -input Type1Interface2UpdateInput { - field2: String -} - -input Type1Interface2Where { - AND: [Type1Interface2Where!] - NOT: Type1Interface2Where - OR: [Type1Interface2Where!] - field2: String - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_IN: [String!] - field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_STARTS_WITH: String -} - -type Type1Interface2sConnection { - edges: [Type1Interface2Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input Type1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type1Sort objects to sort Type1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type1Sort!] -} - -input Type1RelationInput { - interface1: [Type1Interface1CreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Type1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Sort object. -\\"\\"\\" -input Type1Sort { - field1: SortDirection -} - -input Type1UpdateInput { - field1: String - interface1: [Type1Interface1UpdateFieldInput!] -} - -input Type1Where { - AND: [Type1Where!] - NOT: Type1Where - OR: [Type1Where!] - field1: String - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_IN: [String!] - field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_STARTS_WITH: String - interface1Connection: Type1Interface1ConnectionWhere @deprecated(reason: \\"Use \`interface1Connection_SOME\` instead.\\") - \\"\\"\\" - Return Type1s where all of the related Type1Interface1Connections match this filter - \\"\\"\\" - interface1Connection_ALL: Type1Interface1ConnectionWhere - \\"\\"\\" - Return Type1s where none of the related Type1Interface1Connections match this filter - \\"\\"\\" - interface1Connection_NONE: Type1Interface1ConnectionWhere - interface1Connection_NOT: Type1Interface1ConnectionWhere @deprecated(reason: \\"Use \`interface1Connection_NONE\` instead.\\") - \\"\\"\\" - Return Type1s where one of the related Type1Interface1Connections match this filter - \\"\\"\\" - interface1Connection_SINGLE: Type1Interface1ConnectionWhere - \\"\\"\\" - Return Type1s where some of the related Type1Interface1Connections match this filter - \\"\\"\\" - interface1Connection_SOME: Type1Interface1ConnectionWhere -} - -type Type1sConnection { - edges: [Type1Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Type2Interface1 implements Interface1 { - field1: String! - interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! - interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! -} - -type Type2Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelectionNonNullable! -} - -input Type2Interface1ConnectInput { - interface2: [Type2Interface1Interface2ConnectFieldInput!] -} - -input Type2Interface1CreateInput { - field1: String! - interface2: Interface1Interface2FieldInput -} - -input Type2Interface1DeleteInput { - interface2: [Type2Interface1Interface2DeleteFieldInput!] -} - -input Type2Interface1DisconnectInput { - interface2: [Type2Interface1Interface2DisconnectFieldInput!] -} - -type Type2Interface1Edge { - cursor: String! - node: Type2Interface1! -} - -input Type2Interface1Interface2ConnectFieldInput { - where: Interface2ConnectWhere -} - -input Type2Interface1Interface2CreateFieldInput { - node: Interface2CreateInput! -} - -input Type2Interface1Interface2DeleteFieldInput { - where: Interface1Interface2ConnectionWhere -} - -input Type2Interface1Interface2DisconnectFieldInput { - where: Interface1Interface2ConnectionWhere -} - -input Type2Interface1Interface2UpdateConnectionInput { - node: Interface2UpdateInput -} - -input Type2Interface1Interface2UpdateFieldInput { - connect: [Type2Interface1Interface2ConnectFieldInput!] - create: [Type2Interface1Interface2CreateFieldInput!] - delete: [Type2Interface1Interface2DeleteFieldInput!] - disconnect: [Type2Interface1Interface2DisconnectFieldInput!] - update: Type2Interface1Interface2UpdateConnectionInput - where: Interface1Interface2ConnectionWhere -} - -input Type2Interface1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type2Interface1Sort objects to sort Type2Interface1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type2Interface1Sort!] -} - -input Type2Interface1RelationInput { - interface2: [Type2Interface1Interface2CreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Type2Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type2Interface1Sort object. -\\"\\"\\" -input Type2Interface1Sort { - field1: SortDirection -} - -input Type2Interface1UpdateInput { - field1: String - interface2: [Type2Interface1Interface2UpdateFieldInput!] -} - -input Type2Interface1Where { - AND: [Type2Interface1Where!] - NOT: Type2Interface1Where - OR: [Type2Interface1Where!] - field1: String - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_IN: [String!] - field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field1_STARTS_WITH: String - interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") - \\"\\"\\" - Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere - interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") - \\"\\"\\" - Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere - \\"\\"\\" - Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter - \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere -} - -type Type2Interface1sConnection { - edges: [Type2Interface1Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Type2Interface2 implements Interface2 { - field2: String! -} - -type Type2Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelectionNonNullable! -} - -input Type2Interface2CreateInput { - field2: String! -} - -type Type2Interface2Edge { - cursor: String! - node: Type2Interface2! -} - -input Type2Interface2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Type2Interface2Sort objects to sort Type2Interface2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Type2Interface2Sort!] -} - -\\"\\"\\" -Fields to sort Type2Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type2Interface2Sort object. -\\"\\"\\" -input Type2Interface2Sort { - field2: SortDirection -} - -input Type2Interface2UpdateInput { - field2: String -} - -input Type2Interface2Where { - AND: [Type2Interface2Where!] - NOT: Type2Interface2Where - OR: [Type2Interface2Where!] - field2: String - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_IN: [String!] - field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - field2_STARTS_WITH: String -} - -type Type2Interface2sConnection { - edges: [Type2Interface2Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateType1Interface1sMutationResponse { - info: UpdateInfo! - type1Interface1s: [Type1Interface1!]! -} - -type UpdateType1Interface2sMutationResponse { - info: UpdateInfo! - type1Interface2s: [Type1Interface2!]! -} - -type UpdateType1sMutationResponse { - info: UpdateInfo! - type1s: [Type1!]! -} - -type UpdateType2Interface1sMutationResponse { - info: UpdateInfo! - type2Interface1s: [Type2Interface1!]! -} - -type UpdateType2Interface2sMutationResponse { - info: UpdateInfo! - type2Interface2s: [Type2Interface2!]! -}" -`); + input ActorActedInConnectionSort { + edge: ActedInSort + node: ProductionSort + } - // expect(() => { - // // eslint-disable-next-line @typescript-eslint/no-unused-vars - // const neoSchema = new Neo4jGraphQL({ typeDefs }); - // }).toThrowError("Nested interface relationship fields are not supported: Interface1.interface2"); - }); + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } - test("Interface Relationships - nested relationships", async () => { - const typeDefs = gql` - interface Content { - id: ID - content: String - creator: User! @relationship(type: "HAS_CONTENT", direction: IN) + input ActorActedInCreateFieldInput { + edge: ActedInCreateInput! + node: ProductionCreateInput! } - type Comment implements Content { - id: ID - content: String - creator: User! - post: Post! @relationship(type: "HAS_COMMENT", direction: IN) + input ActorActedInDeleteFieldInput { + delete: ProductionDeleteInput + where: ActorActedInConnectionWhere } - type Post implements Content { - id: ID - content: String - creator: User! - comments: [Comment!]! @relationship(type: "HAS_COMMENT", direction: OUT) + input ActorActedInDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: ActorActedInConnectionWhere } - type User { - id: ID - name: String - content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Production! + screenTime: Int! + } - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Comment implements Content { - content: String - creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): CommentUserCreatorAggregationSelection - creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! - id: ID - post(directed: Boolean = true, options: PostOptions, where: PostWhere): Post! - postAggregate(directed: Boolean = true, where: PostWhere): CommentPostPostAggregationSelection - postConnection(after: String, directed: Boolean = true, first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! -} - -type CommentAggregateSelection { - content: StringAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input CommentConnectInput { - creator: ContentCreatorConnectFieldInput - post: CommentPostConnectFieldInput -} - -input CommentConnectWhere { - node: CommentWhere! -} - -input CommentCreateInput { - content: String - creator: ContentCreatorFieldInput - id: ID - post: CommentPostFieldInput -} - -input CommentCreatorAggregateInput { - AND: [CommentCreatorAggregateInput!] - NOT: CommentCreatorAggregateInput - OR: [CommentCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: CommentCreatorNodeAggregationWhereInput -} - -input CommentCreatorNodeAggregationWhereInput { - AND: [CommentCreatorNodeAggregationWhereInput!] - NOT: CommentCreatorNodeAggregationWhereInput - OR: [CommentCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input CommentDeleteInput { - creator: ContentCreatorDeleteFieldInput - post: CommentPostDeleteFieldInput -} - -input CommentDisconnectInput { - creator: ContentCreatorDisconnectFieldInput - post: CommentPostDisconnectFieldInput -} - -type CommentEdge { - cursor: String! - node: Comment! -} - -input CommentOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more CommentSort objects to sort Comments by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [CommentSort!] -} - -input CommentPostAggregateInput { - AND: [CommentPostAggregateInput!] - NOT: CommentPostAggregateInput - OR: [CommentPostAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: CommentPostNodeAggregationWhereInput -} - -input CommentPostConnectFieldInput { - connect: PostConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere -} - -type CommentPostConnection { - edges: [CommentPostRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input CommentPostConnectionSort { - node: PostSort -} - -input CommentPostConnectionWhere { - AND: [CommentPostConnectionWhere!] - NOT: CommentPostConnectionWhere - OR: [CommentPostConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input CommentPostCreateFieldInput { - node: PostCreateInput! -} - -input CommentPostDeleteFieldInput { - delete: PostDeleteInput - where: CommentPostConnectionWhere -} - -input CommentPostDisconnectFieldInput { - disconnect: PostDisconnectInput - where: CommentPostConnectionWhere -} - -input CommentPostFieldInput { - connect: CommentPostConnectFieldInput - create: CommentPostCreateFieldInput -} - -input CommentPostNodeAggregationWhereInput { - AND: [CommentPostNodeAggregationWhereInput!] - NOT: CommentPostNodeAggregationWhereInput - OR: [CommentPostNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type CommentPostPostAggregationSelection { - count: Int! - node: CommentPostPostNodeAggregateSelection -} - -type CommentPostPostNodeAggregateSelection { - content: StringAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -type CommentPostRelationship { - cursor: String! - node: Post! -} - -input CommentPostUpdateConnectionInput { - node: PostUpdateInput -} - -input CommentPostUpdateFieldInput { - connect: CommentPostConnectFieldInput - create: CommentPostCreateFieldInput - delete: CommentPostDeleteFieldInput - disconnect: CommentPostDisconnectFieldInput - update: CommentPostUpdateConnectionInput - where: CommentPostConnectionWhere -} - -input CommentRelationInput { - creator: ContentCreatorCreateFieldInput - post: CommentPostCreateFieldInput -} - -\\"\\"\\" -Fields to sort Comments by. The order in which sorts are applied is not guaranteed when specifying many fields in one CommentSort object. -\\"\\"\\" -input CommentSort { - content: SortDirection - id: SortDirection -} - -input CommentUpdateInput { - content: String - creator: ContentCreatorUpdateFieldInput - id: ID - post: CommentPostUpdateFieldInput -} - -type CommentUserCreatorAggregationSelection { - count: Int! - node: CommentUserCreatorNodeAggregateSelection -} - -type CommentUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! -} - -input CommentWhere { - AND: [CommentWhere!] - NOT: CommentWhere - OR: [CommentWhere!] - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - creator: UserWhere - creatorAggregate: CommentCreatorAggregateInput - creatorConnection: ContentCreatorConnectionWhere - creatorConnection_NOT: ContentCreatorConnectionWhere - creator_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - post: PostWhere - postAggregate: CommentPostAggregateInput - postConnection: CommentPostConnectionWhere - postConnection_NOT: CommentPostConnectionWhere - post_NOT: PostWhere -} - -type CommentsConnection { - edges: [CommentEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface Content { - content: String - creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! - id: ID -} - -input ContentConnectInput { - _on: ContentImplementationsConnectInput - creator: ContentCreatorConnectFieldInput -} - -input ContentConnectWhere { - node: ContentWhere! -} - -input ContentCreateInput { - Comment: CommentCreateInput - Post: PostCreateInput -} - -input ContentCreatorAggregateInput { - AND: [ContentCreatorAggregateInput!] - NOT: ContentCreatorAggregateInput - OR: [ContentCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ContentCreatorNodeAggregationWhereInput -} - -input ContentCreatorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type ContentCreatorConnection { - edges: [ContentCreatorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ContentCreatorConnectionSort { - node: UserSort -} - -input ContentCreatorConnectionWhere { - AND: [ContentCreatorConnectionWhere!] - NOT: ContentCreatorConnectionWhere - OR: [ContentCreatorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ContentCreatorCreateFieldInput { - node: UserCreateInput! -} - -input ContentCreatorDeleteFieldInput { - delete: UserDeleteInput - where: ContentCreatorConnectionWhere -} - -input ContentCreatorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: ContentCreatorConnectionWhere -} - -input ContentCreatorFieldInput { - connect: ContentCreatorConnectFieldInput - create: ContentCreatorCreateFieldInput -} - -input ContentCreatorNodeAggregationWhereInput { - AND: [ContentCreatorNodeAggregationWhereInput!] - NOT: ContentCreatorNodeAggregationWhereInput - OR: [ContentCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ContentCreatorRelationship { - cursor: String! - node: User! -} - -input ContentCreatorUpdateConnectionInput { - node: UserUpdateInput -} - -input ContentCreatorUpdateFieldInput { - connect: ContentCreatorConnectFieldInput - create: ContentCreatorCreateFieldInput - delete: ContentCreatorDeleteFieldInput - disconnect: ContentCreatorDisconnectFieldInput - update: ContentCreatorUpdateConnectionInput - where: ContentCreatorConnectionWhere -} - -input ContentDeleteInput { - _on: ContentImplementationsDeleteInput - creator: ContentCreatorDeleteFieldInput -} - -input ContentDisconnectInput { - _on: ContentImplementationsDisconnectInput - creator: ContentCreatorDisconnectFieldInput -} - -input ContentImplementationsConnectInput { - Comment: [CommentConnectInput!] - Post: [PostConnectInput!] -} - -input ContentImplementationsDeleteInput { - Comment: [CommentDeleteInput!] - Post: [PostDeleteInput!] -} - -input ContentImplementationsDisconnectInput { - Comment: [CommentDisconnectInput!] - Post: [PostDisconnectInput!] -} - -input ContentImplementationsUpdateInput { - Comment: CommentUpdateInput - Post: PostUpdateInput -} - -input ContentImplementationsWhere { - Comment: CommentWhere - Post: PostWhere -} - -input ContentOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more ContentSort objects to sort Contents by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [ContentSort] -} - -\\"\\"\\" -Fields to sort Contents by. The order in which sorts are applied is not guaranteed when specifying many fields in one ContentSort object. -\\"\\"\\" -input ContentSort { - content: SortDirection - id: SortDirection -} - -input ContentUpdateInput { - _on: ContentImplementationsUpdateInput - content: String - creator: ContentCreatorUpdateFieldInput - id: ID -} - -input ContentWhere { - _on: ContentImplementationsWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - creator: UserWhere - creatorAggregate: ContentCreatorAggregateInput - creatorConnection: ContentCreatorConnectionWhere - creatorConnection_NOT: ContentCreatorConnectionWhere - creator_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type CreateCommentsMutationResponse { - comments: [Comment!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Mutation { - createComments(input: [CommentCreateInput!]!): CreateCommentsMutationResponse! - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteComments(delete: CommentDeleteInput, where: CommentWhere): DeleteInfo! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateComments(connect: CommentConnectInput, create: CommentRelationInput, delete: CommentDeleteInput, disconnect: CommentDisconnectInput, update: CommentUpdateInput, where: CommentWhere): UpdateCommentsMutationResponse! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post implements Content { - comments(directed: Boolean = true, options: CommentOptions, where: CommentWhere): [Comment!]! - commentsAggregate(directed: Boolean = true, where: CommentWhere): PostCommentCommentsAggregationSelection - commentsConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! - content: String - creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection - creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! - id: ID -} - -type PostAggregateSelection { - content: StringAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -type PostCommentCommentsAggregationSelection { - count: Int! - node: PostCommentCommentsNodeAggregateSelection -} - -type PostCommentCommentsNodeAggregateSelection { - content: StringAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input PostCommentsAggregateInput { - AND: [PostCommentsAggregateInput!] - NOT: PostCommentsAggregateInput - OR: [PostCommentsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostCommentsNodeAggregationWhereInput -} - -input PostCommentsConnectFieldInput { - connect: [CommentConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: CommentConnectWhere -} - -type PostCommentsConnection { - edges: [PostCommentsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PostCommentsConnectionSort { - node: CommentSort -} - -input PostCommentsConnectionWhere { - AND: [PostCommentsConnectionWhere!] - NOT: PostCommentsConnectionWhere - OR: [PostCommentsConnectionWhere!] - node: CommentWhere - node_NOT: CommentWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PostCommentsCreateFieldInput { - node: CommentCreateInput! -} - -input PostCommentsDeleteFieldInput { - delete: CommentDeleteInput - where: PostCommentsConnectionWhere -} - -input PostCommentsDisconnectFieldInput { - disconnect: CommentDisconnectInput - where: PostCommentsConnectionWhere -} - -input PostCommentsFieldInput { - connect: [PostCommentsConnectFieldInput!] - create: [PostCommentsCreateFieldInput!] -} - -input PostCommentsNodeAggregationWhereInput { - AND: [PostCommentsNodeAggregationWhereInput!] - NOT: PostCommentsNodeAggregationWhereInput - OR: [PostCommentsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -type PostCommentsRelationship { - cursor: String! - node: Comment! -} - -input PostCommentsUpdateConnectionInput { - node: CommentUpdateInput -} - -input PostCommentsUpdateFieldInput { - connect: [PostCommentsConnectFieldInput!] - create: [PostCommentsCreateFieldInput!] - delete: [PostCommentsDeleteFieldInput!] - disconnect: [PostCommentsDisconnectFieldInput!] - update: PostCommentsUpdateConnectionInput - where: PostCommentsConnectionWhere -} - -input PostConnectInput { - comments: [PostCommentsConnectFieldInput!] - creator: ContentCreatorConnectFieldInput -} - -input PostConnectWhere { - node: PostWhere! -} - -input PostCreateInput { - comments: PostCommentsFieldInput - content: String - creator: ContentCreatorFieldInput - id: ID -} - -input PostCreatorAggregateInput { - AND: [PostCreatorAggregateInput!] - NOT: PostCreatorAggregateInput - OR: [PostCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostCreatorNodeAggregationWhereInput -} - -input PostCreatorNodeAggregationWhereInput { - AND: [PostCreatorNodeAggregationWhereInput!] - NOT: PostCreatorNodeAggregationWhereInput - OR: [PostCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input PostDeleteInput { - comments: [PostCommentsDeleteFieldInput!] - creator: ContentCreatorDeleteFieldInput -} - -input PostDisconnectInput { - comments: [PostCommentsDisconnectFieldInput!] - creator: ContentCreatorDisconnectFieldInput -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] -} - -input PostRelationInput { - comments: [PostCommentsCreateFieldInput!] - creator: ContentCreatorCreateFieldInput -} - -\\"\\"\\" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -\\"\\"\\" -input PostSort { - content: SortDirection - id: SortDirection -} - -input PostUpdateInput { - comments: [PostCommentsUpdateFieldInput!] - content: String - creator: ContentCreatorUpdateFieldInput - id: ID -} - -type PostUserCreatorAggregationSelection { - count: Int! - node: PostUserCreatorNodeAggregateSelection -} - -type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - comments: CommentWhere @deprecated(reason: \\"Use \`comments_SOME\` instead.\\") - commentsAggregate: PostCommentsAggregateInput - commentsConnection: PostCommentsConnectionWhere @deprecated(reason: \\"Use \`commentsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Posts where all of the related PostCommentsConnections match this filter - \\"\\"\\" - commentsConnection_ALL: PostCommentsConnectionWhere - \\"\\"\\" - Return Posts where none of the related PostCommentsConnections match this filter - \\"\\"\\" - commentsConnection_NONE: PostCommentsConnectionWhere - commentsConnection_NOT: PostCommentsConnectionWhere @deprecated(reason: \\"Use \`commentsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Posts where one of the related PostCommentsConnections match this filter - \\"\\"\\" - commentsConnection_SINGLE: PostCommentsConnectionWhere - \\"\\"\\" - Return Posts where some of the related PostCommentsConnections match this filter - \\"\\"\\" - commentsConnection_SOME: PostCommentsConnectionWhere - \\"\\"\\"Return Posts where all of the related Comments match this filter\\"\\"\\" - comments_ALL: CommentWhere - \\"\\"\\"Return Posts where none of the related Comments match this filter\\"\\"\\" - comments_NONE: CommentWhere - comments_NOT: CommentWhere @deprecated(reason: \\"Use \`comments_NONE\` instead.\\") - \\"\\"\\"Return Posts where one of the related Comments match this filter\\"\\"\\" - comments_SINGLE: CommentWhere - \\"\\"\\"Return Posts where some of the related Comments match this filter\\"\\"\\" - comments_SOME: CommentWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String - creator: UserWhere - creatorAggregate: PostCreatorAggregateInput - creatorConnection: ContentCreatorConnectionWhere - creatorConnection_NOT: ContentCreatorConnectionWhere - creator_NOT: UserWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - comments(options: CommentOptions, where: CommentWhere): [Comment!]! - commentsAggregate(where: CommentWhere): CommentAggregateSelection! - commentsConnection(after: String, first: Int, sort: [CommentSort], where: CommentWhere): CommentsConnection! - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateCommentsMutationResponse { - comments: [Comment!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - content(directed: Boolean = true, options: ContentOptions, where: ContentWhere): [Content!]! - contentConnection(after: String, directed: Boolean = true, first: Int, sort: [UserContentConnectionSort!], where: UserContentConnectionWhere): UserContentConnection! - id: ID - name: String -} - -type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! -} - -input UserConnectInput { - content: [UserContentConnectFieldInput!] -} - -input UserConnectWhere { - node: UserWhere! -} - -input UserContentConnectFieldInput { - connect: ContentConnectInput - where: ContentConnectWhere -} - -type UserContentConnection { - edges: [UserContentRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserContentConnectionSort { - node: ContentSort -} - -input UserContentConnectionWhere { - AND: [UserContentConnectionWhere!] - NOT: UserContentConnectionWhere - OR: [UserContentConnectionWhere!] - node: ContentWhere - node_NOT: ContentWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input UserContentCreateFieldInput { - node: ContentCreateInput! -} - -input UserContentDeleteFieldInput { - delete: ContentDeleteInput - where: UserContentConnectionWhere -} - -input UserContentDisconnectFieldInput { - disconnect: ContentDisconnectInput - where: UserContentConnectionWhere -} - -input UserContentFieldInput { - connect: [UserContentConnectFieldInput!] - create: [UserContentCreateFieldInput!] -} - -type UserContentRelationship { - cursor: String! - node: Content! -} - -input UserContentUpdateConnectionInput { - node: ContentUpdateInput -} - -input UserContentUpdateFieldInput { - connect: [UserContentConnectFieldInput!] - create: [UserContentCreateFieldInput!] - delete: [UserContentDeleteFieldInput!] - disconnect: [UserContentDisconnectFieldInput!] - update: UserContentUpdateConnectionInput - where: UserContentConnectionWhere -} - -input UserCreateInput { - content: UserContentFieldInput - id: ID - name: String -} - -input UserDeleteInput { - content: [UserContentDeleteFieldInput!] -} - -input UserDisconnectInput { - content: [UserContentDisconnectFieldInput!] -} - -type UserEdge { - cursor: String! - node: User! -} - -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!] -} - -input UserRelationInput { - content: [UserContentCreateFieldInput!] -} - -\\"\\"\\" -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 { - id: SortDirection - name: SortDirection -} - -input UserUpdateInput { - content: [UserContentUpdateFieldInput!] - id: ID - name: String -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - contentConnection: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_ALL: UserContentConnectionWhere - \\"\\"\\" - Return Users where none of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_NONE: UserContentConnectionWhere - contentConnection_NOT: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_SINGLE: UserContentConnectionWhere - \\"\\"\\" - Return Users where some of the related UserContentConnections match this filter - \\"\\"\\" - contentConnection_SOME: UserContentConnectionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: ProductionUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String! + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + type CreateEpisodesMutationResponse { + episodes: [Episode!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Episode { + runtime: Int! + series(directed: Boolean = true, options: SeriesOptions, where: SeriesWhere): Series! + seriesAggregate(directed: Boolean = true, where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection + seriesConnection(after: String, directed: Boolean = true, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! + } + + type EpisodeAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + } + + input EpisodeConnectInput { + series: EpisodeSeriesConnectFieldInput + } + + input EpisodeConnectWhere { + node: EpisodeWhere! + } + + input EpisodeCreateInput { + runtime: Int! + series: EpisodeSeriesFieldInput + } + + input EpisodeDeleteInput { + series: EpisodeSeriesDeleteFieldInput + } + + input EpisodeDisconnectInput { + series: EpisodeSeriesDisconnectFieldInput + } + + type EpisodeEdge { + cursor: String! + node: Episode! + } + + input EpisodeOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more EpisodeSort objects to sort Episodes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [EpisodeSort!] + } + + input EpisodeRelationInput { + series: EpisodeSeriesCreateFieldInput + } + + input EpisodeSeriesAggregateInput { + AND: [EpisodeSeriesAggregateInput!] + NOT: EpisodeSeriesAggregateInput + OR: [EpisodeSeriesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: EpisodeSeriesNodeAggregationWhereInput + } + + input EpisodeSeriesConnectFieldInput { + connect: SeriesConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: SeriesConnectWhere + } + + type EpisodeSeriesConnection { + edges: [EpisodeSeriesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input EpisodeSeriesConnectionSort { + node: SeriesSort + } + + input EpisodeSeriesConnectionWhere { + AND: [EpisodeSeriesConnectionWhere!] + NOT: EpisodeSeriesConnectionWhere + OR: [EpisodeSeriesConnectionWhere!] + node: SeriesWhere + node_NOT: SeriesWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input EpisodeSeriesCreateFieldInput { + node: SeriesCreateInput! + } + + input EpisodeSeriesDeleteFieldInput { + delete: SeriesDeleteInput + where: EpisodeSeriesConnectionWhere + } + + input EpisodeSeriesDisconnectFieldInput { + disconnect: SeriesDisconnectInput + where: EpisodeSeriesConnectionWhere + } + + input EpisodeSeriesFieldInput { + connect: EpisodeSeriesConnectFieldInput + create: EpisodeSeriesCreateFieldInput + } + + input EpisodeSeriesNodeAggregationWhereInput { + AND: [EpisodeSeriesNodeAggregationWhereInput!] + NOT: EpisodeSeriesNodeAggregationWhereInput + OR: [EpisodeSeriesNodeAggregationWhereInput!] + episodeCount_AVERAGE_EQUAL: Float + episodeCount_AVERAGE_GT: Float + episodeCount_AVERAGE_GTE: Float + episodeCount_AVERAGE_LT: Float + episodeCount_AVERAGE_LTE: Float + episodeCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + episodeCount_MAX_EQUAL: Int + episodeCount_MAX_GT: Int + episodeCount_MAX_GTE: Int + episodeCount_MAX_LT: Int + episodeCount_MAX_LTE: Int + episodeCount_MIN_EQUAL: Int + episodeCount_MIN_GT: Int + episodeCount_MIN_GTE: Int + episodeCount_MIN_LT: Int + episodeCount_MIN_LTE: Int + episodeCount_SUM_EQUAL: Int + episodeCount_SUM_GT: Int + episodeCount_SUM_GTE: Int + episodeCount_SUM_LT: Int + episodeCount_SUM_LTE: Int + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type EpisodeSeriesRelationship { + cursor: String! + node: Series! + } + + type EpisodeSeriesSeriesAggregationSelection { + count: Int! + node: EpisodeSeriesSeriesNodeAggregateSelection + } + + type EpisodeSeriesSeriesNodeAggregateSelection { + episodeCount: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input EpisodeSeriesUpdateConnectionInput { + node: SeriesUpdateInput + } + + input EpisodeSeriesUpdateFieldInput { + connect: EpisodeSeriesConnectFieldInput + create: EpisodeSeriesCreateFieldInput + delete: EpisodeSeriesDeleteFieldInput + disconnect: EpisodeSeriesDisconnectFieldInput + update: EpisodeSeriesUpdateConnectionInput + where: EpisodeSeriesConnectionWhere + } + + \\"\\"\\" + Fields to sort Episodes by. The order in which sorts are applied is not guaranteed when specifying many fields in one EpisodeSort object. + \\"\\"\\" + input EpisodeSort { + runtime: SortDirection + } + + input EpisodeUpdateInput { + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + series: EpisodeSeriesUpdateFieldInput + } + + input EpisodeWhere { + AND: [EpisodeWhere!] + NOT: EpisodeWhere + OR: [EpisodeWhere!] + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + series: SeriesWhere + seriesAggregate: EpisodeSeriesAggregateInput + seriesConnection: EpisodeSeriesConnectionWhere + seriesConnection_NOT: EpisodeSeriesConnectionWhere + series_NOT: SeriesWhere + } + + type EpisodesConnection { + edges: [EpisodeEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + runtime: Int! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieAggregateSelection { + count: Int! + runtime: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [ProductionActorsConnectFieldInput!] + } + + input MovieCreateInput { + actors: ProductionActorsFieldInput + runtime: Int! + title: String! + } + + input MovieDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] + } + + input MovieDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [ProductionActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + runtime: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + runtime: Int + runtime_DECREMENT: Int + runtime_INCREMENT: Int + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + runtime: Int + runtime_GT: Int + runtime_GTE: Int + runtime_IN: [Int!] + runtime_LT: Int + runtime_LTE: Int + runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createEpisodes(input: [EpisodeCreateInput!]!): CreateEpisodesMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteEpisodes(delete: EpisodeDeleteInput, where: EpisodeWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateEpisodes(connect: EpisodeConnectInput, create: EpisodeRelationInput, delete: EpisodeDeleteInput, disconnect: EpisodeDisconnectInput, update: EpisodeUpdateInput, where: EpisodeWhere): UpdateEpisodesMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + title: String! + } + + input ProductionActorsAggregateInput { + AND: [ProductionActorsAggregateInput!] + NOT: ProductionActorsAggregateInput + OR: [ProductionActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ProductionActorsEdgeAggregationWhereInput + node: ProductionActorsNodeAggregationWhereInput + } + + input ProductionActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type ProductionActorsConnection { + edges: [ProductionActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ProductionActorsConnectionSort { + edge: ActedInSort + node: ActorSort + } + + input ProductionActorsConnectionWhere { + AND: [ProductionActorsConnectionWhere!] + NOT: ProductionActorsConnectionWhere + OR: [ProductionActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ProductionActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! + } + + input ProductionActorsDeleteFieldInput { + delete: ActorDeleteInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: ProductionActorsConnectionWhere + } + + input ProductionActorsEdgeAggregationWhereInput { + AND: [ProductionActorsEdgeAggregationWhereInput!] + NOT: ProductionActorsEdgeAggregationWhereInput + OR: [ProductionActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ProductionActorsFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + } + + input ProductionActorsNodeAggregationWhereInput { + AND: [ProductionActorsNodeAggregationWhereInput!] + NOT: ProductionActorsNodeAggregationWhereInput + OR: [ProductionActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ProductionActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + screenTime: Int! + } + + input ProductionActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput + } + + input ProductionActorsUpdateFieldInput { + connect: [ProductionActorsConnectFieldInput!] + create: [ProductionActorsCreateFieldInput!] + delete: [ProductionActorsDeleteFieldInput!] + disconnect: [ProductionActorsDisconnectFieldInput!] + update: ProductionActorsUpdateConnectionInput + where: ProductionActorsConnectionWhere + } + + input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + actors: [ProductionActorsConnectFieldInput!] + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + actors: [ProductionActorsDeleteFieldInput!] + } + + input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + actors: [ProductionActorsDisconnectFieldInput!] + } + + input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] + } + + input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] + } + + input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + 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 ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + actors: [ProductionActorsUpdateFieldInput!] + title: String + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + episodes(options: EpisodeOptions, where: EpisodeWhere): [Episode!]! + episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! + episodesConnection(after: String, first: Int, sort: [EpisodeSort], where: EpisodeWhere): EpisodesConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + episodeCount: Int! + episodes(directed: Boolean = true, options: EpisodeOptions, where: EpisodeWhere): [Episode!]! + episodesAggregate(directed: Boolean = true, where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection + episodesConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! + title: String! + } + + type SeriesActorActorsAggregationSelection { + count: Int! + edge: SeriesActorActorsEdgeAggregateSelection + node: SeriesActorActorsNodeAggregateSelection + } + + type SeriesActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! + } + + type SeriesActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input SeriesActorsAggregateInput { + AND: [SeriesActorsAggregateInput!] + NOT: SeriesActorsAggregateInput + OR: [SeriesActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: SeriesActorsEdgeAggregationWhereInput + node: SeriesActorsNodeAggregationWhereInput + } + + input SeriesActorsEdgeAggregationWhereInput { + AND: [SeriesActorsEdgeAggregationWhereInput!] + NOT: SeriesActorsEdgeAggregationWhereInput + OR: [SeriesActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 SeriesActorsNodeAggregationWhereInput { + AND: [SeriesActorsNodeAggregationWhereInput!] + NOT: SeriesActorsNodeAggregationWhereInput + OR: [SeriesActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type SeriesAggregateSelection { + count: Int! + episodeCount: IntAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input SeriesConnectInput { + actors: [ProductionActorsConnectFieldInput!] + episodes: [SeriesEpisodesConnectFieldInput!] + } + + input SeriesConnectWhere { + node: SeriesWhere! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + actors: ProductionActorsFieldInput + episodeCount: Int! + episodes: SeriesEpisodesFieldInput + title: String! + } + + input SeriesDeleteInput { + actors: [ProductionActorsDeleteFieldInput!] + episodes: [SeriesEpisodesDeleteFieldInput!] + } + + input SeriesDisconnectInput { + actors: [ProductionActorsDisconnectFieldInput!] + episodes: [SeriesEpisodesDisconnectFieldInput!] + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + type SeriesEpisodeEpisodesAggregationSelection { + count: Int! + node: SeriesEpisodeEpisodesNodeAggregateSelection + } + + type SeriesEpisodeEpisodesNodeAggregateSelection { + runtime: IntAggregateSelectionNonNullable! + } + + input SeriesEpisodesAggregateInput { + AND: [SeriesEpisodesAggregateInput!] + NOT: SeriesEpisodesAggregateInput + OR: [SeriesEpisodesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesEpisodesNodeAggregationWhereInput + } + + input SeriesEpisodesConnectFieldInput { + connect: [EpisodeConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: EpisodeConnectWhere + } + + type SeriesEpisodesConnection { + edges: [SeriesEpisodesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesEpisodesConnectionSort { + node: EpisodeSort + } + + input SeriesEpisodesConnectionWhere { + AND: [SeriesEpisodesConnectionWhere!] + NOT: SeriesEpisodesConnectionWhere + OR: [SeriesEpisodesConnectionWhere!] + node: EpisodeWhere + node_NOT: EpisodeWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input SeriesEpisodesCreateFieldInput { + node: EpisodeCreateInput! + } + + input SeriesEpisodesDeleteFieldInput { + delete: EpisodeDeleteInput + where: SeriesEpisodesConnectionWhere + } + + input SeriesEpisodesDisconnectFieldInput { + disconnect: EpisodeDisconnectInput + where: SeriesEpisodesConnectionWhere + } + + input SeriesEpisodesFieldInput { + connect: [SeriesEpisodesConnectFieldInput!] + create: [SeriesEpisodesCreateFieldInput!] + } + + input SeriesEpisodesNodeAggregationWhereInput { + AND: [SeriesEpisodesNodeAggregationWhereInput!] + NOT: SeriesEpisodesNodeAggregationWhereInput + OR: [SeriesEpisodesNodeAggregationWhereInput!] + runtime_AVERAGE_EQUAL: Float + runtime_AVERAGE_GT: Float + runtime_AVERAGE_GTE: Float + runtime_AVERAGE_LT: Float + runtime_AVERAGE_LTE: Float + runtime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + runtime_MAX_EQUAL: Int + runtime_MAX_GT: Int + runtime_MAX_GTE: Int + runtime_MAX_LT: Int + runtime_MAX_LTE: Int + runtime_MIN_EQUAL: Int + runtime_MIN_GT: Int + runtime_MIN_GTE: Int + runtime_MIN_LT: Int + runtime_MIN_LTE: Int + runtime_SUM_EQUAL: Int + runtime_SUM_GT: Int + runtime_SUM_GTE: Int + runtime_SUM_LT: Int + runtime_SUM_LTE: Int + } + + type SeriesEpisodesRelationship { + cursor: String! + node: Episode! + } + + input SeriesEpisodesUpdateConnectionInput { + node: EpisodeUpdateInput + } + + input SeriesEpisodesUpdateFieldInput { + connect: [SeriesEpisodesConnectFieldInput!] + create: [SeriesEpisodesCreateFieldInput!] + delete: [SeriesEpisodesDeleteFieldInput!] + disconnect: [SeriesEpisodesDisconnectFieldInput!] + update: SeriesEpisodesUpdateConnectionInput + where: SeriesEpisodesConnectionWhere + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + input SeriesRelationInput { + actors: [ProductionActorsCreateFieldInput!] + episodes: [SeriesEpisodesCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + episodeCount: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + actors: [ProductionActorsUpdateFieldInput!] + episodeCount: Int + episodeCount_DECREMENT: Int + episodeCount_INCREMENT: Int + episodes: [SeriesEpisodesUpdateFieldInput!] + title: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: SeriesActorsAggregateInput + actorsConnection: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NOT: ProductionActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: ProductionActorsConnectionWhere + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + episodeCount: Int + episodeCount_GT: Int + episodeCount_GTE: Int + episodeCount_IN: [Int!] + episodeCount_LT: Int + episodeCount_LTE: Int + episodeCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodeCount_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + episodes: EpisodeWhere @deprecated(reason: \\"Use \`episodes_SOME\` instead.\\") + episodesAggregate: SeriesEpisodesAggregateInput + episodesConnection: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Use \`episodesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Series where all of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + episodesConnection_ALL: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where none of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + episodesConnection_NONE: SeriesEpisodesConnectionWhere + episodesConnection_NOT: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Use \`episodesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Series where one of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + episodesConnection_SINGLE: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where some of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + episodesConnection_SOME: SeriesEpisodesConnectionWhere + \\"\\"\\"Return Series where all of the related Episodes match this filter\\"\\"\\" + episodes_ALL: EpisodeWhere + \\"\\"\\"Return Series where none of the related Episodes match this filter\\"\\"\\" + episodes_NONE: EpisodeWhere + episodes_NOT: EpisodeWhere @deprecated(reason: \\"Use \`episodes_NONE\` instead.\\") + \\"\\"\\"Return Series where one of the related Episodes match this filter\\"\\"\\" + episodes_SINGLE: EpisodeWhere + \\"\\"\\"Return Series where some of the related Episodes match this filter\\"\\"\\" + episodes_SOME: EpisodeWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + type UpdateEpisodesMutationResponse { + episodes: [Episode!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); + + test("Interface Relationships - nested interface relationships", async () => { + const typeDefs = gql` + interface Interface1 { + field1: String! + interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) + } + + interface Interface2 { + field2: String + } + + type Type1Interface1 implements Interface1 { + field1: String! + interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) + } + + type Type2Interface1 implements Interface1 { + field1: String! + interface2: [Interface2!]! @relationship(type: "INTERFACE_TWO", direction: OUT) + } + + type Type1Interface2 implements Interface2 { + field2: String! + } + + type Type2Interface2 implements Interface2 { + field2: String! + } + + type Type1 { + field1: String! + interface1: [Interface1!]! @relationship(type: "INTERFACE_ONE", direction: OUT) + } + `; + + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateType1Interface1sMutationResponse { + info: CreateInfo! + type1Interface1s: [Type1Interface1!]! + } + + type CreateType1Interface2sMutationResponse { + info: CreateInfo! + type1Interface2s: [Type1Interface2!]! + } + + type CreateType1sMutationResponse { + info: CreateInfo! + type1s: [Type1!]! + } + + type CreateType2Interface1sMutationResponse { + info: CreateInfo! + type2Interface1s: [Type2Interface1!]! + } + + type CreateType2Interface2sMutationResponse { + info: CreateInfo! + type2Interface2s: [Type2Interface2!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + interface Interface1 { + field1: String! + interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! + interface2Connection(after: String, directed: Boolean = true, first: Int, where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + } + + input Interface1ConnectInput { + _on: Interface1ImplementationsConnectInput + interface2: [Interface1Interface2ConnectFieldInput!] + } + + input Interface1ConnectWhere { + node: Interface1Where! + } + + input Interface1CreateInput { + Type1Interface1: Type1Interface1CreateInput + Type2Interface1: Type2Interface1CreateInput + } + + input Interface1DeleteInput { + _on: Interface1ImplementationsDeleteInput + interface2: [Interface1Interface2DeleteFieldInput!] + } + + input Interface1DisconnectInput { + _on: Interface1ImplementationsDisconnectInput + interface2: [Interface1Interface2DisconnectFieldInput!] + } + + input Interface1ImplementationsConnectInput { + Type1Interface1: [Type1Interface1ConnectInput!] + Type2Interface1: [Type2Interface1ConnectInput!] + } + + input Interface1ImplementationsDeleteInput { + Type1Interface1: [Type1Interface1DeleteInput!] + Type2Interface1: [Type2Interface1DeleteInput!] + } + + input Interface1ImplementationsDisconnectInput { + Type1Interface1: [Type1Interface1DisconnectInput!] + Type2Interface1: [Type2Interface1DisconnectInput!] + } + + input Interface1ImplementationsUpdateInput { + Type1Interface1: Type1Interface1UpdateInput + Type2Interface1: Type2Interface1UpdateInput + } + + input Interface1ImplementationsWhere { + Type1Interface1: Type1Interface1Where + Type2Interface1: Type2Interface1Where + } + + input Interface1Interface2ConnectFieldInput { + where: Interface2ConnectWhere + } + + type Interface1Interface2Connection { + edges: [Interface1Interface2Relationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input Interface1Interface2ConnectionSort { + node: Interface2Sort + } + + input Interface1Interface2ConnectionWhere { + AND: [Interface1Interface2ConnectionWhere!] + NOT: Interface1Interface2ConnectionWhere + OR: [Interface1Interface2ConnectionWhere!] + node: Interface2Where + node_NOT: Interface2Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input Interface1Interface2CreateFieldInput { + node: Interface2CreateInput! + } + + input Interface1Interface2DeleteFieldInput { + where: Interface1Interface2ConnectionWhere + } + + input Interface1Interface2DisconnectFieldInput { + where: Interface1Interface2ConnectionWhere + } + + input Interface1Interface2FieldInput { + connect: [Interface1Interface2ConnectFieldInput!] + create: [Interface1Interface2CreateFieldInput!] + } + + type Interface1Interface2Relationship { + cursor: String! + node: Interface2! + } + + input Interface1Interface2UpdateConnectionInput { + node: Interface2UpdateInput + } + + input Interface1Interface2UpdateFieldInput { + connect: [Interface1Interface2ConnectFieldInput!] + create: [Interface1Interface2CreateFieldInput!] + delete: [Interface1Interface2DeleteFieldInput!] + disconnect: [Interface1Interface2DisconnectFieldInput!] + update: Interface1Interface2UpdateConnectionInput + where: Interface1Interface2ConnectionWhere + } + + input Interface1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Interface1Sort objects to sort Interface1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Interface1Sort] + } + + \\"\\"\\" + Fields to sort Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface1Sort object. + \\"\\"\\" + input Interface1Sort { + field1: SortDirection + } + + input Interface1UpdateInput { + _on: Interface1ImplementationsUpdateInput + field1: String + interface2: [Interface1Interface2UpdateFieldInput!] + } + + input Interface1Where { + _on: Interface1ImplementationsWhere + field1: String + field1_CONTAINS: String + field1_ENDS_WITH: String + field1_IN: [String!] + field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_STARTS_WITH: String + interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") + \\"\\"\\" + Return Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_ALL: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") + \\"\\"\\" + Return Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SOME: Interface1Interface2ConnectionWhere + } + + interface Interface2 { + field2: String + } + + input Interface2ConnectWhere { + node: Interface2Where! + } + + input Interface2CreateInput { + Type1Interface2: Type1Interface2CreateInput + Type2Interface2: Type2Interface2CreateInput + } + + input Interface2ImplementationsUpdateInput { + Type1Interface2: Type1Interface2UpdateInput + Type2Interface2: Type2Interface2UpdateInput + } + + input Interface2ImplementationsWhere { + Type1Interface2: Type1Interface2Where + Type2Interface2: Type2Interface2Where + } + + input Interface2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Interface2Sort objects to sort Interface2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Interface2Sort] + } + + \\"\\"\\" + Fields to sort Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface2Sort object. + \\"\\"\\" + input Interface2Sort { + field2: SortDirection + } + + input Interface2UpdateInput { + _on: Interface2ImplementationsUpdateInput + field2: String + } + + input Interface2Where { + _on: Interface2ImplementationsWhere + field2: String + field2_CONTAINS: String + field2_ENDS_WITH: String + field2_IN: [String] + field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_STARTS_WITH: String + } + + type Mutation { + createType1Interface1s(input: [Type1Interface1CreateInput!]!): CreateType1Interface1sMutationResponse! + createType1Interface2s(input: [Type1Interface2CreateInput!]!): CreateType1Interface2sMutationResponse! + createType1s(input: [Type1CreateInput!]!): CreateType1sMutationResponse! + createType2Interface1s(input: [Type2Interface1CreateInput!]!): CreateType2Interface1sMutationResponse! + createType2Interface2s(input: [Type2Interface2CreateInput!]!): CreateType2Interface2sMutationResponse! + deleteType1Interface1s(delete: Type1Interface1DeleteInput, where: Type1Interface1Where): DeleteInfo! + deleteType1Interface2s(where: Type1Interface2Where): DeleteInfo! + deleteType1s(delete: Type1DeleteInput, where: Type1Where): DeleteInfo! + deleteType2Interface1s(delete: Type2Interface1DeleteInput, where: Type2Interface1Where): DeleteInfo! + deleteType2Interface2s(where: Type2Interface2Where): DeleteInfo! + updateType1Interface1s(connect: Type1Interface1ConnectInput, create: Type1Interface1RelationInput, delete: Type1Interface1DeleteInput, disconnect: Type1Interface1DisconnectInput, update: Type1Interface1UpdateInput, where: Type1Interface1Where): UpdateType1Interface1sMutationResponse! + updateType1Interface2s(update: Type1Interface2UpdateInput, where: Type1Interface2Where): UpdateType1Interface2sMutationResponse! + updateType1s(connect: Type1ConnectInput, create: Type1RelationInput, delete: Type1DeleteInput, disconnect: Type1DisconnectInput, update: Type1UpdateInput, where: Type1Where): UpdateType1sMutationResponse! + updateType2Interface1s(connect: Type2Interface1ConnectInput, create: Type2Interface1RelationInput, delete: Type2Interface1DeleteInput, disconnect: Type2Interface1DisconnectInput, update: Type2Interface1UpdateInput, where: Type2Interface1Where): UpdateType2Interface1sMutationResponse! + updateType2Interface2s(update: Type2Interface2UpdateInput, where: Type2Interface2Where): UpdateType2Interface2sMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + type1Interface1s(options: Type1Interface1Options, where: Type1Interface1Where): [Type1Interface1!]! + type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! + type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort], where: Type1Interface1Where): Type1Interface1sConnection! + type1Interface2s(options: Type1Interface2Options, where: Type1Interface2Where): [Type1Interface2!]! + type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! + type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort], where: Type1Interface2Where): Type1Interface2sConnection! + type1s(options: Type1Options, where: Type1Where): [Type1!]! + type1sAggregate(where: Type1Where): Type1AggregateSelection! + type1sConnection(after: String, first: Int, sort: [Type1Sort], where: Type1Where): Type1sConnection! + type2Interface1s(options: Type2Interface1Options, where: Type2Interface1Where): [Type2Interface1!]! + type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! + type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort], where: Type2Interface1Where): Type2Interface1sConnection! + type2Interface2s(options: Type2Interface2Options, where: Type2Interface2Where): [Type2Interface2!]! + type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! + type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort], where: Type2Interface2Where): Type2Interface2sConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type Type1 { + field1: String! + interface1(directed: Boolean = true, options: Interface1Options, where: Interface1Where): [Interface1!]! + interface1Connection(after: String, directed: Boolean = true, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! + } + + type Type1AggregateSelection { + count: Int! + field1: StringAggregateSelectionNonNullable! + } + + input Type1ConnectInput { + interface1: [Type1Interface1ConnectFieldInput!] + } + + input Type1CreateInput { + field1: String! + interface1: Type1Interface1FieldInput + } + + input Type1DeleteInput { + interface1: [Type1Interface1DeleteFieldInput!] + } + + input Type1DisconnectInput { + interface1: [Type1Interface1DisconnectFieldInput!] + } + + type Type1Edge { + cursor: String! + node: Type1! + } + + type Type1Interface1 implements Interface1 { + field1: String! + interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! + interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + } + + type Type1Interface1AggregateSelection { + count: Int! + field1: StringAggregateSelectionNonNullable! + } + + input Type1Interface1ConnectFieldInput { + connect: Interface1ConnectInput + where: Interface1ConnectWhere + } + + input Type1Interface1ConnectInput { + interface2: [Type1Interface1Interface2ConnectFieldInput!] + } + + type Type1Interface1Connection { + edges: [Type1Interface1Relationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input Type1Interface1ConnectionSort { + node: Interface1Sort + } + + input Type1Interface1ConnectionWhere { + AND: [Type1Interface1ConnectionWhere!] + NOT: Type1Interface1ConnectionWhere + OR: [Type1Interface1ConnectionWhere!] + node: Interface1Where + node_NOT: Interface1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input Type1Interface1CreateFieldInput { + node: Interface1CreateInput! + } + + input Type1Interface1CreateInput { + field1: String! + interface2: Interface1Interface2FieldInput + } + + input Type1Interface1DeleteFieldInput { + delete: Interface1DeleteInput + where: Type1Interface1ConnectionWhere + } + + input Type1Interface1DeleteInput { + interface2: [Type1Interface1Interface2DeleteFieldInput!] + } + + input Type1Interface1DisconnectFieldInput { + disconnect: Interface1DisconnectInput + where: Type1Interface1ConnectionWhere + } + + input Type1Interface1DisconnectInput { + interface2: [Type1Interface1Interface2DisconnectFieldInput!] + } + + type Type1Interface1Edge { + cursor: String! + node: Type1Interface1! + } + + input Type1Interface1FieldInput { + connect: [Type1Interface1ConnectFieldInput!] + create: [Type1Interface1CreateFieldInput!] + } + + input Type1Interface1Interface2ConnectFieldInput { + where: Interface2ConnectWhere + } + + input Type1Interface1Interface2CreateFieldInput { + node: Interface2CreateInput! + } + + input Type1Interface1Interface2DeleteFieldInput { + where: Interface1Interface2ConnectionWhere + } + + input Type1Interface1Interface2DisconnectFieldInput { + where: Interface1Interface2ConnectionWhere + } + + input Type1Interface1Interface2UpdateConnectionInput { + node: Interface2UpdateInput + } + + input Type1Interface1Interface2UpdateFieldInput { + connect: [Type1Interface1Interface2ConnectFieldInput!] + create: [Type1Interface1Interface2CreateFieldInput!] + delete: [Type1Interface1Interface2DeleteFieldInput!] + disconnect: [Type1Interface1Interface2DisconnectFieldInput!] + update: Type1Interface1Interface2UpdateConnectionInput + where: Interface1Interface2ConnectionWhere + } + + input Type1Interface1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type1Interface1Sort objects to sort Type1Interface1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type1Interface1Sort!] + } + + input Type1Interface1RelationInput { + interface2: [Type1Interface1Interface2CreateFieldInput!] + } + + type Type1Interface1Relationship { + cursor: String! + node: Interface1! + } + + \\"\\"\\" + Fields to sort Type1Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface1Sort object. + \\"\\"\\" + input Type1Interface1Sort { + field1: SortDirection + } + + input Type1Interface1UpdateConnectionInput { + node: Interface1UpdateInput + } + + input Type1Interface1UpdateFieldInput { + connect: [Type1Interface1ConnectFieldInput!] + create: [Type1Interface1CreateFieldInput!] + delete: [Type1Interface1DeleteFieldInput!] + disconnect: [Type1Interface1DisconnectFieldInput!] + update: Type1Interface1UpdateConnectionInput + where: Type1Interface1ConnectionWhere + } + + input Type1Interface1UpdateInput { + field1: String + interface2: [Type1Interface1Interface2UpdateFieldInput!] + } + + input Type1Interface1Where { + AND: [Type1Interface1Where!] + NOT: Type1Interface1Where + OR: [Type1Interface1Where!] + field1: String + field1_CONTAINS: String + field1_ENDS_WITH: String + field1_IN: [String!] + field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_STARTS_WITH: String + interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") + \\"\\"\\" + Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_ALL: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") + \\"\\"\\" + Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SOME: Interface1Interface2ConnectionWhere + } + + type Type1Interface1sConnection { + edges: [Type1Interface1Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Type1Interface2 implements Interface2 { + field2: String! + } + + type Type1Interface2AggregateSelection { + count: Int! + field2: StringAggregateSelectionNonNullable! + } + + input Type1Interface2CreateInput { + field2: String! + } + + type Type1Interface2Edge { + cursor: String! + node: Type1Interface2! + } + + input Type1Interface2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type1Interface2Sort objects to sort Type1Interface2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type1Interface2Sort!] + } + + \\"\\"\\" + Fields to sort Type1Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface2Sort object. + \\"\\"\\" + input Type1Interface2Sort { + field2: SortDirection + } + + input Type1Interface2UpdateInput { + field2: String + } + + input Type1Interface2Where { + AND: [Type1Interface2Where!] + NOT: Type1Interface2Where + OR: [Type1Interface2Where!] + field2: String + field2_CONTAINS: String + field2_ENDS_WITH: String + field2_IN: [String!] + field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_STARTS_WITH: String + } + + type Type1Interface2sConnection { + edges: [Type1Interface2Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input Type1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type1Sort objects to sort Type1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type1Sort!] + } + + input Type1RelationInput { + interface1: [Type1Interface1CreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Type1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Sort object. + \\"\\"\\" + input Type1Sort { + field1: SortDirection + } + + input Type1UpdateInput { + field1: String + interface1: [Type1Interface1UpdateFieldInput!] + } + + input Type1Where { + AND: [Type1Where!] + NOT: Type1Where + OR: [Type1Where!] + field1: String + field1_CONTAINS: String + field1_ENDS_WITH: String + field1_IN: [String!] + field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_STARTS_WITH: String + interface1Connection: Type1Interface1ConnectionWhere @deprecated(reason: \\"Use \`interface1Connection_SOME\` instead.\\") + \\"\\"\\" + Return Type1s where all of the related Type1Interface1Connections match this filter + \\"\\"\\" + interface1Connection_ALL: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where none of the related Type1Interface1Connections match this filter + \\"\\"\\" + interface1Connection_NONE: Type1Interface1ConnectionWhere + interface1Connection_NOT: Type1Interface1ConnectionWhere @deprecated(reason: \\"Use \`interface1Connection_NONE\` instead.\\") + \\"\\"\\" + Return Type1s where one of the related Type1Interface1Connections match this filter + \\"\\"\\" + interface1Connection_SINGLE: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where some of the related Type1Interface1Connections match this filter + \\"\\"\\" + interface1Connection_SOME: Type1Interface1ConnectionWhere + } + + type Type1sConnection { + edges: [Type1Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Type2Interface1 implements Interface1 { + field1: String! + interface2(directed: Boolean = true, options: Interface2Options, where: Interface2Where): [Interface2!]! + interface2Connection(after: String, directed: Boolean = true, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + } + + type Type2Interface1AggregateSelection { + count: Int! + field1: StringAggregateSelectionNonNullable! + } + + input Type2Interface1ConnectInput { + interface2: [Type2Interface1Interface2ConnectFieldInput!] + } + + input Type2Interface1CreateInput { + field1: String! + interface2: Interface1Interface2FieldInput + } + + input Type2Interface1DeleteInput { + interface2: [Type2Interface1Interface2DeleteFieldInput!] + } + + input Type2Interface1DisconnectInput { + interface2: [Type2Interface1Interface2DisconnectFieldInput!] + } + + type Type2Interface1Edge { + cursor: String! + node: Type2Interface1! + } + + input Type2Interface1Interface2ConnectFieldInput { + where: Interface2ConnectWhere + } + + input Type2Interface1Interface2CreateFieldInput { + node: Interface2CreateInput! + } + + input Type2Interface1Interface2DeleteFieldInput { + where: Interface1Interface2ConnectionWhere + } + + input Type2Interface1Interface2DisconnectFieldInput { + where: Interface1Interface2ConnectionWhere + } + + input Type2Interface1Interface2UpdateConnectionInput { + node: Interface2UpdateInput + } + + input Type2Interface1Interface2UpdateFieldInput { + connect: [Type2Interface1Interface2ConnectFieldInput!] + create: [Type2Interface1Interface2CreateFieldInput!] + delete: [Type2Interface1Interface2DeleteFieldInput!] + disconnect: [Type2Interface1Interface2DisconnectFieldInput!] + update: Type2Interface1Interface2UpdateConnectionInput + where: Interface1Interface2ConnectionWhere + } + + input Type2Interface1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type2Interface1Sort objects to sort Type2Interface1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type2Interface1Sort!] + } + + input Type2Interface1RelationInput { + interface2: [Type2Interface1Interface2CreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Type2Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type2Interface1Sort object. + \\"\\"\\" + input Type2Interface1Sort { + field1: SortDirection + } + + input Type2Interface1UpdateInput { + field1: String + interface2: [Type2Interface1Interface2UpdateFieldInput!] + } + + input Type2Interface1Where { + AND: [Type2Interface1Where!] + NOT: Type2Interface1Where + OR: [Type2Interface1Where!] + field1: String + field1_CONTAINS: String + field1_ENDS_WITH: String + field1_IN: [String!] + field1_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field1_STARTS_WITH: String + interface2Connection: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_SOME\` instead.\\") + \\"\\"\\" + Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_ALL: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NOT: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Use \`interface2Connection_NONE\` instead.\\") + \\"\\"\\" + Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + interface2Connection_SOME: Interface1Interface2ConnectionWhere + } + + type Type2Interface1sConnection { + edges: [Type2Interface1Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Type2Interface2 implements Interface2 { + field2: String! + } + + type Type2Interface2AggregateSelection { + count: Int! + field2: StringAggregateSelectionNonNullable! + } + + input Type2Interface2CreateInput { + field2: String! + } + + type Type2Interface2Edge { + cursor: String! + node: Type2Interface2! + } + + input Type2Interface2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Type2Interface2Sort objects to sort Type2Interface2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Type2Interface2Sort!] + } + + \\"\\"\\" + Fields to sort Type2Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type2Interface2Sort object. + \\"\\"\\" + input Type2Interface2Sort { + field2: SortDirection + } + + input Type2Interface2UpdateInput { + field2: String + } + + input Type2Interface2Where { + AND: [Type2Interface2Where!] + NOT: Type2Interface2Where + OR: [Type2Interface2Where!] + field2: String + field2_CONTAINS: String + field2_ENDS_WITH: String + field2_IN: [String!] + field2_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + field2_STARTS_WITH: String + } + + type Type2Interface2sConnection { + edges: [Type2Interface2Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateType1Interface1sMutationResponse { + info: UpdateInfo! + type1Interface1s: [Type1Interface1!]! + } + + type UpdateType1Interface2sMutationResponse { + info: UpdateInfo! + type1Interface2s: [Type1Interface2!]! + } + + type UpdateType1sMutationResponse { + info: UpdateInfo! + type1s: [Type1!]! + } + + type UpdateType2Interface1sMutationResponse { + info: UpdateInfo! + type2Interface1s: [Type2Interface1!]! + } + + type UpdateType2Interface2sMutationResponse { + info: UpdateInfo! + type2Interface2s: [Type2Interface2!]! + }" + `); + + // expect(() => { + // // eslint-disable-next-line @typescript-eslint/no-unused-vars + // const neoSchema = new Neo4jGraphQL({ typeDefs }); + // }).toThrowError("Nested interface relationship fields are not supported: Interface1.interface2"); + }); + + test("Interface Relationships - nested relationships", async () => { + const typeDefs = gql` + interface Content { + id: ID + content: String + creator: User! @relationship(type: "HAS_CONTENT", direction: IN) + } + + type Comment implements Content { + id: ID + content: String + creator: User! + post: Post! @relationship(type: "HAS_COMMENT", direction: IN) + } + + type Post implements Content { + id: ID + content: String + creator: User! + comments: [Comment!]! @relationship(type: "HAS_COMMENT", direction: OUT) + } + + type User { + id: ID + name: String + content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) + } + `; + + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type Comment implements Content { + content: String + creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + creatorAggregate(directed: Boolean = true, where: UserWhere): CommentUserCreatorAggregationSelection + creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + id: ID + post(directed: Boolean = true, options: PostOptions, where: PostWhere): Post! + postAggregate(directed: Boolean = true, where: PostWhere): CommentPostPostAggregationSelection + postConnection(after: String, directed: Boolean = true, first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! + } + + type CommentAggregateSelection { + content: StringAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input CommentConnectInput { + creator: ContentCreatorConnectFieldInput + post: CommentPostConnectFieldInput + } + + input CommentConnectWhere { + node: CommentWhere! + } + + input CommentCreateInput { + content: String + creator: ContentCreatorFieldInput + id: ID + post: CommentPostFieldInput + } + + input CommentCreatorAggregateInput { + AND: [CommentCreatorAggregateInput!] + NOT: CommentCreatorAggregateInput + OR: [CommentCreatorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: CommentCreatorNodeAggregationWhereInput + } + + input CommentCreatorNodeAggregationWhereInput { + AND: [CommentCreatorNodeAggregationWhereInput!] + NOT: CommentCreatorNodeAggregationWhereInput + OR: [CommentCreatorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input CommentDeleteInput { + creator: ContentCreatorDeleteFieldInput + post: CommentPostDeleteFieldInput + } + + input CommentDisconnectInput { + creator: ContentCreatorDisconnectFieldInput + post: CommentPostDisconnectFieldInput + } + + type CommentEdge { + cursor: String! + node: Comment! + } + + input CommentOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more CommentSort objects to sort Comments by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [CommentSort!] + } + + input CommentPostAggregateInput { + AND: [CommentPostAggregateInput!] + NOT: CommentPostAggregateInput + OR: [CommentPostAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: CommentPostNodeAggregationWhereInput + } + + input CommentPostConnectFieldInput { + connect: PostConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere + } + + type CommentPostConnection { + edges: [CommentPostRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input CommentPostConnectionSort { + node: PostSort + } + + input CommentPostConnectionWhere { + AND: [CommentPostConnectionWhere!] + NOT: CommentPostConnectionWhere + OR: [CommentPostConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input CommentPostCreateFieldInput { + node: PostCreateInput! + } + + input CommentPostDeleteFieldInput { + delete: PostDeleteInput + where: CommentPostConnectionWhere + } + + input CommentPostDisconnectFieldInput { + disconnect: PostDisconnectInput + where: CommentPostConnectionWhere + } + + input CommentPostFieldInput { + connect: CommentPostConnectFieldInput + create: CommentPostCreateFieldInput + } + + input CommentPostNodeAggregationWhereInput { + AND: [CommentPostNodeAggregationWhereInput!] + NOT: CommentPostNodeAggregationWhereInput + OR: [CommentPostNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type CommentPostPostAggregationSelection { + count: Int! + node: CommentPostPostNodeAggregateSelection + } + + type CommentPostPostNodeAggregateSelection { + content: StringAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + type CommentPostRelationship { + cursor: String! + node: Post! + } + + input CommentPostUpdateConnectionInput { + node: PostUpdateInput + } + + input CommentPostUpdateFieldInput { + connect: CommentPostConnectFieldInput + create: CommentPostCreateFieldInput + delete: CommentPostDeleteFieldInput + disconnect: CommentPostDisconnectFieldInput + update: CommentPostUpdateConnectionInput + where: CommentPostConnectionWhere + } + + input CommentRelationInput { + creator: ContentCreatorCreateFieldInput + post: CommentPostCreateFieldInput + } + + \\"\\"\\" + Fields to sort Comments by. The order in which sorts are applied is not guaranteed when specifying many fields in one CommentSort object. + \\"\\"\\" + input CommentSort { + content: SortDirection + id: SortDirection + } + + input CommentUpdateInput { + content: String + creator: ContentCreatorUpdateFieldInput + id: ID + post: CommentPostUpdateFieldInput + } + + type CommentUserCreatorAggregationSelection { + count: Int! + node: CommentUserCreatorNodeAggregateSelection + } + + type CommentUserCreatorNodeAggregateSelection { + id: IDAggregateSelectionNullable! + name: StringAggregateSelectionNullable! + } + + input CommentWhere { + AND: [CommentWhere!] + NOT: CommentWhere + OR: [CommentWhere!] + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + creator: UserWhere + creatorAggregate: CommentCreatorAggregateInput + creatorConnection: ContentCreatorConnectionWhere + creatorConnection_NOT: ContentCreatorConnectionWhere + creator_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + post: PostWhere + postAggregate: CommentPostAggregateInput + postConnection: CommentPostConnectionWhere + postConnection_NOT: CommentPostConnectionWhere + post_NOT: PostWhere + } + + type CommentsConnection { + edges: [CommentEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + interface Content { + content: String + creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + id: ID + } + + input ContentConnectInput { + _on: ContentImplementationsConnectInput + creator: ContentCreatorConnectFieldInput + } + + input ContentConnectWhere { + node: ContentWhere! + } + + input ContentCreateInput { + Comment: CommentCreateInput + Post: PostCreateInput + } + + input ContentCreatorAggregateInput { + AND: [ContentCreatorAggregateInput!] + NOT: ContentCreatorAggregateInput + OR: [ContentCreatorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ContentCreatorNodeAggregationWhereInput + } + + input ContentCreatorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type ContentCreatorConnection { + edges: [ContentCreatorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ContentCreatorConnectionSort { + node: UserSort + } + + input ContentCreatorConnectionWhere { + AND: [ContentCreatorConnectionWhere!] + NOT: ContentCreatorConnectionWhere + OR: [ContentCreatorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ContentCreatorCreateFieldInput { + node: UserCreateInput! + } + + input ContentCreatorDeleteFieldInput { + delete: UserDeleteInput + where: ContentCreatorConnectionWhere + } + + input ContentCreatorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: ContentCreatorConnectionWhere + } + + input ContentCreatorFieldInput { + connect: ContentCreatorConnectFieldInput + create: ContentCreatorCreateFieldInput + } + + input ContentCreatorNodeAggregationWhereInput { + AND: [ContentCreatorNodeAggregationWhereInput!] + NOT: ContentCreatorNodeAggregationWhereInput + OR: [ContentCreatorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ContentCreatorRelationship { + cursor: String! + node: User! + } + + input ContentCreatorUpdateConnectionInput { + node: UserUpdateInput + } + + input ContentCreatorUpdateFieldInput { + connect: ContentCreatorConnectFieldInput + create: ContentCreatorCreateFieldInput + delete: ContentCreatorDeleteFieldInput + disconnect: ContentCreatorDisconnectFieldInput + update: ContentCreatorUpdateConnectionInput + where: ContentCreatorConnectionWhere + } + + input ContentDeleteInput { + _on: ContentImplementationsDeleteInput + creator: ContentCreatorDeleteFieldInput + } + + input ContentDisconnectInput { + _on: ContentImplementationsDisconnectInput + creator: ContentCreatorDisconnectFieldInput + } + + input ContentImplementationsConnectInput { + Comment: [CommentConnectInput!] + Post: [PostConnectInput!] + } + + input ContentImplementationsDeleteInput { + Comment: [CommentDeleteInput!] + Post: [PostDeleteInput!] + } + + input ContentImplementationsDisconnectInput { + Comment: [CommentDisconnectInput!] + Post: [PostDisconnectInput!] + } + + input ContentImplementationsUpdateInput { + Comment: CommentUpdateInput + Post: PostUpdateInput + } + + input ContentImplementationsWhere { + Comment: CommentWhere + Post: PostWhere + } + + input ContentOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ContentSort objects to sort Contents by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ContentSort] + } + + \\"\\"\\" + Fields to sort Contents by. The order in which sorts are applied is not guaranteed when specifying many fields in one ContentSort object. + \\"\\"\\" + input ContentSort { + content: SortDirection + id: SortDirection + } + + input ContentUpdateInput { + _on: ContentImplementationsUpdateInput + content: String + creator: ContentCreatorUpdateFieldInput + id: ID + } + + input ContentWhere { + _on: ContentImplementationsWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + creator: UserWhere + creatorAggregate: ContentCreatorAggregateInput + creatorConnection: ContentCreatorConnectionWhere + creatorConnection_NOT: ContentCreatorConnectionWhere + creator_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type CreateCommentsMutationResponse { + comments: [Comment!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Mutation { + createComments(input: [CommentCreateInput!]!): CreateCommentsMutationResponse! + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteComments(delete: CommentDeleteInput, where: CommentWhere): DeleteInfo! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateComments(connect: CommentConnectInput, create: CommentRelationInput, delete: CommentDeleteInput, disconnect: CommentDisconnectInput, update: CommentUpdateInput, where: CommentWhere): UpdateCommentsMutationResponse! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post implements Content { + comments(directed: Boolean = true, options: CommentOptions, where: CommentWhere): [Comment!]! + commentsAggregate(directed: Boolean = true, where: CommentWhere): PostCommentCommentsAggregationSelection + commentsConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! + content: String + creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection + creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + id: ID + } + + type PostAggregateSelection { + content: StringAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + type PostCommentCommentsAggregationSelection { + count: Int! + node: PostCommentCommentsNodeAggregateSelection + } + + type PostCommentCommentsNodeAggregateSelection { + content: StringAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input PostCommentsAggregateInput { + AND: [PostCommentsAggregateInput!] + NOT: PostCommentsAggregateInput + OR: [PostCommentsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostCommentsNodeAggregationWhereInput + } + + input PostCommentsConnectFieldInput { + connect: [CommentConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: CommentConnectWhere + } + + type PostCommentsConnection { + edges: [PostCommentsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostCommentsConnectionSort { + node: CommentSort + } + + input PostCommentsConnectionWhere { + AND: [PostCommentsConnectionWhere!] + NOT: PostCommentsConnectionWhere + OR: [PostCommentsConnectionWhere!] + node: CommentWhere + node_NOT: CommentWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PostCommentsCreateFieldInput { + node: CommentCreateInput! + } + + input PostCommentsDeleteFieldInput { + delete: CommentDeleteInput + where: PostCommentsConnectionWhere + } + + input PostCommentsDisconnectFieldInput { + disconnect: CommentDisconnectInput + where: PostCommentsConnectionWhere + } + + input PostCommentsFieldInput { + connect: [PostCommentsConnectFieldInput!] + create: [PostCommentsCreateFieldInput!] + } + + input PostCommentsNodeAggregationWhereInput { + AND: [PostCommentsNodeAggregationWhereInput!] + NOT: PostCommentsNodeAggregationWhereInput + OR: [PostCommentsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + type PostCommentsRelationship { + cursor: String! + node: Comment! + } + + input PostCommentsUpdateConnectionInput { + node: CommentUpdateInput + } + + input PostCommentsUpdateFieldInput { + connect: [PostCommentsConnectFieldInput!] + create: [PostCommentsCreateFieldInput!] + delete: [PostCommentsDeleteFieldInput!] + disconnect: [PostCommentsDisconnectFieldInput!] + update: PostCommentsUpdateConnectionInput + where: PostCommentsConnectionWhere + } + + input PostConnectInput { + comments: [PostCommentsConnectFieldInput!] + creator: ContentCreatorConnectFieldInput + } + + input PostConnectWhere { + node: PostWhere! + } + + input PostCreateInput { + comments: PostCommentsFieldInput + content: String + creator: ContentCreatorFieldInput + id: ID + } + + input PostCreatorAggregateInput { + AND: [PostCreatorAggregateInput!] + NOT: PostCreatorAggregateInput + OR: [PostCreatorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostCreatorNodeAggregationWhereInput + } + + input PostCreatorNodeAggregationWhereInput { + AND: [PostCreatorNodeAggregationWhereInput!] + NOT: PostCreatorNodeAggregationWhereInput + OR: [PostCreatorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input PostDeleteInput { + comments: [PostCommentsDeleteFieldInput!] + creator: ContentCreatorDeleteFieldInput + } + + input PostDisconnectInput { + comments: [PostCommentsDisconnectFieldInput!] + creator: ContentCreatorDisconnectFieldInput + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + input PostRelationInput { + comments: [PostCommentsCreateFieldInput!] + creator: ContentCreatorCreateFieldInput + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + content: SortDirection + id: SortDirection + } + + input PostUpdateInput { + comments: [PostCommentsUpdateFieldInput!] + content: String + creator: ContentCreatorUpdateFieldInput + id: ID + } + + type PostUserCreatorAggregationSelection { + count: Int! + node: PostUserCreatorNodeAggregateSelection + } + + type PostUserCreatorNodeAggregateSelection { + id: IDAggregateSelectionNullable! + name: StringAggregateSelectionNullable! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + comments: CommentWhere @deprecated(reason: \\"Use \`comments_SOME\` instead.\\") + commentsAggregate: PostCommentsAggregateInput + commentsConnection: PostCommentsConnectionWhere @deprecated(reason: \\"Use \`commentsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Posts where all of the related PostCommentsConnections match this filter + \\"\\"\\" + commentsConnection_ALL: PostCommentsConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostCommentsConnections match this filter + \\"\\"\\" + commentsConnection_NONE: PostCommentsConnectionWhere + commentsConnection_NOT: PostCommentsConnectionWhere @deprecated(reason: \\"Use \`commentsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Posts where one of the related PostCommentsConnections match this filter + \\"\\"\\" + commentsConnection_SINGLE: PostCommentsConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostCommentsConnections match this filter + \\"\\"\\" + commentsConnection_SOME: PostCommentsConnectionWhere + \\"\\"\\"Return Posts where all of the related Comments match this filter\\"\\"\\" + comments_ALL: CommentWhere + \\"\\"\\"Return Posts where none of the related Comments match this filter\\"\\"\\" + comments_NONE: CommentWhere + comments_NOT: CommentWhere @deprecated(reason: \\"Use \`comments_NONE\` instead.\\") + \\"\\"\\"Return Posts where one of the related Comments match this filter\\"\\"\\" + comments_SINGLE: CommentWhere + \\"\\"\\"Return Posts where some of the related Comments match this filter\\"\\"\\" + comments_SOME: CommentWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + creator: UserWhere + creatorAggregate: PostCreatorAggregateInput + creatorConnection: ContentCreatorConnectionWhere + creatorConnection_NOT: ContentCreatorConnectionWhere + creator_NOT: UserWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + comments(options: CommentOptions, where: CommentWhere): [Comment!]! + commentsAggregate(where: CommentWhere): CommentAggregateSelection! + commentsConnection(after: String, first: Int, sort: [CommentSort], where: CommentWhere): CommentsConnection! + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateCommentsMutationResponse { + comments: [Comment!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + content(directed: Boolean = true, options: ContentOptions, where: ContentWhere): [Content!]! + contentConnection(after: String, directed: Boolean = true, first: Int, sort: [UserContentConnectionSort!], where: UserContentConnectionWhere): UserContentConnection! + id: ID + name: String + } + + type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + name: StringAggregateSelectionNullable! + } + + input UserConnectInput { + content: [UserContentConnectFieldInput!] + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserContentConnectFieldInput { + connect: ContentConnectInput + where: ContentConnectWhere + } + + type UserContentConnection { + edges: [UserContentRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserContentConnectionSort { + node: ContentSort + } + + input UserContentConnectionWhere { + AND: [UserContentConnectionWhere!] + NOT: UserContentConnectionWhere + OR: [UserContentConnectionWhere!] + node: ContentWhere + node_NOT: ContentWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserContentCreateFieldInput { + node: ContentCreateInput! + } + + input UserContentDeleteFieldInput { + delete: ContentDeleteInput + where: UserContentConnectionWhere + } + + input UserContentDisconnectFieldInput { + disconnect: ContentDisconnectInput + where: UserContentConnectionWhere + } + + input UserContentFieldInput { + connect: [UserContentConnectFieldInput!] + create: [UserContentCreateFieldInput!] + } + + type UserContentRelationship { + cursor: String! + node: Content! + } + + input UserContentUpdateConnectionInput { + node: ContentUpdateInput + } + + input UserContentUpdateFieldInput { + connect: [UserContentConnectFieldInput!] + create: [UserContentCreateFieldInput!] + delete: [UserContentDeleteFieldInput!] + disconnect: [UserContentDisconnectFieldInput!] + update: UserContentUpdateConnectionInput + where: UserContentConnectionWhere + } + + input UserCreateInput { + content: UserContentFieldInput + id: ID + name: String + } + + input UserDeleteInput { + content: [UserContentDeleteFieldInput!] + } + + input UserDisconnectInput { + content: [UserContentDisconnectFieldInput!] + } + + type UserEdge { + cursor: String! + node: User! + } + + 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!] + } + + input UserRelationInput { + content: [UserContentCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: SortDirection + name: SortDirection + } + + input UserUpdateInput { + content: [UserContentUpdateFieldInput!] + id: ID + name: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + contentConnection: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_ALL: UserContentConnectionWhere + \\"\\"\\" + Return Users where none of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_NONE: UserContentConnectionWhere + contentConnection_NOT: UserContentConnectionWhere @deprecated(reason: \\"Use \`contentConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_SINGLE: UserContentConnectionWhere + \\"\\"\\" + Return Users where some of the related UserContentConnections match this filter + \\"\\"\\" + contentConnection_SOME: UserContentConnectionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 02132cabec..0d478d94d4 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -56,292 +56,292 @@ describe("Interfaces", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie implements MovieNode { - customQuery: [Movie] - id: ID - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! - nodes: [MovieNode] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - movies: [MovieNodeMoviesConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - id: ID - movies: MovieNodeMoviesFieldInput -} - -input MovieDeleteInput { - movies: [MovieNodeMoviesDeleteFieldInput!] -} - -input MovieDisconnectInput { - movies: [MovieNodeMoviesDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieMovieMoviesAggregationSelection { - count: Int! - node: MovieMovieMoviesNodeAggregateSelection -} - -type MovieMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNullable! -} - -input MovieMoviesAggregateInput { - AND: [MovieMoviesAggregateInput!] - NOT: MovieMoviesAggregateInput - OR: [MovieMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieMoviesNodeAggregationWhereInput -} - -input MovieMoviesNodeAggregationWhereInput { - AND: [MovieMoviesNodeAggregationWhereInput!] - NOT: MovieMoviesNodeAggregationWhereInput - OR: [MovieMoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -interface MovieNode { - customQuery: [Movie] - id: ID - movies: [Movie!]! - moviesConnection: MovieNodeMoviesConnection! -} - -input MovieNodeMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type MovieNodeMoviesConnection { - edges: [MovieNodeMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieNodeMoviesConnectionSort { - node: MovieSort -} - -input MovieNodeMoviesConnectionWhere { - AND: [MovieNodeMoviesConnectionWhere!] - NOT: MovieNodeMoviesConnectionWhere - OR: [MovieNodeMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieNodeMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input MovieNodeMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: MovieNodeMoviesConnectionWhere -} - -input MovieNodeMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieNodeMoviesConnectionWhere -} - -input MovieNodeMoviesFieldInput { - connect: [MovieNodeMoviesConnectFieldInput!] - create: [MovieNodeMoviesCreateFieldInput!] -} - -type MovieNodeMoviesRelationship { - cursor: String! - node: Movie! -} - -input MovieNodeMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input MovieNodeMoviesUpdateFieldInput { - connect: [MovieNodeMoviesConnectFieldInput!] - create: [MovieNodeMoviesCreateFieldInput!] - delete: [MovieNodeMoviesDeleteFieldInput!] - disconnect: [MovieNodeMoviesDisconnectFieldInput!] - update: MovieNodeMoviesUpdateConnectionInput - where: MovieNodeMoviesConnectionWhere -} - -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!] -} - -input MovieRelationInput { - movies: [MovieNodeMoviesCreateFieldInput!] -} - -\\"\\"\\" -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 { - id: ID - movies: [MovieNodeMoviesUpdateFieldInput!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: MovieMoviesAggregateInput - moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: MovieNodeMoviesConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: MovieNodeMoviesConnectionWhere - moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: MovieNodeMoviesConnectionWhere - \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie implements MovieNode { + customQuery: [Movie] + id: ID + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! + nodes: [MovieNode] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + movies: [MovieNodeMoviesConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + id: ID + movies: MovieNodeMoviesFieldInput + } + + input MovieDeleteInput { + movies: [MovieNodeMoviesDeleteFieldInput!] + } + + input MovieDisconnectInput { + movies: [MovieNodeMoviesDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieMovieMoviesAggregationSelection { + count: Int! + node: MovieMovieMoviesNodeAggregateSelection + } + + type MovieMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNullable! + } + + input MovieMoviesAggregateInput { + AND: [MovieMoviesAggregateInput!] + NOT: MovieMoviesAggregateInput + OR: [MovieMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieMoviesNodeAggregationWhereInput + } + + input MovieMoviesNodeAggregationWhereInput { + AND: [MovieMoviesNodeAggregationWhereInput!] + NOT: MovieMoviesNodeAggregationWhereInput + OR: [MovieMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + interface MovieNode { + customQuery: [Movie] + id: ID + movies: [Movie!]! + moviesConnection: MovieNodeMoviesConnection! + } + + input MovieNodeMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type MovieNodeMoviesConnection { + edges: [MovieNodeMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieNodeMoviesConnectionSort { + node: MovieSort + } + + input MovieNodeMoviesConnectionWhere { + AND: [MovieNodeMoviesConnectionWhere!] + NOT: MovieNodeMoviesConnectionWhere + OR: [MovieNodeMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieNodeMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input MovieNodeMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: MovieNodeMoviesConnectionWhere + } + + input MovieNodeMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieNodeMoviesConnectionWhere + } + + input MovieNodeMoviesFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] + } + + type MovieNodeMoviesRelationship { + cursor: String! + node: Movie! + } + + input MovieNodeMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input MovieNodeMoviesUpdateFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] + delete: [MovieNodeMoviesDeleteFieldInput!] + disconnect: [MovieNodeMoviesDisconnectFieldInput!] + update: MovieNodeMoviesUpdateConnectionInput + where: MovieNodeMoviesConnectionWhere + } + + 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!] + } + + input MovieRelationInput { + movies: [MovieNodeMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: ID + movies: [MovieNodeMoviesUpdateFieldInput!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: MovieNodeMoviesConnectionWhere + \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Interface with directive", async () => { const typeDefs = gql` @@ -378,293 +378,293 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -directive @something(something: String) on INTERFACE - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie implements MovieNode { - customQuery: [Movie] - id: ID - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! - nodes: [MovieNode] -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - movies: [MovieNodeMoviesConnectFieldInput!] -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - id: ID - movies: MovieNodeMoviesFieldInput -} - -input MovieDeleteInput { - movies: [MovieNodeMoviesDeleteFieldInput!] -} - -input MovieDisconnectInput { - movies: [MovieNodeMoviesDisconnectFieldInput!] -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieMovieMoviesAggregationSelection { - count: Int! - node: MovieMovieMoviesNodeAggregateSelection -} - -type MovieMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNullable! -} - -input MovieMoviesAggregateInput { - AND: [MovieMoviesAggregateInput!] - NOT: MovieMoviesAggregateInput - OR: [MovieMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieMoviesNodeAggregationWhereInput -} - -input MovieMoviesNodeAggregationWhereInput { - AND: [MovieMoviesNodeAggregationWhereInput!] - NOT: MovieMoviesNodeAggregationWhereInput - OR: [MovieMoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -interface MovieNode @something(something: \\"test\\") { - customQuery: [Movie] - id: ID - movies: [Movie!]! - moviesConnection: MovieNodeMoviesConnection! -} - -input MovieNodeMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type MovieNodeMoviesConnection { - edges: [MovieNodeMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieNodeMoviesConnectionSort { - node: MovieSort -} - -input MovieNodeMoviesConnectionWhere { - AND: [MovieNodeMoviesConnectionWhere!] - NOT: MovieNodeMoviesConnectionWhere - OR: [MovieNodeMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieNodeMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input MovieNodeMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: MovieNodeMoviesConnectionWhere -} - -input MovieNodeMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieNodeMoviesConnectionWhere -} - -input MovieNodeMoviesFieldInput { - connect: [MovieNodeMoviesConnectFieldInput!] - create: [MovieNodeMoviesCreateFieldInput!] -} - -type MovieNodeMoviesRelationship { - cursor: String! - node: Movie! -} - -input MovieNodeMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input MovieNodeMoviesUpdateFieldInput { - connect: [MovieNodeMoviesConnectFieldInput!] - create: [MovieNodeMoviesCreateFieldInput!] - delete: [MovieNodeMoviesDeleteFieldInput!] - disconnect: [MovieNodeMoviesDisconnectFieldInput!] - update: MovieNodeMoviesUpdateConnectionInput - where: MovieNodeMoviesConnectionWhere -} - -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!] -} - -input MovieRelationInput { - movies: [MovieNodeMoviesCreateFieldInput!] -} - -\\"\\"\\" -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 { - id: ID - movies: [MovieNodeMoviesUpdateFieldInput!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: MovieMoviesAggregateInput - moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: MovieNodeMoviesConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: MovieNodeMoviesConnectionWhere - moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieNodeMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: MovieNodeMoviesConnectionWhere - \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + directive @something(something: String) on INTERFACE + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie implements MovieNode { + customQuery: [Movie] + id: ID + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): MovieMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! + nodes: [MovieNode] + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + movies: [MovieNodeMoviesConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + id: ID + movies: MovieNodeMoviesFieldInput + } + + input MovieDeleteInput { + movies: [MovieNodeMoviesDeleteFieldInput!] + } + + input MovieDisconnectInput { + movies: [MovieNodeMoviesDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieMovieMoviesAggregationSelection { + count: Int! + node: MovieMovieMoviesNodeAggregateSelection + } + + type MovieMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNullable! + } + + input MovieMoviesAggregateInput { + AND: [MovieMoviesAggregateInput!] + NOT: MovieMoviesAggregateInput + OR: [MovieMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieMoviesNodeAggregationWhereInput + } + + input MovieMoviesNodeAggregationWhereInput { + AND: [MovieMoviesNodeAggregationWhereInput!] + NOT: MovieMoviesNodeAggregationWhereInput + OR: [MovieMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + interface MovieNode @something(something: \\"test\\") { + customQuery: [Movie] + id: ID + movies: [Movie!]! + moviesConnection: MovieNodeMoviesConnection! + } + + input MovieNodeMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type MovieNodeMoviesConnection { + edges: [MovieNodeMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieNodeMoviesConnectionSort { + node: MovieSort + } + + input MovieNodeMoviesConnectionWhere { + AND: [MovieNodeMoviesConnectionWhere!] + NOT: MovieNodeMoviesConnectionWhere + OR: [MovieNodeMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieNodeMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input MovieNodeMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: MovieNodeMoviesConnectionWhere + } + + input MovieNodeMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieNodeMoviesConnectionWhere + } + + input MovieNodeMoviesFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] + } + + type MovieNodeMoviesRelationship { + cursor: String! + node: Movie! + } + + input MovieNodeMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input MovieNodeMoviesUpdateFieldInput { + connect: [MovieNodeMoviesConnectFieldInput!] + create: [MovieNodeMoviesCreateFieldInput!] + delete: [MovieNodeMoviesDeleteFieldInput!] + disconnect: [MovieNodeMoviesDisconnectFieldInput!] + update: MovieNodeMoviesUpdateConnectionInput + where: MovieNodeMoviesConnectionWhere + } + + 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!] + } + + input MovieRelationInput { + movies: [MovieNodeMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: ID + movies: [MovieNodeMoviesUpdateFieldInput!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NOT: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: MovieNodeMoviesConnectionWhere + \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/1038.test.ts b/packages/graphql/tests/schema/issues/1038.test.ts index b2bf10a6d5..ec3befb0af 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -39,242 +39,242 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type AWSAccount { - accountName: String - code: String -} - -type AWSAccountAggregateSelection { - accountName: StringAggregateSelectionNullable! - code: StringAggregateSelectionNullable! - count: Int! -} - -input AWSAccountCreateInput { - accountName: String - code: String -} - -type AWSAccountEdge { - cursor: String! - node: AWSAccount! -} - -input AWSAccountOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more AWSAccountSort objects to sort AwsAccounts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [AWSAccountSort!] -} - -\\"\\"\\" -Fields to sort AwsAccounts by. The order in which sorts are applied is not guaranteed when specifying many fields in one AWSAccountSort object. -\\"\\"\\" -input AWSAccountSort { - accountName: SortDirection - code: SortDirection -} - -input AWSAccountUpdateInput { - accountName: String - code: String -} - -input AWSAccountWhere { - AND: [AWSAccountWhere!] - NOT: AWSAccountWhere - OR: [AWSAccountWhere!] - accountName: String - accountName_CONTAINS: String - accountName_ENDS_WITH: String - accountName_IN: [String] - accountName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - accountName_STARTS_WITH: String - code: String - code_CONTAINS: String - code_ENDS_WITH: String - code_IN: [String] - code_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - code_STARTS_WITH: String -} - -type AwsAccountsConnection { - edges: [AWSAccountEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateAwsAccountsMutationResponse { - awsAccounts: [AWSAccount!]! - info: CreateInfo! -} - -type CreateDnsZonesMutationResponse { - dnsZones: [DNSZone!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type DNSZone { - awsId: String - zoneType: String -} - -type DNSZoneAggregateSelection { - awsId: StringAggregateSelectionNullable! - count: Int! - zoneType: StringAggregateSelectionNullable! -} - -input DNSZoneCreateInput { - awsId: String - zoneType: String -} - -type DNSZoneEdge { - cursor: String! - node: DNSZone! -} - -input DNSZoneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more DNSZoneSort objects to sort DnsZones by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [DNSZoneSort!] -} - -\\"\\"\\" -Fields to sort DnsZones by. The order in which sorts are applied is not guaranteed when specifying many fields in one DNSZoneSort object. -\\"\\"\\" -input DNSZoneSort { - awsId: SortDirection - zoneType: SortDirection -} - -input DNSZoneUpdateInput { - awsId: String - zoneType: String -} - -input DNSZoneWhere { - AND: [DNSZoneWhere!] - NOT: DNSZoneWhere - OR: [DNSZoneWhere!] - awsId: String - awsId_CONTAINS: String - awsId_ENDS_WITH: String - awsId_IN: [String] - awsId_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - awsId_STARTS_WITH: String - zoneType: String - zoneType_CONTAINS: String - zoneType_ENDS_WITH: String - zoneType_IN: [String] - zoneType_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - zoneType_STARTS_WITH: String -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type DnsZonesConnection { - edges: [DNSZoneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createAwsAccounts(input: [AWSAccountCreateInput!]!): CreateAwsAccountsMutationResponse! - createDnsZones(input: [DNSZoneCreateInput!]!): CreateDnsZonesMutationResponse! - deleteAwsAccounts(where: AWSAccountWhere): DeleteInfo! - deleteDnsZones(where: DNSZoneWhere): DeleteInfo! - updateAwsAccounts(update: AWSAccountUpdateInput, where: AWSAccountWhere): UpdateAwsAccountsMutationResponse! - updateDnsZones(update: DNSZoneUpdateInput, where: DNSZoneWhere): UpdateDnsZonesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - awsAccounts(options: AWSAccountOptions, where: AWSAccountWhere): [AWSAccount!]! - awsAccountsAggregate(where: AWSAccountWhere): AWSAccountAggregateSelection! - awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort], where: AWSAccountWhere): AwsAccountsConnection! - dnsZones(options: DNSZoneOptions, where: DNSZoneWhere): [DNSZone!]! - dnsZonesAggregate(where: DNSZoneWhere): DNSZoneAggregateSelection! - dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort], where: DNSZoneWhere): DnsZonesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateAwsAccountsMutationResponse { - awsAccounts: [AWSAccount!]! - info: UpdateInfo! -} - -type UpdateDnsZonesMutationResponse { - dnsZones: [DNSZone!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type AWSAccount { + accountName: String + code: String + } + + type AWSAccountAggregateSelection { + accountName: StringAggregateSelectionNullable! + code: StringAggregateSelectionNullable! + count: Int! + } + + input AWSAccountCreateInput { + accountName: String + code: String + } + + type AWSAccountEdge { + cursor: String! + node: AWSAccount! + } + + input AWSAccountOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more AWSAccountSort objects to sort AwsAccounts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [AWSAccountSort!] + } + + \\"\\"\\" + Fields to sort AwsAccounts by. The order in which sorts are applied is not guaranteed when specifying many fields in one AWSAccountSort object. + \\"\\"\\" + input AWSAccountSort { + accountName: SortDirection + code: SortDirection + } + + input AWSAccountUpdateInput { + accountName: String + code: String + } + + input AWSAccountWhere { + AND: [AWSAccountWhere!] + NOT: AWSAccountWhere + OR: [AWSAccountWhere!] + accountName: String + accountName_CONTAINS: String + accountName_ENDS_WITH: String + accountName_IN: [String] + accountName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + accountName_STARTS_WITH: String + code: String + code_CONTAINS: String + code_ENDS_WITH: String + code_IN: [String] + code_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + code_STARTS_WITH: String + } + + type AwsAccountsConnection { + edges: [AWSAccountEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateAwsAccountsMutationResponse { + awsAccounts: [AWSAccount!]! + info: CreateInfo! + } + + type CreateDnsZonesMutationResponse { + dnsZones: [DNSZone!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type DNSZone { + awsId: String + zoneType: String + } + + type DNSZoneAggregateSelection { + awsId: StringAggregateSelectionNullable! + count: Int! + zoneType: StringAggregateSelectionNullable! + } + + input DNSZoneCreateInput { + awsId: String + zoneType: String + } + + type DNSZoneEdge { + cursor: String! + node: DNSZone! + } + + input DNSZoneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more DNSZoneSort objects to sort DnsZones by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [DNSZoneSort!] + } + + \\"\\"\\" + Fields to sort DnsZones by. The order in which sorts are applied is not guaranteed when specifying many fields in one DNSZoneSort object. + \\"\\"\\" + input DNSZoneSort { + awsId: SortDirection + zoneType: SortDirection + } + + input DNSZoneUpdateInput { + awsId: String + zoneType: String + } + + input DNSZoneWhere { + AND: [DNSZoneWhere!] + NOT: DNSZoneWhere + OR: [DNSZoneWhere!] + awsId: String + awsId_CONTAINS: String + awsId_ENDS_WITH: String + awsId_IN: [String] + awsId_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + awsId_STARTS_WITH: String + zoneType: String + zoneType_CONTAINS: String + zoneType_ENDS_WITH: String + zoneType_IN: [String] + zoneType_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + zoneType_STARTS_WITH: String + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type DnsZonesConnection { + edges: [DNSZoneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createAwsAccounts(input: [AWSAccountCreateInput!]!): CreateAwsAccountsMutationResponse! + createDnsZones(input: [DNSZoneCreateInput!]!): CreateDnsZonesMutationResponse! + deleteAwsAccounts(where: AWSAccountWhere): DeleteInfo! + deleteDnsZones(where: DNSZoneWhere): DeleteInfo! + updateAwsAccounts(update: AWSAccountUpdateInput, where: AWSAccountWhere): UpdateAwsAccountsMutationResponse! + updateDnsZones(update: DNSZoneUpdateInput, where: DNSZoneWhere): UpdateDnsZonesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + awsAccounts(options: AWSAccountOptions, where: AWSAccountWhere): [AWSAccount!]! + awsAccountsAggregate(where: AWSAccountWhere): AWSAccountAggregateSelection! + awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort], where: AWSAccountWhere): AwsAccountsConnection! + dnsZones(options: DNSZoneOptions, where: DNSZoneWhere): [DNSZone!]! + dnsZonesAggregate(where: DNSZoneWhere): DNSZoneAggregateSelection! + dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort], where: DNSZoneWhere): DnsZonesConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateAwsAccountsMutationResponse { + awsAccounts: [AWSAccount!]! + info: UpdateInfo! + } + + type UpdateDnsZonesMutationResponse { + dnsZones: [DNSZone!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index 2896d9d6a2..481796deff 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -42,524 +42,526 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - dob: DateTime! - homeAddress: Point! - id: ID! - name: String! -} - -type ActorAggregateSelection { - count: Int! - dob: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectOrCreateWhere { - node: ActorUniqueWhere! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - dob: DateTime! - homeAddress: PointInput! - name: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -input ActorOnCreateInput { - dob: DateTime! - homeAddress: PointInput! - name: String! -} - -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 { - dob: SortDirection - homeAddress: SortDirection - id: SortDirection - name: SortDirection -} - -input ActorUniqueWhere { - id: ID -} - -input ActorUpdateInput { - dob: DateTime - homeAddress: PointInput - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - dob: DateTime - dob_GT: DateTime - dob_GTE: DateTime - dob_IN: [DateTime!] - dob_LT: DateTime - dob_LTE: DateTime - dob_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - dob_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - homeAddress: PointInput - homeAddress_DISTANCE: PointDistance - homeAddress_GT: PointDistance - homeAddress_GTE: PointDistance - homeAddress_IN: [PointInput!] - homeAddress_LT: PointDistance - homeAddress_LTE: PointDistance - homeAddress_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - homeAddress_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - dob: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -input MovieActorsConnectOrCreateFieldInput { - onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! - where: ActorConnectOrCreateWhere! -} - -input MovieActorsConnectOrCreateFieldInputOnCreate { - node: ActorOnCreateInput! -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - dob_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - dob_MAX_EQUAL: DateTime - dob_MAX_GT: DateTime - dob_MAX_GTE: DateTime - dob_MAX_LT: DateTime - dob_MAX_LTE: DateTime - dob_MIN_EQUAL: DateTime - dob_MIN_GT: DateTime - dob_MIN_GTE: DateTime - dob_MIN_LT: DateTime - dob_MIN_LTE: DateTime - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieConnectOrCreateInput { - actors: [MovieActorsConnectOrCreateFieldInput!] -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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 - title: SortDirection -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -\\"\\"\\"Point type\\"\\"\\" -type Point { - crs: String! - height: Float - latitude: Float! - longitude: Float! - srid: Int! -} - -\\"\\"\\"\\"\\"\\" -input PointDistance { - \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" - distance: Float! - point: PointInput! -} - -\\"\\"\\"\\"\\"\\" -input PointInput { - height: Float - latitude: Float! - longitude: Float! -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + dob: DateTime! + homeAddress: Point! + id: ID! + name: String! + } + + type ActorAggregateSelection { + count: Int! + dob: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectOrCreateWhere { + node: ActorUniqueWhere! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + dob: DateTime! + homeAddress: PointInput! + name: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + input ActorOnCreateInput { + dob: DateTime! + homeAddress: PointInput! + name: String! + } + + 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 { + dob: SortDirection + homeAddress: SortDirection + id: SortDirection + name: SortDirection + } + + input ActorUniqueWhere { + id: ID + } + + input ActorUpdateInput { + dob: DateTime + homeAddress: PointInput + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + dob: DateTime + dob_GT: DateTime + dob_GTE: DateTime + dob_IN: [DateTime!] + dob_LT: DateTime + dob_LTE: DateTime + dob_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + dob_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + homeAddress: PointInput + homeAddress_DISTANCE: PointDistance + homeAddress_GT: PointDistance + homeAddress_GTE: PointDistance + homeAddress_IN: [PointInput!] + homeAddress_LT: PointDistance + homeAddress_LTE: PointDistance + homeAddress_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + homeAddress_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + dob: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + input MovieActorsConnectOrCreateFieldInput { + onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! + where: ActorConnectOrCreateWhere! + } + + input MovieActorsConnectOrCreateFieldInputOnCreate { + node: ActorOnCreateInput! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + dob_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + dob_MAX_EQUAL: DateTime + dob_MAX_GT: DateTime + dob_MAX_GTE: DateTime + dob_MAX_LT: DateTime + dob_MAX_LTE: DateTime + dob_MIN_EQUAL: DateTime + dob_MIN_GT: DateTime + dob_MIN_GTE: DateTime + dob_MIN_LT: DateTime + dob_MIN_LTE: DateTime + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectOrCreateInput { + actors: [MovieActorsConnectOrCreateFieldInput!] + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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 + title: SortDirection + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + \\"\\"\\" + A point in a coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#point + \\"\\"\\" + type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! + } + + \\"\\"\\"\\"\\"\\" + input PointDistance { + \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" + distance: Float! + point: PointInput! + } + + \\"\\"\\"\\"\\"\\" + input PointInput { + height: Float + latitude: Float! + longitude: Float! + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index ae58d3b861..ee90315740 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -43,560 +43,560 @@ describe("162", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateTigerJawLevel2Part1sMutationResponse { - info: CreateInfo! - tigerJawLevel2Part1s: [TigerJawLevel2Part1!]! -} - -type CreateTigerJawLevel2sMutationResponse { - info: CreateInfo! - tigerJawLevel2s: [TigerJawLevel2!]! -} - -type CreateTigersMutationResponse { - info: CreateInfo! - tigers: [Tiger!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Mutation { - createTigerJawLevel2Part1s(input: [TigerJawLevel2Part1CreateInput!]!): CreateTigerJawLevel2Part1sMutationResponse! - createTigerJawLevel2s(input: [TigerJawLevel2CreateInput!]!): CreateTigerJawLevel2sMutationResponse! - createTigers(input: [TigerCreateInput!]!): CreateTigersMutationResponse! - deleteTigerJawLevel2Part1s(delete: TigerJawLevel2Part1DeleteInput, where: TigerJawLevel2Part1Where): DeleteInfo! - deleteTigerJawLevel2s(delete: TigerJawLevel2DeleteInput, where: TigerJawLevel2Where): DeleteInfo! - deleteTigers(where: TigerWhere): DeleteInfo! - updateTigerJawLevel2Part1s(connect: TigerJawLevel2Part1ConnectInput, create: TigerJawLevel2Part1RelationInput, delete: TigerJawLevel2Part1DeleteInput, disconnect: TigerJawLevel2Part1DisconnectInput, update: TigerJawLevel2Part1UpdateInput, where: TigerJawLevel2Part1Where): UpdateTigerJawLevel2Part1sMutationResponse! - updateTigerJawLevel2s(connect: TigerJawLevel2ConnectInput, create: TigerJawLevel2RelationInput, delete: TigerJawLevel2DeleteInput, disconnect: TigerJawLevel2DisconnectInput, update: TigerJawLevel2UpdateInput, where: TigerJawLevel2Where): UpdateTigerJawLevel2sMutationResponse! - updateTigers(update: TigerUpdateInput, where: TigerWhere): UpdateTigersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - tigerJawLevel2Part1s(options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! - tigerJawLevel2Part1sAggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2Part1AggregateSelection! - tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! - tigerJawLevel2s(options: TigerJawLevel2Options, where: TigerJawLevel2Where): [TigerJawLevel2!]! - tigerJawLevel2sAggregate(where: TigerJawLevel2Where): TigerJawLevel2AggregateSelection! - tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort], where: TigerJawLevel2Where): TigerJawLevel2sConnection! - tigers(options: TigerOptions, where: TigerWhere): [Tiger!]! - tigersAggregate(where: TigerWhere): TigerAggregateSelection! - tigersConnection(after: String, first: Int, sort: [TigerSort], where: TigerWhere): TigersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type Tiger { - x: Int -} - -type TigerAggregateSelection { - count: Int! - x: IntAggregateSelectionNullable! -} - -input TigerConnectWhere { - node: TigerWhere! -} - -input TigerCreateInput { - x: Int -} - -type TigerEdge { - cursor: String! - node: Tiger! -} - -type TigerJawLevel2 { - id: ID - part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! - part1Aggregate(directed: Boolean = true, where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection - part1Connection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! -} - -type TigerJawLevel2AggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input TigerJawLevel2ConnectInput { - part1: TigerJawLevel2Part1ConnectFieldInput -} - -input TigerJawLevel2CreateInput { - id: ID - part1: TigerJawLevel2Part1FieldInput -} - -input TigerJawLevel2DeleteInput { - part1: TigerJawLevel2Part1DeleteFieldInput -} - -input TigerJawLevel2DisconnectInput { - part1: TigerJawLevel2Part1DisconnectFieldInput -} - -type TigerJawLevel2Edge { - cursor: String! - node: TigerJawLevel2! -} - -input TigerJawLevel2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TigerJawLevel2Sort objects to sort TigerJawLevel2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TigerJawLevel2Sort!] -} - -type TigerJawLevel2Part1 { - id: ID - tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! - tigerAggregate(directed: Boolean = true, where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection - tigerConnection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! -} - -input TigerJawLevel2Part1AggregateInput { - AND: [TigerJawLevel2Part1AggregateInput!] - NOT: TigerJawLevel2Part1AggregateInput - OR: [TigerJawLevel2Part1AggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: TigerJawLevel2Part1NodeAggregationWhereInput -} - -type TigerJawLevel2Part1AggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input TigerJawLevel2Part1ConnectFieldInput { - connect: TigerJawLevel2Part1ConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: TigerJawLevel2Part1ConnectWhere -} - -input TigerJawLevel2Part1ConnectInput { - tiger: TigerJawLevel2Part1TigerConnectFieldInput -} - -input TigerJawLevel2Part1ConnectWhere { - node: TigerJawLevel2Part1Where! -} - -type TigerJawLevel2Part1Connection { - edges: [TigerJawLevel2Part1Relationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input TigerJawLevel2Part1ConnectionSort { - node: TigerJawLevel2Part1Sort -} - -input TigerJawLevel2Part1ConnectionWhere { - AND: [TigerJawLevel2Part1ConnectionWhere!] - NOT: TigerJawLevel2Part1ConnectionWhere - OR: [TigerJawLevel2Part1ConnectionWhere!] - node: TigerJawLevel2Part1Where - node_NOT: TigerJawLevel2Part1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input TigerJawLevel2Part1CreateFieldInput { - node: TigerJawLevel2Part1CreateInput! -} - -input TigerJawLevel2Part1CreateInput { - id: ID - tiger: TigerJawLevel2Part1TigerFieldInput -} - -input TigerJawLevel2Part1DeleteFieldInput { - delete: TigerJawLevel2Part1DeleteInput - where: TigerJawLevel2Part1ConnectionWhere -} - -input TigerJawLevel2Part1DeleteInput { - tiger: TigerJawLevel2Part1TigerDeleteFieldInput -} - -input TigerJawLevel2Part1DisconnectFieldInput { - disconnect: TigerJawLevel2Part1DisconnectInput - where: TigerJawLevel2Part1ConnectionWhere -} - -input TigerJawLevel2Part1DisconnectInput { - tiger: TigerJawLevel2Part1TigerDisconnectFieldInput -} - -type TigerJawLevel2Part1Edge { - cursor: String! - node: TigerJawLevel2Part1! -} - -input TigerJawLevel2Part1FieldInput { - connect: TigerJawLevel2Part1ConnectFieldInput - create: TigerJawLevel2Part1CreateFieldInput -} - -input TigerJawLevel2Part1NodeAggregationWhereInput { - AND: [TigerJawLevel2Part1NodeAggregationWhereInput!] - NOT: TigerJawLevel2Part1NodeAggregationWhereInput - OR: [TigerJawLevel2Part1NodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") -} - -input TigerJawLevel2Part1Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TigerJawLevel2Part1Sort objects to sort TigerJawLevel2Part1s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TigerJawLevel2Part1Sort!] -} - -input TigerJawLevel2Part1RelationInput { - tiger: TigerJawLevel2Part1TigerCreateFieldInput -} - -type TigerJawLevel2Part1Relationship { - cursor: String! - node: TigerJawLevel2Part1! -} - -\\"\\"\\" -Fields to sort TigerJawLevel2Part1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Part1Sort object. -\\"\\"\\" -input TigerJawLevel2Part1Sort { - id: SortDirection -} - -input TigerJawLevel2Part1TigerAggregateInput { - AND: [TigerJawLevel2Part1TigerAggregateInput!] - NOT: TigerJawLevel2Part1TigerAggregateInput - OR: [TigerJawLevel2Part1TigerAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: TigerJawLevel2Part1TigerNodeAggregationWhereInput -} - -input TigerJawLevel2Part1TigerConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: TigerConnectWhere -} - -type TigerJawLevel2Part1TigerConnection { - edges: [TigerJawLevel2Part1TigerRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input TigerJawLevel2Part1TigerConnectionSort { - node: TigerSort -} - -input TigerJawLevel2Part1TigerConnectionWhere { - AND: [TigerJawLevel2Part1TigerConnectionWhere!] - NOT: TigerJawLevel2Part1TigerConnectionWhere - OR: [TigerJawLevel2Part1TigerConnectionWhere!] - node: TigerWhere - node_NOT: TigerWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input TigerJawLevel2Part1TigerCreateFieldInput { - node: TigerCreateInput! -} - -input TigerJawLevel2Part1TigerDeleteFieldInput { - where: TigerJawLevel2Part1TigerConnectionWhere -} - -input TigerJawLevel2Part1TigerDisconnectFieldInput { - where: TigerJawLevel2Part1TigerConnectionWhere -} - -input TigerJawLevel2Part1TigerFieldInput { - connect: TigerJawLevel2Part1TigerConnectFieldInput - create: TigerJawLevel2Part1TigerCreateFieldInput -} - -input TigerJawLevel2Part1TigerNodeAggregationWhereInput { - AND: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] - NOT: TigerJawLevel2Part1TigerNodeAggregationWhereInput - OR: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] - x_AVERAGE_EQUAL: Float - x_AVERAGE_GT: Float - x_AVERAGE_GTE: Float - x_AVERAGE_LT: Float - x_AVERAGE_LTE: Float - x_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_MAX_EQUAL: Int - x_MAX_GT: Int - x_MAX_GTE: Int - x_MAX_LT: Int - x_MAX_LTE: Int - x_MIN_EQUAL: Int - x_MIN_GT: Int - x_MIN_GTE: Int - x_MIN_LT: Int - x_MIN_LTE: Int - x_SUM_EQUAL: Int - x_SUM_GT: Int - x_SUM_GTE: Int - x_SUM_LT: Int - x_SUM_LTE: Int -} - -type TigerJawLevel2Part1TigerRelationship { - cursor: String! - node: Tiger! -} - -type TigerJawLevel2Part1TigerTigerAggregationSelection { - count: Int! - node: TigerJawLevel2Part1TigerTigerNodeAggregateSelection -} - -type TigerJawLevel2Part1TigerTigerNodeAggregateSelection { - x: IntAggregateSelectionNullable! -} - -input TigerJawLevel2Part1TigerUpdateConnectionInput { - node: TigerUpdateInput -} - -input TigerJawLevel2Part1TigerUpdateFieldInput { - connect: TigerJawLevel2Part1TigerConnectFieldInput - create: TigerJawLevel2Part1TigerCreateFieldInput - delete: TigerJawLevel2Part1TigerDeleteFieldInput - disconnect: TigerJawLevel2Part1TigerDisconnectFieldInput - update: TigerJawLevel2Part1TigerUpdateConnectionInput - where: TigerJawLevel2Part1TigerConnectionWhere -} - -input TigerJawLevel2Part1UpdateConnectionInput { - node: TigerJawLevel2Part1UpdateInput -} - -input TigerJawLevel2Part1UpdateFieldInput { - connect: TigerJawLevel2Part1ConnectFieldInput - create: TigerJawLevel2Part1CreateFieldInput - delete: TigerJawLevel2Part1DeleteFieldInput - disconnect: TigerJawLevel2Part1DisconnectFieldInput - update: TigerJawLevel2Part1UpdateConnectionInput - where: TigerJawLevel2Part1ConnectionWhere -} - -input TigerJawLevel2Part1UpdateInput { - id: ID - tiger: TigerJawLevel2Part1TigerUpdateFieldInput -} - -input TigerJawLevel2Part1Where { - AND: [TigerJawLevel2Part1Where!] - NOT: TigerJawLevel2Part1Where - OR: [TigerJawLevel2Part1Where!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - tiger: TigerWhere - tigerAggregate: TigerJawLevel2Part1TigerAggregateInput - tigerConnection: TigerJawLevel2Part1TigerConnectionWhere - tigerConnection_NOT: TigerJawLevel2Part1TigerConnectionWhere - tiger_NOT: TigerWhere -} - -type TigerJawLevel2Part1sConnection { - edges: [TigerJawLevel2Part1Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input TigerJawLevel2RelationInput { - part1: TigerJawLevel2Part1CreateFieldInput -} - -\\"\\"\\" -Fields to sort TigerJawLevel2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Sort object. -\\"\\"\\" -input TigerJawLevel2Sort { - id: SortDirection -} - -type TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection { - count: Int! - node: TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection -} - -type TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection { - id: IDAggregateSelectionNullable! -} - -input TigerJawLevel2UpdateInput { - id: ID - part1: TigerJawLevel2Part1UpdateFieldInput -} - -input TigerJawLevel2Where { - AND: [TigerJawLevel2Where!] - NOT: TigerJawLevel2Where - OR: [TigerJawLevel2Where!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - part1: TigerJawLevel2Part1Where - part1Aggregate: TigerJawLevel2Part1AggregateInput - part1Connection: TigerJawLevel2Part1ConnectionWhere - part1Connection_NOT: TigerJawLevel2Part1ConnectionWhere - part1_NOT: TigerJawLevel2Part1Where -} - -type TigerJawLevel2sConnection { - edges: [TigerJawLevel2Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input TigerOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more TigerSort objects to sort Tigers by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [TigerSort!] -} - -\\"\\"\\" -Fields to sort Tigers by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerSort object. -\\"\\"\\" -input TigerSort { - x: SortDirection -} - -input TigerUpdateInput { - x: Int - x_DECREMENT: Int - x_INCREMENT: Int -} - -input TigerWhere { - AND: [TigerWhere!] - NOT: TigerWhere - OR: [TigerWhere!] - x: Int - x_GT: Int - x_GTE: Int - x_IN: [Int] - x_LT: Int - x_LTE: Int - x_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - x_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type TigersConnection { - edges: [TigerEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateTigerJawLevel2Part1sMutationResponse { - info: UpdateInfo! - tigerJawLevel2Part1s: [TigerJawLevel2Part1!]! -} - -type UpdateTigerJawLevel2sMutationResponse { - info: UpdateInfo! - tigerJawLevel2s: [TigerJawLevel2!]! -} - -type UpdateTigersMutationResponse { - info: UpdateInfo! - tigers: [Tiger!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateTigerJawLevel2Part1sMutationResponse { + info: CreateInfo! + tigerJawLevel2Part1s: [TigerJawLevel2Part1!]! + } + + type CreateTigerJawLevel2sMutationResponse { + info: CreateInfo! + tigerJawLevel2s: [TigerJawLevel2!]! + } + + type CreateTigersMutationResponse { + info: CreateInfo! + tigers: [Tiger!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Mutation { + createTigerJawLevel2Part1s(input: [TigerJawLevel2Part1CreateInput!]!): CreateTigerJawLevel2Part1sMutationResponse! + createTigerJawLevel2s(input: [TigerJawLevel2CreateInput!]!): CreateTigerJawLevel2sMutationResponse! + createTigers(input: [TigerCreateInput!]!): CreateTigersMutationResponse! + deleteTigerJawLevel2Part1s(delete: TigerJawLevel2Part1DeleteInput, where: TigerJawLevel2Part1Where): DeleteInfo! + deleteTigerJawLevel2s(delete: TigerJawLevel2DeleteInput, where: TigerJawLevel2Where): DeleteInfo! + deleteTigers(where: TigerWhere): DeleteInfo! + updateTigerJawLevel2Part1s(connect: TigerJawLevel2Part1ConnectInput, create: TigerJawLevel2Part1RelationInput, delete: TigerJawLevel2Part1DeleteInput, disconnect: TigerJawLevel2Part1DisconnectInput, update: TigerJawLevel2Part1UpdateInput, where: TigerJawLevel2Part1Where): UpdateTigerJawLevel2Part1sMutationResponse! + updateTigerJawLevel2s(connect: TigerJawLevel2ConnectInput, create: TigerJawLevel2RelationInput, delete: TigerJawLevel2DeleteInput, disconnect: TigerJawLevel2DisconnectInput, update: TigerJawLevel2UpdateInput, where: TigerJawLevel2Where): UpdateTigerJawLevel2sMutationResponse! + updateTigers(update: TigerUpdateInput, where: TigerWhere): UpdateTigersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + tigerJawLevel2Part1s(options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! + tigerJawLevel2Part1sAggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2Part1AggregateSelection! + tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! + tigerJawLevel2s(options: TigerJawLevel2Options, where: TigerJawLevel2Where): [TigerJawLevel2!]! + tigerJawLevel2sAggregate(where: TigerJawLevel2Where): TigerJawLevel2AggregateSelection! + tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort], where: TigerJawLevel2Where): TigerJawLevel2sConnection! + tigers(options: TigerOptions, where: TigerWhere): [Tiger!]! + tigersAggregate(where: TigerWhere): TigerAggregateSelection! + tigersConnection(after: String, first: Int, sort: [TigerSort], where: TigerWhere): TigersConnection! + } + + \\"\\"\\"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 Tiger { + x: Int + } + + type TigerAggregateSelection { + count: Int! + x: IntAggregateSelectionNullable! + } + + input TigerConnectWhere { + node: TigerWhere! + } + + input TigerCreateInput { + x: Int + } + + type TigerEdge { + cursor: String! + node: Tiger! + } + + type TigerJawLevel2 { + id: ID + part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! + part1Aggregate(directed: Boolean = true, where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection + part1Connection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! + } + + type TigerJawLevel2AggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input TigerJawLevel2ConnectInput { + part1: TigerJawLevel2Part1ConnectFieldInput + } + + input TigerJawLevel2CreateInput { + id: ID + part1: TigerJawLevel2Part1FieldInput + } + + input TigerJawLevel2DeleteInput { + part1: TigerJawLevel2Part1DeleteFieldInput + } + + input TigerJawLevel2DisconnectInput { + part1: TigerJawLevel2Part1DisconnectFieldInput + } + + type TigerJawLevel2Edge { + cursor: String! + node: TigerJawLevel2! + } + + input TigerJawLevel2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TigerJawLevel2Sort objects to sort TigerJawLevel2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TigerJawLevel2Sort!] + } + + type TigerJawLevel2Part1 { + id: ID + tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! + tigerAggregate(directed: Boolean = true, where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection + tigerConnection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! + } + + input TigerJawLevel2Part1AggregateInput { + AND: [TigerJawLevel2Part1AggregateInput!] + NOT: TigerJawLevel2Part1AggregateInput + OR: [TigerJawLevel2Part1AggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: TigerJawLevel2Part1NodeAggregationWhereInput + } + + type TigerJawLevel2Part1AggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input TigerJawLevel2Part1ConnectFieldInput { + connect: TigerJawLevel2Part1ConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: TigerJawLevel2Part1ConnectWhere + } + + input TigerJawLevel2Part1ConnectInput { + tiger: TigerJawLevel2Part1TigerConnectFieldInput + } + + input TigerJawLevel2Part1ConnectWhere { + node: TigerJawLevel2Part1Where! + } + + type TigerJawLevel2Part1Connection { + edges: [TigerJawLevel2Part1Relationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input TigerJawLevel2Part1ConnectionSort { + node: TigerJawLevel2Part1Sort + } + + input TigerJawLevel2Part1ConnectionWhere { + AND: [TigerJawLevel2Part1ConnectionWhere!] + NOT: TigerJawLevel2Part1ConnectionWhere + OR: [TigerJawLevel2Part1ConnectionWhere!] + node: TigerJawLevel2Part1Where + node_NOT: TigerJawLevel2Part1Where @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input TigerJawLevel2Part1CreateFieldInput { + node: TigerJawLevel2Part1CreateInput! + } + + input TigerJawLevel2Part1CreateInput { + id: ID + tiger: TigerJawLevel2Part1TigerFieldInput + } + + input TigerJawLevel2Part1DeleteFieldInput { + delete: TigerJawLevel2Part1DeleteInput + where: TigerJawLevel2Part1ConnectionWhere + } + + input TigerJawLevel2Part1DeleteInput { + tiger: TigerJawLevel2Part1TigerDeleteFieldInput + } + + input TigerJawLevel2Part1DisconnectFieldInput { + disconnect: TigerJawLevel2Part1DisconnectInput + where: TigerJawLevel2Part1ConnectionWhere + } + + input TigerJawLevel2Part1DisconnectInput { + tiger: TigerJawLevel2Part1TigerDisconnectFieldInput + } + + type TigerJawLevel2Part1Edge { + cursor: String! + node: TigerJawLevel2Part1! + } + + input TigerJawLevel2Part1FieldInput { + connect: TigerJawLevel2Part1ConnectFieldInput + create: TigerJawLevel2Part1CreateFieldInput + } + + input TigerJawLevel2Part1NodeAggregationWhereInput { + AND: [TigerJawLevel2Part1NodeAggregationWhereInput!] + NOT: TigerJawLevel2Part1NodeAggregationWhereInput + OR: [TigerJawLevel2Part1NodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + } + + input TigerJawLevel2Part1Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TigerJawLevel2Part1Sort objects to sort TigerJawLevel2Part1s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TigerJawLevel2Part1Sort!] + } + + input TigerJawLevel2Part1RelationInput { + tiger: TigerJawLevel2Part1TigerCreateFieldInput + } + + type TigerJawLevel2Part1Relationship { + cursor: String! + node: TigerJawLevel2Part1! + } + + \\"\\"\\" + Fields to sort TigerJawLevel2Part1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Part1Sort object. + \\"\\"\\" + input TigerJawLevel2Part1Sort { + id: SortDirection + } + + input TigerJawLevel2Part1TigerAggregateInput { + AND: [TigerJawLevel2Part1TigerAggregateInput!] + NOT: TigerJawLevel2Part1TigerAggregateInput + OR: [TigerJawLevel2Part1TigerAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: TigerJawLevel2Part1TigerNodeAggregationWhereInput + } + + input TigerJawLevel2Part1TigerConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: TigerConnectWhere + } + + type TigerJawLevel2Part1TigerConnection { + edges: [TigerJawLevel2Part1TigerRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input TigerJawLevel2Part1TigerConnectionSort { + node: TigerSort + } + + input TigerJawLevel2Part1TigerConnectionWhere { + AND: [TigerJawLevel2Part1TigerConnectionWhere!] + NOT: TigerJawLevel2Part1TigerConnectionWhere + OR: [TigerJawLevel2Part1TigerConnectionWhere!] + node: TigerWhere + node_NOT: TigerWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input TigerJawLevel2Part1TigerCreateFieldInput { + node: TigerCreateInput! + } + + input TigerJawLevel2Part1TigerDeleteFieldInput { + where: TigerJawLevel2Part1TigerConnectionWhere + } + + input TigerJawLevel2Part1TigerDisconnectFieldInput { + where: TigerJawLevel2Part1TigerConnectionWhere + } + + input TigerJawLevel2Part1TigerFieldInput { + connect: TigerJawLevel2Part1TigerConnectFieldInput + create: TigerJawLevel2Part1TigerCreateFieldInput + } + + input TigerJawLevel2Part1TigerNodeAggregationWhereInput { + AND: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] + NOT: TigerJawLevel2Part1TigerNodeAggregationWhereInput + OR: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] + x_AVERAGE_EQUAL: Float + x_AVERAGE_GT: Float + x_AVERAGE_GTE: Float + x_AVERAGE_LT: Float + x_AVERAGE_LTE: Float + x_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + x_MAX_EQUAL: Int + x_MAX_GT: Int + x_MAX_GTE: Int + x_MAX_LT: Int + x_MAX_LTE: Int + x_MIN_EQUAL: Int + x_MIN_GT: Int + x_MIN_GTE: Int + x_MIN_LT: Int + x_MIN_LTE: Int + x_SUM_EQUAL: Int + x_SUM_GT: Int + x_SUM_GTE: Int + x_SUM_LT: Int + x_SUM_LTE: Int + } + + type TigerJawLevel2Part1TigerRelationship { + cursor: String! + node: Tiger! + } + + type TigerJawLevel2Part1TigerTigerAggregationSelection { + count: Int! + node: TigerJawLevel2Part1TigerTigerNodeAggregateSelection + } + + type TigerJawLevel2Part1TigerTigerNodeAggregateSelection { + x: IntAggregateSelectionNullable! + } + + input TigerJawLevel2Part1TigerUpdateConnectionInput { + node: TigerUpdateInput + } + + input TigerJawLevel2Part1TigerUpdateFieldInput { + connect: TigerJawLevel2Part1TigerConnectFieldInput + create: TigerJawLevel2Part1TigerCreateFieldInput + delete: TigerJawLevel2Part1TigerDeleteFieldInput + disconnect: TigerJawLevel2Part1TigerDisconnectFieldInput + update: TigerJawLevel2Part1TigerUpdateConnectionInput + where: TigerJawLevel2Part1TigerConnectionWhere + } + + input TigerJawLevel2Part1UpdateConnectionInput { + node: TigerJawLevel2Part1UpdateInput + } + + input TigerJawLevel2Part1UpdateFieldInput { + connect: TigerJawLevel2Part1ConnectFieldInput + create: TigerJawLevel2Part1CreateFieldInput + delete: TigerJawLevel2Part1DeleteFieldInput + disconnect: TigerJawLevel2Part1DisconnectFieldInput + update: TigerJawLevel2Part1UpdateConnectionInput + where: TigerJawLevel2Part1ConnectionWhere + } + + input TigerJawLevel2Part1UpdateInput { + id: ID + tiger: TigerJawLevel2Part1TigerUpdateFieldInput + } + + input TigerJawLevel2Part1Where { + AND: [TigerJawLevel2Part1Where!] + NOT: TigerJawLevel2Part1Where + OR: [TigerJawLevel2Part1Where!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + tiger: TigerWhere + tigerAggregate: TigerJawLevel2Part1TigerAggregateInput + tigerConnection: TigerJawLevel2Part1TigerConnectionWhere + tigerConnection_NOT: TigerJawLevel2Part1TigerConnectionWhere + tiger_NOT: TigerWhere + } + + type TigerJawLevel2Part1sConnection { + edges: [TigerJawLevel2Part1Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input TigerJawLevel2RelationInput { + part1: TigerJawLevel2Part1CreateFieldInput + } + + \\"\\"\\" + Fields to sort TigerJawLevel2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Sort object. + \\"\\"\\" + input TigerJawLevel2Sort { + id: SortDirection + } + + type TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection { + count: Int! + node: TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection + } + + type TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection { + id: IDAggregateSelectionNullable! + } + + input TigerJawLevel2UpdateInput { + id: ID + part1: TigerJawLevel2Part1UpdateFieldInput + } + + input TigerJawLevel2Where { + AND: [TigerJawLevel2Where!] + NOT: TigerJawLevel2Where + OR: [TigerJawLevel2Where!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + part1: TigerJawLevel2Part1Where + part1Aggregate: TigerJawLevel2Part1AggregateInput + part1Connection: TigerJawLevel2Part1ConnectionWhere + part1Connection_NOT: TigerJawLevel2Part1ConnectionWhere + part1_NOT: TigerJawLevel2Part1Where + } + + type TigerJawLevel2sConnection { + edges: [TigerJawLevel2Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input TigerOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more TigerSort objects to sort Tigers by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [TigerSort!] + } + + \\"\\"\\" + Fields to sort Tigers by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerSort object. + \\"\\"\\" + input TigerSort { + x: SortDirection + } + + input TigerUpdateInput { + x: Int + x_DECREMENT: Int + x_INCREMENT: Int + } + + input TigerWhere { + AND: [TigerWhere!] + NOT: TigerWhere + OR: [TigerWhere!] + x: Int + x_GT: Int + x_GTE: Int + x_IN: [Int] + x_LT: Int + x_LTE: Int + x_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + x_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type TigersConnection { + edges: [TigerEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateTigerJawLevel2Part1sMutationResponse { + info: UpdateInfo! + tigerJawLevel2Part1s: [TigerJawLevel2Part1!]! + } + + type UpdateTigerJawLevel2sMutationResponse { + info: UpdateInfo! + tigerJawLevel2s: [TigerJawLevel2!]! + } + + type UpdateTigersMutationResponse { + info: UpdateInfo! + tigers: [Tiger!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index ceb9c8d4c6..35515f29db 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -36,178 +36,178 @@ describe("200", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CategoriesConnection { - edges: [CategoryEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Category { - categoryId: ID! - description: String! - exampleImageLocations: [String!] - name: String! -} - -type CategoryAggregateSelection { - categoryId: IDAggregateSelectionNonNullable! - count: Int! - description: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input CategoryCreateInput { - description: String! = \\"\\" - exampleImageLocations: [String!] - name: String! -} - -type CategoryEdge { - cursor: String! - node: Category! -} - -input CategoryOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more CategorySort objects to sort Categories by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [CategorySort!] -} - -\\"\\"\\" -Fields to sort Categories by. The order in which sorts are applied is not guaranteed when specifying many fields in one CategorySort object. -\\"\\"\\" -input CategorySort { - categoryId: SortDirection - description: SortDirection - name: SortDirection -} - -input CategoryUpdateInput { - description: String - exampleImageLocations: [String!] - exampleImageLocations_POP: Int - exampleImageLocations_PUSH: [String!] - name: String -} - -input CategoryWhere { - AND: [CategoryWhere!] - NOT: CategoryWhere - OR: [CategoryWhere!] - categoryId: ID - categoryId_CONTAINS: ID - categoryId_ENDS_WITH: ID - categoryId_IN: [ID!] - categoryId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - categoryId_STARTS_WITH: ID - description: String - description_CONTAINS: String - description_ENDS_WITH: String - description_IN: [String!] - description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - description_STARTS_WITH: String - exampleImageLocations: [String!] - exampleImageLocations_INCLUDES: String - exampleImageLocations_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - exampleImageLocations_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type CreateCategoriesMutationResponse { - categories: [Category!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Mutation { - createCategories(input: [CategoryCreateInput!]!): CreateCategoriesMutationResponse! - deleteCategories(where: CategoryWhere): DeleteInfo! - updateCategories(update: CategoryUpdateInput, where: CategoryWhere): UpdateCategoriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - categories(options: CategoryOptions, where: CategoryWhere): [Category!]! - categoriesAggregate(where: CategoryWhere): CategoryAggregateSelection! - categoriesConnection(after: String, first: Int, sort: [CategorySort], where: CategoryWhere): CategoriesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateCategoriesMutationResponse { - categories: [Category!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CategoriesConnection { + edges: [CategoryEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Category { + categoryId: ID! + description: String! + exampleImageLocations: [String!] + name: String! + } + + type CategoryAggregateSelection { + categoryId: IDAggregateSelectionNonNullable! + count: Int! + description: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input CategoryCreateInput { + description: String! = \\"\\" + exampleImageLocations: [String!] + name: String! + } + + type CategoryEdge { + cursor: String! + node: Category! + } + + input CategoryOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more CategorySort objects to sort Categories by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [CategorySort!] + } + + \\"\\"\\" + Fields to sort Categories by. The order in which sorts are applied is not guaranteed when specifying many fields in one CategorySort object. + \\"\\"\\" + input CategorySort { + categoryId: SortDirection + description: SortDirection + name: SortDirection + } + + input CategoryUpdateInput { + description: String + exampleImageLocations: [String!] + exampleImageLocations_POP: Int + exampleImageLocations_PUSH: [String!] + name: String + } + + input CategoryWhere { + AND: [CategoryWhere!] + NOT: CategoryWhere + OR: [CategoryWhere!] + categoryId: ID + categoryId_CONTAINS: ID + categoryId_ENDS_WITH: ID + categoryId_IN: [ID!] + categoryId_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + categoryId_STARTS_WITH: ID + description: String + description_CONTAINS: String + description_ENDS_WITH: String + description_IN: [String!] + description_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + description_STARTS_WITH: String + exampleImageLocations: [String!] + exampleImageLocations_INCLUDES: String + exampleImageLocations_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + exampleImageLocations_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type CreateCategoriesMutationResponse { + categories: [Category!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Mutation { + createCategories(input: [CategoryCreateInput!]!): CreateCategoriesMutationResponse! + deleteCategories(where: CategoryWhere): DeleteInfo! + updateCategories(update: CategoryUpdateInput, where: CategoryWhere): UpdateCategoriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + categories(options: CategoryOptions, where: CategoryWhere): [Category!]! + categoriesAggregate(where: CategoryWhere): CategoryAggregateSelection! + categoriesConnection(after: String, first: Int, sort: [CategorySort], where: CategoryWhere): CategoriesConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateCategoriesMutationResponse { + categories: [Category!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index 9519ea3bf5..ee972aeb21 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -43,670 +43,670 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - name: String -} - -type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input GenreConnectInput { - movies: [GenreMoviesConnectFieldInput!] -} - -input GenreConnectWhere { - node: GenreWhere! -} - -input GenreCreateInput { - movies: GenreMoviesFieldInput - name: String -} - -input GenreDeleteInput { - movies: [GenreMoviesDeleteFieldInput!] -} - -input GenreDisconnectInput { - movies: [GenreMoviesDisconnectFieldInput!] -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection -} - -type GenreMovieMoviesNodeAggregateSelection { - imdbRating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - year: IntAggregateSelectionNullable! -} - -input GenreMoviesAggregateInput { - AND: [GenreMoviesAggregateInput!] - NOT: GenreMoviesAggregateInput - OR: [GenreMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: GenreMoviesNodeAggregationWhereInput -} - -input GenreMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input GenreMoviesConnectionSort { - node: MovieSort -} - -input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input GenreMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input GenreMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: GenreMoviesConnectionWhere -} - -input GenreMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: GenreMoviesConnectionWhere -} - -input GenreMoviesFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] -} - -input GenreMoviesNodeAggregationWhereInput { - AND: [GenreMoviesNodeAggregationWhereInput!] - NOT: GenreMoviesNodeAggregationWhereInput - OR: [GenreMoviesNodeAggregationWhereInput!] - imdbRating_AVERAGE_EQUAL: Float - imdbRating_AVERAGE_GT: Float - imdbRating_AVERAGE_GTE: Float - imdbRating_AVERAGE_LT: Float - imdbRating_AVERAGE_LTE: Float - imdbRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - imdbRating_MAX_EQUAL: Float - imdbRating_MAX_GT: Float - imdbRating_MAX_GTE: Float - imdbRating_MAX_LT: Float - imdbRating_MAX_LTE: Float - imdbRating_MIN_EQUAL: Float - imdbRating_MIN_GT: Float - imdbRating_MIN_GTE: Float - imdbRating_MIN_LT: Float - imdbRating_MIN_LTE: Float - imdbRating_SUM_EQUAL: Float - imdbRating_SUM_GT: Float - imdbRating_SUM_GTE: Float - imdbRating_SUM_LT: Float - imdbRating_SUM_LTE: Float - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - year_AVERAGE_EQUAL: Float - year_AVERAGE_GT: Float - year_AVERAGE_GTE: Float - year_AVERAGE_LT: Float - year_AVERAGE_LTE: Float - year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - year_MAX_EQUAL: Int - year_MAX_GT: Int - year_MAX_GTE: Int - year_MAX_LT: Int - year_MAX_LTE: Int - year_MIN_EQUAL: Int - year_MIN_GT: Int - year_MIN_GTE: Int - year_MIN_LT: Int - year_MIN_LTE: Int - year_SUM_EQUAL: Int - year_SUM_GT: Int - year_SUM_GTE: Int - year_SUM_LT: Int - year_SUM_LTE: Int -} - -type GenreMoviesRelationship { - cursor: String! - node: Movie! -} - -input GenreMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input GenreMoviesUpdateFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - delete: [GenreMoviesDeleteFieldInput!] - disconnect: [GenreMoviesDisconnectFieldInput!] - update: GenreMoviesUpdateConnectionInput - where: GenreMoviesConnectionWhere -} - -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!] -} - -input GenreRelationInput { - movies: [GenreMoviesCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: SortDirection -} - -input GenreUpdateInput { - movies: [GenreMoviesUpdateFieldInput!] - name: String -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: GenreMoviesAggregateInput - moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere - moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere - \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") - genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") - genresConnection(after: String, directed: Boolean = true, 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 -} - -type MovieAggregateSelection { - count: Int! - imdbRating: FloatAggregateSelectionNullable! - title: StringAggregateSelectionNullable! - year: IntAggregateSelectionNullable! -} - -input MovieConnectInput { - genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - genres: MovieGenresFieldInput @deprecated(reason: \\"Do not use genre\\") - imdbRating: Float - title: String @deprecated(reason: \\"Do not use title\\") - year: Int -} - -input MovieDeleteInput { - genres: [MovieGenresDeleteFieldInput!] @deprecated(reason: \\"Do not use genre\\") -} - -input MovieDisconnectInput { - genres: [MovieGenresDisconnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieGenreGenresAggregationSelection { - count: Int! - node: MovieGenreGenresNodeAggregateSelection -} - -type MovieGenreGenresNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieGenresAggregateInput { - AND: [MovieGenresAggregateInput!] - NOT: MovieGenresAggregateInput - OR: [MovieGenresAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenresNodeAggregationWhereInput -} - -input MovieGenresConnectFieldInput { - connect: [GenreConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere -} - -type MovieGenresConnection { - edges: [MovieGenresRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieGenresConnectionSort { - node: GenreSort -} - -input MovieGenresConnectionWhere { - AND: [MovieGenresConnectionWhere!] - NOT: MovieGenresConnectionWhere - OR: [MovieGenresConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieGenresCreateFieldInput { - node: GenreCreateInput! -} - -input MovieGenresDeleteFieldInput { - delete: GenreDeleteInput - where: MovieGenresConnectionWhere -} - -input MovieGenresDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: MovieGenresConnectionWhere -} - -input MovieGenresFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] -} - -input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieGenresRelationship { - cursor: String! - node: Genre! -} - -input MovieGenresUpdateConnectionInput { - node: GenreUpdateInput -} - -input MovieGenresUpdateFieldInput { - connect: [MovieGenresConnectFieldInput!] - create: [MovieGenresCreateFieldInput!] - delete: [MovieGenresDeleteFieldInput!] - disconnect: [MovieGenresDisconnectFieldInput!] - update: MovieGenresUpdateConnectionInput - where: MovieGenresConnectionWhere -} - -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!] -} - -input MovieRelationInput { - genres: [MovieGenresCreateFieldInput!] @deprecated(reason: \\"Do not use genre\\") -} - -\\"\\"\\" -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 { - imdbRating: SortDirection - title: SortDirection @deprecated(reason: \\"Do not use title\\") - year: SortDirection -} - -input MovieUpdateInput { - genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use genre\\") - imdbRating: Float - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SUBTRACT: Float - title: String @deprecated(reason: \\"Do not use title\\") - year: Int - year_DECREMENT: Int - year_INCREMENT: Int -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") - genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use genre\\") - genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\" - Return Movies where none of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") - genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\" - Return Movies where some of the related MovieGenresConnections match this filter - \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere @deprecated(reason: \\"Do not use genre\\") - genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use genre\\") - \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere @deprecated(reason: \\"Do not use genre\\") - imdbRating: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title: String @deprecated(reason: \\"Do not use title\\") - title_CONTAINS: String @deprecated(reason: \\"Do not use title\\") - title_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") - title_IN: [String] @deprecated(reason: \\"Do not use title\\") - title_NOT: String @deprecated(reason: \\"Do not use title\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Do not use title\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") - title_NOT_IN: [String] @deprecated(reason: \\"Do not use title\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") - title_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") - year: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int - year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type Genre { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + name: String + } + + type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input GenreConnectInput { + movies: [GenreMoviesConnectFieldInput!] + } + + input GenreConnectWhere { + node: GenreWhere! + } + + input GenreCreateInput { + movies: GenreMoviesFieldInput + name: String + } + + input GenreDeleteInput { + movies: [GenreMoviesDeleteFieldInput!] + } + + input GenreDisconnectInput { + movies: [GenreMoviesDisconnectFieldInput!] + } + + type GenreEdge { + cursor: String! + node: Genre! + } + + type GenreMovieMoviesAggregationSelection { + count: Int! + node: GenreMovieMoviesNodeAggregateSelection + } + + type GenreMovieMoviesNodeAggregateSelection { + imdbRating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! + } + + input GenreMoviesAggregateInput { + AND: [GenreMoviesAggregateInput!] + NOT: GenreMoviesAggregateInput + OR: [GenreMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: GenreMoviesNodeAggregationWhereInput + } + + input GenreMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type GenreMoviesConnection { + edges: [GenreMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input GenreMoviesConnectionSort { + node: MovieSort + } + + input GenreMoviesConnectionWhere { + AND: [GenreMoviesConnectionWhere!] + NOT: GenreMoviesConnectionWhere + OR: [GenreMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input GenreMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input GenreMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: GenreMoviesConnectionWhere + } + + input GenreMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: GenreMoviesConnectionWhere + } + + input GenreMoviesFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + } + + input GenreMoviesNodeAggregationWhereInput { + AND: [GenreMoviesNodeAggregationWhereInput!] + NOT: GenreMoviesNodeAggregationWhereInput + OR: [GenreMoviesNodeAggregationWhereInput!] + imdbRating_AVERAGE_EQUAL: Float + imdbRating_AVERAGE_GT: Float + imdbRating_AVERAGE_GTE: Float + imdbRating_AVERAGE_LT: Float + imdbRating_AVERAGE_LTE: Float + imdbRating_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbRating_MAX_EQUAL: Float + imdbRating_MAX_GT: Float + imdbRating_MAX_GTE: Float + imdbRating_MAX_LT: Float + imdbRating_MAX_LTE: Float + imdbRating_MIN_EQUAL: Float + imdbRating_MIN_GT: Float + imdbRating_MIN_GTE: Float + imdbRating_MIN_LT: Float + imdbRating_MIN_LTE: Float + imdbRating_SUM_EQUAL: Float + imdbRating_SUM_GT: Float + imdbRating_SUM_GTE: Float + imdbRating_SUM_LT: Float + imdbRating_SUM_LTE: Float + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + year_AVERAGE_EQUAL: Float + year_AVERAGE_GT: Float + year_AVERAGE_GTE: Float + year_AVERAGE_LT: Float + year_AVERAGE_LTE: Float + year_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + year_MAX_EQUAL: Int + year_MAX_GT: Int + year_MAX_GTE: Int + year_MAX_LT: Int + year_MAX_LTE: Int + year_MIN_EQUAL: Int + year_MIN_GT: Int + year_MIN_GTE: Int + year_MIN_LT: Int + year_MIN_LTE: Int + year_SUM_EQUAL: Int + year_SUM_GT: Int + year_SUM_GTE: Int + year_SUM_LT: Int + year_SUM_LTE: Int + } + + type GenreMoviesRelationship { + cursor: String! + node: Movie! + } + + input GenreMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input GenreMoviesUpdateFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + delete: [GenreMoviesDeleteFieldInput!] + disconnect: [GenreMoviesDisconnectFieldInput!] + update: GenreMoviesUpdateConnectionInput + where: GenreMoviesConnectionWhere + } + + 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!] + } + + input GenreRelationInput { + movies: [GenreMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: SortDirection + } + + input GenreUpdateInput { + movies: [GenreMoviesUpdateFieldInput!] + name: String + } + + input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: GenreMoviesConnectionWhere + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + genres(directed: Boolean = true, options: GenreOptions, where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") + genresAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") + genresConnection(after: String, directed: Boolean = true, 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 + } + + type MovieAggregateSelection { + count: Int! + imdbRating: FloatAggregateSelectionNullable! + title: StringAggregateSelectionNullable! + year: IntAggregateSelectionNullable! + } + + input MovieConnectInput { + genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + genres: MovieGenresFieldInput @deprecated(reason: \\"Do not use genre\\") + imdbRating: Float + title: String @deprecated(reason: \\"Do not use title\\") + year: Int + } + + input MovieDeleteInput { + genres: [MovieGenresDeleteFieldInput!] @deprecated(reason: \\"Do not use genre\\") + } + + input MovieDisconnectInput { + genres: [MovieGenresDisconnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieGenreGenresAggregationSelection { + count: Int! + node: MovieGenreGenresNodeAggregateSelection + } + + type MovieGenreGenresNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieGenresAggregateInput { + AND: [MovieGenresAggregateInput!] + NOT: MovieGenresAggregateInput + OR: [MovieGenresAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenresNodeAggregationWhereInput + } + + input MovieGenresConnectFieldInput { + connect: [GenreConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere + } + + type MovieGenresConnection { + edges: [MovieGenresRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieGenresConnectionSort { + node: GenreSort + } + + input MovieGenresConnectionWhere { + AND: [MovieGenresConnectionWhere!] + NOT: MovieGenresConnectionWhere + OR: [MovieGenresConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieGenresCreateFieldInput { + node: GenreCreateInput! + } + + input MovieGenresDeleteFieldInput { + delete: GenreDeleteInput + where: MovieGenresConnectionWhere + } + + input MovieGenresDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: MovieGenresConnectionWhere + } + + input MovieGenresFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + } + + input MovieGenresNodeAggregationWhereInput { + AND: [MovieGenresNodeAggregationWhereInput!] + NOT: MovieGenresNodeAggregationWhereInput + OR: [MovieGenresNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieGenresRelationship { + cursor: String! + node: Genre! + } + + input MovieGenresUpdateConnectionInput { + node: GenreUpdateInput + } + + input MovieGenresUpdateFieldInput { + connect: [MovieGenresConnectFieldInput!] + create: [MovieGenresCreateFieldInput!] + delete: [MovieGenresDeleteFieldInput!] + disconnect: [MovieGenresDisconnectFieldInput!] + update: MovieGenresUpdateConnectionInput + where: MovieGenresConnectionWhere + } + + 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!] + } + + input MovieRelationInput { + genres: [MovieGenresCreateFieldInput!] @deprecated(reason: \\"Do not use genre\\") + } + + \\"\\"\\" + 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 { + imdbRating: SortDirection + title: SortDirection @deprecated(reason: \\"Do not use title\\") + year: SortDirection + } + + input MovieUpdateInput { + genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use genre\\") + imdbRating: Float + imdbRating_ADD: Float + imdbRating_DIVIDE: Float + imdbRating_MULTIPLY: Float + imdbRating_SUBTRACT: Float + title: String @deprecated(reason: \\"Do not use title\\") + year: Int + year_DECREMENT: Int + year_INCREMENT: Int + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genres: GenreWhere @deprecated(reason: \\"Use \`genres_SOME\` instead.\\") + genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use genre\\") + genresConnection: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + genresConnection_NOT: MovieGenresConnectionWhere @deprecated(reason: \\"Use \`genresConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + genres_ALL: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + genres_NONE: GenreWhere @deprecated(reason: \\"Do not use genre\\") + genres_NOT: GenreWhere @deprecated(reason: \\"Use \`genres_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + genres_SOME: GenreWhere @deprecated(reason: \\"Do not use genre\\") + imdbRating: Float + imdbRating_GT: Float + imdbRating_GTE: Float + imdbRating_IN: [Float] + imdbRating_LT: Float + imdbRating_LTE: Float + imdbRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdbRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title: String @deprecated(reason: \\"Do not use title\\") + title_CONTAINS: String @deprecated(reason: \\"Do not use title\\") + title_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") + title_IN: [String] @deprecated(reason: \\"Do not use title\\") + title_NOT: String @deprecated(reason: \\"Do not use title\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Do not use title\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") + title_NOT_IN: [String] @deprecated(reason: \\"Do not use title\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") + title_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") + year: Int + year_GT: Int + year_GTE: Int + year_IN: [Int] + year_LT: Int + year_LTE: Int + year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + year_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 1bf4f851b3..823fc1e6cb 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -79,495 +79,495 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateResourcesMutationResponse { - info: CreateInfo! - resources: [Resource!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Mutation { - createResources(input: [ResourceCreateInput!]!): CreateResourcesMutationResponse! - deleteResources(delete: ResourceDeleteInput, where: ResourceWhere): DeleteInfo! - updateResources(connect: ResourceConnectInput, connectOrCreate: ResourceConnectOrCreateInput, create: ResourceRelationInput, delete: ResourceDeleteInput, disconnect: ResourceDisconnectInput, update: ResourceUpdateInput, where: ResourceWhere): UpdateResourcesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -enum Property { - PropertyA - PropertyB - PropertyC -} - -type Query { - resources(options: ResourceOptions, where: ResourceWhere): [Resource!]! - resourcesAggregate(where: ResourceWhere): ResourceAggregateSelection! - resourcesConnection(after: String, first: Int, sort: [ResourceSort], where: ResourceWhere): ResourcesConnection! -} - -type Resource implements ResourceEntity { - \\"\\"\\" - Resources encapsulating the given resource (e.g., a github org contains a repo) - \\"\\"\\" - containedBy(directed: Boolean = true, options: ResourceOptions, where: ResourceWhere): [Resource!]! - containedByAggregate(directed: Boolean = true, where: ResourceWhere): ResourceResourceContainedByAggregationSelection - containedByConnection(after: String, directed: Boolean = true, first: Int, sort: [ResourceContainedByConnectionSort!], where: ResourceContainedByConnectionWhere): ResourceContainedByConnection! - createdAt: DateTime! - externalIds: [ID!] - id: ID! - name: String - properties: [Property!] - \\"\\"\\"Globally tracked tags for this resource\\"\\"\\" - tags: [Tag!] - type: ResourceType! - updatedAt: DateTime! -} - -type ResourceAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - updatedAt: DateTimeAggregateSelectionNonNullable! -} - -input ResourceConnectInput { - containedBy: [ResourceContainedByConnectFieldInput!] -} - -input ResourceConnectOrCreateInput { - containedBy: [ResourceContainedByConnectOrCreateFieldInput!] -} - -input ResourceConnectOrCreateWhere { - node: ResourceUniqueWhere! -} - -input ResourceConnectWhere { - node: ResourceWhere! -} - -input ResourceContainedByAggregateInput { - AND: [ResourceContainedByAggregateInput!] - NOT: ResourceContainedByAggregateInput - OR: [ResourceContainedByAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ResourceContainedByNodeAggregationWhereInput -} - -input ResourceContainedByConnectFieldInput { - connect: [ResourceConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ResourceConnectWhere -} - -input ResourceContainedByConnectOrCreateFieldInput { - onCreate: ResourceContainedByConnectOrCreateFieldInputOnCreate! - where: ResourceConnectOrCreateWhere! -} - -input ResourceContainedByConnectOrCreateFieldInputOnCreate { - node: ResourceOnCreateInput! -} - -type ResourceContainedByConnection { - edges: [ResourceContainedByRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ResourceContainedByConnectionSort { - node: ResourceSort -} - -input ResourceContainedByConnectionWhere { - AND: [ResourceContainedByConnectionWhere!] - NOT: ResourceContainedByConnectionWhere - OR: [ResourceContainedByConnectionWhere!] - node: ResourceWhere - node_NOT: ResourceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ResourceContainedByCreateFieldInput { - node: ResourceCreateInput! -} - -input ResourceContainedByDeleteFieldInput { - delete: ResourceDeleteInput - where: ResourceContainedByConnectionWhere -} - -input ResourceContainedByDisconnectFieldInput { - disconnect: ResourceDisconnectInput - where: ResourceContainedByConnectionWhere -} - -input ResourceContainedByFieldInput { - connect: [ResourceContainedByConnectFieldInput!] - connectOrCreate: [ResourceContainedByConnectOrCreateFieldInput!] - create: [ResourceContainedByCreateFieldInput!] -} - -input ResourceContainedByNodeAggregationWhereInput { - AND: [ResourceContainedByNodeAggregationWhereInput!] - NOT: ResourceContainedByNodeAggregationWhereInput - OR: [ResourceContainedByNodeAggregationWhereInput!] - createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - createdAt_MAX_EQUAL: DateTime - createdAt_MAX_GT: DateTime - createdAt_MAX_GTE: DateTime - createdAt_MAX_LT: DateTime - createdAt_MAX_LTE: DateTime - createdAt_MIN_EQUAL: DateTime - createdAt_MIN_GT: DateTime - createdAt_MIN_GTE: DateTime - createdAt_MIN_LT: DateTime - createdAt_MIN_LTE: DateTime - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - updatedAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - updatedAt_MAX_EQUAL: DateTime - updatedAt_MAX_GT: DateTime - updatedAt_MAX_GTE: DateTime - updatedAt_MAX_LT: DateTime - updatedAt_MAX_LTE: DateTime - updatedAt_MIN_EQUAL: DateTime - updatedAt_MIN_GT: DateTime - updatedAt_MIN_GTE: DateTime - updatedAt_MIN_LT: DateTime - updatedAt_MIN_LTE: DateTime -} - -type ResourceContainedByRelationship { - cursor: String! - node: Resource! -} - -input ResourceContainedByUpdateConnectionInput { - node: ResourceUpdateInput -} - -input ResourceContainedByUpdateFieldInput { - connect: [ResourceContainedByConnectFieldInput!] - connectOrCreate: [ResourceContainedByConnectOrCreateFieldInput!] - create: [ResourceContainedByCreateFieldInput!] - delete: [ResourceContainedByDeleteFieldInput!] - disconnect: [ResourceContainedByDisconnectFieldInput!] - update: ResourceContainedByUpdateConnectionInput - where: ResourceContainedByConnectionWhere -} - -input ResourceCreateInput { - containedBy: ResourceContainedByFieldInput - externalIds: [ID!] - id: ID! - name: String - properties: [Property!] - tags: [Tag!] - type: ResourceType! -} - -input ResourceDeleteInput { - containedBy: [ResourceContainedByDeleteFieldInput!] -} - -input ResourceDisconnectInput { - containedBy: [ResourceContainedByDisconnectFieldInput!] -} - -type ResourceEdge { - cursor: String! - node: Resource! -} - -interface ResourceEntity { - id: ID! - name: String - properties: [Property!] - \\"\\"\\"Globally tracked tags for this resource (enum)\\"\\"\\" - tags: [Tag!] - \\"\\"\\"Allowed resource types (enums)\\"\\"\\" - type: ResourceType! -} - -input ResourceOnCreateInput { - externalIds: [ID!] - id: ID! - name: String - properties: [Property!] - tags: [Tag!] - type: ResourceType! -} - -input ResourceOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more ResourceSort objects to sort Resources by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [ResourceSort!] -} - -input ResourceRelationInput { - containedBy: [ResourceContainedByCreateFieldInput!] -} - -type ResourceResourceContainedByAggregationSelection { - count: Int! - node: ResourceResourceContainedByNodeAggregateSelection -} - -type ResourceResourceContainedByNodeAggregateSelection { - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! - updatedAt: DateTimeAggregateSelectionNonNullable! -} - -\\"\\"\\" -Fields to sort Resources by. The order in which sorts are applied is not guaranteed when specifying many fields in one ResourceSort object. -\\"\\"\\" -input ResourceSort { - createdAt: SortDirection - id: SortDirection - name: SortDirection - type: SortDirection - updatedAt: SortDirection -} - -enum ResourceType { - ResourceA - ResourceB - ResourceC -} - -input ResourceUniqueWhere { - id: ID -} - -input ResourceUpdateInput { - containedBy: [ResourceContainedByUpdateFieldInput!] - externalIds: [ID!] - externalIds_POP: Int - externalIds_PUSH: [ID!] - id: ID - name: String - properties: [Property!] - tags: [Tag!] - type: ResourceType -} - -input ResourceWhere { - AND: [ResourceWhere!] - NOT: ResourceWhere - OR: [ResourceWhere!] - containedBy: ResourceWhere @deprecated(reason: \\"Use \`containedBy_SOME\` instead.\\") - containedByAggregate: ResourceContainedByAggregateInput - containedByConnection: ResourceContainedByConnectionWhere @deprecated(reason: \\"Use \`containedByConnection_SOME\` instead.\\") - \\"\\"\\" - Return Resources where all of the related ResourceContainedByConnections match this filter - \\"\\"\\" - containedByConnection_ALL: ResourceContainedByConnectionWhere - \\"\\"\\" - Return Resources where none of the related ResourceContainedByConnections match this filter - \\"\\"\\" - containedByConnection_NONE: ResourceContainedByConnectionWhere - containedByConnection_NOT: ResourceContainedByConnectionWhere @deprecated(reason: \\"Use \`containedByConnection_NONE\` instead.\\") - \\"\\"\\" - Return Resources where one of the related ResourceContainedByConnections match this filter - \\"\\"\\" - containedByConnection_SINGLE: ResourceContainedByConnectionWhere - \\"\\"\\" - Return Resources where some of the related ResourceContainedByConnections match this filter - \\"\\"\\" - containedByConnection_SOME: ResourceContainedByConnectionWhere - \\"\\"\\"Return Resources where all of the related Resources match this filter\\"\\"\\" - containedBy_ALL: ResourceWhere - \\"\\"\\"Return Resources where none of the related Resources match this filter\\"\\"\\" - containedBy_NONE: ResourceWhere - containedBy_NOT: ResourceWhere @deprecated(reason: \\"Use \`containedBy_NONE\` instead.\\") - \\"\\"\\"Return Resources where one of the related Resources match this filter\\"\\"\\" - containedBy_SINGLE: ResourceWhere - \\"\\"\\"Return Resources where some of the related Resources match this filter\\"\\"\\" - containedBy_SOME: ResourceWhere - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - externalIds: [ID!] - externalIds_INCLUDES: ID - externalIds_NOT: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - externalIds_NOT_INCLUDES: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - properties: [Property!] - properties_INCLUDES: Property - properties_NOT: [Property!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - properties_NOT_INCLUDES: Property @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - tags: [Tag!] - tags_INCLUDES: Tag - tags_NOT: [Tag!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - tags_NOT_INCLUDES: Tag @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - type: ResourceType - type_IN: [ResourceType!] - type_NOT: ResourceType @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - type_NOT_IN: [ResourceType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - updatedAt: DateTime - updatedAt_GT: DateTime - updatedAt_GTE: DateTime - updatedAt_IN: [DateTime!] - updatedAt_LT: DateTime - updatedAt_LTE: DateTime - updatedAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - updatedAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type ResourcesConnection { - edges: [ResourceEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -enum Tag { - TagA - TagB - TagC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateResourcesMutationResponse { - info: UpdateInfo! - resources: [Resource!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateResourcesMutationResponse { + info: CreateInfo! + resources: [Resource!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Mutation { + createResources(input: [ResourceCreateInput!]!): CreateResourcesMutationResponse! + deleteResources(delete: ResourceDeleteInput, where: ResourceWhere): DeleteInfo! + updateResources(connect: ResourceConnectInput, connectOrCreate: ResourceConnectOrCreateInput, create: ResourceRelationInput, delete: ResourceDeleteInput, disconnect: ResourceDisconnectInput, update: ResourceUpdateInput, where: ResourceWhere): UpdateResourcesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + enum Property { + PropertyA + PropertyB + PropertyC + } + + type Query { + resources(options: ResourceOptions, where: ResourceWhere): [Resource!]! + resourcesAggregate(where: ResourceWhere): ResourceAggregateSelection! + resourcesConnection(after: String, first: Int, sort: [ResourceSort], where: ResourceWhere): ResourcesConnection! + } + + type Resource implements ResourceEntity { + \\"\\"\\" + Resources encapsulating the given resource (e.g., a github org contains a repo) + \\"\\"\\" + containedBy(directed: Boolean = true, options: ResourceOptions, where: ResourceWhere): [Resource!]! + containedByAggregate(directed: Boolean = true, where: ResourceWhere): ResourceResourceContainedByAggregationSelection + containedByConnection(after: String, directed: Boolean = true, first: Int, sort: [ResourceContainedByConnectionSort!], where: ResourceContainedByConnectionWhere): ResourceContainedByConnection! + createdAt: DateTime! + externalIds: [ID!] + id: ID! + name: String + properties: [Property!] + \\"\\"\\"Globally tracked tags for this resource\\"\\"\\" + tags: [Tag!] + type: ResourceType! + updatedAt: DateTime! + } + + type ResourceAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + updatedAt: DateTimeAggregateSelectionNonNullable! + } + + input ResourceConnectInput { + containedBy: [ResourceContainedByConnectFieldInput!] + } + + input ResourceConnectOrCreateInput { + containedBy: [ResourceContainedByConnectOrCreateFieldInput!] + } + + input ResourceConnectOrCreateWhere { + node: ResourceUniqueWhere! + } + + input ResourceConnectWhere { + node: ResourceWhere! + } + + input ResourceContainedByAggregateInput { + AND: [ResourceContainedByAggregateInput!] + NOT: ResourceContainedByAggregateInput + OR: [ResourceContainedByAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ResourceContainedByNodeAggregationWhereInput + } + + input ResourceContainedByConnectFieldInput { + connect: [ResourceConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ResourceConnectWhere + } + + input ResourceContainedByConnectOrCreateFieldInput { + onCreate: ResourceContainedByConnectOrCreateFieldInputOnCreate! + where: ResourceConnectOrCreateWhere! + } + + input ResourceContainedByConnectOrCreateFieldInputOnCreate { + node: ResourceOnCreateInput! + } + + type ResourceContainedByConnection { + edges: [ResourceContainedByRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ResourceContainedByConnectionSort { + node: ResourceSort + } + + input ResourceContainedByConnectionWhere { + AND: [ResourceContainedByConnectionWhere!] + NOT: ResourceContainedByConnectionWhere + OR: [ResourceContainedByConnectionWhere!] + node: ResourceWhere + node_NOT: ResourceWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ResourceContainedByCreateFieldInput { + node: ResourceCreateInput! + } + + input ResourceContainedByDeleteFieldInput { + delete: ResourceDeleteInput + where: ResourceContainedByConnectionWhere + } + + input ResourceContainedByDisconnectFieldInput { + disconnect: ResourceDisconnectInput + where: ResourceContainedByConnectionWhere + } + + input ResourceContainedByFieldInput { + connect: [ResourceContainedByConnectFieldInput!] + connectOrCreate: [ResourceContainedByConnectOrCreateFieldInput!] + create: [ResourceContainedByCreateFieldInput!] + } + + input ResourceContainedByNodeAggregationWhereInput { + AND: [ResourceContainedByNodeAggregationWhereInput!] + NOT: ResourceContainedByNodeAggregationWhereInput + OR: [ResourceContainedByNodeAggregationWhereInput!] + createdAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + createdAt_MAX_EQUAL: DateTime + createdAt_MAX_GT: DateTime + createdAt_MAX_GTE: DateTime + createdAt_MAX_LT: DateTime + createdAt_MAX_LTE: DateTime + createdAt_MIN_EQUAL: DateTime + createdAt_MIN_GT: DateTime + createdAt_MIN_GTE: DateTime + createdAt_MIN_LT: DateTime + createdAt_MIN_LTE: DateTime + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + updatedAt_EQUAL: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_GT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_GTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_LT: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_LTE: DateTime @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + updatedAt_MAX_EQUAL: DateTime + updatedAt_MAX_GT: DateTime + updatedAt_MAX_GTE: DateTime + updatedAt_MAX_LT: DateTime + updatedAt_MAX_LTE: DateTime + updatedAt_MIN_EQUAL: DateTime + updatedAt_MIN_GT: DateTime + updatedAt_MIN_GTE: DateTime + updatedAt_MIN_LT: DateTime + updatedAt_MIN_LTE: DateTime + } + + type ResourceContainedByRelationship { + cursor: String! + node: Resource! + } + + input ResourceContainedByUpdateConnectionInput { + node: ResourceUpdateInput + } + + input ResourceContainedByUpdateFieldInput { + connect: [ResourceContainedByConnectFieldInput!] + connectOrCreate: [ResourceContainedByConnectOrCreateFieldInput!] + create: [ResourceContainedByCreateFieldInput!] + delete: [ResourceContainedByDeleteFieldInput!] + disconnect: [ResourceContainedByDisconnectFieldInput!] + update: ResourceContainedByUpdateConnectionInput + where: ResourceContainedByConnectionWhere + } + + input ResourceCreateInput { + containedBy: ResourceContainedByFieldInput + externalIds: [ID!] + id: ID! + name: String + properties: [Property!] + tags: [Tag!] + type: ResourceType! + } + + input ResourceDeleteInput { + containedBy: [ResourceContainedByDeleteFieldInput!] + } + + input ResourceDisconnectInput { + containedBy: [ResourceContainedByDisconnectFieldInput!] + } + + type ResourceEdge { + cursor: String! + node: Resource! + } + + interface ResourceEntity { + id: ID! + name: String + properties: [Property!] + \\"\\"\\"Globally tracked tags for this resource (enum)\\"\\"\\" + tags: [Tag!] + \\"\\"\\"Allowed resource types (enums)\\"\\"\\" + type: ResourceType! + } + + input ResourceOnCreateInput { + externalIds: [ID!] + id: ID! + name: String + properties: [Property!] + tags: [Tag!] + type: ResourceType! + } + + input ResourceOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ResourceSort objects to sort Resources by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ResourceSort!] + } + + input ResourceRelationInput { + containedBy: [ResourceContainedByCreateFieldInput!] + } + + type ResourceResourceContainedByAggregationSelection { + count: Int! + node: ResourceResourceContainedByNodeAggregateSelection + } + + type ResourceResourceContainedByNodeAggregateSelection { + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + updatedAt: DateTimeAggregateSelectionNonNullable! + } + + \\"\\"\\" + Fields to sort Resources by. The order in which sorts are applied is not guaranteed when specifying many fields in one ResourceSort object. + \\"\\"\\" + input ResourceSort { + createdAt: SortDirection + id: SortDirection + name: SortDirection + type: SortDirection + updatedAt: SortDirection + } + + enum ResourceType { + ResourceA + ResourceB + ResourceC + } + + input ResourceUniqueWhere { + id: ID + } + + input ResourceUpdateInput { + containedBy: [ResourceContainedByUpdateFieldInput!] + externalIds: [ID!] + externalIds_POP: Int + externalIds_PUSH: [ID!] + id: ID + name: String + properties: [Property!] + tags: [Tag!] + type: ResourceType + } + + input ResourceWhere { + AND: [ResourceWhere!] + NOT: ResourceWhere + OR: [ResourceWhere!] + containedBy: ResourceWhere @deprecated(reason: \\"Use \`containedBy_SOME\` instead.\\") + containedByAggregate: ResourceContainedByAggregateInput + containedByConnection: ResourceContainedByConnectionWhere @deprecated(reason: \\"Use \`containedByConnection_SOME\` instead.\\") + \\"\\"\\" + Return Resources where all of the related ResourceContainedByConnections match this filter + \\"\\"\\" + containedByConnection_ALL: ResourceContainedByConnectionWhere + \\"\\"\\" + Return Resources where none of the related ResourceContainedByConnections match this filter + \\"\\"\\" + containedByConnection_NONE: ResourceContainedByConnectionWhere + containedByConnection_NOT: ResourceContainedByConnectionWhere @deprecated(reason: \\"Use \`containedByConnection_NONE\` instead.\\") + \\"\\"\\" + Return Resources where one of the related ResourceContainedByConnections match this filter + \\"\\"\\" + containedByConnection_SINGLE: ResourceContainedByConnectionWhere + \\"\\"\\" + Return Resources where some of the related ResourceContainedByConnections match this filter + \\"\\"\\" + containedByConnection_SOME: ResourceContainedByConnectionWhere + \\"\\"\\"Return Resources where all of the related Resources match this filter\\"\\"\\" + containedBy_ALL: ResourceWhere + \\"\\"\\"Return Resources where none of the related Resources match this filter\\"\\"\\" + containedBy_NONE: ResourceWhere + containedBy_NOT: ResourceWhere @deprecated(reason: \\"Use \`containedBy_NONE\` instead.\\") + \\"\\"\\"Return Resources where one of the related Resources match this filter\\"\\"\\" + containedBy_SINGLE: ResourceWhere + \\"\\"\\"Return Resources where some of the related Resources match this filter\\"\\"\\" + containedBy_SOME: ResourceWhere + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime!] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + externalIds: [ID!] + externalIds_INCLUDES: ID + externalIds_NOT: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + externalIds_NOT_INCLUDES: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + properties: [Property!] + properties_INCLUDES: Property + properties_NOT: [Property!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + properties_NOT_INCLUDES: Property @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + tags: [Tag!] + tags_INCLUDES: Tag + tags_NOT: [Tag!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + tags_NOT_INCLUDES: Tag @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + type: ResourceType + type_IN: [ResourceType!] + type_NOT: ResourceType @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + type_NOT_IN: [ResourceType!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + updatedAt: DateTime + updatedAt_GT: DateTime + updatedAt_GTE: DateTime + updatedAt_IN: [DateTime!] + updatedAt_LT: DateTime + updatedAt_LTE: DateTime + updatedAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + updatedAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type ResourcesConnection { + edges: [ResourceEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + enum Tag { + TagA + TagB + TagC + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateResourcesMutationResponse { + info: UpdateInfo! + resources: [Resource!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index ee105b3981..e1f58f1c06 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -40,570 +40,570 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreatePostsMutationResponse { - info: CreateInfo! - posts: [Post!]! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Post { - author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! - content: String! -} - -type PostAggregateSelection { - content: StringAggregateSelectionNonNullable! - count: Int! -} - -input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput -} - -input PostAuthorConnectFieldInput { - connect: UserConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type PostAuthorConnection { - edges: [PostAuthorRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PostAuthorConnectionSort { - node: UserSort -} - -input PostAuthorConnectionWhere { - AND: [PostAuthorConnectionWhere!] - NOT: PostAuthorConnectionWhere - OR: [PostAuthorConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PostAuthorCreateFieldInput { - node: UserCreateInput! -} - -input PostAuthorDeleteFieldInput { - delete: UserDeleteInput - where: PostAuthorConnectionWhere -} - -input PostAuthorDisconnectFieldInput { - disconnect: UserDisconnectInput - where: PostAuthorConnectionWhere -} - -input PostAuthorFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput -} - -input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type PostAuthorRelationship { - cursor: String! - node: User! -} - -input PostAuthorUpdateConnectionInput { - node: UserUpdateInput -} - -input PostAuthorUpdateFieldInput { - connect: PostAuthorConnectFieldInput - create: PostAuthorCreateFieldInput - delete: PostAuthorDeleteFieldInput - disconnect: PostAuthorDisconnectFieldInput - update: PostAuthorUpdateConnectionInput - where: PostAuthorConnectionWhere -} - -input PostConnectInput { - author: PostAuthorConnectFieldInput -} - -input PostConnectWhere { - node: PostWhere! -} - -input PostCreateInput { - author: PostAuthorFieldInput - content: String! -} - -input PostDeleteInput { - author: PostAuthorDeleteFieldInput -} - -input PostDisconnectInput { - author: PostAuthorDisconnectFieldInput -} - -type PostEdge { - cursor: String! - node: Post! -} - -input PostOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PostSort!] -} - -input PostRelationInput { - author: PostAuthorCreateFieldInput -} - -\\"\\"\\" -Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. -\\"\\"\\" -input PostSort { - content: SortDirection -} - -input PostUpdateInput { - author: PostAuthorUpdateFieldInput - content: String -} - -type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection -} - -type PostUserAuthorNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - author: UserWhere - authorAggregate: PostAuthorAggregateInput - authorConnection: PostAuthorConnectionWhere - authorConnection_NOT: PostAuthorConnectionWhere - author_NOT: UserWhere - content: String - content_CONTAINS: String - content_ENDS_WITH: String - content_IN: [String!] - content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - content_STARTS_WITH: String -} - -type PostsConnection { - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Query { - posts(options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! - postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdatePostsMutationResponse { - info: UpdateInfo! - posts: [Post!]! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - id: ID! - name: String! - posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! -} - -type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input UserConnectInput { - posts: [UserPostsConnectFieldInput!] -} - -input UserConnectWhere { - node: UserWhere! -} - -input UserCreateInput { - id: ID! - name: String! - posts: UserPostsFieldInput -} - -input UserDeleteInput { - posts: [UserPostsDeleteFieldInput!] -} - -input UserDisconnectInput { - posts: [UserPostsDisconnectFieldInput!] -} - -type UserEdge { - cursor: String! - node: User! -} - -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!] -} - -type UserPostPostsAggregationSelection { - count: Int! - node: UserPostPostsNodeAggregateSelection -} - -type UserPostPostsNodeAggregateSelection { - content: StringAggregateSelectionNonNullable! -} - -input UserPostsAggregateInput { - AND: [UserPostsAggregateInput!] - NOT: UserPostsAggregateInput - OR: [UserPostsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserPostsNodeAggregationWhereInput -} - -input UserPostsConnectFieldInput { - connect: [PostConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PostConnectWhere -} - -type UserPostsConnection { - edges: [UserPostsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserPostsConnectionSort { - node: PostSort -} - -input UserPostsConnectionWhere { - AND: [UserPostsConnectionWhere!] - NOT: UserPostsConnectionWhere - OR: [UserPostsConnectionWhere!] - node: PostWhere - node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input UserPostsCreateFieldInput { - node: PostCreateInput! -} - -input UserPostsDeleteFieldInput { - delete: PostDeleteInput - where: UserPostsConnectionWhere -} - -input UserPostsDisconnectFieldInput { - disconnect: PostDisconnectInput - where: UserPostsConnectionWhere -} - -input UserPostsFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] -} - -input UserPostsNodeAggregationWhereInput { - AND: [UserPostsNodeAggregationWhereInput!] - NOT: UserPostsNodeAggregationWhereInput - OR: [UserPostsNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type UserPostsRelationship { - cursor: String! - node: Post! -} - -input UserPostsUpdateConnectionInput { - node: PostUpdateInput -} - -input UserPostsUpdateFieldInput { - connect: [UserPostsConnectFieldInput!] - create: [UserPostsCreateFieldInput!] - delete: [UserPostsDeleteFieldInput!] - disconnect: [UserPostsDisconnectFieldInput!] - update: UserPostsUpdateConnectionInput - where: UserPostsConnectionWhere -} - -input UserRelationInput { - posts: [UserPostsCreateFieldInput!] -} - -\\"\\"\\" -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 { - id: SortDirection - name: SortDirection -} - -input UserUpdateInput { - id: ID - name: String - posts: [UserPostsUpdateFieldInput!] -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") - postsAggregate: UserPostsAggregateInput - postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere - postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserPostsConnections match this filter - \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere - \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere - \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere - posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") - \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere - \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + content: String! + } + + type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! + } + + input PostAuthorAggregateInput { + AND: [PostAuthorAggregateInput!] + NOT: PostAuthorAggregateInput + OR: [PostAuthorAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostAuthorNodeAggregationWhereInput + } + + input PostAuthorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostAuthorConnectionSort { + node: UserSort + } + + input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PostAuthorCreateFieldInput { + node: UserCreateInput! + } + + input PostAuthorDeleteFieldInput { + delete: UserDeleteInput + where: PostAuthorConnectionWhere + } + + input PostAuthorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostAuthorConnectionWhere + } + + input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + } + + input PostAuthorNodeAggregationWhereInput { + AND: [PostAuthorNodeAggregationWhereInput!] + NOT: PostAuthorNodeAggregationWhereInput + OR: [PostAuthorNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type PostAuthorRelationship { + cursor: String! + node: User! + } + + input PostAuthorUpdateConnectionInput { + node: UserUpdateInput + } + + input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere + } + + input PostConnectInput { + author: PostAuthorConnectFieldInput + } + + input PostConnectWhere { + node: PostWhere! + } + + input PostCreateInput { + author: PostAuthorFieldInput + content: String! + } + + input PostDeleteInput { + author: PostAuthorDeleteFieldInput + } + + input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + input PostRelationInput { + author: PostAuthorCreateFieldInput + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + content: SortDirection + } + + input PostUpdateInput { + author: PostAuthorUpdateFieldInput + content: String + } + + type PostUserAuthorAggregationSelection { + count: Int! + node: PostUserAuthorNodeAggregateSelection + } + + type PostUserAuthorNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + id: ID! + name: String! + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + } + + type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input UserConnectInput { + posts: [UserPostsConnectFieldInput!] + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + id: ID! + name: String! + posts: UserPostsFieldInput + } + + input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] + } + + input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] + } + + type UserEdge { + cursor: String! + node: User! + } + + 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!] + } + + type UserPostPostsAggregationSelection { + count: Int! + node: UserPostPostsNodeAggregateSelection + } + + type UserPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNonNullable! + } + + input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput + } + + input UserPostsConnectFieldInput { + connect: [PostConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere + } + + type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserPostsConnectionSort { + node: PostSort + } + + input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserPostsCreateFieldInput { + node: PostCreateInput! + } + + input UserPostsDeleteFieldInput { + delete: PostDeleteInput + where: UserPostsConnectionWhere + } + + input UserPostsDisconnectFieldInput { + disconnect: PostDisconnectInput + where: UserPostsConnectionWhere + } + + input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + } + + input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type UserPostsRelationship { + cursor: String! + node: Post! + } + + input UserPostsUpdateConnectionInput { + node: PostUpdateInput + } + + input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere + } + + input UserRelationInput { + posts: [UserPostsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: SortDirection + name: SortDirection + } + + input UserUpdateInput { + id: ID + name: String + posts: [UserPostsUpdateFieldInput!] + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index c3e0759c47..bb4b3fdd8f 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -47,862 +47,862 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Book { - isbn: String! - originalTitle: String! - translatedTitle(directed: Boolean = true, options: QueryOptions, where: BookTitleWhere): BookTitle - translatedTitleConnection(after: String, directed: Boolean = true, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! -} - -type BookAggregateSelection { - count: Int! - isbn: StringAggregateSelectionNonNullable! - originalTitle: StringAggregateSelectionNonNullable! -} - -input BookConnectInput { - translatedTitle: BookTranslatedTitleConnectInput -} - -input BookConnectWhere { - node: BookWhere! -} - -input BookCreateInput { - isbn: String! - originalTitle: String! - translatedTitle: BookTranslatedTitleCreateInput -} - -input BookDeleteInput { - translatedTitle: BookTranslatedTitleDeleteInput -} - -input BookDisconnectInput { - translatedTitle: BookTranslatedTitleDisconnectInput -} - -type BookEdge { - cursor: String! - node: Book! -} - -input BookOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BookSort!] -} - -input BookRelationInput { - translatedTitle: BookTranslatedTitleCreateFieldInput -} - -\\"\\"\\" -Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. -\\"\\"\\" -input BookSort { - isbn: SortDirection - originalTitle: SortDirection -} - -union BookTitle = BookTitle_EN | BookTitle_SV - -type BookTitleEnsConnection { - edges: [BookTitle_ENEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type BookTitleSvsConnection { - edges: [BookTitle_SVEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input BookTitleWhere { - BookTitle_EN: BookTitle_ENWhere - BookTitle_SV: BookTitle_SVWhere -} - -type BookTitle_EN { - book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! - bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_ENBookBookAggregationSelection - bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! - value: String! -} - -type BookTitle_ENAggregateSelection { - count: Int! - value: StringAggregateSelectionNonNullable! -} - -input BookTitle_ENBookAggregateInput { - AND: [BookTitle_ENBookAggregateInput!] - NOT: BookTitle_ENBookAggregateInput - OR: [BookTitle_ENBookAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: BookTitle_ENBookNodeAggregationWhereInput -} - -type BookTitle_ENBookBookAggregationSelection { - count: Int! - node: BookTitle_ENBookBookNodeAggregateSelection -} - -type BookTitle_ENBookBookNodeAggregateSelection { - isbn: StringAggregateSelectionNonNullable! - originalTitle: StringAggregateSelectionNonNullable! -} - -input BookTitle_ENBookConnectFieldInput { - connect: BookConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: BookConnectWhere -} - -type BookTitle_ENBookConnection { - edges: [BookTitle_ENBookRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input BookTitle_ENBookConnectionSort { - node: BookSort -} - -input BookTitle_ENBookConnectionWhere { - AND: [BookTitle_ENBookConnectionWhere!] - NOT: BookTitle_ENBookConnectionWhere - OR: [BookTitle_ENBookConnectionWhere!] - node: BookWhere - node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input BookTitle_ENBookCreateFieldInput { - node: BookCreateInput! -} - -input BookTitle_ENBookDeleteFieldInput { - delete: BookDeleteInput - where: BookTitle_ENBookConnectionWhere -} - -input BookTitle_ENBookDisconnectFieldInput { - disconnect: BookDisconnectInput - where: BookTitle_ENBookConnectionWhere -} - -input BookTitle_ENBookFieldInput { - connect: BookTitle_ENBookConnectFieldInput - create: BookTitle_ENBookCreateFieldInput -} - -input BookTitle_ENBookNodeAggregationWhereInput { - AND: [BookTitle_ENBookNodeAggregationWhereInput!] - NOT: BookTitle_ENBookNodeAggregationWhereInput - OR: [BookTitle_ENBookNodeAggregationWhereInput!] - isbn_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_LENGTH_EQUAL: Float - isbn_AVERAGE_LENGTH_GT: Float - isbn_AVERAGE_LENGTH_GTE: Float - isbn_AVERAGE_LENGTH_LT: Float - isbn_AVERAGE_LENGTH_LTE: Float - isbn_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_LENGTH_EQUAL: Int - isbn_LONGEST_LENGTH_GT: Int - isbn_LONGEST_LENGTH_GTE: Int - isbn_LONGEST_LENGTH_LT: Int - isbn_LONGEST_LENGTH_LTE: Int - isbn_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_LENGTH_EQUAL: Int - isbn_SHORTEST_LENGTH_GT: Int - isbn_SHORTEST_LENGTH_GTE: Int - isbn_SHORTEST_LENGTH_LT: Int - isbn_SHORTEST_LENGTH_LTE: Int - isbn_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_LENGTH_EQUAL: Float - originalTitle_AVERAGE_LENGTH_GT: Float - originalTitle_AVERAGE_LENGTH_GTE: Float - originalTitle_AVERAGE_LENGTH_LT: Float - originalTitle_AVERAGE_LENGTH_LTE: Float - originalTitle_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_LENGTH_EQUAL: Int - originalTitle_LONGEST_LENGTH_GT: Int - originalTitle_LONGEST_LENGTH_GTE: Int - originalTitle_LONGEST_LENGTH_LT: Int - originalTitle_LONGEST_LENGTH_LTE: Int - originalTitle_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_LENGTH_EQUAL: Int - originalTitle_SHORTEST_LENGTH_GT: Int - originalTitle_SHORTEST_LENGTH_GTE: Int - originalTitle_SHORTEST_LENGTH_LT: Int - originalTitle_SHORTEST_LENGTH_LTE: Int - originalTitle_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type BookTitle_ENBookRelationship { - cursor: String! - node: Book! -} - -input BookTitle_ENBookUpdateConnectionInput { - node: BookUpdateInput -} - -input BookTitle_ENBookUpdateFieldInput { - connect: BookTitle_ENBookConnectFieldInput - create: BookTitle_ENBookCreateFieldInput - delete: BookTitle_ENBookDeleteFieldInput - disconnect: BookTitle_ENBookDisconnectFieldInput - update: BookTitle_ENBookUpdateConnectionInput - where: BookTitle_ENBookConnectionWhere -} - -input BookTitle_ENConnectInput { - book: BookTitle_ENBookConnectFieldInput -} - -input BookTitle_ENConnectWhere { - node: BookTitle_ENWhere! -} - -input BookTitle_ENCreateInput { - book: BookTitle_ENBookFieldInput - value: String! -} - -input BookTitle_ENDeleteInput { - book: BookTitle_ENBookDeleteFieldInput -} - -input BookTitle_ENDisconnectInput { - book: BookTitle_ENBookDisconnectFieldInput -} - -type BookTitle_ENEdge { - cursor: String! - node: BookTitle_EN! -} - -input BookTitle_ENOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BookTitle_ENSort objects to sort BookTitleEns by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BookTitle_ENSort!] -} - -input BookTitle_ENRelationInput { - book: BookTitle_ENBookCreateFieldInput -} - -\\"\\"\\" -Fields to sort BookTitleEns by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_ENSort object. -\\"\\"\\" -input BookTitle_ENSort { - value: SortDirection -} - -input BookTitle_ENUpdateInput { - book: BookTitle_ENBookUpdateFieldInput - value: String -} - -input BookTitle_ENWhere { - AND: [BookTitle_ENWhere!] - NOT: BookTitle_ENWhere - OR: [BookTitle_ENWhere!] - book: BookWhere - bookAggregate: BookTitle_ENBookAggregateInput - bookConnection: BookTitle_ENBookConnectionWhere - bookConnection_NOT: BookTitle_ENBookConnectionWhere - book_NOT: BookWhere - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String!] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -} - -type BookTitle_SV { - book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! - bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_SVBookBookAggregationSelection - bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! - value: String! -} - -type BookTitle_SVAggregateSelection { - count: Int! - value: StringAggregateSelectionNonNullable! -} - -input BookTitle_SVBookAggregateInput { - AND: [BookTitle_SVBookAggregateInput!] - NOT: BookTitle_SVBookAggregateInput - OR: [BookTitle_SVBookAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: BookTitle_SVBookNodeAggregationWhereInput -} - -type BookTitle_SVBookBookAggregationSelection { - count: Int! - node: BookTitle_SVBookBookNodeAggregateSelection -} - -type BookTitle_SVBookBookNodeAggregateSelection { - isbn: StringAggregateSelectionNonNullable! - originalTitle: StringAggregateSelectionNonNullable! -} - -input BookTitle_SVBookConnectFieldInput { - connect: BookConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: BookConnectWhere -} - -type BookTitle_SVBookConnection { - edges: [BookTitle_SVBookRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input BookTitle_SVBookConnectionSort { - node: BookSort -} - -input BookTitle_SVBookConnectionWhere { - AND: [BookTitle_SVBookConnectionWhere!] - NOT: BookTitle_SVBookConnectionWhere - OR: [BookTitle_SVBookConnectionWhere!] - node: BookWhere - node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input BookTitle_SVBookCreateFieldInput { - node: BookCreateInput! -} - -input BookTitle_SVBookDeleteFieldInput { - delete: BookDeleteInput - where: BookTitle_SVBookConnectionWhere -} - -input BookTitle_SVBookDisconnectFieldInput { - disconnect: BookDisconnectInput - where: BookTitle_SVBookConnectionWhere -} - -input BookTitle_SVBookFieldInput { - connect: BookTitle_SVBookConnectFieldInput - create: BookTitle_SVBookCreateFieldInput -} - -input BookTitle_SVBookNodeAggregationWhereInput { - AND: [BookTitle_SVBookNodeAggregationWhereInput!] - NOT: BookTitle_SVBookNodeAggregationWhereInput - OR: [BookTitle_SVBookNodeAggregationWhereInput!] - isbn_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_LENGTH_EQUAL: Float - isbn_AVERAGE_LENGTH_GT: Float - isbn_AVERAGE_LENGTH_GTE: Float - isbn_AVERAGE_LENGTH_LT: Float - isbn_AVERAGE_LENGTH_LTE: Float - isbn_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_LENGTH_EQUAL: Int - isbn_LONGEST_LENGTH_GT: Int - isbn_LONGEST_LENGTH_GTE: Int - isbn_LONGEST_LENGTH_LT: Int - isbn_LONGEST_LENGTH_LTE: Int - isbn_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - isbn_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_LENGTH_EQUAL: Int - isbn_SHORTEST_LENGTH_GT: Int - isbn_SHORTEST_LENGTH_GTE: Int - isbn_SHORTEST_LENGTH_LT: Int - isbn_SHORTEST_LENGTH_LTE: Int - isbn_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - isbn_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_LENGTH_EQUAL: Float - originalTitle_AVERAGE_LENGTH_GT: Float - originalTitle_AVERAGE_LENGTH_GTE: Float - originalTitle_AVERAGE_LENGTH_LT: Float - originalTitle_AVERAGE_LENGTH_LTE: Float - originalTitle_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_LENGTH_EQUAL: Int - originalTitle_LONGEST_LENGTH_GT: Int - originalTitle_LONGEST_LENGTH_GTE: Int - originalTitle_LONGEST_LENGTH_LT: Int - originalTitle_LONGEST_LENGTH_LTE: Int - originalTitle_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - originalTitle_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_LENGTH_EQUAL: Int - originalTitle_SHORTEST_LENGTH_GT: Int - originalTitle_SHORTEST_LENGTH_GTE: Int - originalTitle_SHORTEST_LENGTH_LT: Int - originalTitle_SHORTEST_LENGTH_LTE: Int - originalTitle_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - originalTitle_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type BookTitle_SVBookRelationship { - cursor: String! - node: Book! -} - -input BookTitle_SVBookUpdateConnectionInput { - node: BookUpdateInput -} - -input BookTitle_SVBookUpdateFieldInput { - connect: BookTitle_SVBookConnectFieldInput - create: BookTitle_SVBookCreateFieldInput - delete: BookTitle_SVBookDeleteFieldInput - disconnect: BookTitle_SVBookDisconnectFieldInput - update: BookTitle_SVBookUpdateConnectionInput - where: BookTitle_SVBookConnectionWhere -} - -input BookTitle_SVConnectInput { - book: BookTitle_SVBookConnectFieldInput -} - -input BookTitle_SVConnectWhere { - node: BookTitle_SVWhere! -} - -input BookTitle_SVCreateInput { - book: BookTitle_SVBookFieldInput - value: String! -} - -input BookTitle_SVDeleteInput { - book: BookTitle_SVBookDeleteFieldInput -} - -input BookTitle_SVDisconnectInput { - book: BookTitle_SVBookDisconnectFieldInput -} - -type BookTitle_SVEdge { - cursor: String! - node: BookTitle_SV! -} - -input BookTitle_SVOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more BookTitle_SVSort objects to sort BookTitleSvs by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [BookTitle_SVSort!] -} - -input BookTitle_SVRelationInput { - book: BookTitle_SVBookCreateFieldInput -} - -\\"\\"\\" -Fields to sort BookTitleSvs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_SVSort object. -\\"\\"\\" -input BookTitle_SVSort { - value: SortDirection -} - -input BookTitle_SVUpdateInput { - book: BookTitle_SVBookUpdateFieldInput - value: String -} - -input BookTitle_SVWhere { - AND: [BookTitle_SVWhere!] - NOT: BookTitle_SVWhere - OR: [BookTitle_SVWhere!] - book: BookWhere - bookAggregate: BookTitle_SVBookAggregateInput - bookConnection: BookTitle_SVBookConnectionWhere - bookConnection_NOT: BookTitle_SVBookConnectionWhere - book_NOT: BookWhere - value: String - value_CONTAINS: String - value_ENDS_WITH: String - value_IN: [String!] - value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - value_STARTS_WITH: String -} - -input BookTranslatedTitleBookTitle_ENConnectFieldInput { - connect: BookTitle_ENConnectInput - where: BookTitle_ENConnectWhere -} - -input BookTranslatedTitleBookTitle_ENConnectionWhere { - AND: [BookTranslatedTitleBookTitle_ENConnectionWhere!] - NOT: BookTranslatedTitleBookTitle_ENConnectionWhere - OR: [BookTranslatedTitleBookTitle_ENConnectionWhere!] - node: BookTitle_ENWhere - node_NOT: BookTitle_ENWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input BookTranslatedTitleBookTitle_ENCreateFieldInput { - node: BookTitle_ENCreateInput! -} - -input BookTranslatedTitleBookTitle_ENDeleteFieldInput { - delete: BookTitle_ENDeleteInput - where: BookTranslatedTitleBookTitle_ENConnectionWhere -} - -input BookTranslatedTitleBookTitle_ENDisconnectFieldInput { - disconnect: BookTitle_ENDisconnectInput - where: BookTranslatedTitleBookTitle_ENConnectionWhere -} - -input BookTranslatedTitleBookTitle_ENFieldInput { - connect: BookTranslatedTitleBookTitle_ENConnectFieldInput - create: BookTranslatedTitleBookTitle_ENCreateFieldInput -} - -input BookTranslatedTitleBookTitle_ENUpdateConnectionInput { - node: BookTitle_ENUpdateInput -} - -input BookTranslatedTitleBookTitle_ENUpdateFieldInput { - connect: BookTranslatedTitleBookTitle_ENConnectFieldInput - create: BookTranslatedTitleBookTitle_ENCreateFieldInput - delete: BookTranslatedTitleBookTitle_ENDeleteFieldInput - disconnect: BookTranslatedTitleBookTitle_ENDisconnectFieldInput - update: BookTranslatedTitleBookTitle_ENUpdateConnectionInput - where: BookTranslatedTitleBookTitle_ENConnectionWhere -} - -input BookTranslatedTitleBookTitle_SVConnectFieldInput { - connect: BookTitle_SVConnectInput - where: BookTitle_SVConnectWhere -} - -input BookTranslatedTitleBookTitle_SVConnectionWhere { - AND: [BookTranslatedTitleBookTitle_SVConnectionWhere!] - NOT: BookTranslatedTitleBookTitle_SVConnectionWhere - OR: [BookTranslatedTitleBookTitle_SVConnectionWhere!] - node: BookTitle_SVWhere - node_NOT: BookTitle_SVWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input BookTranslatedTitleBookTitle_SVCreateFieldInput { - node: BookTitle_SVCreateInput! -} - -input BookTranslatedTitleBookTitle_SVDeleteFieldInput { - delete: BookTitle_SVDeleteInput - where: BookTranslatedTitleBookTitle_SVConnectionWhere -} - -input BookTranslatedTitleBookTitle_SVDisconnectFieldInput { - disconnect: BookTitle_SVDisconnectInput - where: BookTranslatedTitleBookTitle_SVConnectionWhere -} - -input BookTranslatedTitleBookTitle_SVFieldInput { - connect: BookTranslatedTitleBookTitle_SVConnectFieldInput - create: BookTranslatedTitleBookTitle_SVCreateFieldInput -} - -input BookTranslatedTitleBookTitle_SVUpdateConnectionInput { - node: BookTitle_SVUpdateInput -} - -input BookTranslatedTitleBookTitle_SVUpdateFieldInput { - connect: BookTranslatedTitleBookTitle_SVConnectFieldInput - create: BookTranslatedTitleBookTitle_SVCreateFieldInput - delete: BookTranslatedTitleBookTitle_SVDeleteFieldInput - disconnect: BookTranslatedTitleBookTitle_SVDisconnectFieldInput - update: BookTranslatedTitleBookTitle_SVUpdateConnectionInput - where: BookTranslatedTitleBookTitle_SVConnectionWhere -} - -input BookTranslatedTitleConnectInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENConnectFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVConnectFieldInput -} - -type BookTranslatedTitleConnection { - edges: [BookTranslatedTitleRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input BookTranslatedTitleConnectionWhere { - BookTitle_EN: BookTranslatedTitleBookTitle_ENConnectionWhere - BookTitle_SV: BookTranslatedTitleBookTitle_SVConnectionWhere -} - -input BookTranslatedTitleCreateFieldInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENCreateFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVCreateFieldInput -} - -input BookTranslatedTitleCreateInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVFieldInput -} - -input BookTranslatedTitleDeleteInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENDeleteFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVDeleteFieldInput -} - -input BookTranslatedTitleDisconnectInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENDisconnectFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVDisconnectFieldInput -} - -type BookTranslatedTitleRelationship { - cursor: String! - node: BookTitle! -} - -input BookTranslatedTitleUpdateInput { - BookTitle_EN: BookTranslatedTitleBookTitle_ENUpdateFieldInput - BookTitle_SV: BookTranslatedTitleBookTitle_SVUpdateFieldInput -} - -input BookUpdateInput { - isbn: String - originalTitle: String - translatedTitle: BookTranslatedTitleUpdateInput -} - -input BookWhere { - AND: [BookWhere!] - NOT: BookWhere - OR: [BookWhere!] - isbn: String - isbn_CONTAINS: String - isbn_ENDS_WITH: String - isbn_IN: [String!] - isbn_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isbn_STARTS_WITH: String - originalTitle: String - originalTitle_CONTAINS: String - originalTitle_ENDS_WITH: String - originalTitle_IN: [String!] - originalTitle_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - originalTitle_STARTS_WITH: String - translatedTitleConnection: BookTranslatedTitleConnectionWhere - translatedTitleConnection_NOT: BookTranslatedTitleConnectionWhere -} - -type BooksConnection { - edges: [BookEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateBookTitleEnsMutationResponse { - bookTitleEns: [BookTitle_EN!]! - info: CreateInfo! -} - -type CreateBookTitleSvsMutationResponse { - bookTitleSvs: [BookTitle_SV!]! - info: CreateInfo! -} - -type CreateBooksMutationResponse { - books: [Book!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createBookTitleEns(input: [BookTitle_ENCreateInput!]!): CreateBookTitleEnsMutationResponse! - createBookTitleSvs(input: [BookTitle_SVCreateInput!]!): CreateBookTitleSvsMutationResponse! - createBooks(input: [BookCreateInput!]!): CreateBooksMutationResponse! - deleteBookTitleEns(delete: BookTitle_ENDeleteInput, where: BookTitle_ENWhere): DeleteInfo! - deleteBookTitleSvs(delete: BookTitle_SVDeleteInput, where: BookTitle_SVWhere): DeleteInfo! - deleteBooks(delete: BookDeleteInput, where: BookWhere): DeleteInfo! - updateBookTitleEns(connect: BookTitle_ENConnectInput, create: BookTitle_ENRelationInput, delete: BookTitle_ENDeleteInput, disconnect: BookTitle_ENDisconnectInput, update: BookTitle_ENUpdateInput, where: BookTitle_ENWhere): UpdateBookTitleEnsMutationResponse! - updateBookTitleSvs(connect: BookTitle_SVConnectInput, create: BookTitle_SVRelationInput, delete: BookTitle_SVDeleteInput, disconnect: BookTitle_SVDisconnectInput, update: BookTitle_SVUpdateInput, where: BookTitle_SVWhere): UpdateBookTitleSvsMutationResponse! - updateBooks(connect: BookConnectInput, create: BookRelationInput, delete: BookDeleteInput, disconnect: BookDisconnectInput, update: BookUpdateInput, where: BookWhere): UpdateBooksMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - bookTitleEns(options: BookTitle_ENOptions, where: BookTitle_ENWhere): [BookTitle_EN!]! - bookTitleEnsAggregate(where: BookTitle_ENWhere): BookTitle_ENAggregateSelection! - bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort], where: BookTitle_ENWhere): BookTitleEnsConnection! - bookTitleSvs(options: BookTitle_SVOptions, where: BookTitle_SVWhere): [BookTitle_SV!]! - bookTitleSvsAggregate(where: BookTitle_SVWhere): BookTitle_SVAggregateSelection! - bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort], where: BookTitle_SVWhere): BookTitleSvsConnection! - books(options: BookOptions, where: BookWhere): [Book!]! - booksAggregate(where: BookWhere): BookAggregateSelection! - booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateBookTitleEnsMutationResponse { - bookTitleEns: [BookTitle_EN!]! - info: UpdateInfo! -} - -type UpdateBookTitleSvsMutationResponse { - bookTitleSvs: [BookTitle_SV!]! - info: UpdateInfo! -} - -type UpdateBooksMutationResponse { - books: [Book!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Book { + isbn: String! + originalTitle: String! + translatedTitle(directed: Boolean = true, options: QueryOptions, where: BookTitleWhere): BookTitle + translatedTitleConnection(after: String, directed: Boolean = true, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! + } + + type BookAggregateSelection { + count: Int! + isbn: StringAggregateSelectionNonNullable! + originalTitle: StringAggregateSelectionNonNullable! + } + + input BookConnectInput { + translatedTitle: BookTranslatedTitleConnectInput + } + + input BookConnectWhere { + node: BookWhere! + } + + input BookCreateInput { + isbn: String! + originalTitle: String! + translatedTitle: BookTranslatedTitleCreateInput + } + + input BookDeleteInput { + translatedTitle: BookTranslatedTitleDeleteInput + } + + input BookDisconnectInput { + translatedTitle: BookTranslatedTitleDisconnectInput + } + + type BookEdge { + cursor: String! + node: Book! + } + + input BookOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BookSort objects to sort Books by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BookSort!] + } + + input BookRelationInput { + translatedTitle: BookTranslatedTitleCreateFieldInput + } + + \\"\\"\\" + Fields to sort Books by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookSort object. + \\"\\"\\" + input BookSort { + isbn: SortDirection + originalTitle: SortDirection + } + + union BookTitle = BookTitle_EN | BookTitle_SV + + type BookTitleEnsConnection { + edges: [BookTitle_ENEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type BookTitleSvsConnection { + edges: [BookTitle_SVEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input BookTitleWhere { + BookTitle_EN: BookTitle_ENWhere + BookTitle_SV: BookTitle_SVWhere + } + + type BookTitle_EN { + book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! + bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_ENBookBookAggregationSelection + bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! + value: String! + } + + type BookTitle_ENAggregateSelection { + count: Int! + value: StringAggregateSelectionNonNullable! + } + + input BookTitle_ENBookAggregateInput { + AND: [BookTitle_ENBookAggregateInput!] + NOT: BookTitle_ENBookAggregateInput + OR: [BookTitle_ENBookAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: BookTitle_ENBookNodeAggregationWhereInput + } + + type BookTitle_ENBookBookAggregationSelection { + count: Int! + node: BookTitle_ENBookBookNodeAggregateSelection + } + + type BookTitle_ENBookBookNodeAggregateSelection { + isbn: StringAggregateSelectionNonNullable! + originalTitle: StringAggregateSelectionNonNullable! + } + + input BookTitle_ENBookConnectFieldInput { + connect: BookConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: BookConnectWhere + } + + type BookTitle_ENBookConnection { + edges: [BookTitle_ENBookRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input BookTitle_ENBookConnectionSort { + node: BookSort + } + + input BookTitle_ENBookConnectionWhere { + AND: [BookTitle_ENBookConnectionWhere!] + NOT: BookTitle_ENBookConnectionWhere + OR: [BookTitle_ENBookConnectionWhere!] + node: BookWhere + node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input BookTitle_ENBookCreateFieldInput { + node: BookCreateInput! + } + + input BookTitle_ENBookDeleteFieldInput { + delete: BookDeleteInput + where: BookTitle_ENBookConnectionWhere + } + + input BookTitle_ENBookDisconnectFieldInput { + disconnect: BookDisconnectInput + where: BookTitle_ENBookConnectionWhere + } + + input BookTitle_ENBookFieldInput { + connect: BookTitle_ENBookConnectFieldInput + create: BookTitle_ENBookCreateFieldInput + } + + input BookTitle_ENBookNodeAggregationWhereInput { + AND: [BookTitle_ENBookNodeAggregationWhereInput!] + NOT: BookTitle_ENBookNodeAggregationWhereInput + OR: [BookTitle_ENBookNodeAggregationWhereInput!] + isbn_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_LENGTH_EQUAL: Float + isbn_AVERAGE_LENGTH_GT: Float + isbn_AVERAGE_LENGTH_GTE: Float + isbn_AVERAGE_LENGTH_LT: Float + isbn_AVERAGE_LENGTH_LTE: Float + isbn_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_LENGTH_EQUAL: Int + isbn_LONGEST_LENGTH_GT: Int + isbn_LONGEST_LENGTH_GTE: Int + isbn_LONGEST_LENGTH_LT: Int + isbn_LONGEST_LENGTH_LTE: Int + isbn_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_LENGTH_EQUAL: Int + isbn_SHORTEST_LENGTH_GT: Int + isbn_SHORTEST_LENGTH_GTE: Int + isbn_SHORTEST_LENGTH_LT: Int + isbn_SHORTEST_LENGTH_LTE: Int + isbn_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_LENGTH_EQUAL: Float + originalTitle_AVERAGE_LENGTH_GT: Float + originalTitle_AVERAGE_LENGTH_GTE: Float + originalTitle_AVERAGE_LENGTH_LT: Float + originalTitle_AVERAGE_LENGTH_LTE: Float + originalTitle_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_LENGTH_EQUAL: Int + originalTitle_LONGEST_LENGTH_GT: Int + originalTitle_LONGEST_LENGTH_GTE: Int + originalTitle_LONGEST_LENGTH_LT: Int + originalTitle_LONGEST_LENGTH_LTE: Int + originalTitle_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_LENGTH_EQUAL: Int + originalTitle_SHORTEST_LENGTH_GT: Int + originalTitle_SHORTEST_LENGTH_GTE: Int + originalTitle_SHORTEST_LENGTH_LT: Int + originalTitle_SHORTEST_LENGTH_LTE: Int + originalTitle_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type BookTitle_ENBookRelationship { + cursor: String! + node: Book! + } + + input BookTitle_ENBookUpdateConnectionInput { + node: BookUpdateInput + } + + input BookTitle_ENBookUpdateFieldInput { + connect: BookTitle_ENBookConnectFieldInput + create: BookTitle_ENBookCreateFieldInput + delete: BookTitle_ENBookDeleteFieldInput + disconnect: BookTitle_ENBookDisconnectFieldInput + update: BookTitle_ENBookUpdateConnectionInput + where: BookTitle_ENBookConnectionWhere + } + + input BookTitle_ENConnectInput { + book: BookTitle_ENBookConnectFieldInput + } + + input BookTitle_ENConnectWhere { + node: BookTitle_ENWhere! + } + + input BookTitle_ENCreateInput { + book: BookTitle_ENBookFieldInput + value: String! + } + + input BookTitle_ENDeleteInput { + book: BookTitle_ENBookDeleteFieldInput + } + + input BookTitle_ENDisconnectInput { + book: BookTitle_ENBookDisconnectFieldInput + } + + type BookTitle_ENEdge { + cursor: String! + node: BookTitle_EN! + } + + input BookTitle_ENOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BookTitle_ENSort objects to sort BookTitleEns by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BookTitle_ENSort!] + } + + input BookTitle_ENRelationInput { + book: BookTitle_ENBookCreateFieldInput + } + + \\"\\"\\" + Fields to sort BookTitleEns by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_ENSort object. + \\"\\"\\" + input BookTitle_ENSort { + value: SortDirection + } + + input BookTitle_ENUpdateInput { + book: BookTitle_ENBookUpdateFieldInput + value: String + } + + input BookTitle_ENWhere { + AND: [BookTitle_ENWhere!] + NOT: BookTitle_ENWhere + OR: [BookTitle_ENWhere!] + book: BookWhere + bookAggregate: BookTitle_ENBookAggregateInput + bookConnection: BookTitle_ENBookConnectionWhere + bookConnection_NOT: BookTitle_ENBookConnectionWhere + book_NOT: BookWhere + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String!] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + } + + type BookTitle_SV { + book(directed: Boolean = true, options: BookOptions, where: BookWhere): Book! + bookAggregate(directed: Boolean = true, where: BookWhere): BookTitle_SVBookBookAggregationSelection + bookConnection(after: String, directed: Boolean = true, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! + value: String! + } + + type BookTitle_SVAggregateSelection { + count: Int! + value: StringAggregateSelectionNonNullable! + } + + input BookTitle_SVBookAggregateInput { + AND: [BookTitle_SVBookAggregateInput!] + NOT: BookTitle_SVBookAggregateInput + OR: [BookTitle_SVBookAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: BookTitle_SVBookNodeAggregationWhereInput + } + + type BookTitle_SVBookBookAggregationSelection { + count: Int! + node: BookTitle_SVBookBookNodeAggregateSelection + } + + type BookTitle_SVBookBookNodeAggregateSelection { + isbn: StringAggregateSelectionNonNullable! + originalTitle: StringAggregateSelectionNonNullable! + } + + input BookTitle_SVBookConnectFieldInput { + connect: BookConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: BookConnectWhere + } + + type BookTitle_SVBookConnection { + edges: [BookTitle_SVBookRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input BookTitle_SVBookConnectionSort { + node: BookSort + } + + input BookTitle_SVBookConnectionWhere { + AND: [BookTitle_SVBookConnectionWhere!] + NOT: BookTitle_SVBookConnectionWhere + OR: [BookTitle_SVBookConnectionWhere!] + node: BookWhere + node_NOT: BookWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input BookTitle_SVBookCreateFieldInput { + node: BookCreateInput! + } + + input BookTitle_SVBookDeleteFieldInput { + delete: BookDeleteInput + where: BookTitle_SVBookConnectionWhere + } + + input BookTitle_SVBookDisconnectFieldInput { + disconnect: BookDisconnectInput + where: BookTitle_SVBookConnectionWhere + } + + input BookTitle_SVBookFieldInput { + connect: BookTitle_SVBookConnectFieldInput + create: BookTitle_SVBookCreateFieldInput + } + + input BookTitle_SVBookNodeAggregationWhereInput { + AND: [BookTitle_SVBookNodeAggregationWhereInput!] + NOT: BookTitle_SVBookNodeAggregationWhereInput + OR: [BookTitle_SVBookNodeAggregationWhereInput!] + isbn_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_LENGTH_EQUAL: Float + isbn_AVERAGE_LENGTH_GT: Float + isbn_AVERAGE_LENGTH_GTE: Float + isbn_AVERAGE_LENGTH_LT: Float + isbn_AVERAGE_LENGTH_LTE: Float + isbn_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_LENGTH_EQUAL: Int + isbn_LONGEST_LENGTH_GT: Int + isbn_LONGEST_LENGTH_GTE: Int + isbn_LONGEST_LENGTH_LT: Int + isbn_LONGEST_LENGTH_LTE: Int + isbn_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + isbn_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_LENGTH_EQUAL: Int + isbn_SHORTEST_LENGTH_GT: Int + isbn_SHORTEST_LENGTH_GTE: Int + isbn_SHORTEST_LENGTH_LT: Int + isbn_SHORTEST_LENGTH_LTE: Int + isbn_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + isbn_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_LENGTH_EQUAL: Float + originalTitle_AVERAGE_LENGTH_GT: Float + originalTitle_AVERAGE_LENGTH_GTE: Float + originalTitle_AVERAGE_LENGTH_LT: Float + originalTitle_AVERAGE_LENGTH_LTE: Float + originalTitle_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_LENGTH_EQUAL: Int + originalTitle_LONGEST_LENGTH_GT: Int + originalTitle_LONGEST_LENGTH_GTE: Int + originalTitle_LONGEST_LENGTH_LT: Int + originalTitle_LONGEST_LENGTH_LTE: Int + originalTitle_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + originalTitle_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_LENGTH_EQUAL: Int + originalTitle_SHORTEST_LENGTH_GT: Int + originalTitle_SHORTEST_LENGTH_GTE: Int + originalTitle_SHORTEST_LENGTH_LT: Int + originalTitle_SHORTEST_LENGTH_LTE: Int + originalTitle_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + originalTitle_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type BookTitle_SVBookRelationship { + cursor: String! + node: Book! + } + + input BookTitle_SVBookUpdateConnectionInput { + node: BookUpdateInput + } + + input BookTitle_SVBookUpdateFieldInput { + connect: BookTitle_SVBookConnectFieldInput + create: BookTitle_SVBookCreateFieldInput + delete: BookTitle_SVBookDeleteFieldInput + disconnect: BookTitle_SVBookDisconnectFieldInput + update: BookTitle_SVBookUpdateConnectionInput + where: BookTitle_SVBookConnectionWhere + } + + input BookTitle_SVConnectInput { + book: BookTitle_SVBookConnectFieldInput + } + + input BookTitle_SVConnectWhere { + node: BookTitle_SVWhere! + } + + input BookTitle_SVCreateInput { + book: BookTitle_SVBookFieldInput + value: String! + } + + input BookTitle_SVDeleteInput { + book: BookTitle_SVBookDeleteFieldInput + } + + input BookTitle_SVDisconnectInput { + book: BookTitle_SVBookDisconnectFieldInput + } + + type BookTitle_SVEdge { + cursor: String! + node: BookTitle_SV! + } + + input BookTitle_SVOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more BookTitle_SVSort objects to sort BookTitleSvs by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [BookTitle_SVSort!] + } + + input BookTitle_SVRelationInput { + book: BookTitle_SVBookCreateFieldInput + } + + \\"\\"\\" + Fields to sort BookTitleSvs by. The order in which sorts are applied is not guaranteed when specifying many fields in one BookTitle_SVSort object. + \\"\\"\\" + input BookTitle_SVSort { + value: SortDirection + } + + input BookTitle_SVUpdateInput { + book: BookTitle_SVBookUpdateFieldInput + value: String + } + + input BookTitle_SVWhere { + AND: [BookTitle_SVWhere!] + NOT: BookTitle_SVWhere + OR: [BookTitle_SVWhere!] + book: BookWhere + bookAggregate: BookTitle_SVBookAggregateInput + bookConnection: BookTitle_SVBookConnectionWhere + bookConnection_NOT: BookTitle_SVBookConnectionWhere + book_NOT: BookWhere + value: String + value_CONTAINS: String + value_ENDS_WITH: String + value_IN: [String!] + value_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + value_STARTS_WITH: String + } + + input BookTranslatedTitleBookTitle_ENConnectFieldInput { + connect: BookTitle_ENConnectInput + where: BookTitle_ENConnectWhere + } + + input BookTranslatedTitleBookTitle_ENConnectionWhere { + AND: [BookTranslatedTitleBookTitle_ENConnectionWhere!] + NOT: BookTranslatedTitleBookTitle_ENConnectionWhere + OR: [BookTranslatedTitleBookTitle_ENConnectionWhere!] + node: BookTitle_ENWhere + node_NOT: BookTitle_ENWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input BookTranslatedTitleBookTitle_ENCreateFieldInput { + node: BookTitle_ENCreateInput! + } + + input BookTranslatedTitleBookTitle_ENDeleteFieldInput { + delete: BookTitle_ENDeleteInput + where: BookTranslatedTitleBookTitle_ENConnectionWhere + } + + input BookTranslatedTitleBookTitle_ENDisconnectFieldInput { + disconnect: BookTitle_ENDisconnectInput + where: BookTranslatedTitleBookTitle_ENConnectionWhere + } + + input BookTranslatedTitleBookTitle_ENFieldInput { + connect: BookTranslatedTitleBookTitle_ENConnectFieldInput + create: BookTranslatedTitleBookTitle_ENCreateFieldInput + } + + input BookTranslatedTitleBookTitle_ENUpdateConnectionInput { + node: BookTitle_ENUpdateInput + } + + input BookTranslatedTitleBookTitle_ENUpdateFieldInput { + connect: BookTranslatedTitleBookTitle_ENConnectFieldInput + create: BookTranslatedTitleBookTitle_ENCreateFieldInput + delete: BookTranslatedTitleBookTitle_ENDeleteFieldInput + disconnect: BookTranslatedTitleBookTitle_ENDisconnectFieldInput + update: BookTranslatedTitleBookTitle_ENUpdateConnectionInput + where: BookTranslatedTitleBookTitle_ENConnectionWhere + } + + input BookTranslatedTitleBookTitle_SVConnectFieldInput { + connect: BookTitle_SVConnectInput + where: BookTitle_SVConnectWhere + } + + input BookTranslatedTitleBookTitle_SVConnectionWhere { + AND: [BookTranslatedTitleBookTitle_SVConnectionWhere!] + NOT: BookTranslatedTitleBookTitle_SVConnectionWhere + OR: [BookTranslatedTitleBookTitle_SVConnectionWhere!] + node: BookTitle_SVWhere + node_NOT: BookTitle_SVWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input BookTranslatedTitleBookTitle_SVCreateFieldInput { + node: BookTitle_SVCreateInput! + } + + input BookTranslatedTitleBookTitle_SVDeleteFieldInput { + delete: BookTitle_SVDeleteInput + where: BookTranslatedTitleBookTitle_SVConnectionWhere + } + + input BookTranslatedTitleBookTitle_SVDisconnectFieldInput { + disconnect: BookTitle_SVDisconnectInput + where: BookTranslatedTitleBookTitle_SVConnectionWhere + } + + input BookTranslatedTitleBookTitle_SVFieldInput { + connect: BookTranslatedTitleBookTitle_SVConnectFieldInput + create: BookTranslatedTitleBookTitle_SVCreateFieldInput + } + + input BookTranslatedTitleBookTitle_SVUpdateConnectionInput { + node: BookTitle_SVUpdateInput + } + + input BookTranslatedTitleBookTitle_SVUpdateFieldInput { + connect: BookTranslatedTitleBookTitle_SVConnectFieldInput + create: BookTranslatedTitleBookTitle_SVCreateFieldInput + delete: BookTranslatedTitleBookTitle_SVDeleteFieldInput + disconnect: BookTranslatedTitleBookTitle_SVDisconnectFieldInput + update: BookTranslatedTitleBookTitle_SVUpdateConnectionInput + where: BookTranslatedTitleBookTitle_SVConnectionWhere + } + + input BookTranslatedTitleConnectInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENConnectFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVConnectFieldInput + } + + type BookTranslatedTitleConnection { + edges: [BookTranslatedTitleRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input BookTranslatedTitleConnectionWhere { + BookTitle_EN: BookTranslatedTitleBookTitle_ENConnectionWhere + BookTitle_SV: BookTranslatedTitleBookTitle_SVConnectionWhere + } + + input BookTranslatedTitleCreateFieldInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENCreateFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVCreateFieldInput + } + + input BookTranslatedTitleCreateInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVFieldInput + } + + input BookTranslatedTitleDeleteInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENDeleteFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVDeleteFieldInput + } + + input BookTranslatedTitleDisconnectInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENDisconnectFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVDisconnectFieldInput + } + + type BookTranslatedTitleRelationship { + cursor: String! + node: BookTitle! + } + + input BookTranslatedTitleUpdateInput { + BookTitle_EN: BookTranslatedTitleBookTitle_ENUpdateFieldInput + BookTitle_SV: BookTranslatedTitleBookTitle_SVUpdateFieldInput + } + + input BookUpdateInput { + isbn: String + originalTitle: String + translatedTitle: BookTranslatedTitleUpdateInput + } + + input BookWhere { + AND: [BookWhere!] + NOT: BookWhere + OR: [BookWhere!] + isbn: String + isbn_CONTAINS: String + isbn_ENDS_WITH: String + isbn_IN: [String!] + isbn_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isbn_STARTS_WITH: String + originalTitle: String + originalTitle_CONTAINS: String + originalTitle_ENDS_WITH: String + originalTitle_IN: [String!] + originalTitle_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + originalTitle_STARTS_WITH: String + translatedTitleConnection: BookTranslatedTitleConnectionWhere + translatedTitleConnection_NOT: BookTranslatedTitleConnectionWhere + } + + type BooksConnection { + edges: [BookEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateBookTitleEnsMutationResponse { + bookTitleEns: [BookTitle_EN!]! + info: CreateInfo! + } + + type CreateBookTitleSvsMutationResponse { + bookTitleSvs: [BookTitle_SV!]! + info: CreateInfo! + } + + type CreateBooksMutationResponse { + books: [Book!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createBookTitleEns(input: [BookTitle_ENCreateInput!]!): CreateBookTitleEnsMutationResponse! + createBookTitleSvs(input: [BookTitle_SVCreateInput!]!): CreateBookTitleSvsMutationResponse! + createBooks(input: [BookCreateInput!]!): CreateBooksMutationResponse! + deleteBookTitleEns(delete: BookTitle_ENDeleteInput, where: BookTitle_ENWhere): DeleteInfo! + deleteBookTitleSvs(delete: BookTitle_SVDeleteInput, where: BookTitle_SVWhere): DeleteInfo! + deleteBooks(delete: BookDeleteInput, where: BookWhere): DeleteInfo! + updateBookTitleEns(connect: BookTitle_ENConnectInput, create: BookTitle_ENRelationInput, delete: BookTitle_ENDeleteInput, disconnect: BookTitle_ENDisconnectInput, update: BookTitle_ENUpdateInput, where: BookTitle_ENWhere): UpdateBookTitleEnsMutationResponse! + updateBookTitleSvs(connect: BookTitle_SVConnectInput, create: BookTitle_SVRelationInput, delete: BookTitle_SVDeleteInput, disconnect: BookTitle_SVDisconnectInput, update: BookTitle_SVUpdateInput, where: BookTitle_SVWhere): UpdateBookTitleSvsMutationResponse! + updateBooks(connect: BookConnectInput, create: BookRelationInput, delete: BookDeleteInput, disconnect: BookDisconnectInput, update: BookUpdateInput, where: BookWhere): UpdateBooksMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + bookTitleEns(options: BookTitle_ENOptions, where: BookTitle_ENWhere): [BookTitle_EN!]! + bookTitleEnsAggregate(where: BookTitle_ENWhere): BookTitle_ENAggregateSelection! + bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort], where: BookTitle_ENWhere): BookTitleEnsConnection! + bookTitleSvs(options: BookTitle_SVOptions, where: BookTitle_SVWhere): [BookTitle_SV!]! + bookTitleSvsAggregate(where: BookTitle_SVWhere): BookTitle_SVAggregateSelection! + bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort], where: BookTitle_SVWhere): BookTitleSvsConnection! + books(options: BookOptions, where: BookWhere): [Book!]! + booksAggregate(where: BookWhere): BookAggregateSelection! + booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateBookTitleEnsMutationResponse { + bookTitleEns: [BookTitle_EN!]! + info: UpdateInfo! + } + + type UpdateBookTitleSvsMutationResponse { + bookTitleSvs: [BookTitle_SV!]! + info: UpdateInfo! + } + + type UpdateBooksMutationResponse { + books: [Book!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 38ccdc4392..01ece2ae39 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -45,372 +45,372 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -interface FOLLOWS { - since: DateTime! -} - -input FOLLOWSSort { - since: SortDirection -} - -input FOLLOWSWhere { - AND: [FOLLOWSWhere!] - NOT: FOLLOWSWhere - OR: [FOLLOWSWhere!] - since: DateTime - since_GT: DateTime - since_GTE: DateTime - since_IN: [DateTime!] - since_LT: DateTime - since_LTE: DateTime - since_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - since_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -interface Profile { - id: ID! - userName: String! -} - -input ProfileConnectInput { - _on: ProfileImplementationsConnectInput -} - -input ProfileConnectWhere { - node: ProfileWhere! -} - -input ProfileCreateInput { - User: UserCreateInput -} - -input ProfileDeleteInput { - _on: ProfileImplementationsDeleteInput -} - -input ProfileDisconnectInput { - _on: ProfileImplementationsDisconnectInput -} - -input ProfileImplementationsConnectInput { - User: [UserConnectInput!] -} - -input ProfileImplementationsDeleteInput { - User: [UserDeleteInput!] -} - -input ProfileImplementationsDisconnectInput { - User: [UserDisconnectInput!] -} - -input ProfileImplementationsUpdateInput { - User: UserUpdateInput -} - -input ProfileImplementationsWhere { - User: UserWhere -} - -input ProfileOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more ProfileSort objects to sort Profiles by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [ProfileSort] -} - -\\"\\"\\" -Fields to sort Profiles by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProfileSort object. -\\"\\"\\" -input ProfileSort { - id: SortDirection - userName: SortDirection -} - -input ProfileUpdateInput { - _on: ProfileImplementationsUpdateInput - userName: String -} - -input ProfileWhere { - _on: ProfileImplementationsWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - userName: String - userName_CONTAINS: String - userName_ENDS_WITH: String - userName_IN: [String!] - userName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_STARTS_WITH: String -} - -type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User implements Profile { - following(directed: Boolean = true, options: ProfileOptions, where: ProfileWhere): [Profile!]! - followingConnection(after: String, directed: Boolean = true, first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! - id: ID! - userName: String! -} - -type UserAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - userName: StringAggregateSelectionNonNullable! -} - -input UserConnectInput { - following: [UserFollowingConnectFieldInput!] -} - -input UserCreateInput { - following: UserFollowingFieldInput - userName: String! -} - -input UserDeleteInput { - following: [UserFollowingDeleteFieldInput!] -} - -input UserDisconnectInput { - following: [UserFollowingDisconnectFieldInput!] -} - -type UserEdge { - cursor: String! - node: User! -} - -input UserFollowingConnectFieldInput { - connect: ProfileConnectInput - where: ProfileConnectWhere -} - -type UserFollowingConnection { - edges: [UserFollowingRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserFollowingConnectionSort { - edge: FOLLOWSSort - node: ProfileSort -} - -input UserFollowingConnectionWhere { - AND: [UserFollowingConnectionWhere!] - NOT: UserFollowingConnectionWhere - OR: [UserFollowingConnectionWhere!] - edge: FOLLOWSWhere - edge_NOT: FOLLOWSWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ProfileWhere - node_NOT: ProfileWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input UserFollowingCreateFieldInput { - node: ProfileCreateInput! -} - -input UserFollowingDeleteFieldInput { - delete: ProfileDeleteInput - where: UserFollowingConnectionWhere -} - -input UserFollowingDisconnectFieldInput { - disconnect: ProfileDisconnectInput - where: UserFollowingConnectionWhere -} - -input UserFollowingFieldInput { - connect: [UserFollowingConnectFieldInput!] - create: [UserFollowingCreateFieldInput!] -} - -type UserFollowingRelationship implements FOLLOWS { - cursor: String! - node: Profile! - since: DateTime! -} - -input UserFollowingUpdateConnectionInput { - node: ProfileUpdateInput -} - -input UserFollowingUpdateFieldInput { - connect: [UserFollowingConnectFieldInput!] - create: [UserFollowingCreateFieldInput!] - delete: [UserFollowingDeleteFieldInput!] - disconnect: [UserFollowingDisconnectFieldInput!] - update: UserFollowingUpdateConnectionInput - where: UserFollowingConnectionWhere -} - -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!] -} - -input UserRelationInput { - following: [UserFollowingCreateFieldInput!] -} - -\\"\\"\\" -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 { - id: SortDirection - userName: SortDirection -} - -input UserUpdateInput { - following: [UserFollowingUpdateFieldInput!] - userName: String -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - followingConnection: UserFollowingConnectionWhere @deprecated(reason: \\"Use \`followingConnection_SOME\` instead.\\") - \\"\\"\\" - Return Users where all of the related UserFollowingConnections match this filter - \\"\\"\\" - followingConnection_ALL: UserFollowingConnectionWhere - \\"\\"\\" - Return Users where none of the related UserFollowingConnections match this filter - \\"\\"\\" - followingConnection_NONE: UserFollowingConnectionWhere - followingConnection_NOT: UserFollowingConnectionWhere @deprecated(reason: \\"Use \`followingConnection_NONE\` instead.\\") - \\"\\"\\" - Return Users where one of the related UserFollowingConnections match this filter - \\"\\"\\" - followingConnection_SINGLE: UserFollowingConnectionWhere - \\"\\"\\" - Return Users where some of the related UserFollowingConnections match this filter - \\"\\"\\" - followingConnection_SOME: UserFollowingConnectionWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - userName: String - userName_CONTAINS: String - userName_ENDS_WITH: String - userName_IN: [String!] - userName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - userName_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + interface FOLLOWS { + since: DateTime! + } + + input FOLLOWSSort { + since: SortDirection + } + + input FOLLOWSWhere { + AND: [FOLLOWSWhere!] + NOT: FOLLOWSWhere + OR: [FOLLOWSWhere!] + since: DateTime + since_GT: DateTime + since_GTE: DateTime + since_IN: [DateTime!] + since_LT: DateTime + since_LTE: DateTime + since_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + since_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Profile { + id: ID! + userName: String! + } + + input ProfileConnectInput { + _on: ProfileImplementationsConnectInput + } + + input ProfileConnectWhere { + node: ProfileWhere! + } + + input ProfileCreateInput { + User: UserCreateInput + } + + input ProfileDeleteInput { + _on: ProfileImplementationsDeleteInput + } + + input ProfileDisconnectInput { + _on: ProfileImplementationsDisconnectInput + } + + input ProfileImplementationsConnectInput { + User: [UserConnectInput!] + } + + input ProfileImplementationsDeleteInput { + User: [UserDeleteInput!] + } + + input ProfileImplementationsDisconnectInput { + User: [UserDisconnectInput!] + } + + input ProfileImplementationsUpdateInput { + User: UserUpdateInput + } + + input ProfileImplementationsWhere { + User: UserWhere + } + + input ProfileOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ProfileSort objects to sort Profiles by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ProfileSort] + } + + \\"\\"\\" + Fields to sort Profiles by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProfileSort object. + \\"\\"\\" + input ProfileSort { + id: SortDirection + userName: SortDirection + } + + input ProfileUpdateInput { + _on: ProfileImplementationsUpdateInput + userName: String + } + + input ProfileWhere { + _on: ProfileImplementationsWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + userName: String + userName_CONTAINS: String + userName_ENDS_WITH: String + userName_IN: [String!] + userName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_STARTS_WITH: String + } + + type Query { + users(options: UserOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User implements Profile { + following(directed: Boolean = true, options: ProfileOptions, where: ProfileWhere): [Profile!]! + followingConnection(after: String, directed: Boolean = true, first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! + id: ID! + userName: String! + } + + type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + userName: StringAggregateSelectionNonNullable! + } + + input UserConnectInput { + following: [UserFollowingConnectFieldInput!] + } + + input UserCreateInput { + following: UserFollowingFieldInput + userName: String! + } + + input UserDeleteInput { + following: [UserFollowingDeleteFieldInput!] + } + + input UserDisconnectInput { + following: [UserFollowingDisconnectFieldInput!] + } + + type UserEdge { + cursor: String! + node: User! + } + + input UserFollowingConnectFieldInput { + connect: ProfileConnectInput + where: ProfileConnectWhere + } + + type UserFollowingConnection { + edges: [UserFollowingRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserFollowingConnectionSort { + edge: FOLLOWSSort + node: ProfileSort + } + + input UserFollowingConnectionWhere { + AND: [UserFollowingConnectionWhere!] + NOT: UserFollowingConnectionWhere + OR: [UserFollowingConnectionWhere!] + edge: FOLLOWSWhere + edge_NOT: FOLLOWSWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ProfileWhere + node_NOT: ProfileWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserFollowingCreateFieldInput { + node: ProfileCreateInput! + } + + input UserFollowingDeleteFieldInput { + delete: ProfileDeleteInput + where: UserFollowingConnectionWhere + } + + input UserFollowingDisconnectFieldInput { + disconnect: ProfileDisconnectInput + where: UserFollowingConnectionWhere + } + + input UserFollowingFieldInput { + connect: [UserFollowingConnectFieldInput!] + create: [UserFollowingCreateFieldInput!] + } + + type UserFollowingRelationship implements FOLLOWS { + cursor: String! + node: Profile! + since: DateTime! + } + + input UserFollowingUpdateConnectionInput { + node: ProfileUpdateInput + } + + input UserFollowingUpdateFieldInput { + connect: [UserFollowingConnectFieldInput!] + create: [UserFollowingCreateFieldInput!] + delete: [UserFollowingDeleteFieldInput!] + disconnect: [UserFollowingDisconnectFieldInput!] + update: UserFollowingUpdateConnectionInput + where: UserFollowingConnectionWhere + } + + 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!] + } + + input UserRelationInput { + following: [UserFollowingCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: SortDirection + userName: SortDirection + } + + input UserUpdateInput { + following: [UserFollowingUpdateFieldInput!] + userName: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + followingConnection: UserFollowingConnectionWhere @deprecated(reason: \\"Use \`followingConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserFollowingConnections match this filter + \\"\\"\\" + followingConnection_ALL: UserFollowingConnectionWhere + \\"\\"\\" + Return Users where none of the related UserFollowingConnections match this filter + \\"\\"\\" + followingConnection_NONE: UserFollowingConnectionWhere + followingConnection_NOT: UserFollowingConnectionWhere @deprecated(reason: \\"Use \`followingConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserFollowingConnections match this filter + \\"\\"\\" + followingConnection_SINGLE: UserFollowingConnectionWhere + \\"\\"\\" + Return Users where some of the related UserFollowingConnections match this filter + \\"\\"\\" + followingConnection_SOME: UserFollowingConnectionWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + userName: String + userName_CONTAINS: String + userName_ENDS_WITH: String + userName_IN: [String!] + userName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + userName_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 97eb86ecb5..133acf25e4 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -39,355 +39,355 @@ describe("Relationship nested operations", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! -} - -\\"\\"\\" -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePeople(where: PersonWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - id: ID! - name: String -} - -type PersonAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNullable! -} - -input PersonCreateInput { - name: String -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - id: SortDirection - name: SortDirection -} - -input PersonUpdateInput { - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + } + + \\"\\"\\" + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePeople(where: PersonWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + id: ID! + name: String + } + + type PersonAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNullable! + } + + input PersonCreateInput { + name: String + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + id: SortDirection + name: SortDirection + } + + input PersonUpdateInput { + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); }); test("Single relationship to union with unique fields with no nested operation specified", async () => { @@ -411,358 +411,358 @@ type UpdatePeopleMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePersonOnesMutationResponse { - info: CreateInfo! - personOnes: [PersonOne!]! -} - -type CreatePersonTwosMutationResponse { - info: CreateInfo! - personTwos: [PersonTwo!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionWhere { - PersonOne: MovieActorsPersonOneConnectionWhere - PersonTwo: MovieActorsPersonTwoConnectionWhere -} - -input MovieActorsPersonOneConnectionWhere { - AND: [MovieActorsPersonOneConnectionWhere!] - NOT: MovieActorsPersonOneConnectionWhere - OR: [MovieActorsPersonOneConnectionWhere!] - node: PersonOneWhere - node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsPersonTwoConnectionWhere { - AND: [MovieActorsPersonTwoConnectionWhere!] - NOT: MovieActorsPersonTwoConnectionWhere - OR: [MovieActorsPersonTwoConnectionWhere!] - node: PersonTwoWhere - node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Person! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID -} - -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 { - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! - createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - deletePersonOnes(where: PersonOneWhere): DeleteInfo! - deletePersonTwos(where: PersonTwoWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! - updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -union Person = PersonOne | PersonTwo - -type PersonOne { - name: String -} - -type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input PersonOneCreateInput { - name: String -} - -type PersonOneEdge { - cursor: String! - node: PersonOne! -} - -input PersonOneOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonOneSort!] -} - -\\"\\"\\" -Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. -\\"\\"\\" -input PersonOneSort { - name: SortDirection -} - -input PersonOneUpdateInput { - name: String -} - -input PersonOneWhere { - AND: [PersonOneWhere!] - NOT: PersonOneWhere - OR: [PersonOneWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type PersonOnesConnection { - edges: [PersonOneEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type PersonTwo { - nameTwo: String -} - -type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelectionNullable! -} - -input PersonTwoCreateInput { - nameTwo: String -} - -type PersonTwoEdge { - cursor: String! - node: PersonTwo! -} - -input PersonTwoOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonTwoSort!] -} - -\\"\\"\\" -Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. -\\"\\"\\" -input PersonTwoSort { - nameTwo: SortDirection -} - -input PersonTwoUpdateInput { - nameTwo: String -} - -input PersonTwoWhere { - AND: [PersonTwoWhere!] - NOT: PersonTwoWhere - OR: [PersonTwoWhere!] - nameTwo: String - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_IN: [String] - nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - nameTwo_STARTS_WITH: String -} - -type PersonTwosConnection { - edges: [PersonTwoEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWhere { - PersonOne: PersonOneWhere - PersonTwo: PersonTwoWhere -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! - personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! - personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! - personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePersonOnesMutationResponse { - info: UpdateInfo! - personOnes: [PersonOne!]! -} - -type UpdatePersonTwosMutationResponse { - info: UpdateInfo! - personTwos: [PersonTwo!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePersonOnesMutationResponse { + info: CreateInfo! + personOnes: [PersonOne!]! + } + + type CreatePersonTwosMutationResponse { + info: CreateInfo! + personTwos: [PersonTwo!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true, options: QueryOptions, where: PersonWhere): [Person!]! + actorsConnection(after: String, directed: Boolean = true, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionWhere { + PersonOne: MovieActorsPersonOneConnectionWhere + PersonTwo: MovieActorsPersonTwoConnectionWhere + } + + input MovieActorsPersonOneConnectionWhere { + AND: [MovieActorsPersonOneConnectionWhere!] + NOT: MovieActorsPersonOneConnectionWhere + OR: [MovieActorsPersonOneConnectionWhere!] + node: PersonOneWhere + node_NOT: PersonOneWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsPersonTwoConnectionWhere { + AND: [MovieActorsPersonTwoConnectionWhere!] + NOT: MovieActorsPersonTwoConnectionWhere + OR: [MovieActorsPersonTwoConnectionWhere!] + node: PersonTwoWhere + node_NOT: PersonTwoWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Person! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + } + + 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 { + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPersonOnes(input: [PersonOneCreateInput!]!): CreatePersonOnesMutationResponse! + createPersonTwos(input: [PersonTwoCreateInput!]!): CreatePersonTwosMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deletePersonOnes(where: PersonOneWhere): DeleteInfo! + deletePersonTwos(where: PersonTwoWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePersonOnes(update: PersonOneUpdateInput, where: PersonOneWhere): UpdatePersonOnesMutationResponse! + updatePersonTwos(update: PersonTwoUpdateInput, where: PersonTwoWhere): UpdatePersonTwosMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + union Person = PersonOne | PersonTwo + + type PersonOne { + name: String + } + + type PersonOneAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input PersonOneCreateInput { + name: String + } + + type PersonOneEdge { + cursor: String! + node: PersonOne! + } + + input PersonOneOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonOneSort objects to sort PersonOnes by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonOneSort!] + } + + \\"\\"\\" + Fields to sort PersonOnes by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonOneSort object. + \\"\\"\\" + input PersonOneSort { + name: SortDirection + } + + input PersonOneUpdateInput { + name: String + } + + input PersonOneWhere { + AND: [PersonOneWhere!] + NOT: PersonOneWhere + OR: [PersonOneWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type PersonOnesConnection { + edges: [PersonOneEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type PersonTwo { + nameTwo: String + } + + type PersonTwoAggregateSelection { + count: Int! + nameTwo: StringAggregateSelectionNullable! + } + + input PersonTwoCreateInput { + nameTwo: String + } + + type PersonTwoEdge { + cursor: String! + node: PersonTwo! + } + + input PersonTwoOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonTwoSort objects to sort PersonTwos by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonTwoSort!] + } + + \\"\\"\\" + Fields to sort PersonTwos by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonTwoSort object. + \\"\\"\\" + input PersonTwoSort { + nameTwo: SortDirection + } + + input PersonTwoUpdateInput { + nameTwo: String + } + + input PersonTwoWhere { + AND: [PersonTwoWhere!] + NOT: PersonTwoWhere + OR: [PersonTwoWhere!] + nameTwo: String + nameTwo_CONTAINS: String + nameTwo_ENDS_WITH: String + nameTwo_IN: [String] + nameTwo_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + nameTwo_STARTS_WITH: String + } + + type PersonTwosConnection { + edges: [PersonTwoEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWhere { + PersonOne: PersonOneWhere + PersonTwo: PersonTwoWhere + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + personOnes(options: PersonOneOptions, where: PersonOneWhere): [PersonOne!]! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesConnection(after: String, first: Int, sort: [PersonOneSort], where: PersonOneWhere): PersonOnesConnection! + personTwos(options: PersonTwoOptions, where: PersonTwoWhere): [PersonTwo!]! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePersonOnesMutationResponse { + info: UpdateInfo! + personOnes: [PersonOne!]! + } + + type UpdatePersonTwosMutationResponse { + info: UpdateInfo! + personTwos: [PersonTwo!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 3e269e51d5..d1400af969 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -68,2390 +68,2390 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Genre { - name: String! - product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! - productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! -} - -type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input GenreConnectInput { - product: [GenreProductConnectFieldInput!] -} - -input GenreConnectOrCreateWhere { - node: GenreUniqueWhere! -} - -input GenreConnectWhere { - node: GenreWhere! -} - -type GenreConnectedRelationships { - product: GenreProductConnectedRelationship -} - -input GenreCreateInput { - name: String! - product: GenreProductFieldInput -} - -type GenreCreatedEvent { - createdGenre: GenreEventPayload! - event: EventType! - timestamp: Float! -} - -input GenreDeleteInput { - product: [GenreProductDeleteFieldInput!] -} - -type GenreDeletedEvent { - deletedGenre: GenreEventPayload! - event: EventType! - timestamp: Float! -} - -input GenreDisconnectInput { - product: [GenreProductDisconnectFieldInput!] -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreEventPayload { - name: String! -} - -input GenreOnCreateInput { - name: String! -} - -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!] -} - -input GenreProductConnectFieldInput { - connect: IProductConnectInput - where: IProductConnectWhere -} - -type GenreProductConnectedRelationship { - node: IProductEventPayload! -} - -type GenreProductConnection { - edges: [GenreProductRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input GenreProductConnectionSort { - node: IProductSort -} - -input GenreProductConnectionWhere { - AND: [GenreProductConnectionWhere!] - NOT: GenreProductConnectionWhere - OR: [GenreProductConnectionWhere!] - node: IProductWhere - node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input GenreProductCreateFieldInput { - node: IProductCreateInput! -} - -input GenreProductDeleteFieldInput { - delete: IProductDeleteInput - where: GenreProductConnectionWhere -} - -input GenreProductDisconnectFieldInput { - disconnect: IProductDisconnectInput - where: GenreProductConnectionWhere -} - -input GenreProductFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] -} - -type GenreProductRelationship { - cursor: String! - node: IProduct! -} - -input GenreProductRelationshipSubscriptionWhere { - node: IProductSubscriptionWhere -} - -input GenreProductUpdateConnectionInput { - node: IProductUpdateInput -} - -input GenreProductUpdateFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - delete: [GenreProductDeleteFieldInput!] - disconnect: [GenreProductDisconnectFieldInput!] - update: GenreProductUpdateConnectionInput - where: GenreProductConnectionWhere -} - -input GenreRelationInput { - product: [GenreProductCreateFieldInput!] -} - -type GenreRelationshipCreatedEvent { - createdRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input GenreRelationshipCreatedSubscriptionWhere { - AND: [GenreRelationshipCreatedSubscriptionWhere!] - NOT: GenreRelationshipCreatedSubscriptionWhere - OR: [GenreRelationshipCreatedSubscriptionWhere!] - createdRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere -} - -type GenreRelationshipDeletedEvent { - deletedRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input GenreRelationshipDeletedSubscriptionWhere { - AND: [GenreRelationshipDeletedSubscriptionWhere!] - NOT: GenreRelationshipDeletedSubscriptionWhere - OR: [GenreRelationshipDeletedSubscriptionWhere!] - deletedRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere -} - -input GenreRelationshipsSubscriptionWhere { - product: GenreProductRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - name: SortDirection -} - -input GenreSubscriptionWhere { - AND: [GenreSubscriptionWhere!] - NOT: GenreSubscriptionWhere - OR: [GenreSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input GenreUniqueWhere { - name: String -} - -input GenreUpdateInput { - name: String - product: [GenreProductUpdateFieldInput!] -} - -type GenreUpdatedEvent { - event: EventType! - previousState: GenreEventPayload! - timestamp: Float! - updatedGenre: GenreEventPayload! -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_ALL: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_NONE: GenreProductConnectionWhere - productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SINGLE: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SOME: GenreProductConnectionWhere -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface INode { - id: String! -} - -interface IProduct { - genre: Genre! - id: String! - name: String! -} - -input IProductConnectInput { - _on: IProductImplementationsConnectInput -} - -input IProductConnectWhere { - node: IProductWhere! -} - -input IProductCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input IProductDeleteInput { - _on: IProductImplementationsDeleteInput -} - -input IProductDisconnectInput { - _on: IProductImplementationsDisconnectInput -} - -interface IProductEventPayload { - id: String! - name: String! -} - -input IProductImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] -} - -input IProductImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] -} - -input IProductImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] -} - -input IProductImplementationsSubscriptionWhere { - Movie: MovieSubscriptionWhere - Series: SeriesSubscriptionWhere -} - -input IProductImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input IProductImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -input IProductOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [IProductSort] -} - -\\"\\"\\" -Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. -\\"\\"\\" -input IProductSort { - id: SortDirection - name: SortDirection -} - -input IProductSubscriptionWhere { - AND: [IProductSubscriptionWhere!] - NOT: IProductSubscriptionWhere - OR: [IProductSubscriptionWhere!] - _on: IProductImplementationsSubscriptionWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input IProductUpdateInput { - _on: IProductImplementationsUpdateInput - id: String - name: String -} - -input IProductWhere { - _on: IProductImplementationsWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Movie implements INode & IProduct { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! - id: String! - name: String! -} - -type MovieAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - genre: MovieGenreConnectFieldInput -} - -input MovieConnectOrCreateInput { - genre: MovieGenreConnectOrCreateFieldInput -} - -type MovieConnectedRelationships { - genre: MovieGenreConnectedRelationship -} - -input MovieCreateInput { - genre: MovieGenreFieldInput - id: String! - name: String! -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - genre: MovieGenreDeleteFieldInput -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - genre: MovieGenreDisconnectFieldInput -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload implements IProductEventPayload { - id: String! - name: String! -} - -input MovieGenreAggregateInput { - AND: [MovieGenreAggregateInput!] - NOT: MovieGenreAggregateInput - OR: [MovieGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenreNodeAggregationWhereInput -} - -input MovieGenreConnectFieldInput { - connect: GenreConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere -} - -input MovieGenreConnectOrCreateFieldInput { - onCreate: MovieGenreConnectOrCreateFieldInputOnCreate! - where: GenreConnectOrCreateWhere! -} - -input MovieGenreConnectOrCreateFieldInputOnCreate { - node: GenreOnCreateInput! -} - -type MovieGenreConnectedRelationship { - node: GenreEventPayload! -} - -type MovieGenreConnection { - edges: [MovieGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieGenreConnectionSort { - node: GenreSort -} - -input MovieGenreConnectionWhere { - AND: [MovieGenreConnectionWhere!] - NOT: MovieGenreConnectionWhere - OR: [MovieGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieGenreCreateFieldInput { - node: GenreCreateInput! -} - -input MovieGenreDeleteFieldInput { - delete: GenreDeleteInput - where: MovieGenreConnectionWhere -} - -input MovieGenreDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: MovieGenreConnectionWhere -} - -input MovieGenreFieldInput { - connect: MovieGenreConnectFieldInput - connectOrCreate: MovieGenreConnectOrCreateFieldInput - create: MovieGenreCreateFieldInput -} - -type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection -} - -type MovieGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieGenreNodeAggregationWhereInput { - AND: [MovieGenreNodeAggregationWhereInput!] - NOT: MovieGenreNodeAggregationWhereInput - OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieGenreRelationship { - cursor: String! - node: Genre! -} - -input MovieGenreRelationshipSubscriptionWhere { - node: GenreSubscriptionWhere -} - -input MovieGenreUpdateConnectionInput { - node: GenreUpdateInput -} - -input MovieGenreUpdateFieldInput { - connect: MovieGenreConnectFieldInput - connectOrCreate: MovieGenreConnectOrCreateFieldInput - create: MovieGenreCreateFieldInput - delete: MovieGenreDeleteFieldInput - disconnect: MovieGenreDisconnectFieldInput - update: MovieGenreUpdateConnectionInput - where: MovieGenreConnectionWhere -} - -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!] -} - -input MovieRelationInput { - genre: MovieGenreCreateFieldInput -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - genre: MovieGenreRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 - name: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input MovieUpdateInput { - genre: MovieGenreUpdateFieldInput - id: String - name: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genre: GenreWhere - genreAggregate: MovieGenreAggregateInput - genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, connectOrCreate: SeriesConnectOrCreateInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements INode & IProduct { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! - id: String! - name: String! -} - -type SeriesAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input SeriesConnectInput { - genre: SeriesGenreConnectFieldInput -} - -input SeriesConnectOrCreateInput { - genre: SeriesGenreConnectOrCreateFieldInput -} - -type SeriesConnectedRelationships { - genre: SeriesGenreConnectedRelationship -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - genre: SeriesGenreFieldInput - id: String! - name: String! -} - -type SeriesCreatedEvent { - createdSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! -} - -input SeriesDeleteInput { - genre: SeriesGenreDeleteFieldInput -} - -type SeriesDeletedEvent { - deletedSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! -} - -input SeriesDisconnectInput { - genre: SeriesGenreDisconnectFieldInput -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -type SeriesEventPayload implements IProductEventPayload { - id: String! - name: String! -} - -input SeriesGenreAggregateInput { - AND: [SeriesGenreAggregateInput!] - NOT: SeriesGenreAggregateInput - OR: [SeriesGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesGenreNodeAggregationWhereInput -} - -input SeriesGenreConnectFieldInput { - connect: GenreConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere -} - -input SeriesGenreConnectOrCreateFieldInput { - onCreate: SeriesGenreConnectOrCreateFieldInputOnCreate! - where: GenreConnectOrCreateWhere! -} - -input SeriesGenreConnectOrCreateFieldInputOnCreate { - node: GenreOnCreateInput! -} - -type SeriesGenreConnectedRelationship { - node: GenreEventPayload! -} - -type SeriesGenreConnection { - edges: [SeriesGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesGenreConnectionSort { - node: GenreSort -} - -input SeriesGenreConnectionWhere { - AND: [SeriesGenreConnectionWhere!] - NOT: SeriesGenreConnectionWhere - OR: [SeriesGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input SeriesGenreCreateFieldInput { - node: GenreCreateInput! -} - -input SeriesGenreDeleteFieldInput { - delete: GenreDeleteInput - where: SeriesGenreConnectionWhere -} - -input SeriesGenreDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: SeriesGenreConnectionWhere -} - -input SeriesGenreFieldInput { - connect: SeriesGenreConnectFieldInput - connectOrCreate: SeriesGenreConnectOrCreateFieldInput - create: SeriesGenreCreateFieldInput -} - -type SeriesGenreGenreAggregationSelection { - count: Int! - node: SeriesGenreGenreNodeAggregateSelection -} - -type SeriesGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input SeriesGenreNodeAggregationWhereInput { - AND: [SeriesGenreNodeAggregationWhereInput!] - NOT: SeriesGenreNodeAggregationWhereInput - OR: [SeriesGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type SeriesGenreRelationship { - cursor: String! - node: Genre! -} - -input SeriesGenreRelationshipSubscriptionWhere { - node: GenreSubscriptionWhere -} - -input SeriesGenreUpdateConnectionInput { - node: GenreUpdateInput -} - -input SeriesGenreUpdateFieldInput { - connect: SeriesGenreConnectFieldInput - connectOrCreate: SeriesGenreConnectOrCreateFieldInput - create: SeriesGenreCreateFieldInput - delete: SeriesGenreDeleteFieldInput - disconnect: SeriesGenreDisconnectFieldInput - update: SeriesGenreUpdateConnectionInput - where: SeriesGenreConnectionWhere -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -input SeriesRelationInput { - genre: SeriesGenreCreateFieldInput -} - -type SeriesRelationshipCreatedEvent { - createdRelationship: SeriesConnectedRelationships! - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! -} - -input SeriesRelationshipCreatedSubscriptionWhere { - AND: [SeriesRelationshipCreatedSubscriptionWhere!] - NOT: SeriesRelationshipCreatedSubscriptionWhere - OR: [SeriesRelationshipCreatedSubscriptionWhere!] - createdRelationship: SeriesRelationshipsSubscriptionWhere - series: SeriesSubscriptionWhere -} - -type SeriesRelationshipDeletedEvent { - deletedRelationship: SeriesConnectedRelationships! - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! -} - -input SeriesRelationshipDeletedSubscriptionWhere { - AND: [SeriesRelationshipDeletedSubscriptionWhere!] - NOT: SeriesRelationshipDeletedSubscriptionWhere - OR: [SeriesRelationshipDeletedSubscriptionWhere!] - deletedRelationship: SeriesRelationshipsSubscriptionWhere - series: SeriesSubscriptionWhere -} - -input SeriesRelationshipsSubscriptionWhere { - genre: SeriesGenreRelationshipSubscriptionWhere -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - id: SortDirection - name: SortDirection -} - -input SeriesSubscriptionWhere { - AND: [SeriesSubscriptionWhere!] - NOT: SeriesSubscriptionWhere - OR: [SeriesSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input SeriesUpdateInput { - genre: SeriesGenreUpdateFieldInput - id: String - name: String -} - -type SeriesUpdatedEvent { - event: EventType! - previousState: SeriesEventPayload! - timestamp: Float! - updatedSeries: SeriesEventPayload! -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - genre: GenreWhere - genreAggregate: SeriesGenreAggregateInput - genreConnection: SeriesGenreConnectionWhere - genreConnection_NOT: SeriesGenreConnectionWhere - genre_NOT: GenreWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type Subscription { - genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! - genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! - genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! - genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! - genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! - seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! - seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! - seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! - seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Genre { + name: String! + product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! + productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + } + + type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input GenreConnectInput { + product: [GenreProductConnectFieldInput!] + } + + input GenreConnectOrCreateWhere { + node: GenreUniqueWhere! + } + + input GenreConnectWhere { + node: GenreWhere! + } + + type GenreConnectedRelationships { + product: GenreProductConnectedRelationship + } + + input GenreCreateInput { + name: String! + product: GenreProductFieldInput + } + + type GenreCreatedEvent { + createdGenre: GenreEventPayload! + event: EventType! + timestamp: Float! + } + + input GenreDeleteInput { + product: [GenreProductDeleteFieldInput!] + } + + type GenreDeletedEvent { + deletedGenre: GenreEventPayload! + event: EventType! + timestamp: Float! + } + + input GenreDisconnectInput { + product: [GenreProductDisconnectFieldInput!] + } + + type GenreEdge { + cursor: String! + node: Genre! + } + + type GenreEventPayload { + name: String! + } + + input GenreOnCreateInput { + name: String! + } + + 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!] + } + + input GenreProductConnectFieldInput { + connect: IProductConnectInput + where: IProductConnectWhere + } + + type GenreProductConnectedRelationship { + node: IProductEventPayload! + } + + type GenreProductConnection { + edges: [GenreProductRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input GenreProductConnectionSort { + node: IProductSort + } + + input GenreProductConnectionWhere { + AND: [GenreProductConnectionWhere!] + NOT: GenreProductConnectionWhere + OR: [GenreProductConnectionWhere!] + node: IProductWhere + node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input GenreProductCreateFieldInput { + node: IProductCreateInput! + } + + input GenreProductDeleteFieldInput { + delete: IProductDeleteInput + where: GenreProductConnectionWhere + } + + input GenreProductDisconnectFieldInput { + disconnect: IProductDisconnectInput + where: GenreProductConnectionWhere + } + + input GenreProductFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + } + + type GenreProductRelationship { + cursor: String! + node: IProduct! + } + + input GenreProductRelationshipSubscriptionWhere { + node: IProductSubscriptionWhere + } + + input GenreProductUpdateConnectionInput { + node: IProductUpdateInput + } + + input GenreProductUpdateFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + delete: [GenreProductDeleteFieldInput!] + disconnect: [GenreProductDisconnectFieldInput!] + update: GenreProductUpdateConnectionInput + where: GenreProductConnectionWhere + } + + input GenreRelationInput { + product: [GenreProductCreateFieldInput!] + } + + type GenreRelationshipCreatedEvent { + createdRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input GenreRelationshipCreatedSubscriptionWhere { + AND: [GenreRelationshipCreatedSubscriptionWhere!] + NOT: GenreRelationshipCreatedSubscriptionWhere + OR: [GenreRelationshipCreatedSubscriptionWhere!] + createdRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere + } + + type GenreRelationshipDeletedEvent { + deletedRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input GenreRelationshipDeletedSubscriptionWhere { + AND: [GenreRelationshipDeletedSubscriptionWhere!] + NOT: GenreRelationshipDeletedSubscriptionWhere + OR: [GenreRelationshipDeletedSubscriptionWhere!] + deletedRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere + } + + input GenreRelationshipsSubscriptionWhere { + product: GenreProductRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + name: SortDirection + } + + input GenreSubscriptionWhere { + AND: [GenreSubscriptionWhere!] + NOT: GenreSubscriptionWhere + OR: [GenreSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input GenreUniqueWhere { + name: String + } + + input GenreUpdateInput { + name: String + product: [GenreProductUpdateFieldInput!] + } + + type GenreUpdatedEvent { + event: EventType! + previousState: GenreEventPayload! + timestamp: Float! + updatedGenre: GenreEventPayload! + } + + input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_ALL: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_NONE: GenreProductConnectionWhere + productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SINGLE: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SOME: GenreProductConnectionWhere + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + interface INode { + id: String! + } + + interface IProduct { + genre: Genre! + id: String! + name: String! + } + + input IProductConnectInput { + _on: IProductImplementationsConnectInput + } + + input IProductConnectWhere { + node: IProductWhere! + } + + input IProductCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input IProductDeleteInput { + _on: IProductImplementationsDeleteInput + } + + input IProductDisconnectInput { + _on: IProductImplementationsDisconnectInput + } + + interface IProductEventPayload { + id: String! + name: String! + } + + input IProductImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] + } + + input IProductImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] + } + + input IProductImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] + } + + input IProductImplementationsSubscriptionWhere { + Movie: MovieSubscriptionWhere + Series: SeriesSubscriptionWhere + } + + input IProductImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input IProductImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + input IProductOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [IProductSort] + } + + \\"\\"\\" + Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. + \\"\\"\\" + input IProductSort { + id: SortDirection + name: SortDirection + } + + input IProductSubscriptionWhere { + AND: [IProductSubscriptionWhere!] + NOT: IProductSubscriptionWhere + OR: [IProductSubscriptionWhere!] + _on: IProductImplementationsSubscriptionWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input IProductUpdateInput { + _on: IProductImplementationsUpdateInput + id: String + name: String + } + + input IProductWhere { + _on: IProductImplementationsWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Movie implements INode & IProduct { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + id: String! + name: String! + } + + type MovieAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + genre: MovieGenreConnectFieldInput + } + + input MovieConnectOrCreateInput { + genre: MovieGenreConnectOrCreateFieldInput + } + + type MovieConnectedRelationships { + genre: MovieGenreConnectedRelationship + } + + input MovieCreateInput { + genre: MovieGenreFieldInput + id: String! + name: String! + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + genre: MovieGenreDeleteFieldInput + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + genre: MovieGenreDisconnectFieldInput + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload implements IProductEventPayload { + id: String! + name: String! + } + + input MovieGenreAggregateInput { + AND: [MovieGenreAggregateInput!] + NOT: MovieGenreAggregateInput + OR: [MovieGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenreNodeAggregationWhereInput + } + + input MovieGenreConnectFieldInput { + connect: GenreConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere + } + + input MovieGenreConnectOrCreateFieldInput { + onCreate: MovieGenreConnectOrCreateFieldInputOnCreate! + where: GenreConnectOrCreateWhere! + } + + input MovieGenreConnectOrCreateFieldInputOnCreate { + node: GenreOnCreateInput! + } + + type MovieGenreConnectedRelationship { + node: GenreEventPayload! + } + + type MovieGenreConnection { + edges: [MovieGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieGenreConnectionSort { + node: GenreSort + } + + input MovieGenreConnectionWhere { + AND: [MovieGenreConnectionWhere!] + NOT: MovieGenreConnectionWhere + OR: [MovieGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieGenreCreateFieldInput { + node: GenreCreateInput! + } + + input MovieGenreDeleteFieldInput { + delete: GenreDeleteInput + where: MovieGenreConnectionWhere + } + + input MovieGenreDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: MovieGenreConnectionWhere + } + + input MovieGenreFieldInput { + connect: MovieGenreConnectFieldInput + connectOrCreate: MovieGenreConnectOrCreateFieldInput + create: MovieGenreCreateFieldInput + } + + type MovieGenreGenreAggregationSelection { + count: Int! + node: MovieGenreGenreNodeAggregateSelection + } + + type MovieGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieGenreNodeAggregationWhereInput { + AND: [MovieGenreNodeAggregationWhereInput!] + NOT: MovieGenreNodeAggregationWhereInput + OR: [MovieGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieGenreRelationship { + cursor: String! + node: Genre! + } + + input MovieGenreRelationshipSubscriptionWhere { + node: GenreSubscriptionWhere + } + + input MovieGenreUpdateConnectionInput { + node: GenreUpdateInput + } + + input MovieGenreUpdateFieldInput { + connect: MovieGenreConnectFieldInput + connectOrCreate: MovieGenreConnectOrCreateFieldInput + create: MovieGenreCreateFieldInput + delete: MovieGenreDeleteFieldInput + disconnect: MovieGenreDisconnectFieldInput + update: MovieGenreUpdateConnectionInput + where: MovieGenreConnectionWhere + } + + 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!] + } + + input MovieRelationInput { + genre: MovieGenreCreateFieldInput + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + genre: MovieGenreRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 + name: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input MovieUpdateInput { + genre: MovieGenreUpdateFieldInput + id: String + name: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genre: GenreWhere + genreAggregate: MovieGenreAggregateInput + genreConnection: MovieGenreConnectionWhere + genreConnection_NOT: MovieGenreConnectionWhere + genre_NOT: GenreWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, connectOrCreate: SeriesConnectOrCreateInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements INode & IProduct { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! + id: String! + name: String! + } + + type SeriesAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input SeriesConnectInput { + genre: SeriesGenreConnectFieldInput + } + + input SeriesConnectOrCreateInput { + genre: SeriesGenreConnectOrCreateFieldInput + } + + type SeriesConnectedRelationships { + genre: SeriesGenreConnectedRelationship + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + genre: SeriesGenreFieldInput + id: String! + name: String! + } + + type SeriesCreatedEvent { + createdSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! + } + + input SeriesDeleteInput { + genre: SeriesGenreDeleteFieldInput + } + + type SeriesDeletedEvent { + deletedSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! + } + + input SeriesDisconnectInput { + genre: SeriesGenreDisconnectFieldInput + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + type SeriesEventPayload implements IProductEventPayload { + id: String! + name: String! + } + + input SeriesGenreAggregateInput { + AND: [SeriesGenreAggregateInput!] + NOT: SeriesGenreAggregateInput + OR: [SeriesGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesGenreNodeAggregationWhereInput + } + + input SeriesGenreConnectFieldInput { + connect: GenreConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere + } + + input SeriesGenreConnectOrCreateFieldInput { + onCreate: SeriesGenreConnectOrCreateFieldInputOnCreate! + where: GenreConnectOrCreateWhere! + } + + input SeriesGenreConnectOrCreateFieldInputOnCreate { + node: GenreOnCreateInput! + } + + type SeriesGenreConnectedRelationship { + node: GenreEventPayload! + } + + type SeriesGenreConnection { + edges: [SeriesGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesGenreConnectionSort { + node: GenreSort + } + + input SeriesGenreConnectionWhere { + AND: [SeriesGenreConnectionWhere!] + NOT: SeriesGenreConnectionWhere + OR: [SeriesGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input SeriesGenreCreateFieldInput { + node: GenreCreateInput! + } + + input SeriesGenreDeleteFieldInput { + delete: GenreDeleteInput + where: SeriesGenreConnectionWhere + } + + input SeriesGenreDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: SeriesGenreConnectionWhere + } + + input SeriesGenreFieldInput { + connect: SeriesGenreConnectFieldInput + connectOrCreate: SeriesGenreConnectOrCreateFieldInput + create: SeriesGenreCreateFieldInput + } + + type SeriesGenreGenreAggregationSelection { + count: Int! + node: SeriesGenreGenreNodeAggregateSelection + } + + type SeriesGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input SeriesGenreNodeAggregationWhereInput { + AND: [SeriesGenreNodeAggregationWhereInput!] + NOT: SeriesGenreNodeAggregationWhereInput + OR: [SeriesGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type SeriesGenreRelationship { + cursor: String! + node: Genre! + } + + input SeriesGenreRelationshipSubscriptionWhere { + node: GenreSubscriptionWhere + } + + input SeriesGenreUpdateConnectionInput { + node: GenreUpdateInput + } + + input SeriesGenreUpdateFieldInput { + connect: SeriesGenreConnectFieldInput + connectOrCreate: SeriesGenreConnectOrCreateFieldInput + create: SeriesGenreCreateFieldInput + delete: SeriesGenreDeleteFieldInput + disconnect: SeriesGenreDisconnectFieldInput + update: SeriesGenreUpdateConnectionInput + where: SeriesGenreConnectionWhere + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + input SeriesRelationInput { + genre: SeriesGenreCreateFieldInput + } + + type SeriesRelationshipCreatedEvent { + createdRelationship: SeriesConnectedRelationships! + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! + } + + input SeriesRelationshipCreatedSubscriptionWhere { + AND: [SeriesRelationshipCreatedSubscriptionWhere!] + NOT: SeriesRelationshipCreatedSubscriptionWhere + OR: [SeriesRelationshipCreatedSubscriptionWhere!] + createdRelationship: SeriesRelationshipsSubscriptionWhere + series: SeriesSubscriptionWhere + } + + type SeriesRelationshipDeletedEvent { + deletedRelationship: SeriesConnectedRelationships! + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! + } + + input SeriesRelationshipDeletedSubscriptionWhere { + AND: [SeriesRelationshipDeletedSubscriptionWhere!] + NOT: SeriesRelationshipDeletedSubscriptionWhere + OR: [SeriesRelationshipDeletedSubscriptionWhere!] + deletedRelationship: SeriesRelationshipsSubscriptionWhere + series: SeriesSubscriptionWhere + } + + input SeriesRelationshipsSubscriptionWhere { + genre: SeriesGenreRelationshipSubscriptionWhere + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + id: SortDirection + name: SortDirection + } + + input SeriesSubscriptionWhere { + AND: [SeriesSubscriptionWhere!] + NOT: SeriesSubscriptionWhere + OR: [SeriesSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input SeriesUpdateInput { + genre: SeriesGenreUpdateFieldInput + id: String + name: String + } + + type SeriesUpdatedEvent { + event: EventType! + previousState: SeriesEventPayload! + timestamp: Float! + updatedSeries: SeriesEventPayload! + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + genre: GenreWhere + genreAggregate: SeriesGenreAggregateInput + genreConnection: SeriesGenreConnectionWhere + genreConnection_NOT: SeriesGenreConnectionWhere + genre_NOT: GenreWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type Subscription { + genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! + genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! + genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! + genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! + genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! + seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! + seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! + seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! + seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! + } + + type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); - test("Simple type definitions implementing just one interface", async () => { - const typeDefs = gql` - interface IProduct { - id: String! + test("Simple type definitions implementing just one interface", async () => { + const typeDefs = gql` + interface IProduct { + id: String! + + name: String! + genre: Genre! + } + + type Movie implements IProduct { + id: String! + + name: String! + genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT) + } + + type Series implements IProduct { + id: String! + + name: String! + genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT) + } + + type Genre { + name: String! @unique + product: [IProduct!]! @relationship(type: "HAS_GENRE", direction: IN) + } + `; + + const subscriptionsEngine = new TestSubscriptionsEngine(); + const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionsEngine } }); + + const schema = await neoSchema.getSchema(); + const errors = validateSchema(schema); + expect(errors).toHaveLength(0); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Genre { + name: String! + product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! + productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + } + + type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input GenreConnectInput { + product: [GenreProductConnectFieldInput!] + } + + input GenreConnectOrCreateWhere { + node: GenreUniqueWhere! + } + + input GenreConnectWhere { + node: GenreWhere! + } + + type GenreConnectedRelationships { + product: GenreProductConnectedRelationship + } + + input GenreCreateInput { + name: String! + product: GenreProductFieldInput + } + + type GenreCreatedEvent { + createdGenre: GenreEventPayload! + event: EventType! + timestamp: Float! + } + + input GenreDeleteInput { + product: [GenreProductDeleteFieldInput!] + } + + type GenreDeletedEvent { + deletedGenre: GenreEventPayload! + event: EventType! + timestamp: Float! + } + + input GenreDisconnectInput { + product: [GenreProductDisconnectFieldInput!] + } + + type GenreEdge { + cursor: String! + node: Genre! + } + + type GenreEventPayload { + name: String! + } + + input GenreOnCreateInput { + name: String! + } + + 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!] + } + + input GenreProductConnectFieldInput { + connect: IProductConnectInput + where: IProductConnectWhere + } + + type GenreProductConnectedRelationship { + node: IProductEventPayload! + } + + type GenreProductConnection { + edges: [GenreProductRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input GenreProductConnectionSort { + node: IProductSort + } + + input GenreProductConnectionWhere { + AND: [GenreProductConnectionWhere!] + NOT: GenreProductConnectionWhere + OR: [GenreProductConnectionWhere!] + node: IProductWhere + node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input GenreProductCreateFieldInput { + node: IProductCreateInput! + } + + input GenreProductDeleteFieldInput { + delete: IProductDeleteInput + where: GenreProductConnectionWhere + } + + input GenreProductDisconnectFieldInput { + disconnect: IProductDisconnectInput + where: GenreProductConnectionWhere + } + + input GenreProductFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + } + + type GenreProductRelationship { + cursor: String! + node: IProduct! + } + + input GenreProductRelationshipSubscriptionWhere { + node: IProductSubscriptionWhere + } + + input GenreProductUpdateConnectionInput { + node: IProductUpdateInput + } + + input GenreProductUpdateFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + delete: [GenreProductDeleteFieldInput!] + disconnect: [GenreProductDisconnectFieldInput!] + update: GenreProductUpdateConnectionInput + where: GenreProductConnectionWhere + } + + input GenreRelationInput { + product: [GenreProductCreateFieldInput!] + } + + type GenreRelationshipCreatedEvent { + createdRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input GenreRelationshipCreatedSubscriptionWhere { + AND: [GenreRelationshipCreatedSubscriptionWhere!] + NOT: GenreRelationshipCreatedSubscriptionWhere + OR: [GenreRelationshipCreatedSubscriptionWhere!] + createdRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere + } + + type GenreRelationshipDeletedEvent { + deletedRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input GenreRelationshipDeletedSubscriptionWhere { + AND: [GenreRelationshipDeletedSubscriptionWhere!] + NOT: GenreRelationshipDeletedSubscriptionWhere + OR: [GenreRelationshipDeletedSubscriptionWhere!] + deletedRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere + } + + input GenreRelationshipsSubscriptionWhere { + product: GenreProductRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + name: SortDirection + } + + input GenreSubscriptionWhere { + AND: [GenreSubscriptionWhere!] + NOT: GenreSubscriptionWhere + OR: [GenreSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input GenreUniqueWhere { + name: String + } + + input GenreUpdateInput { + name: String + product: [GenreProductUpdateFieldInput!] + } + + type GenreUpdatedEvent { + event: EventType! + previousState: GenreEventPayload! + timestamp: Float! + updatedGenre: GenreEventPayload! + } + + input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_ALL: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_NONE: GenreProductConnectionWhere + productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SINGLE: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SOME: GenreProductConnectionWhere + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + interface IProduct { + genre: Genre! + id: String! + name: String! + } + + input IProductConnectInput { + _on: IProductImplementationsConnectInput + } + + input IProductConnectWhere { + node: IProductWhere! + } + + input IProductCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + input IProductDeleteInput { + _on: IProductImplementationsDeleteInput + } + + input IProductDisconnectInput { + _on: IProductImplementationsDisconnectInput + } + + interface IProductEventPayload { + id: String! + name: String! + } + + input IProductGenreConnectFieldInput { + connect: GenreConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere + } + + input IProductGenreConnectOrCreateFieldInput { + onCreate: IProductGenreConnectOrCreateFieldInputOnCreate! + where: GenreConnectOrCreateWhere! + } + + input IProductGenreConnectOrCreateFieldInputOnCreate { + node: GenreOnCreateInput! + } + + type IProductGenreConnection { + edges: [IProductGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input IProductGenreConnectionSort { + node: GenreSort + } + + input IProductGenreConnectionWhere { + AND: [IProductGenreConnectionWhere!] + NOT: IProductGenreConnectionWhere + OR: [IProductGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input IProductGenreCreateFieldInput { + node: GenreCreateInput! + } + + input IProductGenreDeleteFieldInput { + delete: GenreDeleteInput + where: IProductGenreConnectionWhere + } + + input IProductGenreDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: IProductGenreConnectionWhere + } + + input IProductGenreFieldInput { + connect: IProductGenreConnectFieldInput + connectOrCreate: IProductGenreConnectOrCreateFieldInput + create: IProductGenreCreateFieldInput + } + + type IProductGenreRelationship { + cursor: String! + node: Genre! + } + + input IProductGenreUpdateConnectionInput { + node: GenreUpdateInput + } + + input IProductGenreUpdateFieldInput { + connect: IProductGenreConnectFieldInput + connectOrCreate: IProductGenreConnectOrCreateFieldInput + create: IProductGenreCreateFieldInput + delete: IProductGenreDeleteFieldInput + disconnect: IProductGenreDisconnectFieldInput + update: IProductGenreUpdateConnectionInput + where: IProductGenreConnectionWhere + } + + input IProductImplementationsConnectInput { + Movie: [MovieConnectInput!] + Series: [SeriesConnectInput!] + } + + input IProductImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + Series: [SeriesDeleteInput!] + } + + input IProductImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + Series: [SeriesDisconnectInput!] + } + + input IProductImplementationsSubscriptionWhere { + Movie: MovieSubscriptionWhere + Series: SeriesSubscriptionWhere + } + + input IProductImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input IProductImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + input IProductOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [IProductSort] + } + + \\"\\"\\" + Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. + \\"\\"\\" + input IProductSort { + id: SortDirection + name: SortDirection + } + + input IProductSubscriptionWhere { + AND: [IProductSubscriptionWhere!] + NOT: IProductSubscriptionWhere + OR: [IProductSubscriptionWhere!] + _on: IProductImplementationsSubscriptionWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input IProductUpdateInput { + _on: IProductImplementationsUpdateInput + id: String + name: String + } + + input IProductWhere { + _on: IProductImplementationsWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Movie implements IProduct { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + id: String! + name: String! + } + + type MovieAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + genre: IProductGenreConnectFieldInput + } + + input MovieConnectOrCreateInput { + genre: IProductGenreConnectOrCreateFieldInput + } + + type MovieConnectedRelationships { + genre: MovieGenreConnectedRelationship + } + + input MovieCreateInput { + genre: IProductGenreFieldInput + id: String! + name: String! + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDeleteInput { + genre: IProductGenreDeleteFieldInput + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + input MovieDisconnectInput { + genre: IProductGenreDisconnectFieldInput + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload implements IProductEventPayload { + id: String! + name: String! + } + + input MovieGenreAggregateInput { + AND: [MovieGenreAggregateInput!] + NOT: MovieGenreAggregateInput + OR: [MovieGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenreNodeAggregationWhereInput + } + + type MovieGenreConnectedRelationship { + node: GenreEventPayload! + } + + type MovieGenreGenreAggregationSelection { + count: Int! + node: MovieGenreGenreNodeAggregateSelection + } + + type MovieGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieGenreNodeAggregationWhereInput { + AND: [MovieGenreNodeAggregationWhereInput!] + NOT: MovieGenreNodeAggregationWhereInput + OR: [MovieGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input MovieGenreRelationshipSubscriptionWhere { + node: GenreSubscriptionWhere + } + + 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!] + } + + input MovieRelationInput { + genre: IProductGenreCreateFieldInput + } + + type MovieRelationshipCreatedEvent { + createdRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipCreatedSubscriptionWhere { + AND: [MovieRelationshipCreatedSubscriptionWhere!] + NOT: MovieRelationshipCreatedSubscriptionWhere + OR: [MovieRelationshipCreatedSubscriptionWhere!] + createdRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + type MovieRelationshipDeletedEvent { + deletedRelationship: MovieConnectedRelationships! + event: EventType! + movie: MovieEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input MovieRelationshipDeletedSubscriptionWhere { + AND: [MovieRelationshipDeletedSubscriptionWhere!] + NOT: MovieRelationshipDeletedSubscriptionWhere + OR: [MovieRelationshipDeletedSubscriptionWhere!] + deletedRelationship: MovieRelationshipsSubscriptionWhere + movie: MovieSubscriptionWhere + } + + input MovieRelationshipsSubscriptionWhere { + genre: MovieGenreRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 + name: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input MovieUpdateInput { + genre: IProductGenreUpdateFieldInput + id: String + name: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genre: GenreWhere + genreAggregate: MovieGenreAggregateInput + genreConnection: IProductGenreConnectionWhere + genreConnection_NOT: IProductGenreConnectionWhere + genre_NOT: GenreWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(connect: SeriesConnectInput, connectOrCreate: SeriesConnectOrCreateInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements IProduct { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + id: String! + name: String! + } + + type SeriesAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input SeriesConnectInput { + genre: IProductGenreConnectFieldInput + } + + input SeriesConnectOrCreateInput { + genre: IProductGenreConnectOrCreateFieldInput + } + + type SeriesConnectedRelationships { + genre: SeriesGenreConnectedRelationship + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + genre: IProductGenreFieldInput + id: String! + name: String! + } + + type SeriesCreatedEvent { + createdSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! + } + + input SeriesDeleteInput { + genre: IProductGenreDeleteFieldInput + } + + type SeriesDeletedEvent { + deletedSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! + } + + input SeriesDisconnectInput { + genre: IProductGenreDisconnectFieldInput + } - name: String! - genre: Genre! + type SeriesEdge { + cursor: String! + node: Series! } - type Movie implements IProduct { - id: String! + type SeriesEventPayload implements IProductEventPayload { + id: String! + name: String! + } - name: String! - genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT) + input SeriesGenreAggregateInput { + AND: [SeriesGenreAggregateInput!] + NOT: SeriesGenreAggregateInput + OR: [SeriesGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: SeriesGenreNodeAggregationWhereInput } - type Series implements IProduct { - id: String! + type SeriesGenreConnectedRelationship { + node: GenreEventPayload! + } - name: String! - genre: Genre! @relationship(type: "HAS_GENRE", direction: OUT) + type SeriesGenreGenreAggregationSelection { + count: Int! + node: SeriesGenreGenreNodeAggregateSelection } - type Genre { - name: String! @unique - product: [IProduct!]! @relationship(type: "HAS_GENRE", direction: IN) + type SeriesGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! } - `; - const subscriptionsEngine = new TestSubscriptionsEngine(); - const neoSchema = new Neo4jGraphQL({ typeDefs, features: { subscriptions: subscriptionsEngine } }); + input SeriesGenreNodeAggregationWhereInput { + AND: [SeriesGenreNodeAggregationWhereInput!] + NOT: SeriesGenreNodeAggregationWhereInput + OR: [SeriesGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } - const schema = await neoSchema.getSchema(); - const errors = validateSchema(schema); - expect(errors).toHaveLength(0); + input SeriesGenreRelationshipSubscriptionWhere { + node: GenreSubscriptionWhere + } - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Genre { - name: String! - product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! - productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! -} - -type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input GenreConnectInput { - product: [GenreProductConnectFieldInput!] -} - -input GenreConnectOrCreateWhere { - node: GenreUniqueWhere! -} - -input GenreConnectWhere { - node: GenreWhere! -} - -type GenreConnectedRelationships { - product: GenreProductConnectedRelationship -} - -input GenreCreateInput { - name: String! - product: GenreProductFieldInput -} - -type GenreCreatedEvent { - createdGenre: GenreEventPayload! - event: EventType! - timestamp: Float! -} - -input GenreDeleteInput { - product: [GenreProductDeleteFieldInput!] -} - -type GenreDeletedEvent { - deletedGenre: GenreEventPayload! - event: EventType! - timestamp: Float! -} - -input GenreDisconnectInput { - product: [GenreProductDisconnectFieldInput!] -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreEventPayload { - name: String! -} - -input GenreOnCreateInput { - name: String! -} - -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!] -} - -input GenreProductConnectFieldInput { - connect: IProductConnectInput - where: IProductConnectWhere -} - -type GenreProductConnectedRelationship { - node: IProductEventPayload! -} - -type GenreProductConnection { - edges: [GenreProductRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input GenreProductConnectionSort { - node: IProductSort -} - -input GenreProductConnectionWhere { - AND: [GenreProductConnectionWhere!] - NOT: GenreProductConnectionWhere - OR: [GenreProductConnectionWhere!] - node: IProductWhere - node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input GenreProductCreateFieldInput { - node: IProductCreateInput! -} - -input GenreProductDeleteFieldInput { - delete: IProductDeleteInput - where: GenreProductConnectionWhere -} - -input GenreProductDisconnectFieldInput { - disconnect: IProductDisconnectInput - where: GenreProductConnectionWhere -} - -input GenreProductFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] -} - -type GenreProductRelationship { - cursor: String! - node: IProduct! -} - -input GenreProductRelationshipSubscriptionWhere { - node: IProductSubscriptionWhere -} - -input GenreProductUpdateConnectionInput { - node: IProductUpdateInput -} - -input GenreProductUpdateFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - delete: [GenreProductDeleteFieldInput!] - disconnect: [GenreProductDisconnectFieldInput!] - update: GenreProductUpdateConnectionInput - where: GenreProductConnectionWhere -} - -input GenreRelationInput { - product: [GenreProductCreateFieldInput!] -} - -type GenreRelationshipCreatedEvent { - createdRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input GenreRelationshipCreatedSubscriptionWhere { - AND: [GenreRelationshipCreatedSubscriptionWhere!] - NOT: GenreRelationshipCreatedSubscriptionWhere - OR: [GenreRelationshipCreatedSubscriptionWhere!] - createdRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere -} - -type GenreRelationshipDeletedEvent { - deletedRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input GenreRelationshipDeletedSubscriptionWhere { - AND: [GenreRelationshipDeletedSubscriptionWhere!] - NOT: GenreRelationshipDeletedSubscriptionWhere - OR: [GenreRelationshipDeletedSubscriptionWhere!] - deletedRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere -} - -input GenreRelationshipsSubscriptionWhere { - product: GenreProductRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - name: SortDirection -} - -input GenreSubscriptionWhere { - AND: [GenreSubscriptionWhere!] - NOT: GenreSubscriptionWhere - OR: [GenreSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input GenreUniqueWhere { - name: String -} - -input GenreUpdateInput { - name: String - product: [GenreProductUpdateFieldInput!] -} - -type GenreUpdatedEvent { - event: EventType! - previousState: GenreEventPayload! - timestamp: Float! - updatedGenre: GenreEventPayload! -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_ALL: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_NONE: GenreProductConnectionWhere - productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SINGLE: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SOME: GenreProductConnectionWhere -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface IProduct { - genre: Genre! - id: String! - name: String! -} - -input IProductConnectInput { - _on: IProductImplementationsConnectInput -} - -input IProductConnectWhere { - node: IProductWhere! -} - -input IProductCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -input IProductDeleteInput { - _on: IProductImplementationsDeleteInput -} - -input IProductDisconnectInput { - _on: IProductImplementationsDisconnectInput -} - -interface IProductEventPayload { - id: String! - name: String! -} - -input IProductGenreConnectFieldInput { - connect: GenreConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere -} - -input IProductGenreConnectOrCreateFieldInput { - onCreate: IProductGenreConnectOrCreateFieldInputOnCreate! - where: GenreConnectOrCreateWhere! -} - -input IProductGenreConnectOrCreateFieldInputOnCreate { - node: GenreOnCreateInput! -} - -type IProductGenreConnection { - edges: [IProductGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input IProductGenreConnectionSort { - node: GenreSort -} - -input IProductGenreConnectionWhere { - AND: [IProductGenreConnectionWhere!] - NOT: IProductGenreConnectionWhere - OR: [IProductGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input IProductGenreCreateFieldInput { - node: GenreCreateInput! -} - -input IProductGenreDeleteFieldInput { - delete: GenreDeleteInput - where: IProductGenreConnectionWhere -} - -input IProductGenreDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: IProductGenreConnectionWhere -} - -input IProductGenreFieldInput { - connect: IProductGenreConnectFieldInput - connectOrCreate: IProductGenreConnectOrCreateFieldInput - create: IProductGenreCreateFieldInput -} - -type IProductGenreRelationship { - cursor: String! - node: Genre! -} - -input IProductGenreUpdateConnectionInput { - node: GenreUpdateInput -} - -input IProductGenreUpdateFieldInput { - connect: IProductGenreConnectFieldInput - connectOrCreate: IProductGenreConnectOrCreateFieldInput - create: IProductGenreCreateFieldInput - delete: IProductGenreDeleteFieldInput - disconnect: IProductGenreDisconnectFieldInput - update: IProductGenreUpdateConnectionInput - where: IProductGenreConnectionWhere -} - -input IProductImplementationsConnectInput { - Movie: [MovieConnectInput!] - Series: [SeriesConnectInput!] -} - -input IProductImplementationsDeleteInput { - Movie: [MovieDeleteInput!] - Series: [SeriesDeleteInput!] -} - -input IProductImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] - Series: [SeriesDisconnectInput!] -} - -input IProductImplementationsSubscriptionWhere { - Movie: MovieSubscriptionWhere - Series: SeriesSubscriptionWhere -} - -input IProductImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input IProductImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -input IProductOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [IProductSort] -} - -\\"\\"\\" -Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. -\\"\\"\\" -input IProductSort { - id: SortDirection - name: SortDirection -} - -input IProductSubscriptionWhere { - AND: [IProductSubscriptionWhere!] - NOT: IProductSubscriptionWhere - OR: [IProductSubscriptionWhere!] - _on: IProductImplementationsSubscriptionWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input IProductUpdateInput { - _on: IProductImplementationsUpdateInput - id: String - name: String -} - -input IProductWhere { - _on: IProductImplementationsWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Movie implements IProduct { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! - id: String! - name: String! -} - -type MovieAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - genre: IProductGenreConnectFieldInput -} - -input MovieConnectOrCreateInput { - genre: IProductGenreConnectOrCreateFieldInput -} - -type MovieConnectedRelationships { - genre: MovieGenreConnectedRelationship -} - -input MovieCreateInput { - genre: IProductGenreFieldInput - id: String! - name: String! -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDeleteInput { - genre: IProductGenreDeleteFieldInput -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -input MovieDisconnectInput { - genre: IProductGenreDisconnectFieldInput -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload implements IProductEventPayload { - id: String! - name: String! -} - -input MovieGenreAggregateInput { - AND: [MovieGenreAggregateInput!] - NOT: MovieGenreAggregateInput - OR: [MovieGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenreNodeAggregationWhereInput -} - -type MovieGenreConnectedRelationship { - node: GenreEventPayload! -} - -type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection -} - -type MovieGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieGenreNodeAggregationWhereInput { - AND: [MovieGenreNodeAggregationWhereInput!] - NOT: MovieGenreNodeAggregationWhereInput - OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input MovieGenreRelationshipSubscriptionWhere { - node: GenreSubscriptionWhere -} - -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!] -} - -input MovieRelationInput { - genre: IProductGenreCreateFieldInput -} - -type MovieRelationshipCreatedEvent { - createdRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipCreatedSubscriptionWhere { - AND: [MovieRelationshipCreatedSubscriptionWhere!] - NOT: MovieRelationshipCreatedSubscriptionWhere - OR: [MovieRelationshipCreatedSubscriptionWhere!] - createdRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -type MovieRelationshipDeletedEvent { - deletedRelationship: MovieConnectedRelationships! - event: EventType! - movie: MovieEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input MovieRelationshipDeletedSubscriptionWhere { - AND: [MovieRelationshipDeletedSubscriptionWhere!] - NOT: MovieRelationshipDeletedSubscriptionWhere - OR: [MovieRelationshipDeletedSubscriptionWhere!] - deletedRelationship: MovieRelationshipsSubscriptionWhere - movie: MovieSubscriptionWhere -} - -input MovieRelationshipsSubscriptionWhere { - genre: MovieGenreRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 - name: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input MovieUpdateInput { - genre: IProductGenreUpdateFieldInput - id: String - name: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genre: GenreWhere - genreAggregate: MovieGenreAggregateInput - genreConnection: IProductGenreConnectionWhere - genreConnection_NOT: IProductGenreConnectionWhere - genre_NOT: GenreWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deleteSeries(delete: SeriesDeleteInput, where: SeriesWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(connect: SeriesConnectInput, connectOrCreate: SeriesConnectOrCreateInput, create: SeriesRelationInput, delete: SeriesDeleteInput, disconnect: SeriesDisconnectInput, update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements IProduct { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): SeriesGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! - id: String! - name: String! -} - -type SeriesAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input SeriesConnectInput { - genre: IProductGenreConnectFieldInput -} - -input SeriesConnectOrCreateInput { - genre: IProductGenreConnectOrCreateFieldInput -} - -type SeriesConnectedRelationships { - genre: SeriesGenreConnectedRelationship -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - genre: IProductGenreFieldInput - id: String! - name: String! -} - -type SeriesCreatedEvent { - createdSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! -} - -input SeriesDeleteInput { - genre: IProductGenreDeleteFieldInput -} - -type SeriesDeletedEvent { - deletedSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! -} - -input SeriesDisconnectInput { - genre: IProductGenreDisconnectFieldInput -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -type SeriesEventPayload implements IProductEventPayload { - id: String! - name: String! -} - -input SeriesGenreAggregateInput { - AND: [SeriesGenreAggregateInput!] - NOT: SeriesGenreAggregateInput - OR: [SeriesGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: SeriesGenreNodeAggregationWhereInput -} - -type SeriesGenreConnectedRelationship { - node: GenreEventPayload! -} - -type SeriesGenreGenreAggregationSelection { - count: Int! - node: SeriesGenreGenreNodeAggregateSelection -} - -type SeriesGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input SeriesGenreNodeAggregationWhereInput { - AND: [SeriesGenreNodeAggregationWhereInput!] - NOT: SeriesGenreNodeAggregationWhereInput - OR: [SeriesGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input SeriesGenreRelationshipSubscriptionWhere { - node: GenreSubscriptionWhere -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -input SeriesRelationInput { - genre: IProductGenreCreateFieldInput -} - -type SeriesRelationshipCreatedEvent { - createdRelationship: SeriesConnectedRelationships! - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! -} - -input SeriesRelationshipCreatedSubscriptionWhere { - AND: [SeriesRelationshipCreatedSubscriptionWhere!] - NOT: SeriesRelationshipCreatedSubscriptionWhere - OR: [SeriesRelationshipCreatedSubscriptionWhere!] - createdRelationship: SeriesRelationshipsSubscriptionWhere - series: SeriesSubscriptionWhere -} - -type SeriesRelationshipDeletedEvent { - deletedRelationship: SeriesConnectedRelationships! - event: EventType! - relationshipFieldName: String! - series: SeriesEventPayload! - timestamp: Float! -} - -input SeriesRelationshipDeletedSubscriptionWhere { - AND: [SeriesRelationshipDeletedSubscriptionWhere!] - NOT: SeriesRelationshipDeletedSubscriptionWhere - OR: [SeriesRelationshipDeletedSubscriptionWhere!] - deletedRelationship: SeriesRelationshipsSubscriptionWhere - series: SeriesSubscriptionWhere -} - -input SeriesRelationshipsSubscriptionWhere { - genre: SeriesGenreRelationshipSubscriptionWhere -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - id: SortDirection - name: SortDirection -} - -input SeriesSubscriptionWhere { - AND: [SeriesSubscriptionWhere!] - NOT: SeriesSubscriptionWhere - OR: [SeriesSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input SeriesUpdateInput { - genre: IProductGenreUpdateFieldInput - id: String - name: String -} - -type SeriesUpdatedEvent { - event: EventType! - previousState: SeriesEventPayload! - timestamp: Float! - updatedSeries: SeriesEventPayload! -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - genre: GenreWhere - genreAggregate: SeriesGenreAggregateInput - genreConnection: IProductGenreConnectionWhere - genreConnection_NOT: IProductGenreConnectionWhere - genre_NOT: GenreWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type Subscription { - genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! - genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! - genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! - genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! - genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! - movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! - seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! - seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! - seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! - seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + input SeriesRelationInput { + genre: IProductGenreCreateFieldInput + } + + type SeriesRelationshipCreatedEvent { + createdRelationship: SeriesConnectedRelationships! + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! + } + + input SeriesRelationshipCreatedSubscriptionWhere { + AND: [SeriesRelationshipCreatedSubscriptionWhere!] + NOT: SeriesRelationshipCreatedSubscriptionWhere + OR: [SeriesRelationshipCreatedSubscriptionWhere!] + createdRelationship: SeriesRelationshipsSubscriptionWhere + series: SeriesSubscriptionWhere + } + + type SeriesRelationshipDeletedEvent { + deletedRelationship: SeriesConnectedRelationships! + event: EventType! + relationshipFieldName: String! + series: SeriesEventPayload! + timestamp: Float! + } + + input SeriesRelationshipDeletedSubscriptionWhere { + AND: [SeriesRelationshipDeletedSubscriptionWhere!] + NOT: SeriesRelationshipDeletedSubscriptionWhere + OR: [SeriesRelationshipDeletedSubscriptionWhere!] + deletedRelationship: SeriesRelationshipsSubscriptionWhere + series: SeriesSubscriptionWhere + } + + input SeriesRelationshipsSubscriptionWhere { + genre: SeriesGenreRelationshipSubscriptionWhere + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + id: SortDirection + name: SortDirection + } + + input SeriesSubscriptionWhere { + AND: [SeriesSubscriptionWhere!] + NOT: SeriesSubscriptionWhere + OR: [SeriesSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input SeriesUpdateInput { + genre: IProductGenreUpdateFieldInput + id: String + name: String + } + + type SeriesUpdatedEvent { + event: EventType! + previousState: SeriesEventPayload! + timestamp: Float! + updatedSeries: SeriesEventPayload! + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + genre: GenreWhere + genreAggregate: SeriesGenreAggregateInput + genreConnection: IProductGenreConnectionWhere + genreConnection_NOT: IProductGenreConnectionWhere + genre_NOT: GenreWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type Subscription { + genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! + genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! + genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! + genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! + genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieRelationshipCreated(where: MovieRelationshipCreatedSubscriptionWhere): MovieRelationshipCreatedEvent! + movieRelationshipDeleted(where: MovieRelationshipDeletedSubscriptionWhere): MovieRelationshipDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! + seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! + seriesRelationshipCreated(where: SeriesRelationshipCreatedSubscriptionWhere): SeriesRelationshipCreatedEvent! + seriesRelationshipDeleted(where: SeriesRelationshipDeletedSubscriptionWhere): SeriesRelationshipDeletedEvent! + seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! + } + + type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); test("Example 3", async () => { @@ -2493,734 +2493,734 @@ type UpdateSeriesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Genre { - name: String! - product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! - productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! -} - -type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input GenreConnectInput { - product: [GenreProductConnectFieldInput!] -} - -type GenreConnectedRelationships { - product: GenreProductConnectedRelationship -} - -input GenreCreateInput { - name: String! - product: GenreProductFieldInput -} - -type GenreCreatedEvent { - createdGenre: GenreEventPayload! - event: EventType! - timestamp: Float! -} - -input GenreDeleteInput { - product: [GenreProductDeleteFieldInput!] -} - -type GenreDeletedEvent { - deletedGenre: GenreEventPayload! - event: EventType! - timestamp: Float! -} - -input GenreDisconnectInput { - product: [GenreProductDisconnectFieldInput!] -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreEventPayload { - name: String! -} - -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!] -} - -input GenreProductConnectFieldInput { - where: IProductConnectWhere -} - -type GenreProductConnectedRelationship { - node: IProductEventPayload! -} - -type GenreProductConnection { - edges: [GenreProductRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input GenreProductConnectionSort { - node: IProductSort -} - -input GenreProductConnectionWhere { - AND: [GenreProductConnectionWhere!] - NOT: GenreProductConnectionWhere - OR: [GenreProductConnectionWhere!] - node: IProductWhere - node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input GenreProductCreateFieldInput { - node: IProductCreateInput! -} - -input GenreProductDeleteFieldInput { - where: GenreProductConnectionWhere -} - -input GenreProductDisconnectFieldInput { - where: GenreProductConnectionWhere -} - -input GenreProductFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] -} - -type GenreProductRelationship { - cursor: String! - node: IProduct! -} - -input GenreProductRelationshipSubscriptionWhere { - node: IProductSubscriptionWhere -} - -input GenreProductUpdateConnectionInput { - node: IProductUpdateInput -} - -input GenreProductUpdateFieldInput { - connect: [GenreProductConnectFieldInput!] - create: [GenreProductCreateFieldInput!] - delete: [GenreProductDeleteFieldInput!] - disconnect: [GenreProductDisconnectFieldInput!] - update: GenreProductUpdateConnectionInput - where: GenreProductConnectionWhere -} - -input GenreRelationInput { - product: [GenreProductCreateFieldInput!] -} - -type GenreRelationshipCreatedEvent { - createdRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input GenreRelationshipCreatedSubscriptionWhere { - AND: [GenreRelationshipCreatedSubscriptionWhere!] - NOT: GenreRelationshipCreatedSubscriptionWhere - OR: [GenreRelationshipCreatedSubscriptionWhere!] - createdRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere -} - -type GenreRelationshipDeletedEvent { - deletedRelationship: GenreConnectedRelationships! - event: EventType! - genre: GenreEventPayload! - relationshipFieldName: String! - timestamp: Float! -} - -input GenreRelationshipDeletedSubscriptionWhere { - AND: [GenreRelationshipDeletedSubscriptionWhere!] - NOT: GenreRelationshipDeletedSubscriptionWhere - OR: [GenreRelationshipDeletedSubscriptionWhere!] - deletedRelationship: GenreRelationshipsSubscriptionWhere - genre: GenreSubscriptionWhere -} - -input GenreRelationshipsSubscriptionWhere { - product: GenreProductRelationshipSubscriptionWhere -} - -\\"\\"\\" -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 { - name: SortDirection -} - -input GenreSubscriptionWhere { - AND: [GenreSubscriptionWhere!] - NOT: GenreSubscriptionWhere - OR: [GenreSubscriptionWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input GenreUpdateInput { - name: String - product: [GenreProductUpdateFieldInput!] -} - -type GenreUpdatedEvent { - event: EventType! - previousState: GenreEventPayload! - timestamp: Float! - updatedGenre: GenreEventPayload! -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_ALL: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_NONE: GenreProductConnectionWhere - productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SINGLE: GenreProductConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreProductConnections match this filter - \\"\\"\\" - productConnection_SOME: GenreProductConnectionWhere -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -interface IProduct { - genre: Genre! - id: String! - name: String! -} - -input IProductConnectWhere { - node: IProductWhere! -} - -input IProductCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput -} - -interface IProductEventPayload { - id: String! - name: String! -} - -input IProductImplementationsSubscriptionWhere { - Movie: MovieSubscriptionWhere - Series: SeriesSubscriptionWhere -} - -input IProductImplementationsUpdateInput { - Movie: MovieUpdateInput - Series: SeriesUpdateInput -} - -input IProductImplementationsWhere { - Movie: MovieWhere - Series: SeriesWhere -} - -input IProductOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [IProductSort] -} - -\\"\\"\\" -Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. -\\"\\"\\" -input IProductSort { - id: SortDirection - name: SortDirection -} - -input IProductSubscriptionWhere { - AND: [IProductSubscriptionWhere!] - NOT: IProductSubscriptionWhere - OR: [IProductSubscriptionWhere!] - _on: IProductImplementationsSubscriptionWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input IProductUpdateInput { - _on: IProductImplementationsUpdateInput - id: String - name: String -} - -input IProductWhere { - _on: IProductImplementationsWhere - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Movie implements IProduct { - genre: Genre! - id: String! - name: String! -} - -type MovieAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -input MovieCreateInput { - id: String! - name: String! -} - -type MovieCreatedEvent { - createdMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -type MovieDeletedEvent { - deletedMovie: MovieEventPayload! - event: EventType! - timestamp: Float! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload implements IProductEventPayload { - id: String! - name: String! -} - -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 - name: SortDirection -} - -input MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input MovieUpdateInput { - id: String - name: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - series(options: SeriesOptions, where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! -} - -type Series implements IProduct { - genre: Genre! - id: String! - name: String! -} - -type SeriesAggregateSelection { - count: Int! - id: StringAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} - -type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input SeriesCreateInput { - id: String! - name: String! -} - -type SeriesCreatedEvent { - createdSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! -} - -type SeriesDeletedEvent { - deletedSeries: SeriesEventPayload! - event: EventType! - timestamp: Float! -} - -type SeriesEdge { - cursor: String! - node: Series! -} - -type SeriesEventPayload implements IProductEventPayload { - id: String! - name: String! -} - -input SeriesOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [SeriesSort!] -} - -\\"\\"\\" -Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. -\\"\\"\\" -input SeriesSort { - id: SortDirection - name: SortDirection -} - -input SeriesSubscriptionWhere { - AND: [SeriesSubscriptionWhere!] - NOT: SeriesSubscriptionWhere - OR: [SeriesSubscriptionWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -input SeriesUpdateInput { - id: String - name: String -} - -type SeriesUpdatedEvent { - event: EventType! - previousState: SeriesEventPayload! - timestamp: Float! - updatedSeries: SeriesEventPayload! -} - -input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - id: String - id_CONTAINS: String - id_ENDS_WITH: String - id_IN: [String!] - id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: String - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type Subscription { - genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! - genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! - genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! - genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! - genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! - movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! - movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! - seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! - seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! - seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! -}" -`); + "schema { + query: Query + mutation: Mutation + subscription: Subscription + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Genre { + name: String! + product(directed: Boolean = true, options: IProductOptions, where: IProductWhere): [IProduct!]! + productConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + } + + type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input GenreConnectInput { + product: [GenreProductConnectFieldInput!] + } + + type GenreConnectedRelationships { + product: GenreProductConnectedRelationship + } + + input GenreCreateInput { + name: String! + product: GenreProductFieldInput + } + + type GenreCreatedEvent { + createdGenre: GenreEventPayload! + event: EventType! + timestamp: Float! + } + + input GenreDeleteInput { + product: [GenreProductDeleteFieldInput!] + } + + type GenreDeletedEvent { + deletedGenre: GenreEventPayload! + event: EventType! + timestamp: Float! + } + + input GenreDisconnectInput { + product: [GenreProductDisconnectFieldInput!] + } + + type GenreEdge { + cursor: String! + node: Genre! + } + + type GenreEventPayload { + name: String! + } + + 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!] + } + + input GenreProductConnectFieldInput { + where: IProductConnectWhere + } + + type GenreProductConnectedRelationship { + node: IProductEventPayload! + } + + type GenreProductConnection { + edges: [GenreProductRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input GenreProductConnectionSort { + node: IProductSort + } + + input GenreProductConnectionWhere { + AND: [GenreProductConnectionWhere!] + NOT: GenreProductConnectionWhere + OR: [GenreProductConnectionWhere!] + node: IProductWhere + node_NOT: IProductWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input GenreProductCreateFieldInput { + node: IProductCreateInput! + } + + input GenreProductDeleteFieldInput { + where: GenreProductConnectionWhere + } + + input GenreProductDisconnectFieldInput { + where: GenreProductConnectionWhere + } + + input GenreProductFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + } + + type GenreProductRelationship { + cursor: String! + node: IProduct! + } + + input GenreProductRelationshipSubscriptionWhere { + node: IProductSubscriptionWhere + } + + input GenreProductUpdateConnectionInput { + node: IProductUpdateInput + } + + input GenreProductUpdateFieldInput { + connect: [GenreProductConnectFieldInput!] + create: [GenreProductCreateFieldInput!] + delete: [GenreProductDeleteFieldInput!] + disconnect: [GenreProductDisconnectFieldInput!] + update: GenreProductUpdateConnectionInput + where: GenreProductConnectionWhere + } + + input GenreRelationInput { + product: [GenreProductCreateFieldInput!] + } + + type GenreRelationshipCreatedEvent { + createdRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input GenreRelationshipCreatedSubscriptionWhere { + AND: [GenreRelationshipCreatedSubscriptionWhere!] + NOT: GenreRelationshipCreatedSubscriptionWhere + OR: [GenreRelationshipCreatedSubscriptionWhere!] + createdRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere + } + + type GenreRelationshipDeletedEvent { + deletedRelationship: GenreConnectedRelationships! + event: EventType! + genre: GenreEventPayload! + relationshipFieldName: String! + timestamp: Float! + } + + input GenreRelationshipDeletedSubscriptionWhere { + AND: [GenreRelationshipDeletedSubscriptionWhere!] + NOT: GenreRelationshipDeletedSubscriptionWhere + OR: [GenreRelationshipDeletedSubscriptionWhere!] + deletedRelationship: GenreRelationshipsSubscriptionWhere + genre: GenreSubscriptionWhere + } + + input GenreRelationshipsSubscriptionWhere { + product: GenreProductRelationshipSubscriptionWhere + } + + \\"\\"\\" + 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 { + name: SortDirection + } + + input GenreSubscriptionWhere { + AND: [GenreSubscriptionWhere!] + NOT: GenreSubscriptionWhere + OR: [GenreSubscriptionWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input GenreUpdateInput { + name: String + product: [GenreProductUpdateFieldInput!] + } + + type GenreUpdatedEvent { + event: EventType! + previousState: GenreEventPayload! + timestamp: Float! + updatedGenre: GenreEventPayload! + } + + input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + productConnection: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_ALL: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_NONE: GenreProductConnectionWhere + productConnection_NOT: GenreProductConnectionWhere @deprecated(reason: \\"Use \`productConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SINGLE: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreProductConnections match this filter + \\"\\"\\" + productConnection_SOME: GenreProductConnectionWhere + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + interface IProduct { + genre: Genre! + id: String! + name: String! + } + + input IProductConnectWhere { + node: IProductWhere! + } + + input IProductCreateInput { + Movie: MovieCreateInput + Series: SeriesCreateInput + } + + interface IProductEventPayload { + id: String! + name: String! + } + + input IProductImplementationsSubscriptionWhere { + Movie: MovieSubscriptionWhere + Series: SeriesSubscriptionWhere + } + + input IProductImplementationsUpdateInput { + Movie: MovieUpdateInput + Series: SeriesUpdateInput + } + + input IProductImplementationsWhere { + Movie: MovieWhere + Series: SeriesWhere + } + + input IProductOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more IProductSort objects to sort IProducts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [IProductSort] + } + + \\"\\"\\" + Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. + \\"\\"\\" + input IProductSort { + id: SortDirection + name: SortDirection + } + + input IProductSubscriptionWhere { + AND: [IProductSubscriptionWhere!] + NOT: IProductSubscriptionWhere + OR: [IProductSubscriptionWhere!] + _on: IProductImplementationsSubscriptionWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input IProductUpdateInput { + _on: IProductImplementationsUpdateInput + id: String + name: String + } + + input IProductWhere { + _on: IProductImplementationsWhere + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Movie implements IProduct { + genre: Genre! + id: String! + name: String! + } + + type MovieAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input MovieCreateInput { + id: String! + name: String! + } + + type MovieCreatedEvent { + createdMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + type MovieDeletedEvent { + deletedMovie: MovieEventPayload! + event: EventType! + timestamp: Float! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload implements IProductEventPayload { + id: String! + name: String! + } + + 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 + name: SortDirection + } + + input MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input MovieUpdateInput { + id: String + name: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + series(options: SeriesOptions, where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! + } + + type Series implements IProduct { + genre: Genre! + id: String! + name: String! + } + + type SeriesAggregateSelection { + count: Int! + id: StringAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + id: String! + name: String! + } + + type SeriesCreatedEvent { + createdSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! + } + + type SeriesDeletedEvent { + deletedSeries: SeriesEventPayload! + event: EventType! + timestamp: Float! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + type SeriesEventPayload implements IProductEventPayload { + id: String! + name: String! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + id: SortDirection + name: SortDirection + } + + input SeriesSubscriptionWhere { + AND: [SeriesSubscriptionWhere!] + NOT: SeriesSubscriptionWhere + OR: [SeriesSubscriptionWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + input SeriesUpdateInput { + id: String + name: String + } + + type SeriesUpdatedEvent { + event: EventType! + previousState: SeriesEventPayload! + timestamp: Float! + updatedSeries: SeriesEventPayload! + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + id: String + id_CONTAINS: String + id_ENDS_WITH: String + id_IN: [String!] + id_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: String + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type Subscription { + genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! + genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! + genreRelationshipCreated(where: GenreRelationshipCreatedSubscriptionWhere): GenreRelationshipCreatedEvent! + genreRelationshipDeleted(where: GenreRelationshipDeletedSubscriptionWhere): GenreRelationshipDeletedEvent! + genreUpdated(where: GenreSubscriptionWhere): GenreUpdatedEvent! + movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! + movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + seriesCreated(where: SeriesSubscriptionWhere): SeriesCreatedEvent! + seriesDeleted(where: SeriesSubscriptionWhere): SeriesDeletedEvent! + seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! + } + + type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index 5024855ba3..46ae56fac4 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -44,252 +44,252 @@ describe("Extending the schema in when using getSubgraphSchema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query - mutation: Mutation -} - -directive @federation__extends on INTERFACE | OBJECT - -directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - -directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @federation__override(from: String!) on FIELD_DEFINITION - -directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - -directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - -directive @shareable on FIELD_DEFINITION | OBJECT - -type Actor { - password: String! - username: String! -} - -input ActorCreateInput { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorUpdateInput { - password: String - username: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - title: String -} - -input MovieCreateInput { - title: String -} - -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 { - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -scalar _Any - -type _Service { - sdl: String -} - -scalar federation__FieldSet - -scalar link__Import - -enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY -}" -`); + "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query + mutation: Mutation + } + + directive @federation__extends on INTERFACE | OBJECT + + directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + + directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @federation__override(from: String!) on FIELD_DEFINITION + + directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + + directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + + directive @shareable on FIELD_DEFINITION | OBJECT + + type Actor { + password: String! + username: String! + } + + input ActorCreateInput { + password: String! + username: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + password: SortDirection + username: SortDirection + } + + input ActorUpdateInput { + password: String + username: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + title: String + } + + input MovieCreateInput { + title: String + } + + 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 { + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + 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 UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + scalar _Any + + type _Service { + sdl: String + } + + scalar federation__FieldSet + + scalar link__Import + + enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY + }" + `); }); test("Should be able to extend the schema using @mutation", async () => { @@ -312,204 +312,204 @@ enum link__Purpose { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query -} - -directive @federation__extends on INTERFACE | OBJECT - -directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - -directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @federation__override(from: String!) on FIELD_DEFINITION - -directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - -directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - -directive @shareable on FIELD_DEFINITION | OBJECT - -type Actor { - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - title: String -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -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 MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable @shareable { - longest: String - shortest: String -} - -scalar _Any - -type _Service { - sdl: String -} - -scalar federation__FieldSet - -scalar link__Import - -enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY -}" -`); + "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query + } + + directive @federation__extends on INTERFACE | OBJECT + + directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + + directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @federation__override(from: String!) on FIELD_DEFINITION + + directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + + directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + + directive @shareable on FIELD_DEFINITION | OBJECT + + type Actor { + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + password: SortDirection + username: SortDirection + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Movie { + title: String + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + 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 MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable @shareable { + longest: String + shortest: String + } + + scalar _Any + + type _Service { + sdl: String + } + + scalar federation__FieldSet + + scalar link__Import + + enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY + }" + `); }); test("Should be able to extend the schema using @subscription", async () => { @@ -533,353 +533,353 @@ enum link__Purpose { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query - mutation: Mutation - subscription: Subscription -} - -directive @federation__extends on INTERFACE | OBJECT - -directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - -directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @federation__override(from: String!) on FIELD_DEFINITION - -directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - -directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - -directive @shareable on FIELD_DEFINITION | OBJECT - -type Actor { - password: String! - username: String! -} - -type ActorAggregateSelection { - count: Int! - password: StringAggregateSelectionNonNullable! - username: StringAggregateSelectionNonNullable! -} - -input ActorCreateInput { - password: String! - username: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorEventPayload { - password: String! - username: String! -} - -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 { - password: SortDirection - username: SortDirection -} - -input ActorSubscriptionWhere { - AND: [ActorSubscriptionWhere!] - NOT: ActorSubscriptionWhere - OR: [ActorSubscriptionWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -input ActorUpdateInput { - password: String - username: String -} - -type ActorUpdatedEvent { - event: EventType! - previousState: ActorEventPayload! - timestamp: Float! - updatedActor: ActorEventPayload! -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - password: String - password_CONTAINS: String - password_ENDS_WITH: String - password_IN: [String!] - password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - password_STARTS_WITH: String - username: String - username_CONTAINS: String - username_ENDS_WITH: String - username_IN: [String!] - username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - username_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -enum EventType { - CREATE - CREATE_RELATIONSHIP - DELETE - DELETE_RELATIONSHIP - UPDATE -} - -type Movie { - title: String -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieCreateInput { - title: String -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -type MovieEventPayload { - title: String -} - -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 MovieSubscriptionWhere { - AND: [MovieSubscriptionWhere!] - NOT: MovieSubscriptionWhere - OR: [MovieSubscriptionWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -input MovieUpdateInput { - title: String -} - -type MovieUpdatedEvent { - event: EventType! - previousState: MovieEventPayload! - timestamp: Float! - updatedMovie: MovieEventPayload! -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! -} - -type StringAggregateSelectionNullable @shareable { - longest: String - shortest: String -} - -type Subscription { - actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! - movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -scalar _Any - -type _Service { - sdl: String -} - -scalar federation__FieldSet - -scalar link__Import - -enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY -}" -`); + "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query + mutation: Mutation + subscription: Subscription + } + + directive @federation__extends on INTERFACE | OBJECT + + directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + + directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @federation__override(from: String!) on FIELD_DEFINITION + + directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + + directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + + directive @shareable on FIELD_DEFINITION | OBJECT + + type Actor { + password: String! + username: String! + } + + type ActorAggregateSelection { + count: Int! + password: StringAggregateSelectionNonNullable! + username: StringAggregateSelectionNonNullable! + } + + input ActorCreateInput { + password: String! + username: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorEventPayload { + password: String! + username: String! + } + + 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 { + password: SortDirection + username: SortDirection + } + + input ActorSubscriptionWhere { + AND: [ActorSubscriptionWhere!] + NOT: ActorSubscriptionWhere + OR: [ActorSubscriptionWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + input ActorUpdateInput { + password: String + username: String + } + + type ActorUpdatedEvent { + event: EventType! + previousState: ActorEventPayload! + timestamp: Float! + updatedActor: ActorEventPayload! + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + password: String + password_CONTAINS: String + password_ENDS_WITH: String + password_IN: [String!] + password_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + password_STARTS_WITH: String + username: String + username_CONTAINS: String + username_ENDS_WITH: String + username_IN: [String!] + username_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + username_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + enum EventType { + CREATE + CREATE_RELATIONSHIP + DELETE + DELETE_RELATIONSHIP + UPDATE + } + + type Movie { + title: String + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieCreateInput { + title: String + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + type MovieEventPayload { + title: String + } + + 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 MovieSubscriptionWhere { + AND: [MovieSubscriptionWhere!] + NOT: MovieSubscriptionWhere + OR: [MovieSubscriptionWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + input MovieUpdateInput { + title: String + } + + type MovieUpdatedEvent { + event: EventType! + previousState: MovieEventPayload! + timestamp: Float! + updatedMovie: MovieEventPayload! + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! + } + + type StringAggregateSelectionNullable @shareable { + longest: String + shortest: String + } + + type Subscription { + actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! + movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + scalar _Any + + type _Service { + sdl: String + } + + scalar federation__FieldSet + + scalar link__Import + + enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index debe77f63e..eb7853d1b8 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -41,306 +41,306 @@ describe("Extending the schema in when using getSubgraphSchema", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query -} - -directive @federation__extends on INTERFACE | OBJECT - -directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - -directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @federation__override(from: String!) on FIELD_DEFINITION - -directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - -directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - -directive @shareable on FIELD_DEFINITION | OBJECT - -type Actor { - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie @key(fields: \\"title\\") @shareable { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -type MovieAggregateSelection @shareable { - count: Int! - title: StringAggregateSelectionNonNullable! -} - -type MovieEdge @shareable { - 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 MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection @shareable { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - _entities(representations: [_Any!]!): [_Entity]! - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! @shareable - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @shareable - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! @shareable -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! -} - -scalar _Any - -union _Entity = Movie - -type _Service { - sdl: String -} - -scalar federation__FieldSet - -scalar link__Import - -enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY -}" -`); + "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query + } + + directive @federation__extends on INTERFACE | OBJECT + + directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + + directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @federation__override(from: String!) on FIELD_DEFINITION + + directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + + directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + + directive @shareable on FIELD_DEFINITION | OBJECT + + type Actor { + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Movie @key(fields: \\"title\\") @shareable { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + type MovieAggregateSelection @shareable { + count: Int! + title: StringAggregateSelectionNonNullable! + } + + type MovieEdge @shareable { + 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 MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection @shareable { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + _entities(representations: [_Any!]!): [_Entity]! + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! @shareable + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @shareable + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! @shareable + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! + } + + scalar _Any + + union _Entity = Movie + + type _Service { + sdl: String + } + + scalar federation__FieldSet + + scalar link__Import + + enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY + }" + `); }); test("Should be able to use @query and multiple @key directives on the same type", async () => { @@ -362,412 +362,412 @@ enum link__Purpose { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSubgraphSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { - query: Query - mutation: Mutation -} - -directive @federation__extends on INTERFACE | OBJECT - -directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT - -directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @federation__override(from: String!) on FIELD_DEFINITION - -directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION - -directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT - -directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - -directive @shareable on FIELD_DEFINITION | OBJECT - -type Actor { - name: String! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - name: String! -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -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 { - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse @shareable { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID! - title: String! -} - -type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: ActorConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - node: ActorSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship { - cursor: String! - node: Actor! -} - -input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] -} - -input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID! - title: String! -} - -input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] -} - -input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - id: ID - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! @shareable - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! @shareable - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! @shareable -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo @shareable { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - _entities(representations: [_Any!]!): [_Entity]! - _service: _Service! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable @shareable { - longest: String! - shortest: String! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo @shareable { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse @shareable { - info: UpdateInfo! - movies: [Movie!]! -} - -scalar _Any - -union _Entity = Movie - -type _Service { - sdl: String -} - -scalar federation__FieldSet - -scalar link__Import - -enum link__Purpose { - \\"\\"\\" - \`EXECUTION\` features provide metadata necessary for operation execution. - \\"\\"\\" - EXECUTION - \\"\\"\\" - \`SECURITY\` features provide metadata necessary to securely resolve fields. - \\"\\"\\" - SECURITY -}" -`); + "schema @link(url: \\"https://specs.apollo.dev/link/v1.0\\") @link(url: \\"https://specs.apollo.dev/federation/v2.0\\", import: [\\"@key\\", \\"@shareable\\"]) { + query: Query + mutation: Mutation + } + + directive @federation__extends on INTERFACE | OBJECT + + directive @federation__external(reason: String) on FIELD_DEFINITION | OBJECT + + directive @federation__inaccessible on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @federation__override(from: String!) on FIELD_DEFINITION + + directive @federation__provides(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__requires(fields: federation__FieldSet!) on FIELD_DEFINITION + + directive @federation__tag(name: String!) repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT + + directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA + + directive @shareable on FIELD_DEFINITION | OBJECT + + type Actor { + name: String! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + name: String! + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + 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 { + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse @shareable { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID! + title: String! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + id: ID + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! @shareable + deleteActors(where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! @shareable + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! @shareable + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + _entities(representations: [_Any!]!): [_Entity]! + _service: _Service! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable @shareable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo @shareable { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse @shareable { + info: UpdateInfo! + movies: [Movie!]! + } + + scalar _Any + + union _Entity = Movie + + type _Service { + sdl: String + } + + scalar federation__FieldSet + + scalar link__Import + + enum link__Purpose { + \\"\\"\\" + \`EXECUTION\` features provide metadata necessary for operation execution. + \\"\\"\\" + EXECUTION + \\"\\"\\" + \`SECURITY\` features provide metadata necessary to securely resolve fields. + \\"\\"\\" + SECURITY + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/3816.test.ts b/packages/graphql/tests/schema/issues/3816.test.ts index 8311f72245..3f30f62c81 100644 --- a/packages/graphql/tests/schema/issues/3816.test.ts +++ b/packages/graphql/tests/schema/issues/3816.test.ts @@ -40,523 +40,523 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - name: String! -} - -type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input GenreConnectInput { - movies: [GenreMoviesConnectFieldInput!] -} - -input GenreConnectWhere { - node: GenreWhere! -} - -input GenreCreateInput { - movies: GenreMoviesFieldInput - name: String! -} - -input GenreDeleteInput { - movies: [GenreMoviesDeleteFieldInput!] -} - -input GenreDisconnectInput { - movies: [GenreMoviesDisconnectFieldInput!] -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection -} - -type GenreMovieMoviesNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input GenreMoviesAggregateInput { - AND: [GenreMoviesAggregateInput!] - NOT: GenreMoviesAggregateInput - OR: [GenreMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: GenreMoviesNodeAggregationWhereInput -} - -input GenreMoviesConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input GenreMoviesConnectionSort { - node: MovieSort -} - -input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input GenreMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input GenreMoviesDeleteFieldInput { - where: GenreMoviesConnectionWhere -} - -input GenreMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: GenreMoviesConnectionWhere -} - -input GenreMoviesFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] -} - -input GenreMoviesNodeAggregationWhereInput { - AND: [GenreMoviesNodeAggregationWhereInput!] - NOT: GenreMoviesNodeAggregationWhereInput - OR: [GenreMoviesNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type GenreMoviesRelationship { - cursor: String! - node: Movie! -} - -input GenreMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input GenreMoviesUpdateFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - delete: [GenreMoviesDeleteFieldInput!] - disconnect: [GenreMoviesDisconnectFieldInput!] - update: GenreMoviesUpdateConnectionInput - where: GenreMoviesConnectionWhere -} - -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!] -} - -input GenreRelationInput { - movies: [GenreMoviesCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: SortDirection -} - -input GenreUpdateInput { - movies: [GenreMoviesUpdateFieldInput!] - name: String -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: GenreMoviesAggregateInput - moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere - moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere - \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! - name: String! -} - -type MovieAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input MovieConnectInput { - genre: MovieGenreConnectFieldInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - genre: MovieGenreFieldInput - name: String! -} - -input MovieDisconnectInput { - genre: MovieGenreDisconnectFieldInput -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieGenreAggregateInput { - AND: [MovieGenreAggregateInput!] - NOT: MovieGenreAggregateInput - OR: [MovieGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenreNodeAggregationWhereInput -} - -input MovieGenreConnectFieldInput { - connect: GenreConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: GenreConnectWhere -} - -type MovieGenreConnection { - edges: [MovieGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieGenreConnectionSort { - node: GenreSort -} - -input MovieGenreConnectionWhere { - AND: [MovieGenreConnectionWhere!] - NOT: MovieGenreConnectionWhere - OR: [MovieGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieGenreDisconnectFieldInput { - disconnect: GenreDisconnectInput - where: MovieGenreConnectionWhere -} - -input MovieGenreFieldInput { - connect: MovieGenreConnectFieldInput -} - -type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection -} - -type MovieGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieGenreNodeAggregationWhereInput { - AND: [MovieGenreNodeAggregationWhereInput!] - NOT: MovieGenreNodeAggregationWhereInput - OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieGenreRelationship { - cursor: String! - node: Genre! -} - -input MovieGenreUpdateFieldInput { - connect: MovieGenreConnectFieldInput - disconnect: MovieGenreDisconnectFieldInput - where: MovieGenreConnectionWhere -} - -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 { - name: SortDirection -} - -input MovieUpdateInput { - genre: MovieGenreUpdateFieldInput - name: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genre: GenreWhere - genreAggregate: MovieGenreAggregateInput - genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Genre { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + name: String! + } + + type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input GenreConnectInput { + movies: [GenreMoviesConnectFieldInput!] + } + + input GenreConnectWhere { + node: GenreWhere! + } + + input GenreCreateInput { + movies: GenreMoviesFieldInput + name: String! + } + + input GenreDeleteInput { + movies: [GenreMoviesDeleteFieldInput!] + } + + input GenreDisconnectInput { + movies: [GenreMoviesDisconnectFieldInput!] + } + + type GenreEdge { + cursor: String! + node: Genre! + } + + type GenreMovieMoviesAggregationSelection { + count: Int! + node: GenreMovieMoviesNodeAggregateSelection + } + + type GenreMovieMoviesNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input GenreMoviesAggregateInput { + AND: [GenreMoviesAggregateInput!] + NOT: GenreMoviesAggregateInput + OR: [GenreMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: GenreMoviesNodeAggregationWhereInput + } + + input GenreMoviesConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type GenreMoviesConnection { + edges: [GenreMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input GenreMoviesConnectionSort { + node: MovieSort + } + + input GenreMoviesConnectionWhere { + AND: [GenreMoviesConnectionWhere!] + NOT: GenreMoviesConnectionWhere + OR: [GenreMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input GenreMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input GenreMoviesDeleteFieldInput { + where: GenreMoviesConnectionWhere + } + + input GenreMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: GenreMoviesConnectionWhere + } + + input GenreMoviesFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + } + + input GenreMoviesNodeAggregationWhereInput { + AND: [GenreMoviesNodeAggregationWhereInput!] + NOT: GenreMoviesNodeAggregationWhereInput + OR: [GenreMoviesNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type GenreMoviesRelationship { + cursor: String! + node: Movie! + } + + input GenreMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input GenreMoviesUpdateFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + delete: [GenreMoviesDeleteFieldInput!] + disconnect: [GenreMoviesDisconnectFieldInput!] + update: GenreMoviesUpdateConnectionInput + where: GenreMoviesConnectionWhere + } + + 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!] + } + + input GenreRelationInput { + movies: [GenreMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: SortDirection + } + + input GenreUpdateInput { + movies: [GenreMoviesUpdateFieldInput!] + name: String + } + + input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: GenreMoviesConnectionWhere + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Movie { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + name: String! + } + + type MovieAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + genre: MovieGenreConnectFieldInput + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + genre: MovieGenreFieldInput + name: String! + } + + input MovieDisconnectInput { + genre: MovieGenreDisconnectFieldInput + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieGenreAggregateInput { + AND: [MovieGenreAggregateInput!] + NOT: MovieGenreAggregateInput + OR: [MovieGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenreNodeAggregationWhereInput + } + + input MovieGenreConnectFieldInput { + connect: GenreConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: GenreConnectWhere + } + + type MovieGenreConnection { + edges: [MovieGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieGenreConnectionSort { + node: GenreSort + } + + input MovieGenreConnectionWhere { + AND: [MovieGenreConnectionWhere!] + NOT: MovieGenreConnectionWhere + OR: [MovieGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieGenreDisconnectFieldInput { + disconnect: GenreDisconnectInput + where: MovieGenreConnectionWhere + } + + input MovieGenreFieldInput { + connect: MovieGenreConnectFieldInput + } + + type MovieGenreGenreAggregationSelection { + count: Int! + node: MovieGenreGenreNodeAggregateSelection + } + + type MovieGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieGenreNodeAggregationWhereInput { + AND: [MovieGenreNodeAggregationWhereInput!] + NOT: MovieGenreNodeAggregationWhereInput + OR: [MovieGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieGenreRelationship { + cursor: String! + node: Genre! + } + + input MovieGenreUpdateFieldInput { + connect: MovieGenreConnectFieldInput + disconnect: MovieGenreDisconnectFieldInput + where: MovieGenreConnectionWhere + } + + 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 { + name: SortDirection + } + + input MovieUpdateInput { + genre: MovieGenreUpdateFieldInput + name: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genre: GenreWhere + genreAggregate: MovieGenreAggregateInput + genreConnection: MovieGenreConnectionWhere + genreConnection_NOT: MovieGenreConnectionWhere + genre_NOT: GenreWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("No nested operations in one type", async () => { @@ -576,482 +576,482 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Genre { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! - name: String! -} - -type GenreAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input GenreConnectInput { - movies: [GenreMoviesConnectFieldInput!] -} - -input GenreCreateInput { - movies: GenreMoviesFieldInput - name: String! -} - -input GenreDeleteInput { - movies: [GenreMoviesDeleteFieldInput!] -} - -input GenreDisconnectInput { - movies: [GenreMoviesDisconnectFieldInput!] -} - -type GenreEdge { - cursor: String! - node: Genre! -} - -type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection -} - -type GenreMovieMoviesNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input GenreMoviesAggregateInput { - AND: [GenreMoviesAggregateInput!] - NOT: GenreMoviesAggregateInput - OR: [GenreMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: GenreMoviesNodeAggregationWhereInput -} - -input GenreMoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type GenreMoviesConnection { - edges: [GenreMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input GenreMoviesConnectionSort { - node: MovieSort -} - -input GenreMoviesConnectionWhere { - AND: [GenreMoviesConnectionWhere!] - NOT: GenreMoviesConnectionWhere - OR: [GenreMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input GenreMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input GenreMoviesDeleteFieldInput { - where: GenreMoviesConnectionWhere -} - -input GenreMoviesDisconnectFieldInput { - where: GenreMoviesConnectionWhere -} - -input GenreMoviesFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] -} - -input GenreMoviesNodeAggregationWhereInput { - AND: [GenreMoviesNodeAggregationWhereInput!] - NOT: GenreMoviesNodeAggregationWhereInput - OR: [GenreMoviesNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type GenreMoviesRelationship { - cursor: String! - node: Movie! -} - -input GenreMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input GenreMoviesUpdateFieldInput { - connect: [GenreMoviesConnectFieldInput!] - create: [GenreMoviesCreateFieldInput!] - delete: [GenreMoviesDeleteFieldInput!] - disconnect: [GenreMoviesDisconnectFieldInput!] - update: GenreMoviesUpdateConnectionInput - where: GenreMoviesConnectionWhere -} - -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!] -} - -input GenreRelationInput { - movies: [GenreMoviesCreateFieldInput!] -} - -\\"\\"\\" -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 { - name: SortDirection -} - -input GenreUpdateInput { - movies: [GenreMoviesUpdateFieldInput!] - name: String -} - -input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: GenreMoviesAggregateInput - moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Genres where all of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where none of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere - moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Genres where one of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere - \\"\\"\\" - Return Genres where some of the related GenreMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere - \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Movie { - genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! - name: String! -} - -type MovieAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - name: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieGenreAggregateInput { - AND: [MovieGenreAggregateInput!] - NOT: MovieGenreAggregateInput - OR: [MovieGenreAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieGenreNodeAggregationWhereInput -} - -type MovieGenreConnection { - edges: [MovieGenreRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieGenreConnectionSort { - node: GenreSort -} - -input MovieGenreConnectionWhere { - AND: [MovieGenreConnectionWhere!] - NOT: MovieGenreConnectionWhere - OR: [MovieGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection -} - -type MovieGenreGenreNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieGenreNodeAggregationWhereInput { - AND: [MovieGenreNodeAggregationWhereInput!] - NOT: MovieGenreNodeAggregationWhereInput - OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieGenreRelationship { - cursor: String! - node: Genre! -} - -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 { - name: SortDirection -} - -input MovieUpdateInput { - name: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - genre: GenreWhere - genreAggregate: MovieGenreAggregateInput - genreConnection: MovieGenreConnectionWhere - genreConnection_NOT: MovieGenreConnectionWhere - genre_NOT: GenreWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Genre { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + name: String! + } + + type GenreAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input GenreConnectInput { + movies: [GenreMoviesConnectFieldInput!] + } + + input GenreCreateInput { + movies: GenreMoviesFieldInput + name: String! + } + + input GenreDeleteInput { + movies: [GenreMoviesDeleteFieldInput!] + } + + input GenreDisconnectInput { + movies: [GenreMoviesDisconnectFieldInput!] + } + + type GenreEdge { + cursor: String! + node: Genre! + } + + type GenreMovieMoviesAggregationSelection { + count: Int! + node: GenreMovieMoviesNodeAggregateSelection + } + + type GenreMovieMoviesNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input GenreMoviesAggregateInput { + AND: [GenreMoviesAggregateInput!] + NOT: GenreMoviesAggregateInput + OR: [GenreMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: GenreMoviesNodeAggregationWhereInput + } + + input GenreMoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type GenreMoviesConnection { + edges: [GenreMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input GenreMoviesConnectionSort { + node: MovieSort + } + + input GenreMoviesConnectionWhere { + AND: [GenreMoviesConnectionWhere!] + NOT: GenreMoviesConnectionWhere + OR: [GenreMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input GenreMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input GenreMoviesDeleteFieldInput { + where: GenreMoviesConnectionWhere + } + + input GenreMoviesDisconnectFieldInput { + where: GenreMoviesConnectionWhere + } + + input GenreMoviesFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + } + + input GenreMoviesNodeAggregationWhereInput { + AND: [GenreMoviesNodeAggregationWhereInput!] + NOT: GenreMoviesNodeAggregationWhereInput + OR: [GenreMoviesNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type GenreMoviesRelationship { + cursor: String! + node: Movie! + } + + input GenreMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input GenreMoviesUpdateFieldInput { + connect: [GenreMoviesConnectFieldInput!] + create: [GenreMoviesCreateFieldInput!] + delete: [GenreMoviesDeleteFieldInput!] + disconnect: [GenreMoviesDisconnectFieldInput!] + update: GenreMoviesUpdateConnectionInput + where: GenreMoviesConnectionWhere + } + + 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!] + } + + input GenreRelationInput { + movies: [GenreMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + name: SortDirection + } + + input GenreUpdateInput { + movies: [GenreMoviesUpdateFieldInput!] + name: String + } + + input GenreWhere { + AND: [GenreWhere!] + NOT: GenreWhere + OR: [GenreWhere!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NOT: GenreMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: GenreMoviesConnectionWhere + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Movie { + genre(directed: Boolean = true, options: GenreOptions, where: GenreWhere): Genre! + genreAggregate(directed: Boolean = true, where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + name: String! + } + + type MovieAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + name: String! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieGenreAggregateInput { + AND: [MovieGenreAggregateInput!] + NOT: MovieGenreAggregateInput + OR: [MovieGenreAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieGenreNodeAggregationWhereInput + } + + type MovieGenreConnection { + edges: [MovieGenreRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieGenreConnectionSort { + node: GenreSort + } + + input MovieGenreConnectionWhere { + AND: [MovieGenreConnectionWhere!] + NOT: MovieGenreConnectionWhere + OR: [MovieGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MovieGenreGenreAggregationSelection { + count: Int! + node: MovieGenreGenreNodeAggregateSelection + } + + type MovieGenreGenreNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieGenreNodeAggregationWhereInput { + AND: [MovieGenreNodeAggregationWhereInput!] + NOT: MovieGenreNodeAggregationWhereInput + OR: [MovieGenreNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieGenreRelationship { + cursor: String! + node: Genre! + } + + 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 { + name: SortDirection + } + + input MovieUpdateInput { + name: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + genre: GenreWhere + genreAggregate: MovieGenreAggregateInput + genreConnection: MovieGenreConnectionWhere + genreConnection_NOT: MovieGenreConnectionWhere + genre_NOT: GenreWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(delete: GenreDeleteInput, where: GenreWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateGenres(connect: GenreConnectInput, create: GenreRelationInput, delete: GenreDeleteInput, disconnect: GenreDisconnectInput, update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/609.test.ts b/packages/graphql/tests/schema/issues/609.test.ts index d8a098ff50..1fcf3f6340 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -33,136 +33,136 @@ describe("609", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateDeprecatedsMutationResponse { - deprecateds: [Deprecated!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Deprecated { - deprecatedField: String @deprecated -} - -type DeprecatedAggregateSelection { - count: Int! - deprecatedField: StringAggregateSelectionNullable! -} - -input DeprecatedCreateInput { - deprecatedField: String @deprecated -} - -type DeprecatedEdge { - cursor: String! - node: Deprecated! -} - -input DeprecatedOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more DeprecatedSort objects to sort Deprecateds by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [DeprecatedSort!] -} - -\\"\\"\\" -Fields to sort Deprecateds by. The order in which sorts are applied is not guaranteed when specifying many fields in one DeprecatedSort object. -\\"\\"\\" -input DeprecatedSort { - deprecatedField: SortDirection @deprecated -} - -input DeprecatedUpdateInput { - deprecatedField: String @deprecated -} - -input DeprecatedWhere { - AND: [DeprecatedWhere!] - NOT: DeprecatedWhere - OR: [DeprecatedWhere!] - deprecatedField: String @deprecated - deprecatedField_CONTAINS: String @deprecated - deprecatedField_ENDS_WITH: String @deprecated - deprecatedField_IN: [String] @deprecated - deprecatedField_NOT: String @deprecated - deprecatedField_NOT_CONTAINS: String @deprecated - deprecatedField_NOT_ENDS_WITH: String @deprecated - deprecatedField_NOT_IN: [String] @deprecated - deprecatedField_NOT_STARTS_WITH: String @deprecated - deprecatedField_STARTS_WITH: String @deprecated -} - -type DeprecatedsConnection { - edges: [DeprecatedEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createDeprecateds(input: [DeprecatedCreateInput!]!): CreateDeprecatedsMutationResponse! - deleteDeprecateds(where: DeprecatedWhere): DeleteInfo! - updateDeprecateds(update: DeprecatedUpdateInput, where: DeprecatedWhere): UpdateDeprecatedsMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - deprecateds(options: DeprecatedOptions, where: DeprecatedWhere): [Deprecated!]! - deprecatedsAggregate(where: DeprecatedWhere): DeprecatedAggregateSelection! - deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort], where: DeprecatedWhere): DeprecatedsConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateDeprecatedsMutationResponse { - deprecateds: [Deprecated!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateDeprecatedsMutationResponse { + deprecateds: [Deprecated!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Deprecated { + deprecatedField: String @deprecated + } + + type DeprecatedAggregateSelection { + count: Int! + deprecatedField: StringAggregateSelectionNullable! + } + + input DeprecatedCreateInput { + deprecatedField: String @deprecated + } + + type DeprecatedEdge { + cursor: String! + node: Deprecated! + } + + input DeprecatedOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more DeprecatedSort objects to sort Deprecateds by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [DeprecatedSort!] + } + + \\"\\"\\" + Fields to sort Deprecateds by. The order in which sorts are applied is not guaranteed when specifying many fields in one DeprecatedSort object. + \\"\\"\\" + input DeprecatedSort { + deprecatedField: SortDirection @deprecated + } + + input DeprecatedUpdateInput { + deprecatedField: String @deprecated + } + + input DeprecatedWhere { + AND: [DeprecatedWhere!] + NOT: DeprecatedWhere + OR: [DeprecatedWhere!] + deprecatedField: String @deprecated + deprecatedField_CONTAINS: String @deprecated + deprecatedField_ENDS_WITH: String @deprecated + deprecatedField_IN: [String] @deprecated + deprecatedField_NOT: String @deprecated + deprecatedField_NOT_CONTAINS: String @deprecated + deprecatedField_NOT_ENDS_WITH: String @deprecated + deprecatedField_NOT_IN: [String] @deprecated + deprecatedField_NOT_STARTS_WITH: String @deprecated + deprecatedField_STARTS_WITH: String @deprecated + } + + type DeprecatedsConnection { + edges: [DeprecatedEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createDeprecateds(input: [DeprecatedCreateInput!]!): CreateDeprecatedsMutationResponse! + deleteDeprecateds(where: DeprecatedWhere): DeleteInfo! + updateDeprecateds(update: DeprecatedUpdateInput, where: DeprecatedWhere): UpdateDeprecatedsMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + deprecateds(options: DeprecatedOptions, where: DeprecatedWhere): [Deprecated!]! + deprecatedsAggregate(where: DeprecatedWhere): DeprecatedAggregateSelection! + deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort], where: DeprecatedWhere): DeprecatedsConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateDeprecatedsMutationResponse { + deprecateds: [Deprecated!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index 78f8fc8ca9..7dae149c68 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -44,702 +44,702 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type Actor { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! -} - -type Actor2 { - movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true, where: MovieWhere): Actor2MovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! - name: String! -} - -type Actor2AggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input Actor2ConnectInput { - movies: [Actor2MoviesConnectFieldInput!] -} - -input Actor2ConnectOrCreateInput { - movies: [Actor2MoviesConnectOrCreateFieldInput!] -} - -input Actor2CreateInput { - movies: Actor2MoviesFieldInput - name: String! -} - -input Actor2DeleteInput { - movies: [Actor2MoviesDeleteFieldInput!] -} - -input Actor2DisconnectInput { - movies: [Actor2MoviesDisconnectFieldInput!] -} - -type Actor2Edge { - cursor: String! - node: Actor2! -} - -type Actor2MovieMoviesAggregationSelection { - count: Int! - node: Actor2MovieMoviesNodeAggregateSelection -} - -type Actor2MovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input Actor2MoviesAggregateInput { - AND: [Actor2MoviesAggregateInput!] - NOT: Actor2MoviesAggregateInput - OR: [Actor2MoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: Actor2MoviesNodeAggregationWhereInput -} - -input Actor2MoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -input Actor2MoviesConnectOrCreateFieldInput { - onCreate: Actor2MoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! -} - -input Actor2MoviesConnectOrCreateFieldInputOnCreate { - node: MovieOnCreateInput! -} - -type Actor2MoviesConnection { - edges: [Actor2MoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input Actor2MoviesConnectionSort { - node: MovieSort -} - -input Actor2MoviesConnectionWhere { - AND: [Actor2MoviesConnectionWhere!] - NOT: Actor2MoviesConnectionWhere - OR: [Actor2MoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input Actor2MoviesCreateFieldInput { - node: MovieCreateInput! -} - -input Actor2MoviesDeleteFieldInput { - where: Actor2MoviesConnectionWhere -} - -input Actor2MoviesDisconnectFieldInput { - where: Actor2MoviesConnectionWhere -} - -input Actor2MoviesFieldInput { - connect: [Actor2MoviesConnectFieldInput!] - connectOrCreate: [Actor2MoviesConnectOrCreateFieldInput!] - create: [Actor2MoviesCreateFieldInput!] -} - -input Actor2MoviesNodeAggregationWhereInput { - AND: [Actor2MoviesNodeAggregationWhereInput!] - NOT: Actor2MoviesNodeAggregationWhereInput - OR: [Actor2MoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type Actor2MoviesRelationship { - cursor: String! - node: Movie! -} - -input Actor2MoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input Actor2MoviesUpdateFieldInput { - connect: [Actor2MoviesConnectFieldInput!] - connectOrCreate: [Actor2MoviesConnectOrCreateFieldInput!] - create: [Actor2MoviesCreateFieldInput!] - delete: [Actor2MoviesDeleteFieldInput!] - disconnect: [Actor2MoviesDisconnectFieldInput!] - update: Actor2MoviesUpdateConnectionInput - where: Actor2MoviesConnectionWhere -} - -input Actor2Options { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more Actor2Sort objects to sort Actor2s by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [Actor2Sort!] -} - -input Actor2RelationInput { - movies: [Actor2MoviesCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Actor2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Actor2Sort object. -\\"\\"\\" -input Actor2Sort { - name: SortDirection -} - -input Actor2UpdateInput { - movies: [Actor2MoviesUpdateFieldInput!] - name: String -} - -input Actor2Where { - AND: [Actor2Where!] - NOT: Actor2Where - OR: [Actor2Where!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: Actor2MoviesAggregateInput - moviesConnection: Actor2MoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actor2s where all of the related Actor2MoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: Actor2MoviesConnectionWhere - \\"\\"\\" - Return Actor2s where none of the related Actor2MoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: Actor2MoviesConnectionWhere - moviesConnection_NOT: Actor2MoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actor2s where one of the related Actor2MoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: Actor2MoviesConnectionWhere - \\"\\"\\" - Return Actor2s where some of the related Actor2MoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: Actor2MoviesConnectionWhere - \\"\\"\\"Return Actor2s where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Actor2s where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"Return Actor2s where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Actor2s where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Actor2sConnection { - edges: [Actor2Edge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] -} - -input ActorConnectOrCreateInput { - movies: [ActorMoviesConnectOrCreateFieldInput!] -} - -input ActorCreateInput { - movies: ActorMoviesFieldInput - name: String! -} - -input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] -} - -input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection -} - -type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput -} - -input ActorMoviesConnectFieldInput { - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -input ActorMoviesConnectOrCreateFieldInput { - onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! - where: MovieConnectOrCreateWhere! -} - -input ActorMoviesConnectOrCreateFieldInputOnCreate { - node: MovieOnCreateInput! -} - -type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorMoviesConnectionSort { - node: MovieSort -} - -input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorMoviesCreateFieldInput { - node: MovieCreateInput! -} - -input ActorMoviesDeleteFieldInput { - where: ActorMoviesConnectionWhere -} - -input ActorMoviesDisconnectFieldInput { - where: ActorMoviesConnectionWhere -} - -input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - create: [ActorMoviesCreateFieldInput!] -} - -input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorMoviesRelationship { - cursor: String! - node: Movie! -} - -input ActorMoviesUpdateConnectionInput { - node: MovieUpdateInput -} - -input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] - 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!] -} - -input ActorRelationInput { - movies: [ActorMoviesCreateFieldInput!] -} - -\\"\\"\\" -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!] - movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") - moviesAggregate: ActorMoviesAggregateInput - moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActor2sMutationResponse { - actor2s: [Actor2!]! - info: CreateInfo! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} - -type Movie { - id: ID! - title: String! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! -} - -input MovieConnectOrCreateWhere { - node: MovieUniqueWhere! -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - title: String! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOnCreateInput { - title: String! -} - -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 - title: SortDirection -} - -input MovieUniqueWhere { - id: ID -} - -input MovieUpdateInput { - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createActor2s(input: [Actor2CreateInput!]!): CreateActor2sMutationResponse! - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActor2s(delete: Actor2DeleteInput, where: Actor2Where): DeleteInfo! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - updateActor2s(connect: Actor2ConnectInput, connectOrCreate: Actor2ConnectOrCreateInput, create: Actor2RelationInput, delete: Actor2DeleteInput, disconnect: Actor2DisconnectInput, update: Actor2UpdateInput, where: Actor2Where): UpdateActor2sMutationResponse! - updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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 { - actor2s(options: Actor2Options, where: Actor2Where): [Actor2!]! - actor2sAggregate(where: Actor2Where): Actor2AggregateSelection! - actor2sConnection(after: String, first: Int, sort: [Actor2Sort], where: Actor2Where): Actor2sConnection! - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateActor2sMutationResponse { - actor2s: [Actor2!]! - info: UpdateInfo! -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type Actor { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type Actor2 { + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): Actor2MovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! + name: String! + } + + type Actor2AggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input Actor2ConnectInput { + movies: [Actor2MoviesConnectFieldInput!] + } + + input Actor2ConnectOrCreateInput { + movies: [Actor2MoviesConnectOrCreateFieldInput!] + } + + input Actor2CreateInput { + movies: Actor2MoviesFieldInput + name: String! + } + + input Actor2DeleteInput { + movies: [Actor2MoviesDeleteFieldInput!] + } + + input Actor2DisconnectInput { + movies: [Actor2MoviesDisconnectFieldInput!] + } + + type Actor2Edge { + cursor: String! + node: Actor2! + } + + type Actor2MovieMoviesAggregationSelection { + count: Int! + node: Actor2MovieMoviesNodeAggregateSelection + } + + type Actor2MovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input Actor2MoviesAggregateInput { + AND: [Actor2MoviesAggregateInput!] + NOT: Actor2MoviesAggregateInput + OR: [Actor2MoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: Actor2MoviesNodeAggregationWhereInput + } + + input Actor2MoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + input Actor2MoviesConnectOrCreateFieldInput { + onCreate: Actor2MoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! + } + + input Actor2MoviesConnectOrCreateFieldInputOnCreate { + node: MovieOnCreateInput! + } + + type Actor2MoviesConnection { + edges: [Actor2MoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input Actor2MoviesConnectionSort { + node: MovieSort + } + + input Actor2MoviesConnectionWhere { + AND: [Actor2MoviesConnectionWhere!] + NOT: Actor2MoviesConnectionWhere + OR: [Actor2MoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input Actor2MoviesCreateFieldInput { + node: MovieCreateInput! + } + + input Actor2MoviesDeleteFieldInput { + where: Actor2MoviesConnectionWhere + } + + input Actor2MoviesDisconnectFieldInput { + where: Actor2MoviesConnectionWhere + } + + input Actor2MoviesFieldInput { + connect: [Actor2MoviesConnectFieldInput!] + connectOrCreate: [Actor2MoviesConnectOrCreateFieldInput!] + create: [Actor2MoviesCreateFieldInput!] + } + + input Actor2MoviesNodeAggregationWhereInput { + AND: [Actor2MoviesNodeAggregationWhereInput!] + NOT: Actor2MoviesNodeAggregationWhereInput + OR: [Actor2MoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type Actor2MoviesRelationship { + cursor: String! + node: Movie! + } + + input Actor2MoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input Actor2MoviesUpdateFieldInput { + connect: [Actor2MoviesConnectFieldInput!] + connectOrCreate: [Actor2MoviesConnectOrCreateFieldInput!] + create: [Actor2MoviesCreateFieldInput!] + delete: [Actor2MoviesDeleteFieldInput!] + disconnect: [Actor2MoviesDisconnectFieldInput!] + update: Actor2MoviesUpdateConnectionInput + where: Actor2MoviesConnectionWhere + } + + input Actor2Options { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more Actor2Sort objects to sort Actor2s by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [Actor2Sort!] + } + + input Actor2RelationInput { + movies: [Actor2MoviesCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Actor2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Actor2Sort object. + \\"\\"\\" + input Actor2Sort { + name: SortDirection + } + + input Actor2UpdateInput { + movies: [Actor2MoviesUpdateFieldInput!] + name: String + } + + input Actor2Where { + AND: [Actor2Where!] + NOT: Actor2Where + OR: [Actor2Where!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: Actor2MoviesAggregateInput + moviesConnection: Actor2MoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actor2s where all of the related Actor2MoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: Actor2MoviesConnectionWhere + \\"\\"\\" + Return Actor2s where none of the related Actor2MoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: Actor2MoviesConnectionWhere + moviesConnection_NOT: Actor2MoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actor2s where one of the related Actor2MoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: Actor2MoviesConnectionWhere + \\"\\"\\" + Return Actor2s where some of the related Actor2MoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: Actor2MoviesConnectionWhere + \\"\\"\\"Return Actor2s where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Actor2s where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return Actor2s where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Actor2s where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Actor2sConnection { + edges: [Actor2Edge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + name: String! + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesNodeAggregateSelection { + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! + } + + input ActorMoviesConnectOrCreateFieldInputOnCreate { + node: MovieOnCreateInput! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + where: ActorMoviesConnectionWhere + } + + input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + } + + input ActorMoviesUpdateConnectionInput { + node: MovieUpdateInput + } + + input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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!] + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActor2sMutationResponse { + actor2s: [Actor2!]! + info: CreateInfo! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Movie { + id: ID! + title: String! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + title: String! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOnCreateInput { + title: String! + } + + 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 + title: SortDirection + } + + input MovieUniqueWhere { + id: ID + } + + input MovieUpdateInput { + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActor2s(input: [Actor2CreateInput!]!): CreateActor2sMutationResponse! + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActor2s(delete: Actor2DeleteInput, where: Actor2Where): DeleteInfo! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(where: MovieWhere): DeleteInfo! + updateActor2s(connect: Actor2ConnectInput, connectOrCreate: Actor2ConnectOrCreateInput, create: Actor2RelationInput, delete: Actor2DeleteInput, disconnect: Actor2DisconnectInput, update: Actor2UpdateInput, where: Actor2Where): UpdateActor2sMutationResponse! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, 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 { + actor2s(options: Actor2Options, where: Actor2Where): [Actor2!]! + actor2sAggregate(where: Actor2Where): Actor2AggregateSelection! + actor2sConnection(after: String, first: Int, sort: [Actor2Sort], where: Actor2Where): Actor2sConnection! + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActor2sMutationResponse { + actor2s: [Actor2!]! + info: UpdateInfo! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index 4d4f4f7afc..61e8db0050 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -61,7 +61,7 @@ describe("lower case type names", () => { info: CreateInfo! } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -81,7 +81,7 @@ describe("lower case type names", () => { min: DateTime } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -127,7 +127,7 @@ describe("lower case type names", () => { moviesConnection(after: String, first: Int, sort: [movieSort], where: movieWhere): MoviesConnection! } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -145,7 +145,7 @@ describe("lower case type names", () => { info: UpdateInfo! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 7314b23d40..d04891f349 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -33,159 +33,159 @@ describe("Algebraic", () => { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie { - id: ID - viewers: Int! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: IntAggregateSelectionNonNullable! -} - -input MovieCreateInput { - id: ID - viewers: Int! -} - -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 - viewers: SortDirection -} - -input MovieUpdateInput { - id: ID - viewers: Int - viewers_DECREMENT: Int - viewers_INCREMENT: Int -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie { + id: ID + viewers: Int! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: IntAggregateSelectionNonNullable! + } + + input MovieCreateInput { + id: ID + viewers: Int! + } + + 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 + viewers: SortDirection + } + + input MovieUpdateInput { + id: ID + viewers: Int + viewers_DECREMENT: Int + viewers_INCREMENT: Int + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: Int + viewers_GT: Int + viewers_GTE: Int + viewers_IN: [Int!] + viewers_LT: Int + viewers_LTE: Int + viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("BigInt fields should be extended with Increment/Decrement operators", async () => { @@ -198,164 +198,164 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\" -A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. -\\"\\"\\" -scalar BigInt - -type BigIntAggregateSelectionNonNullable { - average: BigInt! - max: BigInt! - min: BigInt! - sum: BigInt! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID - viewers: BigInt! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: BigIntAggregateSelectionNonNullable! -} - -input MovieCreateInput { - id: ID - viewers: BigInt! -} - -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 - viewers: SortDirection -} - -input MovieUpdateInput { - id: ID - viewers: BigInt - viewers_DECREMENT: BigInt - viewers_INCREMENT: BigInt -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: BigInt - viewers_GT: BigInt - viewers_GTE: BigInt - viewers_IN: [BigInt!] - viewers_LT: BigInt - viewers_LTE: BigInt - viewers_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [BigInt!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. + \\"\\"\\" + scalar BigInt + + type BigIntAggregateSelectionNonNullable { + average: BigInt! + max: BigInt! + min: BigInt! + sum: BigInt! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + viewers: BigInt! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: BigIntAggregateSelectionNonNullable! + } + + input MovieCreateInput { + id: ID + viewers: BigInt! + } + + 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 + viewers: SortDirection + } + + input MovieUpdateInput { + id: ID + viewers: BigInt + viewers_DECREMENT: BigInt + viewers_INCREMENT: BigInt + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: BigInt + viewers_GT: BigInt + viewers_GTE: BigInt + viewers_IN: [BigInt!] + viewers_LT: BigInt + viewers_LTE: BigInt + viewers_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [BigInt!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Float fields should be extended with Add/Subtract/Multiply/Divide operators", async () => { @@ -369,161 +369,161 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID - viewers: Float! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: FloatAggregateSelectionNonNullable! -} - -input MovieCreateInput { - id: ID - viewers: Float! -} - -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 - viewers: SortDirection -} - -input MovieUpdateInput { - id: ID - viewers: Float - viewers_ADD: Float - viewers_DIVIDE: Float - viewers_MULTIPLY: Float - viewers_SUBTRACT: Float -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: Float - viewers_GT: Float - viewers_GTE: Float - viewers_IN: [Float!] - viewers_LT: Float - viewers_LTE: Float - viewers_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + viewers: Float! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: FloatAggregateSelectionNonNullable! + } + + input MovieCreateInput { + id: ID + viewers: Float! + } + + 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 + viewers: SortDirection + } + + input MovieUpdateInput { + id: ID + viewers: Float + viewers_ADD: Float + viewers_DIVIDE: Float + viewers_MULTIPLY: Float + viewers_SUBTRACT: Float + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: Float + viewers_GT: Float + viewers_GTE: Float + viewers_IN: [Float!] + viewers_LT: Float + viewers_LTE: Float + viewers_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("Operators should be presents in nested updates", async () => { @@ -542,1911 +542,1911 @@ type UpdateMoviesMutationResponse { const neoSchema = new Neo4jGraphQL({ typeDefs }); const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateDirectorsMutationResponse { - directors: [Director!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Director { - directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - directsAggregate(directed: Boolean = true, where: MovieWhere): DirectorMovieDirectsAggregationSelection - directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! - lastName: String! -} - -type DirectorAggregateSelection { - count: Int! - lastName: StringAggregateSelectionNonNullable! -} - -input DirectorConnectInput { - directs: [DirectorDirectsConnectFieldInput!] -} - -input DirectorConnectWhere { - node: DirectorWhere! -} - -input DirectorCreateInput { - directs: DirectorDirectsFieldInput - lastName: String! -} - -input DirectorDeleteInput { - directs: [DirectorDirectsDeleteFieldInput!] -} - -input DirectorDirectsAggregateInput { - AND: [DirectorDirectsAggregateInput!] - NOT: DirectorDirectsAggregateInput - OR: [DirectorDirectsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: DirectorDirectsNodeAggregationWhereInput -} - -input DirectorDirectsConnectFieldInput { - connect: [MovieConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type DirectorDirectsConnection { - edges: [DirectorDirectsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input DirectorDirectsConnectionSort { - node: MovieSort -} - -input DirectorDirectsConnectionWhere { - AND: [DirectorDirectsConnectionWhere!] - NOT: DirectorDirectsConnectionWhere - OR: [DirectorDirectsConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input DirectorDirectsCreateFieldInput { - node: MovieCreateInput! -} - -input DirectorDirectsDeleteFieldInput { - delete: MovieDeleteInput - where: DirectorDirectsConnectionWhere -} - -input DirectorDirectsDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: DirectorDirectsConnectionWhere -} - -input DirectorDirectsFieldInput { - connect: [DirectorDirectsConnectFieldInput!] - create: [DirectorDirectsCreateFieldInput!] -} - -input DirectorDirectsNodeAggregationWhereInput { - AND: [DirectorDirectsNodeAggregationWhereInput!] - NOT: DirectorDirectsNodeAggregationWhereInput - OR: [DirectorDirectsNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_AVERAGE_EQUAL: Float - viewers_AVERAGE_GT: Float - viewers_AVERAGE_GTE: Float - viewers_AVERAGE_LT: Float - viewers_AVERAGE_LTE: Float - viewers_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - viewers_MAX_EQUAL: Int - viewers_MAX_GT: Int - viewers_MAX_GTE: Int - viewers_MAX_LT: Int - viewers_MAX_LTE: Int - viewers_MIN_EQUAL: Int - viewers_MIN_GT: Int - viewers_MIN_GTE: Int - viewers_MIN_LT: Int - viewers_MIN_LTE: Int - viewers_SUM_EQUAL: Int - viewers_SUM_GT: Int - viewers_SUM_GTE: Int - viewers_SUM_LT: Int - viewers_SUM_LTE: Int -} - -type DirectorDirectsRelationship { - cursor: String! - node: Movie! -} - -input DirectorDirectsUpdateConnectionInput { - node: MovieUpdateInput -} - -input DirectorDirectsUpdateFieldInput { - connect: [DirectorDirectsConnectFieldInput!] - create: [DirectorDirectsCreateFieldInput!] - delete: [DirectorDirectsDeleteFieldInput!] - disconnect: [DirectorDirectsDisconnectFieldInput!] - update: DirectorDirectsUpdateConnectionInput - where: DirectorDirectsConnectionWhere -} - -input DirectorDisconnectInput { - directs: [DirectorDirectsDisconnectFieldInput!] -} - -type DirectorEdge { - cursor: String! - node: Director! -} - -type DirectorMovieDirectsAggregationSelection { - count: Int! - node: DirectorMovieDirectsNodeAggregateSelection -} - -type DirectorMovieDirectsNodeAggregateSelection { - id: IDAggregateSelectionNullable! - viewers: IntAggregateSelectionNonNullable! -} - -input DirectorOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more DirectorSort objects to sort Directors by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [DirectorSort!] -} - -input DirectorRelationInput { - directs: [DirectorDirectsCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object. -\\"\\"\\" -input DirectorSort { - lastName: SortDirection -} - -input DirectorUpdateInput { - directs: [DirectorDirectsUpdateFieldInput!] - lastName: String -} - -input DirectorWhere { - AND: [DirectorWhere!] - NOT: DirectorWhere - OR: [DirectorWhere!] - directs: MovieWhere @deprecated(reason: \\"Use \`directs_SOME\` instead.\\") - directsAggregate: DirectorDirectsAggregateInput - directsConnection: DirectorDirectsConnectionWhere @deprecated(reason: \\"Use \`directsConnection_SOME\` instead.\\") - \\"\\"\\" - Return Directors where all of the related DirectorDirectsConnections match this filter - \\"\\"\\" - directsConnection_ALL: DirectorDirectsConnectionWhere - \\"\\"\\" - Return Directors where none of the related DirectorDirectsConnections match this filter - \\"\\"\\" - directsConnection_NONE: DirectorDirectsConnectionWhere - directsConnection_NOT: DirectorDirectsConnectionWhere @deprecated(reason: \\"Use \`directsConnection_NONE\` instead.\\") - \\"\\"\\" - Return Directors where one of the related DirectorDirectsConnections match this filter - \\"\\"\\" - directsConnection_SINGLE: DirectorDirectsConnectionWhere - \\"\\"\\" - Return Directors where some of the related DirectorDirectsConnections match this filter - \\"\\"\\" - directsConnection_SOME: DirectorDirectsConnectionWhere - \\"\\"\\"Return Directors where all of the related Movies match this filter\\"\\"\\" - directs_ALL: MovieWhere - \\"\\"\\"Return Directors where none of the related Movies match this filter\\"\\"\\" - directs_NONE: MovieWhere - directs_NOT: MovieWhere @deprecated(reason: \\"Use \`directs_NONE\` instead.\\") - \\"\\"\\"Return Directors where one of the related Movies match this filter\\"\\"\\" - directs_SINGLE: MovieWhere - \\"\\"\\"Return Directors where some of the related Movies match this filter\\"\\"\\" - directs_SOME: MovieWhere - lastName: String - lastName_CONTAINS: String - lastName_ENDS_WITH: String - lastName_IN: [String!] - lastName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - lastName_STARTS_WITH: String -} - -type DirectorsConnection { - edges: [DirectorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie { - directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director - directedByAggregate(directed: Boolean = true, where: DirectorWhere): MovieDirectorDirectedByAggregationSelection - directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! - id: ID - viewers: Int! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: IntAggregateSelectionNonNullable! -} - -input MovieConnectInput { - directedBy: MovieDirectedByConnectFieldInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - directedBy: MovieDirectedByFieldInput - id: ID - viewers: Int! -} - -input MovieDeleteInput { - directedBy: MovieDirectedByDeleteFieldInput -} - -input MovieDirectedByAggregateInput { - AND: [MovieDirectedByAggregateInput!] - NOT: MovieDirectedByAggregateInput - OR: [MovieDirectedByAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieDirectedByNodeAggregationWhereInput -} - -input MovieDirectedByConnectFieldInput { - connect: DirectorConnectInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: DirectorConnectWhere -} - -type MovieDirectedByConnection { - edges: [MovieDirectedByRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieDirectedByConnectionSort { - node: DirectorSort -} - -input MovieDirectedByConnectionWhere { - AND: [MovieDirectedByConnectionWhere!] - NOT: MovieDirectedByConnectionWhere - OR: [MovieDirectedByConnectionWhere!] - node: DirectorWhere - node_NOT: DirectorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieDirectedByCreateFieldInput { - node: DirectorCreateInput! -} - -input MovieDirectedByDeleteFieldInput { - delete: DirectorDeleteInput - where: MovieDirectedByConnectionWhere -} - -input MovieDirectedByDisconnectFieldInput { - disconnect: DirectorDisconnectInput - where: MovieDirectedByConnectionWhere -} - -input MovieDirectedByFieldInput { - connect: MovieDirectedByConnectFieldInput - create: MovieDirectedByCreateFieldInput -} - -input MovieDirectedByNodeAggregationWhereInput { - AND: [MovieDirectedByNodeAggregationWhereInput!] - NOT: MovieDirectedByNodeAggregationWhereInput - OR: [MovieDirectedByNodeAggregationWhereInput!] - lastName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_LENGTH_EQUAL: Float - lastName_AVERAGE_LENGTH_GT: Float - lastName_AVERAGE_LENGTH_GTE: Float - lastName_AVERAGE_LENGTH_LT: Float - lastName_AVERAGE_LENGTH_LTE: Float - lastName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_LENGTH_EQUAL: Int - lastName_LONGEST_LENGTH_GT: Int - lastName_LONGEST_LENGTH_GTE: Int - lastName_LONGEST_LENGTH_LT: Int - lastName_LONGEST_LENGTH_LTE: Int - lastName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_LENGTH_EQUAL: Int - lastName_SHORTEST_LENGTH_GT: Int - lastName_SHORTEST_LENGTH_GTE: Int - lastName_SHORTEST_LENGTH_LT: Int - lastName_SHORTEST_LENGTH_LTE: Int - lastName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieDirectedByRelationship { - cursor: String! - node: Director! -} - -input MovieDirectedByUpdateConnectionInput { - node: DirectorUpdateInput -} - -input MovieDirectedByUpdateFieldInput { - connect: MovieDirectedByConnectFieldInput - create: MovieDirectedByCreateFieldInput - delete: MovieDirectedByDeleteFieldInput - disconnect: MovieDirectedByDisconnectFieldInput - update: MovieDirectedByUpdateConnectionInput - where: MovieDirectedByConnectionWhere -} - -type MovieDirectorDirectedByAggregationSelection { - count: Int! - node: MovieDirectorDirectedByNodeAggregateSelection -} - -type MovieDirectorDirectedByNodeAggregateSelection { - lastName: StringAggregateSelectionNonNullable! -} - -input MovieDisconnectInput { - directedBy: MovieDirectedByDisconnectFieldInput -} - -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!] -} - -input MovieRelationInput { - directedBy: MovieDirectedByCreateFieldInput -} - -\\"\\"\\" -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 - viewers: SortDirection -} - -input MovieUpdateInput { - directedBy: MovieDirectedByUpdateFieldInput - id: ID - viewers: Int - viewers_DECREMENT: Int - viewers_INCREMENT: Int -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - directedBy: DirectorWhere - directedByAggregate: MovieDirectedByAggregateInput - directedByConnection: MovieDirectedByConnectionWhere - directedByConnection_NOT: MovieDirectedByConnectionWhere - directedBy_NOT: DirectorWhere - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createDirectors(input: [DirectorCreateInput!]!): CreateDirectorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteDirectors(delete: DirectorDeleteInput, where: DirectorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateDirectors(connect: DirectorConnectInput, create: DirectorRelationInput, delete: DirectorDeleteInput, disconnect: DirectorDisconnectInput, update: DirectorUpdateInput, where: DirectorWhere): UpdateDirectorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - directors(options: DirectorOptions, where: DirectorWhere): [Director!]! - directorsAggregate(where: DirectorWhere): DirectorAggregateSelection! - directorsConnection(after: String, first: Int, sort: [DirectorSort], where: DirectorWhere): DirectorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateDirectorsMutationResponse { - directors: [Director!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); - }); + "schema { + query: Query + mutation: Mutation + } - test("Should be supported in interfaces", async () => { - const typeDefs = gql` - interface Production { - viewers: Int! + type CreateDirectorsMutationResponse { + directors: [Director!]! + info: CreateInfo! } - type Movie implements Production { - id: ID - viewers: Int! - workers: [Person!]! @relationship(type: "WORKED_IN", direction: IN) + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! } - type Person { - name: String! - worksInProduction: [Production!]! @relationship(type: "WORKED_IN", direction: OUT) + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} - -type Movie implements Production { - id: ID - viewers: Int! - workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - workersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonWorkersAggregationSelection - workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - viewers: IntAggregateSelectionNonNullable! -} - -input MovieConnectInput { - workers: [MovieWorkersConnectFieldInput!] -} - -input MovieCreateInput { - id: ID - viewers: Int! - workers: MovieWorkersFieldInput -} - -input MovieDeleteInput { - workers: [MovieWorkersDeleteFieldInput!] -} - -input MovieDisconnectInput { - workers: [MovieWorkersDisconnectFieldInput!] -} - -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!] -} - -type MoviePersonWorkersAggregationSelection { - count: Int! - node: MoviePersonWorkersNodeAggregateSelection -} - -type MoviePersonWorkersNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieRelationInput { - workers: [MovieWorkersCreateFieldInput!] -} - -\\"\\"\\" -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 - viewers: SortDirection -} - -input MovieUpdateInput { - id: ID - viewers: Int - viewers_DECREMENT: Int - viewers_INCREMENT: Int - workers: [MovieWorkersUpdateFieldInput!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - workers: PersonWhere @deprecated(reason: \\"Use \`workers_SOME\` instead.\\") - workersAggregate: MovieWorkersAggregateInput - workersConnection: MovieWorkersConnectionWhere @deprecated(reason: \\"Use \`workersConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieWorkersConnections match this filter - \\"\\"\\" - workersConnection_ALL: MovieWorkersConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieWorkersConnections match this filter - \\"\\"\\" - workersConnection_NONE: MovieWorkersConnectionWhere - workersConnection_NOT: MovieWorkersConnectionWhere @deprecated(reason: \\"Use \`workersConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieWorkersConnections match this filter - \\"\\"\\" - workersConnection_SINGLE: MovieWorkersConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieWorkersConnections match this filter - \\"\\"\\" - workersConnection_SOME: MovieWorkersConnectionWhere - \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - workers_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - workers_NONE: PersonWhere - workers_NOT: PersonWhere @deprecated(reason: \\"Use \`workers_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - workers_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - workers_SOME: PersonWhere -} - -input MovieWorkersAggregateInput { - AND: [MovieWorkersAggregateInput!] - NOT: MovieWorkersAggregateInput - OR: [MovieWorkersAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieWorkersNodeAggregationWhereInput -} - -input MovieWorkersConnectFieldInput { - connect: [PersonConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PersonConnectWhere -} - -type MovieWorkersConnection { - edges: [MovieWorkersRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieWorkersConnectionSort { - node: PersonSort -} - -input MovieWorkersConnectionWhere { - AND: [MovieWorkersConnectionWhere!] - NOT: MovieWorkersConnectionWhere - OR: [MovieWorkersConnectionWhere!] - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieWorkersCreateFieldInput { - node: PersonCreateInput! -} - -input MovieWorkersDeleteFieldInput { - delete: PersonDeleteInput - where: MovieWorkersConnectionWhere -} - -input MovieWorkersDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieWorkersConnectionWhere -} - -input MovieWorkersFieldInput { - connect: [MovieWorkersConnectFieldInput!] - create: [MovieWorkersCreateFieldInput!] -} - -input MovieWorkersNodeAggregationWhereInput { - AND: [MovieWorkersNodeAggregationWhereInput!] - NOT: MovieWorkersNodeAggregationWhereInput - OR: [MovieWorkersNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieWorkersRelationship { - cursor: String! - node: Person! -} - -input MovieWorkersUpdateConnectionInput { - node: PersonUpdateInput -} - -input MovieWorkersUpdateFieldInput { - connect: [MovieWorkersConnectFieldInput!] - create: [MovieWorkersCreateFieldInput!] - delete: [MovieWorkersDeleteFieldInput!] - disconnect: [MovieWorkersDisconnectFieldInput!] - update: MovieWorkersUpdateConnectionInput - where: MovieWorkersConnectionWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - name: String! - worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! - worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input PersonConnectInput { - worksInProduction: [PersonWorksInProductionConnectFieldInput!] -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - name: String! - worksInProduction: PersonWorksInProductionFieldInput -} - -input PersonDeleteInput { - worksInProduction: [PersonWorksInProductionDeleteFieldInput!] -} - -input PersonDisconnectInput { - worksInProduction: [PersonWorksInProductionDisconnectFieldInput!] -} - -type PersonEdge { - cursor: String! - node: Person! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -input PersonRelationInput { - worksInProduction: [PersonWorksInProductionCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - name: String - worksInProduction: [PersonWorksInProductionUpdateFieldInput!] -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - worksInProductionConnection: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Use \`worksInProductionConnection_SOME\` instead.\\") - \\"\\"\\" - Return People where all of the related PersonWorksInProductionConnections match this filter - \\"\\"\\" - worksInProductionConnection_ALL: PersonWorksInProductionConnectionWhere - \\"\\"\\" - Return People where none of the related PersonWorksInProductionConnections match this filter - \\"\\"\\" - worksInProductionConnection_NONE: PersonWorksInProductionConnectionWhere - worksInProductionConnection_NOT: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Use \`worksInProductionConnection_NONE\` instead.\\") - \\"\\"\\" - Return People where one of the related PersonWorksInProductionConnections match this filter - \\"\\"\\" - worksInProductionConnection_SINGLE: PersonWorksInProductionConnectionWhere - \\"\\"\\" - Return People where some of the related PersonWorksInProductionConnections match this filter - \\"\\"\\" - worksInProductionConnection_SOME: PersonWorksInProductionConnectionWhere -} - -input PersonWorksInProductionConnectFieldInput { - connect: ProductionConnectInput - where: ProductionConnectWhere -} - -type PersonWorksInProductionConnection { - edges: [PersonWorksInProductionRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonWorksInProductionConnectionSort { - node: ProductionSort -} - -input PersonWorksInProductionConnectionWhere { - AND: [PersonWorksInProductionConnectionWhere!] - NOT: PersonWorksInProductionConnectionWhere - OR: [PersonWorksInProductionConnectionWhere!] - node: ProductionWhere - node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PersonWorksInProductionCreateFieldInput { - node: ProductionCreateInput! -} - -input PersonWorksInProductionDeleteFieldInput { - delete: ProductionDeleteInput - where: PersonWorksInProductionConnectionWhere -} - -input PersonWorksInProductionDisconnectFieldInput { - disconnect: ProductionDisconnectInput - where: PersonWorksInProductionConnectionWhere -} - -input PersonWorksInProductionFieldInput { - connect: [PersonWorksInProductionConnectFieldInput!] - create: [PersonWorksInProductionCreateFieldInput!] -} - -type PersonWorksInProductionRelationship { - cursor: String! - node: Production! -} - -input PersonWorksInProductionUpdateConnectionInput { - node: ProductionUpdateInput -} - -input PersonWorksInProductionUpdateFieldInput { - connect: [PersonWorksInProductionConnectFieldInput!] - create: [PersonWorksInProductionCreateFieldInput!] - delete: [PersonWorksInProductionDeleteFieldInput!] - disconnect: [PersonWorksInProductionDisconnectFieldInput!] - update: PersonWorksInProductionUpdateConnectionInput - where: PersonWorksInProductionConnectionWhere -} - -interface Production { - viewers: Int! -} - -input ProductionConnectInput { - _on: ProductionImplementationsConnectInput -} - -input ProductionConnectWhere { - node: ProductionWhere! -} - -input ProductionCreateInput { - Movie: MovieCreateInput -} - -input ProductionDeleteInput { - _on: ProductionImplementationsDeleteInput -} - -input ProductionDisconnectInput { - _on: ProductionImplementationsDisconnectInput -} - -input ProductionImplementationsConnectInput { - Movie: [MovieConnectInput!] -} - -input ProductionImplementationsDeleteInput { - Movie: [MovieDeleteInput!] -} - -input ProductionImplementationsDisconnectInput { - Movie: [MovieDisconnectInput!] -} - -input ProductionImplementationsUpdateInput { - Movie: MovieUpdateInput -} - -input ProductionImplementationsWhere { - Movie: MovieWhere -} - -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 { - viewers: SortDirection -} - -input ProductionUpdateInput { - _on: ProductionImplementationsUpdateInput - viewers: Int - viewers_DECREMENT: Int - viewers_INCREMENT: Int -} - -input ProductionWhere { - _on: ProductionImplementationsWhere - viewers: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int - viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); - }); - test("Should be supported in Relationship properties", async () => { - const typeDefs = gql` - type Person { - name: String! - actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Director { + directs(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + directsAggregate(directed: Boolean = true, where: MovieWhere): DirectorMovieDirectsAggregationSelection + directsConnection(after: String, directed: Boolean = true, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! + lastName: String! + } + + type DirectorAggregateSelection { + count: Int! + lastName: StringAggregateSelectionNonNullable! + } + + input DirectorConnectInput { + directs: [DirectorDirectsConnectFieldInput!] + } + + input DirectorConnectWhere { + node: DirectorWhere! + } + + input DirectorCreateInput { + directs: DirectorDirectsFieldInput + lastName: String! + } + + input DirectorDeleteInput { + directs: [DirectorDirectsDeleteFieldInput!] + } + + input DirectorDirectsAggregateInput { + AND: [DirectorDirectsAggregateInput!] + NOT: DirectorDirectsAggregateInput + OR: [DirectorDirectsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: DirectorDirectsNodeAggregationWhereInput + } + + input DirectorDirectsConnectFieldInput { + connect: [MovieConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type DirectorDirectsConnection { + edges: [DirectorDirectsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input DirectorDirectsConnectionSort { + node: MovieSort + } + + input DirectorDirectsConnectionWhere { + AND: [DirectorDirectsConnectionWhere!] + NOT: DirectorDirectsConnectionWhere + OR: [DirectorDirectsConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input DirectorDirectsCreateFieldInput { + node: MovieCreateInput! + } + + input DirectorDirectsDeleteFieldInput { + delete: MovieDeleteInput + where: DirectorDirectsConnectionWhere + } + + input DirectorDirectsDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: DirectorDirectsConnectionWhere + } + + input DirectorDirectsFieldInput { + connect: [DirectorDirectsConnectFieldInput!] + create: [DirectorDirectsCreateFieldInput!] + } + + input DirectorDirectsNodeAggregationWhereInput { + AND: [DirectorDirectsNodeAggregationWhereInput!] + NOT: DirectorDirectsNodeAggregationWhereInput + OR: [DirectorDirectsNodeAggregationWhereInput!] + id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_AVERAGE_EQUAL: Float + viewers_AVERAGE_GT: Float + viewers_AVERAGE_GTE: Float + viewers_AVERAGE_LT: Float + viewers_AVERAGE_LTE: Float + viewers_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + viewers_MAX_EQUAL: Int + viewers_MAX_GT: Int + viewers_MAX_GTE: Int + viewers_MAX_LT: Int + viewers_MAX_LTE: Int + viewers_MIN_EQUAL: Int + viewers_MIN_GT: Int + viewers_MIN_GTE: Int + viewers_MIN_LT: Int + viewers_MIN_LTE: Int + viewers_SUM_EQUAL: Int + viewers_SUM_GT: Int + viewers_SUM_GTE: Int + viewers_SUM_LT: Int + viewers_SUM_LTE: Int + } + + type DirectorDirectsRelationship { + cursor: String! + node: Movie! + } + + input DirectorDirectsUpdateConnectionInput { + node: MovieUpdateInput + } + + input DirectorDirectsUpdateFieldInput { + connect: [DirectorDirectsConnectFieldInput!] + create: [DirectorDirectsCreateFieldInput!] + delete: [DirectorDirectsDeleteFieldInput!] + disconnect: [DirectorDirectsDisconnectFieldInput!] + update: DirectorDirectsUpdateConnectionInput + where: DirectorDirectsConnectionWhere + } + + input DirectorDisconnectInput { + directs: [DirectorDirectsDisconnectFieldInput!] + } + + type DirectorEdge { + cursor: String! + node: Director! + } + + type DirectorMovieDirectsAggregationSelection { + count: Int! + node: DirectorMovieDirectsNodeAggregateSelection + } + + type DirectorMovieDirectsNodeAggregateSelection { + id: IDAggregateSelectionNullable! + viewers: IntAggregateSelectionNonNullable! + } + + input DirectorOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more DirectorSort objects to sort Directors by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [DirectorSort!] + } + + input DirectorRelationInput { + directs: [DirectorDirectsCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object. + \\"\\"\\" + input DirectorSort { + lastName: SortDirection + } + + input DirectorUpdateInput { + directs: [DirectorDirectsUpdateFieldInput!] + lastName: String + } + + input DirectorWhere { + AND: [DirectorWhere!] + NOT: DirectorWhere + OR: [DirectorWhere!] + directs: MovieWhere @deprecated(reason: \\"Use \`directs_SOME\` instead.\\") + directsAggregate: DirectorDirectsAggregateInput + directsConnection: DirectorDirectsConnectionWhere @deprecated(reason: \\"Use \`directsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Directors where all of the related DirectorDirectsConnections match this filter + \\"\\"\\" + directsConnection_ALL: DirectorDirectsConnectionWhere + \\"\\"\\" + Return Directors where none of the related DirectorDirectsConnections match this filter + \\"\\"\\" + directsConnection_NONE: DirectorDirectsConnectionWhere + directsConnection_NOT: DirectorDirectsConnectionWhere @deprecated(reason: \\"Use \`directsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Directors where one of the related DirectorDirectsConnections match this filter + \\"\\"\\" + directsConnection_SINGLE: DirectorDirectsConnectionWhere + \\"\\"\\" + Return Directors where some of the related DirectorDirectsConnections match this filter + \\"\\"\\" + directsConnection_SOME: DirectorDirectsConnectionWhere + \\"\\"\\"Return Directors where all of the related Movies match this filter\\"\\"\\" + directs_ALL: MovieWhere + \\"\\"\\"Return Directors where none of the related Movies match this filter\\"\\"\\" + directs_NONE: MovieWhere + directs_NOT: MovieWhere @deprecated(reason: \\"Use \`directs_NONE\` instead.\\") + \\"\\"\\"Return Directors where one of the related Movies match this filter\\"\\"\\" + directs_SINGLE: MovieWhere + \\"\\"\\"Return Directors where some of the related Movies match this filter\\"\\"\\" + directs_SOME: MovieWhere + lastName: String + lastName_CONTAINS: String + lastName_ENDS_WITH: String + lastName_IN: [String!] + lastName_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + lastName_STARTS_WITH: String + } + + type DirectorsConnection { + edges: [DirectorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! } type Movie { - title: String! - actors: [Person!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director + directedByAggregate(directed: Boolean = true, where: DirectorWhere): MovieDirectorDirectedByAggregationSelection + directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! + id: ID + viewers: Int! } - interface ActedIn @relationshipProperties { - roles: [String!] - pay: Float + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: IntAggregateSelectionNonNullable! } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - pay: Float - roles: [String!] -} - -input ActedInCreateInput { - pay: Float - roles: [String!] -} - -input ActedInSort { - pay: SortDirection - roles: SortDirection -} - -input ActedInUpdateInput { - pay: Float - pay_ADD: Float - pay_DIVIDE: Float - pay_MULTIPLY: Float - pay_SUBTRACT: Float - roles: [String!] - roles_POP: Int - roles_PUSH: [String!] -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - pay: Float - pay_GT: Float - pay_GTE: Float - pay_IN: [Float] - pay_LT: Float - pay_LTE: Float - pay_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - pay_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - roles: [String!] - roles_INCLUDES: String - roles_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - roles_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -type CreatePeopleMutationResponse { - info: CreateInfo! - people: [Person!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type Movie { - actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [PersonConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: PersonConnectWhere -} - -type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieActorsConnectionSort { - edge: ActedInSort - node: PersonSort -} - -input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: PersonWhere - node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - edge: ActedInCreateInput - node: PersonCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: PersonDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: PersonDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - pay_AVERAGE_EQUAL: Float - pay_AVERAGE_GT: Float - pay_AVERAGE_GTE: Float - pay_AVERAGE_LT: Float - pay_AVERAGE_LTE: Float - pay_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_MAX_EQUAL: Float - pay_MAX_GT: Float - pay_MAX_GTE: Float - pay_MAX_LT: Float - pay_MAX_LTE: Float - pay_MIN_EQUAL: Float - pay_MIN_GT: Float - pay_MIN_GTE: Float - pay_MIN_LT: Float - pay_MIN_LTE: Float - pay_SUM_EQUAL: Float - pay_SUM_GT: Float - pay_SUM_GTE: Float - pay_SUM_LT: Float - pay_SUM_LTE: Float -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Person! - pay: Float - roles: [String!] -} - -input MovieActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: PersonUpdateInput -} - -input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNonNullable! -} - -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!] -} - -type MoviePersonActorsAggregationSelection { - count: Int! - edge: MoviePersonActorsEdgeAggregateSelection - node: MoviePersonActorsNodeAggregateSelection -} - -type MoviePersonActorsEdgeAggregateSelection { - pay: FloatAggregateSelectionNullable! -} - -type MoviePersonActorsNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 People match this filter\\"\\"\\" - actors_ALL: PersonWhere - \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere - actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere - \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String!] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type PeopleConnection { - edges: [PersonEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Person { - actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInMoviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieActedInMoviesAggregationSelection - actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! - name: String! -} - -input PersonActedInMoviesAggregateInput { - AND: [PersonActedInMoviesAggregateInput!] - NOT: PersonActedInMoviesAggregateInput - OR: [PersonActedInMoviesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: PersonActedInMoviesEdgeAggregationWhereInput - node: PersonActedInMoviesNodeAggregationWhereInput -} - -input PersonActedInMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type PersonActedInMoviesConnection { - edges: [PersonActedInMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input PersonActedInMoviesConnectionSort { - edge: ActedInSort - node: MovieSort -} - -input PersonActedInMoviesConnectionWhere { - AND: [PersonActedInMoviesConnectionWhere!] - NOT: PersonActedInMoviesConnectionWhere - OR: [PersonActedInMoviesConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input PersonActedInMoviesCreateFieldInput { - edge: ActedInCreateInput - node: MovieCreateInput! -} - -input PersonActedInMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: PersonActedInMoviesConnectionWhere -} - -input PersonActedInMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: PersonActedInMoviesConnectionWhere -} - -input PersonActedInMoviesEdgeAggregationWhereInput { - AND: [PersonActedInMoviesEdgeAggregationWhereInput!] - NOT: PersonActedInMoviesEdgeAggregationWhereInput - OR: [PersonActedInMoviesEdgeAggregationWhereInput!] - pay_AVERAGE_EQUAL: Float - pay_AVERAGE_GT: Float - pay_AVERAGE_GTE: Float - pay_AVERAGE_LT: Float - pay_AVERAGE_LTE: Float - pay_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - pay_MAX_EQUAL: Float - pay_MAX_GT: Float - pay_MAX_GTE: Float - pay_MAX_LT: Float - pay_MAX_LTE: Float - pay_MIN_EQUAL: Float - pay_MIN_GT: Float - pay_MIN_GTE: Float - pay_MIN_LT: Float - pay_MIN_LTE: Float - pay_SUM_EQUAL: Float - pay_SUM_GT: Float - pay_SUM_GTE: Float - pay_SUM_LT: Float - pay_SUM_LTE: Float -} - -input PersonActedInMoviesFieldInput { - connect: [PersonActedInMoviesConnectFieldInput!] - create: [PersonActedInMoviesCreateFieldInput!] -} - -input PersonActedInMoviesNodeAggregationWhereInput { - AND: [PersonActedInMoviesNodeAggregationWhereInput!] - NOT: PersonActedInMoviesNodeAggregationWhereInput - OR: [PersonActedInMoviesNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type PersonActedInMoviesRelationship implements ActedIn { - cursor: String! - node: Movie! - pay: Float - roles: [String!] -} - -input PersonActedInMoviesUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput -} - -input PersonActedInMoviesUpdateFieldInput { - connect: [PersonActedInMoviesConnectFieldInput!] - create: [PersonActedInMoviesCreateFieldInput!] - delete: [PersonActedInMoviesDeleteFieldInput!] - disconnect: [PersonActedInMoviesDisconnectFieldInput!] - update: PersonActedInMoviesUpdateConnectionInput - where: PersonActedInMoviesConnectionWhere -} - -type PersonAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -input PersonConnectInput { - actedInMovies: [PersonActedInMoviesConnectFieldInput!] -} - -input PersonConnectWhere { - node: PersonWhere! -} - -input PersonCreateInput { - actedInMovies: PersonActedInMoviesFieldInput - name: String! -} - -input PersonDeleteInput { - actedInMovies: [PersonActedInMoviesDeleteFieldInput!] -} - -input PersonDisconnectInput { - actedInMovies: [PersonActedInMoviesDisconnectFieldInput!] -} - -type PersonEdge { - cursor: String! - node: Person! -} - -type PersonMovieActedInMoviesAggregationSelection { - count: Int! - edge: PersonMovieActedInMoviesEdgeAggregateSelection - node: PersonMovieActedInMoviesNodeAggregateSelection -} - -type PersonMovieActedInMoviesEdgeAggregateSelection { - pay: FloatAggregateSelectionNullable! -} - -type PersonMovieActedInMoviesNodeAggregateSelection { - title: StringAggregateSelectionNonNullable! -} - -input PersonOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [PersonSort!] -} - -input PersonRelationInput { - actedInMovies: [PersonActedInMoviesCreateFieldInput!] -} - -\\"\\"\\" -Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. -\\"\\"\\" -input PersonSort { - name: SortDirection -} - -input PersonUpdateInput { - actedInMovies: [PersonActedInMoviesUpdateFieldInput!] - name: String -} - -input PersonWhere { - AND: [PersonWhere!] - NOT: PersonWhere - OR: [PersonWhere!] - actedInMovies: MovieWhere @deprecated(reason: \\"Use \`actedInMovies_SOME\` instead.\\") - actedInMoviesAggregate: PersonActedInMoviesAggregateInput - actedInMoviesConnection: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Use \`actedInMoviesConnection_SOME\` instead.\\") - \\"\\"\\" - Return People where all of the related PersonActedInMoviesConnections match this filter - \\"\\"\\" - actedInMoviesConnection_ALL: PersonActedInMoviesConnectionWhere - \\"\\"\\" - Return People where none of the related PersonActedInMoviesConnections match this filter - \\"\\"\\" - actedInMoviesConnection_NONE: PersonActedInMoviesConnectionWhere - actedInMoviesConnection_NOT: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Use \`actedInMoviesConnection_NONE\` instead.\\") - \\"\\"\\" - Return People where one of the related PersonActedInMoviesConnections match this filter - \\"\\"\\" - actedInMoviesConnection_SINGLE: PersonActedInMoviesConnectionWhere - \\"\\"\\" - Return People where some of the related PersonActedInMoviesConnections match this filter - \\"\\"\\" - actedInMoviesConnection_SOME: PersonActedInMoviesConnectionWhere - \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - actedInMovies_ALL: MovieWhere - \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - actedInMovies_NONE: MovieWhere - actedInMovies_NOT: MovieWhere @deprecated(reason: \\"Use \`actedInMovies_NONE\` instead.\\") - \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - actedInMovies_SINGLE: MovieWhere - \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - actedInMovies_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! - people(options: PersonOptions, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! - peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -} - -type UpdatePeopleMutationResponse { - info: UpdateInfo! - people: [Person!]! -}" -`); + input MovieConnectInput { + directedBy: MovieDirectedByConnectFieldInput + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + directedBy: MovieDirectedByFieldInput + id: ID + viewers: Int! + } + + input MovieDeleteInput { + directedBy: MovieDirectedByDeleteFieldInput + } + + input MovieDirectedByAggregateInput { + AND: [MovieDirectedByAggregateInput!] + NOT: MovieDirectedByAggregateInput + OR: [MovieDirectedByAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieDirectedByNodeAggregationWhereInput + } + + input MovieDirectedByConnectFieldInput { + connect: DirectorConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: DirectorConnectWhere + } + + type MovieDirectedByConnection { + edges: [MovieDirectedByRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieDirectedByConnectionSort { + node: DirectorSort + } + + input MovieDirectedByConnectionWhere { + AND: [MovieDirectedByConnectionWhere!] + NOT: MovieDirectedByConnectionWhere + OR: [MovieDirectedByConnectionWhere!] + node: DirectorWhere + node_NOT: DirectorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieDirectedByCreateFieldInput { + node: DirectorCreateInput! + } + + input MovieDirectedByDeleteFieldInput { + delete: DirectorDeleteInput + where: MovieDirectedByConnectionWhere + } + + input MovieDirectedByDisconnectFieldInput { + disconnect: DirectorDisconnectInput + where: MovieDirectedByConnectionWhere + } + + input MovieDirectedByFieldInput { + connect: MovieDirectedByConnectFieldInput + create: MovieDirectedByCreateFieldInput + } + + input MovieDirectedByNodeAggregationWhereInput { + AND: [MovieDirectedByNodeAggregationWhereInput!] + NOT: MovieDirectedByNodeAggregationWhereInput + OR: [MovieDirectedByNodeAggregationWhereInput!] + lastName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_AVERAGE_LENGTH_EQUAL: Float + lastName_AVERAGE_LENGTH_GT: Float + lastName_AVERAGE_LENGTH_GTE: Float + lastName_AVERAGE_LENGTH_LT: Float + lastName_AVERAGE_LENGTH_LTE: Float + lastName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LONGEST_LENGTH_EQUAL: Int + lastName_LONGEST_LENGTH_GT: Int + lastName_LONGEST_LENGTH_GTE: Int + lastName_LONGEST_LENGTH_LT: Int + lastName_LONGEST_LENGTH_LTE: Int + lastName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + lastName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_SHORTEST_LENGTH_EQUAL: Int + lastName_SHORTEST_LENGTH_GT: Int + lastName_SHORTEST_LENGTH_GTE: Int + lastName_SHORTEST_LENGTH_LT: Int + lastName_SHORTEST_LENGTH_LTE: Int + lastName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + lastName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieDirectedByRelationship { + cursor: String! + node: Director! + } + + input MovieDirectedByUpdateConnectionInput { + node: DirectorUpdateInput + } + + input MovieDirectedByUpdateFieldInput { + connect: MovieDirectedByConnectFieldInput + create: MovieDirectedByCreateFieldInput + delete: MovieDirectedByDeleteFieldInput + disconnect: MovieDirectedByDisconnectFieldInput + update: MovieDirectedByUpdateConnectionInput + where: MovieDirectedByConnectionWhere + } + + type MovieDirectorDirectedByAggregationSelection { + count: Int! + node: MovieDirectorDirectedByNodeAggregateSelection + } + + type MovieDirectorDirectedByNodeAggregateSelection { + lastName: StringAggregateSelectionNonNullable! + } + + input MovieDisconnectInput { + directedBy: MovieDirectedByDisconnectFieldInput + } + + 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!] + } + + input MovieRelationInput { + directedBy: MovieDirectedByCreateFieldInput + } + + \\"\\"\\" + 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 + viewers: SortDirection + } + + input MovieUpdateInput { + directedBy: MovieDirectedByUpdateFieldInput + id: ID + viewers: Int + viewers_DECREMENT: Int + viewers_INCREMENT: Int + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + directedBy: DirectorWhere + directedByAggregate: MovieDirectedByAggregateInput + directedByConnection: MovieDirectedByConnectionWhere + directedByConnection_NOT: MovieDirectedByConnectionWhere + directedBy_NOT: DirectorWhere + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: Int + viewers_GT: Int + viewers_GTE: Int + viewers_IN: [Int!] + viewers_LT: Int + viewers_LTE: Int + viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createDirectors(input: [DirectorCreateInput!]!): CreateDirectorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteDirectors(delete: DirectorDeleteInput, where: DirectorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateDirectors(connect: DirectorConnectInput, create: DirectorRelationInput, delete: DirectorDeleteInput, disconnect: DirectorDisconnectInput, update: DirectorUpdateInput, where: DirectorWhere): UpdateDirectorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + directors(options: DirectorOptions, where: DirectorWhere): [Director!]! + directorsAggregate(where: DirectorWhere): DirectorAggregateSelection! + directorsConnection(after: String, first: Int, sort: [DirectorSort], where: DirectorWhere): DirectorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateDirectorsMutationResponse { + directors: [Director!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("Should be supported in interfaces", async () => { + const typeDefs = gql` + interface Production { + viewers: Int! + } + + type Movie implements Production { + id: ID + viewers: Int! + workers: [Person!]! @relationship(type: "WORKED_IN", direction: IN) + } + + type Person { + name: String! + worksInProduction: [Production!]! @relationship(type: "WORKED_IN", direction: OUT) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type Movie implements Production { + id: ID + viewers: Int! + workers(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + workersAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonWorkersAggregationSelection + workersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + viewers: IntAggregateSelectionNonNullable! + } + + input MovieConnectInput { + workers: [MovieWorkersConnectFieldInput!] + } + + input MovieCreateInput { + id: ID + viewers: Int! + workers: MovieWorkersFieldInput + } + + input MovieDeleteInput { + workers: [MovieWorkersDeleteFieldInput!] + } + + input MovieDisconnectInput { + workers: [MovieWorkersDisconnectFieldInput!] + } + + 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!] + } + + type MoviePersonWorkersAggregationSelection { + count: Int! + node: MoviePersonWorkersNodeAggregateSelection + } + + type MoviePersonWorkersNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieRelationInput { + workers: [MovieWorkersCreateFieldInput!] + } + + \\"\\"\\" + 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 + viewers: SortDirection + } + + input MovieUpdateInput { + id: ID + viewers: Int + viewers_DECREMENT: Int + viewers_INCREMENT: Int + workers: [MovieWorkersUpdateFieldInput!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + viewers: Int + viewers_GT: Int + viewers_GTE: Int + viewers_IN: [Int!] + viewers_LT: Int + viewers_LTE: Int + viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + workers: PersonWhere @deprecated(reason: \\"Use \`workers_SOME\` instead.\\") + workersAggregate: MovieWorkersAggregateInput + workersConnection: MovieWorkersConnectionWhere @deprecated(reason: \\"Use \`workersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieWorkersConnections match this filter + \\"\\"\\" + workersConnection_ALL: MovieWorkersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieWorkersConnections match this filter + \\"\\"\\" + workersConnection_NONE: MovieWorkersConnectionWhere + workersConnection_NOT: MovieWorkersConnectionWhere @deprecated(reason: \\"Use \`workersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieWorkersConnections match this filter + \\"\\"\\" + workersConnection_SINGLE: MovieWorkersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieWorkersConnections match this filter + \\"\\"\\" + workersConnection_SOME: MovieWorkersConnectionWhere + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + workers_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + workers_NONE: PersonWhere + workers_NOT: PersonWhere @deprecated(reason: \\"Use \`workers_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + workers_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + workers_SOME: PersonWhere + } + + input MovieWorkersAggregateInput { + AND: [MovieWorkersAggregateInput!] + NOT: MovieWorkersAggregateInput + OR: [MovieWorkersAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: MovieWorkersNodeAggregationWhereInput + } + + input MovieWorkersConnectFieldInput { + connect: [PersonConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PersonConnectWhere + } + + type MovieWorkersConnection { + edges: [MovieWorkersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieWorkersConnectionSort { + node: PersonSort + } + + input MovieWorkersConnectionWhere { + AND: [MovieWorkersConnectionWhere!] + NOT: MovieWorkersConnectionWhere + OR: [MovieWorkersConnectionWhere!] + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieWorkersCreateFieldInput { + node: PersonCreateInput! + } + + input MovieWorkersDeleteFieldInput { + delete: PersonDeleteInput + where: MovieWorkersConnectionWhere + } + + input MovieWorkersDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieWorkersConnectionWhere + } + + input MovieWorkersFieldInput { + connect: [MovieWorkersConnectFieldInput!] + create: [MovieWorkersCreateFieldInput!] + } + + input MovieWorkersNodeAggregationWhereInput { + AND: [MovieWorkersNodeAggregationWhereInput!] + NOT: MovieWorkersNodeAggregationWhereInput + OR: [MovieWorkersNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieWorkersRelationship { + cursor: String! + node: Person! + } + + input MovieWorkersUpdateConnectionInput { + node: PersonUpdateInput + } + + input MovieWorkersUpdateFieldInput { + connect: [MovieWorkersConnectFieldInput!] + create: [MovieWorkersCreateFieldInput!] + delete: [MovieWorkersDeleteFieldInput!] + disconnect: [MovieWorkersDisconnectFieldInput!] + update: MovieWorkersUpdateConnectionInput + where: MovieWorkersConnectionWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + name: String! + worksInProduction(directed: Boolean = true, options: ProductionOptions, where: ProductionWhere): [Production!]! + worksInProductionConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input PersonConnectInput { + worksInProduction: [PersonWorksInProductionConnectFieldInput!] + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + name: String! + worksInProduction: PersonWorksInProductionFieldInput + } + + input PersonDeleteInput { + worksInProduction: [PersonWorksInProductionDeleteFieldInput!] + } + + input PersonDisconnectInput { + worksInProduction: [PersonWorksInProductionDisconnectFieldInput!] + } + + type PersonEdge { + cursor: String! + node: Person! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + input PersonRelationInput { + worksInProduction: [PersonWorksInProductionCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + name: String + worksInProduction: [PersonWorksInProductionUpdateFieldInput!] + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + worksInProductionConnection: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Use \`worksInProductionConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + worksInProductionConnection_ALL: PersonWorksInProductionConnectionWhere + \\"\\"\\" + Return People where none of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + worksInProductionConnection_NONE: PersonWorksInProductionConnectionWhere + worksInProductionConnection_NOT: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Use \`worksInProductionConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + worksInProductionConnection_SINGLE: PersonWorksInProductionConnectionWhere + \\"\\"\\" + Return People where some of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + worksInProductionConnection_SOME: PersonWorksInProductionConnectionWhere + } + + input PersonWorksInProductionConnectFieldInput { + connect: ProductionConnectInput + where: ProductionConnectWhere + } + + type PersonWorksInProductionConnection { + edges: [PersonWorksInProductionRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonWorksInProductionConnectionSort { + node: ProductionSort + } + + input PersonWorksInProductionConnectionWhere { + AND: [PersonWorksInProductionConnectionWhere!] + NOT: PersonWorksInProductionConnectionWhere + OR: [PersonWorksInProductionConnectionWhere!] + node: ProductionWhere + node_NOT: ProductionWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PersonWorksInProductionCreateFieldInput { + node: ProductionCreateInput! + } + + input PersonWorksInProductionDeleteFieldInput { + delete: ProductionDeleteInput + where: PersonWorksInProductionConnectionWhere + } + + input PersonWorksInProductionDisconnectFieldInput { + disconnect: ProductionDisconnectInput + where: PersonWorksInProductionConnectionWhere + } + + input PersonWorksInProductionFieldInput { + connect: [PersonWorksInProductionConnectFieldInput!] + create: [PersonWorksInProductionCreateFieldInput!] + } + + type PersonWorksInProductionRelationship { + cursor: String! + node: Production! + } + + input PersonWorksInProductionUpdateConnectionInput { + node: ProductionUpdateInput + } + + input PersonWorksInProductionUpdateFieldInput { + connect: [PersonWorksInProductionConnectFieldInput!] + create: [PersonWorksInProductionCreateFieldInput!] + delete: [PersonWorksInProductionDeleteFieldInput!] + disconnect: [PersonWorksInProductionDisconnectFieldInput!] + update: PersonWorksInProductionUpdateConnectionInput + where: PersonWorksInProductionConnectionWhere + } + + interface Production { + viewers: Int! + } + + input ProductionConnectInput { + _on: ProductionImplementationsConnectInput + } + + input ProductionConnectWhere { + node: ProductionWhere! + } + + input ProductionCreateInput { + Movie: MovieCreateInput + } + + input ProductionDeleteInput { + _on: ProductionImplementationsDeleteInput + } + + input ProductionDisconnectInput { + _on: ProductionImplementationsDisconnectInput + } + + input ProductionImplementationsConnectInput { + Movie: [MovieConnectInput!] + } + + input ProductionImplementationsDeleteInput { + Movie: [MovieDeleteInput!] + } + + input ProductionImplementationsDisconnectInput { + Movie: [MovieDisconnectInput!] + } + + input ProductionImplementationsUpdateInput { + Movie: MovieUpdateInput + } + + input ProductionImplementationsWhere { + Movie: MovieWhere + } + + 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 { + viewers: SortDirection + } + + input ProductionUpdateInput { + _on: ProductionImplementationsUpdateInput + viewers: Int + viewers_DECREMENT: Int + viewers_INCREMENT: Int + } + + input ProductionWhere { + _on: ProductionImplementationsWhere + viewers: Int + viewers_GT: Int + viewers_GTE: Int + viewers_IN: [Int!] + viewers_LT: Int + viewers_LTE: Int + viewers_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + viewers_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); + + test("Should be supported in Relationship properties", async () => { + const typeDefs = gql` + type Person { + name: String! + actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + type Movie { + title: String! + actors: [Person!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + } + + interface ActedIn @relationshipProperties { + roles: [String!] + pay: Float + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + pay: Float + roles: [String!] + } + + input ActedInCreateInput { + pay: Float + roles: [String!] + } + + input ActedInSort { + pay: SortDirection + roles: SortDirection + } + + input ActedInUpdateInput { + pay: Float + pay_ADD: Float + pay_DIVIDE: Float + pay_MULTIPLY: Float + pay_SUBTRACT: Float + roles: [String!] + roles_POP: Int + roles_PUSH: [String!] + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + pay: Float + pay_GT: Float + pay_GTE: Float + pay_IN: [Float] + pay_LT: Float + pay_LTE: Float + pay_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + pay_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + roles: [String!] + roles_INCLUDES: String + roles_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + roles_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type Movie { + actors(directed: Boolean = true, options: PersonOptions, where: PersonWhere): [Person!]! + actorsAggregate(directed: Boolean = true, where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [PersonConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: PersonConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + edge: ActedInSort + node: PersonSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + edge: ActedInCreateInput + node: PersonCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: PersonDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + pay_AVERAGE_EQUAL: Float + pay_AVERAGE_GT: Float + pay_AVERAGE_GTE: Float + pay_AVERAGE_LT: Float + pay_AVERAGE_LTE: Float + pay_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_MAX_EQUAL: Float + pay_MAX_GT: Float + pay_MAX_GTE: Float + pay_MAX_LT: Float + pay_MAX_LTE: Float + pay_MIN_EQUAL: Float + pay_MIN_GT: Float + pay_MIN_GTE: Float + pay_MIN_LT: Float + pay_MIN_LTE: Float + pay_SUM_EQUAL: Float + pay_SUM_GT: Float + pay_SUM_GTE: Float + pay_SUM_LT: Float + pay_SUM_LTE: Float + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Person! + pay: Float + roles: [String!] + } + + input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: PersonUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNonNullable! + } + + 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!] + } + + type MoviePersonActorsAggregationSelection { + count: Int! + edge: MoviePersonActorsEdgeAggregateSelection + node: MoviePersonActorsNodeAggregateSelection + } + + type MoviePersonActorsEdgeAggregateSelection { + pay: FloatAggregateSelectionNullable! + } + + type MoviePersonActorsNodeAggregateSelection { + name: StringAggregateSelectionNonNullable! + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actors: PersonWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 People match this filter\\"\\"\\" + actors_ALL: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + actors_NONE: PersonWhere + actors_NOT: PersonWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + actors_SINGLE: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + actors_SOME: PersonWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person { + actedInMovies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInMoviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieActedInMoviesAggregationSelection + actedInMoviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! + name: String! + } + + input PersonActedInMoviesAggregateInput { + AND: [PersonActedInMoviesAggregateInput!] + NOT: PersonActedInMoviesAggregateInput + OR: [PersonActedInMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: PersonActedInMoviesEdgeAggregationWhereInput + node: PersonActedInMoviesNodeAggregationWhereInput + } + + input PersonActedInMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type PersonActedInMoviesConnection { + edges: [PersonActedInMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonActedInMoviesConnectionSort { + edge: ActedInSort + node: MovieSort + } + + input PersonActedInMoviesConnectionWhere { + AND: [PersonActedInMoviesConnectionWhere!] + NOT: PersonActedInMoviesConnectionWhere + OR: [PersonActedInMoviesConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PersonActedInMoviesCreateFieldInput { + edge: ActedInCreateInput + node: MovieCreateInput! + } + + input PersonActedInMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: PersonActedInMoviesConnectionWhere + } + + input PersonActedInMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: PersonActedInMoviesConnectionWhere + } + + input PersonActedInMoviesEdgeAggregationWhereInput { + AND: [PersonActedInMoviesEdgeAggregationWhereInput!] + NOT: PersonActedInMoviesEdgeAggregationWhereInput + OR: [PersonActedInMoviesEdgeAggregationWhereInput!] + pay_AVERAGE_EQUAL: Float + pay_AVERAGE_GT: Float + pay_AVERAGE_GTE: Float + pay_AVERAGE_LT: Float + pay_AVERAGE_LTE: Float + pay_EQUAL: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_GT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_GTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_LT: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_LTE: Float @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + pay_MAX_EQUAL: Float + pay_MAX_GT: Float + pay_MAX_GTE: Float + pay_MAX_LT: Float + pay_MAX_LTE: Float + pay_MIN_EQUAL: Float + pay_MIN_GT: Float + pay_MIN_GTE: Float + pay_MIN_LT: Float + pay_MIN_LTE: Float + pay_SUM_EQUAL: Float + pay_SUM_GT: Float + pay_SUM_GTE: Float + pay_SUM_LT: Float + pay_SUM_LTE: Float + } + + input PersonActedInMoviesFieldInput { + connect: [PersonActedInMoviesConnectFieldInput!] + create: [PersonActedInMoviesCreateFieldInput!] + } + + input PersonActedInMoviesNodeAggregationWhereInput { + AND: [PersonActedInMoviesNodeAggregationWhereInput!] + NOT: PersonActedInMoviesNodeAggregationWhereInput + OR: [PersonActedInMoviesNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type PersonActedInMoviesRelationship implements ActedIn { + cursor: String! + node: Movie! + pay: Float + roles: [String!] + } + + input PersonActedInMoviesUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput + } + + input PersonActedInMoviesUpdateFieldInput { + connect: [PersonActedInMoviesConnectFieldInput!] + create: [PersonActedInMoviesCreateFieldInput!] + delete: [PersonActedInMoviesDeleteFieldInput!] + disconnect: [PersonActedInMoviesDisconnectFieldInput!] + update: PersonActedInMoviesUpdateConnectionInput + where: PersonActedInMoviesConnectionWhere + } + + type PersonAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + input PersonConnectInput { + actedInMovies: [PersonActedInMoviesConnectFieldInput!] + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + actedInMovies: PersonActedInMoviesFieldInput + name: String! + } + + input PersonDeleteInput { + actedInMovies: [PersonActedInMoviesDeleteFieldInput!] + } + + input PersonDisconnectInput { + actedInMovies: [PersonActedInMoviesDisconnectFieldInput!] + } + + type PersonEdge { + cursor: String! + node: Person! + } + + type PersonMovieActedInMoviesAggregationSelection { + count: Int! + edge: PersonMovieActedInMoviesEdgeAggregateSelection + node: PersonMovieActedInMoviesNodeAggregateSelection + } + + type PersonMovieActedInMoviesEdgeAggregateSelection { + pay: FloatAggregateSelectionNullable! + } + + type PersonMovieActedInMoviesNodeAggregateSelection { + title: StringAggregateSelectionNonNullable! + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + input PersonRelationInput { + actedInMovies: [PersonActedInMoviesCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + name: SortDirection + } + + input PersonUpdateInput { + actedInMovies: [PersonActedInMoviesUpdateFieldInput!] + name: String + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + actedInMovies: MovieWhere @deprecated(reason: \\"Use \`actedInMovies_SOME\` instead.\\") + actedInMoviesAggregate: PersonActedInMoviesAggregateInput + actedInMoviesConnection: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Use \`actedInMoviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + actedInMoviesConnection_ALL: PersonActedInMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + actedInMoviesConnection_NONE: PersonActedInMoviesConnectionWhere + actedInMoviesConnection_NOT: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Use \`actedInMoviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + actedInMoviesConnection_SINGLE: PersonActedInMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + actedInMoviesConnection_SOME: PersonActedInMoviesConnectionWhere + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + actedInMovies_ALL: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + actedInMovies_NONE: MovieWhere + actedInMovies_NOT: MovieWhere @deprecated(reason: \\"Use \`actedInMovies_NONE\` instead.\\") + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + actedInMovies_SINGLE: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + actedInMovies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index bf2b16b03a..cf9938cc0a 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -45,320 +45,322 @@ describe("Null", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} + "schema { + query: Query + mutation: Mutation + } -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime -type DateTimeAggregateSelectionNonNullable { - max: DateTime! - min: DateTime! -} + type DateTimeAggregateSelectionNonNullable { + max: DateTime! + min: DateTime! + } -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } -type FloatAggregateSelectionNonNullable { - average: Float! - max: Float! - min: Float! - sum: Float! -} + type FloatAggregateSelectionNonNullable { + average: Float! + max: Float! + min: Float! + sum: Float! + } -type IDAggregateSelectionNonNullable { - longest: ID! - shortest: ID! -} + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } -type IntAggregateSelectionNonNullable { - average: Float! - max: Int! - min: Int! - sum: Int! -} + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } -type Movie { - actorCount: Int! - actorCounts: [Int!]! - averageRating: Float! - averageRatings: [Float!]! - createdAt: DateTime! - createdAts: [DateTime!]! - filmedAt: Point! - filmedAts: [Point!]! - id: ID! - ids: [ID!]! - isActives: [Boolean!]! - name: String! - names: [String!]! -} + type Movie { + actorCount: Int! + actorCounts: [Int!]! + averageRating: Float! + averageRatings: [Float!]! + createdAt: DateTime! + createdAts: [DateTime!]! + filmedAt: Point! + filmedAts: [Point!]! + id: ID! + ids: [ID!]! + isActives: [Boolean!]! + name: String! + names: [String!]! + } -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNonNullable! - averageRating: FloatAggregateSelectionNonNullable! - count: Int! - createdAt: DateTimeAggregateSelectionNonNullable! - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! -} + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNonNullable! + averageRating: FloatAggregateSelectionNonNullable! + count: Int! + createdAt: DateTimeAggregateSelectionNonNullable! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } -input MovieCreateInput { - actorCount: Int! - actorCounts: [Int!]! - averageRating: Float! - averageRatings: [Float!]! - createdAt: DateTime! - createdAts: [DateTime!]! - filmedAt: PointInput! - filmedAts: [PointInput!]! - id: ID! - ids: [ID!]! - isActives: [Boolean!]! - name: String! - names: [String!]! -} + input MovieCreateInput { + actorCount: Int! + actorCounts: [Int!]! + averageRating: Float! + averageRatings: [Float!]! + createdAt: DateTime! + createdAts: [DateTime!]! + filmedAt: PointInput! + filmedAts: [PointInput!]! + id: ID! + ids: [ID!]! + isActives: [Boolean!]! + name: String! + names: [String!]! + } -type MovieEdge { - cursor: String! - node: Movie! -} + 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!] -} + 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 { - actorCount: SortDirection - averageRating: SortDirection - createdAt: SortDirection - filmedAt: SortDirection - id: SortDirection - name: SortDirection -} + \\"\\"\\" + 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 { + actorCount: SortDirection + averageRating: SortDirection + createdAt: SortDirection + filmedAt: SortDirection + id: SortDirection + name: SortDirection + } -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCounts: [Int!] - actorCounts_POP: Int - actorCounts_PUSH: [Int!] - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - averageRatings: [Float!] - averageRatings_POP: Int - averageRatings_PUSH: [Float!] - createdAt: DateTime - createdAts: [DateTime!] - createdAts_POP: Int - createdAts_PUSH: [DateTime!] - filmedAt: PointInput - filmedAts: [PointInput!] - filmedAts_POP: Int - filmedAts_PUSH: [PointInput!] - id: ID - ids: [ID!] - ids_POP: Int - ids_PUSH: [ID!] - isActives: [Boolean!] - isActives_POP: Int - isActives_PUSH: [Boolean!] - name: String - names: [String!] - names_POP: Int - names_PUSH: [String!] -} + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + actorCounts: [Int!] + actorCounts_POP: Int + actorCounts_PUSH: [Int!] + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + averageRatings: [Float!] + averageRatings_POP: Int + averageRatings_PUSH: [Float!] + createdAt: DateTime + createdAts: [DateTime!] + createdAts_POP: Int + createdAts_PUSH: [DateTime!] + filmedAt: PointInput + filmedAts: [PointInput!] + filmedAts_POP: Int + filmedAts_PUSH: [PointInput!] + id: ID + ids: [ID!] + ids_POP: Int + ids_PUSH: [ID!] + isActives: [Boolean!] + isActives_POP: Int + isActives_PUSH: [Boolean!] + name: String + names: [String!] + names_POP: Int + names_PUSH: [String!] + } -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int!] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCounts: [Int!] - actorCounts_INCLUDES: Int - actorCounts_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCounts_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRatings: [Float!] - averageRatings_INCLUDES: Float - averageRatings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRatings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAts: [DateTime!] - createdAts_INCLUDES: DateTime - createdAts_NOT: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - createdAts_NOT_INCLUDES: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAt: PointInput - filmedAt_DISTANCE: PointDistance - filmedAt_GT: PointDistance - filmedAt_GTE: PointDistance - filmedAt_IN: [PointInput!] - filmedAt_LT: PointDistance - filmedAt_LTE: PointDistance - filmedAt_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAt_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAts: [PointInput!] - filmedAts_INCLUDES: PointInput - filmedAts_NOT: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAts_NOT_INCLUDES: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID!] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - ids: [ID!] - ids_INCLUDES: ID - ids_NOT: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - ids_NOT_INCLUDES: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - isActives: [Boolean!] - isActives_NOT: [Boolean!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - names: [String!] - names_INCLUDES: String - names_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - names_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int!] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCounts: [Int!] + actorCounts_INCLUDES: Int + actorCounts_NOT: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCounts_NOT_INCLUDES: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float!] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRatings: [Float!] + averageRatings_INCLUDES: Float + averageRatings_NOT: [Float!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRatings_NOT_INCLUDES: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt: DateTime + createdAt_GT: DateTime + createdAt_GTE: DateTime + createdAt_IN: [DateTime!] + createdAt_LT: DateTime + createdAt_LTE: DateTime + createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAts: [DateTime!] + createdAts_INCLUDES: DateTime + createdAts_NOT: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + createdAts_NOT_INCLUDES: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAt: PointInput + filmedAt_DISTANCE: PointDistance + filmedAt_GT: PointDistance + filmedAt_GTE: PointDistance + filmedAt_IN: [PointInput!] + filmedAt_LT: PointDistance + filmedAt_LTE: PointDistance + filmedAt_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAt_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAts: [PointInput!] + filmedAts_INCLUDES: PointInput + filmedAts_NOT: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAts_NOT_INCLUDES: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + ids: [ID!] + ids_INCLUDES: ID + ids_NOT: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + ids_NOT_INCLUDES: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + isActives: [Boolean!] + isActives_NOT: [Boolean!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + names: [String!] + names_INCLUDES: String + names_NOT: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + names_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } -\\"\\"\\"Point type\\"\\"\\" -type Point { - crs: String! - height: Float - latitude: Float! - longitude: Float! - srid: Int! -} + \\"\\"\\" + A point in a coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#point + \\"\\"\\" + type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! + } -\\"\\"\\"\\"\\"\\" -input PointDistance { - \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" - distance: Float! - point: PointInput! -} + \\"\\"\\"\\"\\"\\" + input PointDistance { + \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" + distance: Float! + point: PointInput! + } -\\"\\"\\"\\"\\"\\" -input PointInput { - height: Float - latitude: Float! - longitude: Float! -} + \\"\\"\\"\\"\\"\\" + input PointInput { + height: Float + latitude: Float! + longitude: Float! + } -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} + \\"\\"\\"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 StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index ff948f319c..f1d1bd3397 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -43,7 +43,7 @@ describe("Pluralize consistency", () => { mutation: Mutation } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -60,7 +60,7 @@ describe("Pluralize consistency", () => { superUsers: [super_user!]! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -93,7 +93,7 @@ describe("Pluralize consistency", () => { superUsersConnection(after: String, first: Int, sort: [super_userSort], where: super_userWhere): SuperUsersConnection! } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -118,7 +118,7 @@ describe("Pluralize consistency", () => { totalCount: Int! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index e2db42fa81..b044881e09 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -35,317 +35,317 @@ describe("Query Direction", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - friends(directed: Boolean = false, options: UserOptions, where: UserWhere): [User!]! - friendsAggregate(directed: Boolean = false, where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, directed: Boolean = false, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - name: String! -} - -type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -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 - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput -} - -input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserFriendsConnectionSort { - node: UserSort -} - -input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -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!] -} - -input UserRelationInput { - friends: [UserFriendsCreateFieldInput!] -} - -\\"\\"\\" -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: StringAggregateSelectionNonNullable! -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") - friendsAggregate: UserFriendsAggregateInput - friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + users(options: UserOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + friends(directed: Boolean = false, options: UserOptions, where: UserWhere): [User!]! + friendsAggregate(directed: Boolean = false, where: UserWhere): UserUserFriendsAggregationSelection + friendsConnection(after: String, directed: Boolean = false, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + name: String! + } + + type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + 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 + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserFriendsNodeAggregationWhereInput + } + + input UserFriendsConnectFieldInput { + connect: [UserConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type UserFriendsConnection { + edges: [UserFriendsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserFriendsConnectionSort { + node: UserSort + } + + input UserFriendsConnectionWhere { + AND: [UserFriendsConnectionWhere!] + NOT: UserFriendsConnectionWhere + OR: [UserFriendsConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + 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!] + } + + input UserRelationInput { + friends: [UserFriendsCreateFieldInput!] + } + + \\"\\"\\" + 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: StringAggregateSelectionNonNullable! + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") + friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); test("DIRECTED_ONLY", async () => { @@ -359,317 +359,317 @@ type UsersConnection { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - friends(options: UserOptions, where: UserWhere): [User!]! - friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - name: String! -} - -type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -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 - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput -} - -input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserFriendsConnectionSort { - node: UserSort -} - -input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -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!] -} - -input UserRelationInput { - friends: [UserFriendsCreateFieldInput!] -} - -\\"\\"\\" -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: StringAggregateSelectionNonNullable! -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") - friendsAggregate: UserFriendsAggregateInput - friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + users(options: UserOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + friends(options: UserOptions, where: UserWhere): [User!]! + friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection + friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + name: String! + } + + type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + 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 + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserFriendsNodeAggregationWhereInput + } + + input UserFriendsConnectFieldInput { + connect: [UserConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type UserFriendsConnection { + edges: [UserFriendsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserFriendsConnectionSort { + node: UserSort + } + + input UserFriendsConnectionWhere { + AND: [UserFriendsConnectionWhere!] + NOT: UserFriendsConnectionWhere + OR: [UserFriendsConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + 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!] + } + + input UserRelationInput { + friends: [UserFriendsCreateFieldInput!] + } + + \\"\\"\\" + 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: StringAggregateSelectionNonNullable! + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") + friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); test("UNDIRECTED_ONLY", async () => { @@ -683,316 +683,316 @@ type UsersConnection { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - users(options: UserOptions, where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! -} - -type User { - friends(options: UserOptions, where: UserWhere): [User!]! - friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - name: String! -} - -type UserAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! -} - -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 - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput -} - -input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: UserConnectWhere -} - -type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input UserFriendsConnectionSort { - node: UserSort -} - -input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -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!] -} - -input UserRelationInput { - friends: [UserFriendsCreateFieldInput!] -} - -\\"\\"\\" -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: StringAggregateSelectionNonNullable! -} - -input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") - friendsAggregate: UserFriendsAggregateInput - friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") - \\"\\"\\"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 - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Mutation { + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + users(options: UserOptions, 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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + friends(options: UserOptions, where: UserWhere): [User!]! + friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection + friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! + name: String! + } + + type UserAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + } + + 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 + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserFriendsNodeAggregationWhereInput + } + + input UserFriendsConnectFieldInput { + connect: [UserConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type UserFriendsConnection { + edges: [UserFriendsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserFriendsConnectionSort { + node: UserSort + } + + input UserFriendsConnectionWhere { + AND: [UserFriendsConnectionWhere!] + NOT: UserFriendsConnectionWhere + OR: [UserFriendsConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + 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_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + 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!] + } + + input UserRelationInput { + friends: [UserFriendsCreateFieldInput!] + } + + \\"\\"\\" + 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: StringAggregateSelectionNonNullable! + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + friends: UserWhere @deprecated(reason: \\"Use \`friends_SOME\` instead.\\") + friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + friendsConnection_NOT: UserFriendsConnectionWhere @deprecated(reason: \\"Use \`friendsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + friends_NOT: UserWhere @deprecated(reason: \\"Use \`friends_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index 4cf72434e6..f4e4698d30 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -38,160 +38,160 @@ describe("Scalar", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -scalar CustomScalar - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID - myCustomArrayScalar: [CustomScalar!] - myCustomScalar: CustomScalar - myRequiredCustomArrayScalar: [CustomScalar!]! -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID - myCustomArrayScalar: [CustomScalar!] - myCustomScalar: CustomScalar - myRequiredCustomArrayScalar: [CustomScalar!]! -} - -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 - myCustomScalar: SortDirection -} - -input MovieUpdateInput { - id: ID - myCustomArrayScalar: [CustomScalar!] - myCustomScalar: CustomScalar - myRequiredCustomArrayScalar: [CustomScalar!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - myCustomArrayScalar: [CustomScalar!] - myCustomArrayScalar_INCLUDES: CustomScalar - myCustomArrayScalar_NOT: [CustomScalar!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myCustomArrayScalar_NOT_INCLUDES: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myCustomScalar: CustomScalar - myCustomScalar_IN: [CustomScalar] - myCustomScalar_NOT: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myCustomScalar_NOT_IN: [CustomScalar] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myRequiredCustomArrayScalar: [CustomScalar!] - myRequiredCustomArrayScalar_INCLUDES: CustomScalar - myRequiredCustomArrayScalar_NOT: [CustomScalar!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - myRequiredCustomArrayScalar_NOT_INCLUDES: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + scalar CustomScalar + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + myCustomArrayScalar: [CustomScalar!] + myCustomScalar: CustomScalar + myRequiredCustomArrayScalar: [CustomScalar!]! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + myCustomArrayScalar: [CustomScalar!] + myCustomScalar: CustomScalar + myRequiredCustomArrayScalar: [CustomScalar!]! + } + + 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 + myCustomScalar: SortDirection + } + + input MovieUpdateInput { + id: ID + myCustomArrayScalar: [CustomScalar!] + myCustomScalar: CustomScalar + myRequiredCustomArrayScalar: [CustomScalar!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + myCustomArrayScalar: [CustomScalar!] + myCustomArrayScalar_INCLUDES: CustomScalar + myCustomArrayScalar_NOT: [CustomScalar!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myCustomArrayScalar_NOT_INCLUDES: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myCustomScalar: CustomScalar + myCustomScalar_IN: [CustomScalar] + myCustomScalar_NOT: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myCustomScalar_NOT_IN: [CustomScalar] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myRequiredCustomArrayScalar: [CustomScalar!] + myRequiredCustomArrayScalar_INCLUDES: CustomScalar + myRequiredCustomArrayScalar_NOT: [CustomScalar!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + myRequiredCustomArrayScalar_NOT_INCLUDES: CustomScalar @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index eb38cb9682..3c120261f7 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -36,188 +36,188 @@ describe("Simple", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type FloatAggregateSelectionNullable { - average: Float - max: Float - min: Float - sum: Float -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type IntAggregateSelectionNullable { - average: Float - max: Int - min: Int - sum: Int -} - -type Movie { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean -} - -type MovieAggregateSelection { - actorCount: IntAggregateSelectionNullable! - averageRating: FloatAggregateSelectionNullable! - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - actorCount: Int - averageRating: Float - id: ID - isActive: Boolean -} - -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 { - actorCount: SortDirection - averageRating: SortDirection - id: SortDirection - isActive: SortDirection -} - -input MovieUpdateInput { - actorCount: Int - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - averageRating: Float - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SUBTRACT: Float - id: ID - isActive: Boolean -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - isActive: Boolean - isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelectionNullable { + average: Float + max: Float + min: Float + sum: Float + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean + } + + type MovieAggregateSelection { + actorCount: IntAggregateSelectionNullable! + averageRating: FloatAggregateSelectionNullable! + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + actorCount: Int + averageRating: Float + id: ID + isActive: Boolean + } + + 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 { + actorCount: SortDirection + averageRating: SortDirection + id: SortDirection + isActive: SortDirection + } + + input MovieUpdateInput { + actorCount: Int + actorCount_DECREMENT: Int + actorCount_INCREMENT: Int + averageRating: Float + averageRating_ADD: Float + averageRating_DIVIDE: Float + averageRating_MULTIPLY: Float + averageRating_SUBTRACT: Float + id: ID + isActive: Boolean + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorCount: Int + actorCount_GT: Int + actorCount_GTE: Int + actorCount_IN: [Int] + actorCount_LT: Int + actorCount_LTE: Int + actorCount_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + actorCount_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating: Float + averageRating_GT: Float + averageRating_GTE: Float + averageRating_IN: [Float] + averageRating_LT: Float + averageRating_LTE: Float + averageRating_NOT: Float @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + averageRating_NOT_IN: [Float] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + isActive: Boolean + isActive_NOT: Boolean @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index 1558b9b067..be2831c926 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -45,141 +45,141 @@ describe("String Comparators", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - title: String -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieCreateInput { - title: String -} - -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 { - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_GT: String - title_GTE: String - title_IN: [String] - title_LT: String - title_LTE: String - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + title: String + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieCreateInput { + title: String + } + + 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 { + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_GT: String + title_GTE: String + title_IN: [String] + title_LT: String + title_LTE: String + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("String comparators should not be present if not explicitly defined in the configuration", async () => { @@ -194,137 +194,137 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - title: String -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieCreateInput { - title: String -} - -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 { - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_IN: [String] - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + title: String + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieCreateInput { + title: String + } + + 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 { + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("If String comparators are partially defined, then only the defined ones should be present", async () => { @@ -348,139 +348,139 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - title: String -} - -type MovieAggregateSelection { - count: Int! - title: StringAggregateSelectionNullable! -} - -input MovieCreateInput { - title: String -} - -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 { - title: String -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - title: String - title_CONTAINS: String - title_ENDS_WITH: String - title_GT: String - title_IN: [String] - title_LT: String - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + title: String + } + + type MovieAggregateSelection { + count: Int! + title: StringAggregateSelectionNullable! + } + + input MovieCreateInput { + title: String + } + + 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 { + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_GT: String + title_IN: [String] + title_LT: String + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("string comparator relationship and relationship properties", async () => { @@ -516,724 +516,724 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -interface ActedIn { - screenTime: String -} - -input ActedInCreateInput { - screenTime: String -} - -input ActedInSort { - screenTime: SortDirection -} - -input ActedInUpdateInput { - screenTime: String -} - -input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime: String - screenTime_CONTAINS: String - screenTime_ENDS_WITH: String - screenTime_GT: String - screenTime_GTE: String - screenTime_IN: [String] - screenTime_LT: String - screenTime_LTE: String - screenTime_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - screenTime_STARTS_WITH: String -} - -type Actor { - actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String -} - -input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActorActedInEdgeAggregationWhereInput - node: ActorActedInNodeAggregationWhereInput -} - -input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - where: MovieConnectWhere -} - -type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input ActorActedInConnectionSort { - edge: ActedInSort - node: MovieSort -} - -input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input ActorActedInCreateFieldInput { - edge: ActedInCreateInput - node: MovieCreateInput! -} - -input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere -} - -input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere -} - -input ActorActedInEdgeAggregationWhereInput { - AND: [ActorActedInEdgeAggregationWhereInput!] - NOT: ActorActedInEdgeAggregationWhereInput - OR: [ActorActedInEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_LENGTH_EQUAL: Float - screenTime_AVERAGE_LENGTH_GT: Float - screenTime_AVERAGE_LENGTH_GTE: Float - screenTime_AVERAGE_LENGTH_LT: Float - screenTime_AVERAGE_LENGTH_LTE: Float - screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_LENGTH_EQUAL: Int - screenTime_LONGEST_LENGTH_GT: Int - screenTime_LONGEST_LENGTH_GTE: Int - screenTime_LONGEST_LENGTH_LT: Int - screenTime_LONGEST_LENGTH_LTE: Int - screenTime_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_LENGTH_EQUAL: Int - screenTime_SHORTEST_LENGTH_GT: Int - screenTime_SHORTEST_LENGTH_GTE: Int - screenTime_SHORTEST_LENGTH_LT: Int - screenTime_SHORTEST_LENGTH_LTE: Int - screenTime_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] -} - -input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type ActorActedInRelationship implements ActedIn { - cursor: String! - node: Movie! - screenTime: String -} - -input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput -} - -input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere -} - -type ActorAggregateSelection { - count: Int! - name: StringAggregateSelectionNullable! -} - -input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] -} - -input ActorConnectWhere { - node: ActorWhere! -} - -input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String -} - -input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] -} - -input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] -} - -type ActorEdge { - cursor: String! - node: Actor! -} - -type ActorMovieActedInAggregationSelection { - count: Int! - edge: ActorMovieActedInEdgeAggregateSelection - node: ActorMovieActedInNodeAggregateSelection -} - -type ActorMovieActedInEdgeAggregateSelection { - screenTime: StringAggregateSelectionNullable! -} - -type ActorMovieActedInNodeAggregateSelection { - title: StringAggregateSelectionNullable! -} - -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!] -} - -input ActorRelationInput { - actedIn: [ActorActedInCreateFieldInput!] -} - -\\"\\"\\" -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 { - actedIn: [ActorActedInUpdateFieldInput!] - name: String -} - -input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") - actedInAggregate: ActorActedInAggregateInput - actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_GT: String - name_GTE: String - name_IN: [String] - name_LT: String - name_LTE: String - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String -} - -type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String -} - -type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection -} - -type MovieActorActorsEdgeAggregateSelection { - screenTime: StringAggregateSelectionNullable! -} - -type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelectionNullable! -} - -input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: MovieActorsEdgeAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput -} - -input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput - \\"\\"\\" - Whether or not to overwrite any matching relationship with the new properties. - \\"\\"\\" - overwrite: Boolean! = true - 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 - edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - node: ActorWhere - node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieActorsCreateFieldInput { - edge: ActedInCreateInput - node: ActorCreateInput! -} - -input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere -} - -input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere -} - -input MovieActorsEdgeAggregationWhereInput { - AND: [MovieActorsEdgeAggregationWhereInput!] - NOT: MovieActorsEdgeAggregationWhereInput - OR: [MovieActorsEdgeAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_LENGTH_EQUAL: Float - screenTime_AVERAGE_LENGTH_GT: Float - screenTime_AVERAGE_LENGTH_GTE: Float - screenTime_AVERAGE_LENGTH_LT: Float - screenTime_AVERAGE_LENGTH_LTE: Float - screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_LENGTH_EQUAL: Int - screenTime_LONGEST_LENGTH_GT: Int - screenTime_LONGEST_LENGTH_GTE: Int - screenTime_LONGEST_LENGTH_LT: Int - screenTime_LONGEST_LENGTH_LTE: Int - screenTime_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - screenTime_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_LENGTH_EQUAL: Int - screenTime_SHORTEST_LENGTH_GT: Int - screenTime_SHORTEST_LENGTH_GTE: Int - screenTime_SHORTEST_LENGTH_LT: Int - screenTime_SHORTEST_LENGTH_LTE: Int - screenTime_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - screenTime_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] -} - -input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - 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 - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") -} - -type MovieActorsRelationship implements ActedIn { - cursor: String! - node: Actor! - screenTime: String -} - -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: StringAggregateSelectionNullable! -} - -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!] -} - -input MovieRelationInput { - actors: [MovieActorsCreateFieldInput!] -} - -\\"\\"\\" -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!] - actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") - actorsAggregate: MovieActorsAggregateInput - actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") - \\"\\"\\" - 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 - actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") - \\"\\"\\" - 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 - actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") - \\"\\"\\"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 - title_CONTAINS: String - title_ENDS_WITH: String - title_GT: String - title_GTE: String - title_IN: [String] - title_LT: String - title_LTE: String - title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - title_STARTS_WITH: String -} - -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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - actors(options: ActorOptions, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNullable { - longest: String - shortest: String -} - -type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + screenTime: String + } + + input ActedInCreateInput { + screenTime: String + } + + input ActedInSort { + screenTime: SortDirection + } + + input ActedInUpdateInput { + screenTime: String + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: String + screenTime_CONTAINS: String + screenTime_ENDS_WITH: String + screenTime_GT: String + screenTime_GTE: String + screenTime_IN: [String] + screenTime_LT: String + screenTime_LTE: String + screenTime_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_STARTS_WITH: String + } + + type Actor { + actedIn(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + actedInAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String + } + + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorActedInEdgeAggregationWhereInput + node: ActorActedInNodeAggregationWhereInput + } + + input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorActedInConnectionSort { + edge: ActedInSort + node: MovieSort + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorActedInCreateFieldInput { + edge: ActedInCreateInput + node: MovieCreateInput! + } + + input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere + } + + input ActorActedInEdgeAggregationWhereInput { + AND: [ActorActedInEdgeAggregationWhereInput!] + NOT: ActorActedInEdgeAggregationWhereInput + OR: [ActorActedInEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_LENGTH_EQUAL: Float + screenTime_AVERAGE_LENGTH_GT: Float + screenTime_AVERAGE_LENGTH_GTE: Float + screenTime_AVERAGE_LENGTH_LT: Float + screenTime_AVERAGE_LENGTH_LTE: Float + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_LENGTH_EQUAL: Int + screenTime_LONGEST_LENGTH_GT: Int + screenTime_LONGEST_LENGTH_GTE: Int + screenTime_LONGEST_LENGTH_LT: Int + screenTime_LONGEST_LENGTH_LTE: Int + screenTime_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_LENGTH_EQUAL: Int + screenTime_SHORTEST_LENGTH_GT: Int + screenTime_SHORTEST_LENGTH_GTE: Int + screenTime_SHORTEST_LENGTH_LT: Int + screenTime_SHORTEST_LENGTH_LTE: Int + screenTime_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorActedInRelationship implements ActedIn { + cursor: String! + node: Movie! + screenTime: String + } + + input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelectionNullable! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + edge: ActorMovieActedInEdgeAggregateSelection + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInEdgeAggregateSelection { + screenTime: StringAggregateSelectionNullable! + } + + type ActorMovieActedInNodeAggregateSelection { + title: StringAggregateSelectionNullable! + } + + 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!] + } + + input ActorRelationInput { + actedIn: [ActorActedInCreateFieldInput!] + } + + \\"\\"\\" + 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 { + actedIn: [ActorActedInUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieWhere @deprecated(reason: \\"Use \`actedIn_SOME\` instead.\\") + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_SOME\` instead.\\") + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NOT: ActorActedInConnectionWhere @deprecated(reason: \\"Use \`actedInConnection_NONE\` instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere + actedIn_NOT: MovieWhere @deprecated(reason: \\"Use \`actedIn_NONE\` instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_GT: String + name_GTE: String + name_IN: [String] + name_LT: String + name_LTE: String + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + title: String + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + screenTime: StringAggregateSelectionNullable! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelectionNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + 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 + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + edge: ActedInCreateInput + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_LENGTH_EQUAL: Float + screenTime_AVERAGE_LENGTH_GT: Float + screenTime_AVERAGE_LENGTH_GTE: Float + screenTime_AVERAGE_LENGTH_LT: Float + screenTime_AVERAGE_LENGTH_LTE: Float + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_LENGTH_EQUAL: Int + screenTime_LONGEST_LENGTH_GT: Int + screenTime_LONGEST_LENGTH_GTE: Int + screenTime_LONGEST_LENGTH_LT: Int + screenTime_LONGEST_LENGTH_LTE: Int + screenTime_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_LENGTH_EQUAL: Int + screenTime_SHORTEST_LENGTH_GT: Int + screenTime_SHORTEST_LENGTH_GTE: Int + screenTime_SHORTEST_LENGTH_LT: Int + screenTime_SHORTEST_LENGTH_LTE: Int + screenTime_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + screenTime_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + screenTime: String + } + + 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: StringAggregateSelectionNullable! + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + } + + \\"\\"\\" + 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!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + title_CONTAINS: String + title_ENDS_WITH: String + title_GT: String + title_GTE: String + title_IN: [String] + title_LT: String + title_LTE: String + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + 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(connect: ActorConnectInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + movies(options: MovieOptions, 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 StringAggregateSelectionNullable { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 04eee436ed..5937b2acf1 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -167,7 +167,7 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -179,7 +179,7 @@ describe("Subscriptions", () => { movies: [Movie!]! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -618,7 +618,7 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -647,7 +647,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -989,7 +989,7 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1001,7 +1001,7 @@ describe("Subscriptions", () => { movies: [Movie!]! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1376,7 +1376,7 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -1402,7 +1402,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1461,7 +1461,7 @@ describe("Subscriptions", () => { Star: StarWhere } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1483,7 +1483,7 @@ describe("Subscriptions", () => { stars: [Star!]! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2209,7 +2209,7 @@ describe("Subscriptions", () => { offset: Int } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -2525,7 +2525,7 @@ describe("Subscriptions", () => { starUpdated: StarUpdatedEvent! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2927,7 +2927,7 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2939,7 +2939,7 @@ describe("Subscriptions", () => { movies: [Movie!]! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3388,7 +3388,7 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3414,7 +3414,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3567,7 +3567,7 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3579,7 +3579,7 @@ describe("Subscriptions", () => { movies: [Movie!]! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3910,7 +3910,7 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -3934,7 +3934,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4338,14 +4338,14 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4390,7 +4390,7 @@ describe("Subscriptions", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -4421,7 +4421,7 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4585,7 +4585,7 @@ describe("Subscriptions", () => { Star: StarWhere } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4607,7 +4607,7 @@ describe("Subscriptions", () => { stars: [Star!]! } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5333,7 +5333,7 @@ describe("Subscriptions", () => { offset: Int } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -5587,7 +5587,7 @@ describe("Subscriptions", () => { personUpdated: PersonUpdatedEvent! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5658,7 +5658,7 @@ describe("Subscriptions", () => { subscription: Subscription } - \\"\\"\\"CreateInfo\\"\\"\\" + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5804,7 +5804,7 @@ describe("Subscriptions", () => { moviesConnection_NOT: CreatureMoviesConnectionWhere } - \\"\\"\\"DeleteInfo\\"\\"\\" + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6572,7 +6572,7 @@ describe("Subscriptions", () => { title_STARTS_WITH: String } - \\"\\"\\"SortDirection\\"\\"\\" + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" ASC @@ -6598,7 +6598,7 @@ describe("Subscriptions", () => { seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! } - \\"\\"\\"UpdateInfo\\"\\"\\" + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index 66418317a0..cca4b5939e 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -34,163 +34,163 @@ describe("Bigint", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\" -A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. -\\"\\"\\" -scalar BigInt - -type BigIntAggregateSelectionNonNullable { - average: BigInt! - max: BigInt! - min: BigInt! - sum: BigInt! -} - -type CreateFilesMutationResponse { - files: [File!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type File { - name: String! - size: BigInt! -} - -type FileAggregateSelection { - count: Int! - name: StringAggregateSelectionNonNullable! - size: BigIntAggregateSelectionNonNullable! -} - -input FileCreateInput { - name: String! - size: BigInt! -} - -type FileEdge { - cursor: String! - node: File! -} - -input FileOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more FileSort objects to sort Files by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [FileSort!] -} - -\\"\\"\\" -Fields to sort Files by. The order in which sorts are applied is not guaranteed when specifying many fields in one FileSort object. -\\"\\"\\" -input FileSort { - name: SortDirection - size: SortDirection -} - -input FileUpdateInput { - name: String - size: BigInt - size_DECREMENT: BigInt - size_INCREMENT: BigInt -} - -input FileWhere { - AND: [FileWhere!] - NOT: FileWhere - OR: [FileWhere!] - name: String - name_CONTAINS: String - name_ENDS_WITH: String - name_IN: [String!] - name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - name_STARTS_WITH: String - size: BigInt - size_GT: BigInt - size_GTE: BigInt - size_IN: [BigInt!] - size_LT: BigInt - size_LTE: BigInt - size_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - size_NOT_IN: [BigInt!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type FilesConnection { - edges: [FileEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createFiles(input: [FileCreateInput!]!): CreateFilesMutationResponse! - deleteFiles(where: FileWhere): DeleteInfo! - updateFiles(update: FileUpdateInput, where: FileWhere): UpdateFilesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - files(options: FileOptions, where: FileWhere): [File!]! - filesAggregate(where: FileWhere): FileAggregateSelection! - filesConnection(after: String, first: Int, sort: [FileSort], where: FileWhere): FilesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type StringAggregateSelectionNonNullable { - longest: String! - shortest: String! -} - -type UpdateFilesMutationResponse { - files: [File!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. + \\"\\"\\" + scalar BigInt + + type BigIntAggregateSelectionNonNullable { + average: BigInt! + max: BigInt! + min: BigInt! + sum: BigInt! + } + + type CreateFilesMutationResponse { + files: [File!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type File { + name: String! + size: BigInt! + } + + type FileAggregateSelection { + count: Int! + name: StringAggregateSelectionNonNullable! + size: BigIntAggregateSelectionNonNullable! + } + + input FileCreateInput { + name: String! + size: BigInt! + } + + type FileEdge { + cursor: String! + node: File! + } + + input FileOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more FileSort objects to sort Files by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [FileSort!] + } + + \\"\\"\\" + Fields to sort Files by. The order in which sorts are applied is not guaranteed when specifying many fields in one FileSort object. + \\"\\"\\" + input FileSort { + name: SortDirection + size: SortDirection + } + + input FileUpdateInput { + name: String + size: BigInt + size_DECREMENT: BigInt + size_INCREMENT: BigInt + } + + input FileWhere { + AND: [FileWhere!] + NOT: FileWhere + OR: [FileWhere!] + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + size: BigInt + size_GT: BigInt + size_GTE: BigInt + size_IN: [BigInt!] + size_LT: BigInt + size_LTE: BigInt + size_NOT: BigInt @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + size_NOT_IN: [BigInt!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type FilesConnection { + edges: [FileEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createFiles(input: [FileCreateInput!]!): CreateFilesMutationResponse! + deleteFiles(where: FileWhere): DeleteInfo! + updateFiles(update: FileUpdateInput, where: FileWhere): UpdateFilesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + files(options: FileOptions, where: FileWhere): [File!]! + filesAggregate(where: FileWhere): FileAggregateSelection! + filesConnection(after: String, first: Int, sort: [FileSort], where: FileWhere): FilesConnection! + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateFilesMutationResponse { + files: [File!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index 12ac961adc..ce6ac84d10 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -34,151 +34,151 @@ describe("Date", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" -scalar Date - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - date: Date - id: ID -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - date: Date - id: ID -} - -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 { - date: SortDirection - id: SortDirection -} - -input MovieUpdateInput { - date: Date - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - date: Date - date_GT: Date - date_GTE: Date - date_IN: [Date] - date_LT: Date - date_LTE: Date - date_NOT: Date @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - date_NOT_IN: [Date] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" + scalar Date + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + date: Date + id: ID + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + date: Date + id: ID + } + + 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 { + date: SortDirection + id: SortDirection + } + + input MovieUpdateInput { + date: Date + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + date: Date + date_GT: Date + date_GTE: Date + date_IN: [Date] + date_LT: Date + date_LTE: Date + date_NOT: Date @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + date_NOT_IN: [Date] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index 74548dc63a..307126522e 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -34,157 +34,157 @@ describe("Datetime", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" -scalar DateTime - -type DateTimeAggregateSelectionNullable { - max: DateTime - min: DateTime -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - datetime: DateTime - id: ID -} - -type MovieAggregateSelection { - count: Int! - datetime: DateTimeAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - datetime: DateTime - id: ID -} - -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 { - datetime: SortDirection - id: SortDirection -} - -input MovieUpdateInput { - datetime: DateTime - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - datetime: DateTime - datetime_GT: DateTime - datetime_GTE: DateTime - datetime_IN: [DateTime] - datetime_LT: DateTime - datetime_LTE: DateTime - datetime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - datetime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelectionNullable { + max: DateTime + min: DateTime + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + datetime: DateTime + id: ID + } + + type MovieAggregateSelection { + count: Int! + datetime: DateTimeAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + datetime: DateTime + id: ID + } + + 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 { + datetime: SortDirection + id: SortDirection + } + + input MovieUpdateInput { + datetime: DateTime + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + datetime: DateTime + datetime_GT: DateTime + datetime_GTE: DateTime + datetime_IN: [DateTime] + datetime_LT: DateTime + datetime_LTE: DateTime + datetime_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + datetime_NOT_IN: [DateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index 83efe1fea6..52ba9d7b04 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -34,157 +34,157 @@ describe("Duration", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -\\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" -scalar Duration - -type DurationAggregateSelectionNullable { - max: Duration - min: Duration -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - duration: Duration - id: ID -} - -type MovieAggregateSelection { - count: Int! - duration: DurationAggregateSelectionNullable! - id: IDAggregateSelectionNullable! -} - -input MovieCreateInput { - duration: Duration - id: ID -} - -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 { - duration: SortDirection - id: SortDirection -} - -input MovieUpdateInput { - duration: Duration - id: ID -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - duration: Duration - duration_GT: Duration - duration_GTE: Duration - duration_IN: [Duration] - duration_LT: Duration - duration_LTE: Duration - duration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - duration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelectionNullable { + max: Duration + min: Duration + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + duration: Duration + id: ID + } + + type MovieAggregateSelection { + count: Int! + duration: DurationAggregateSelectionNullable! + id: IDAggregateSelectionNullable! + } + + input MovieCreateInput { + duration: Duration + id: ID + } + + 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 { + duration: SortDirection + id: SortDirection + } + + input MovieUpdateInput { + duration: Duration + id: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + duration: Duration + duration_GT: Duration + duration_GTE: Duration + duration_IN: [Duration] + duration_LT: Duration + duration_LTE: Duration + duration_NOT: Duration @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + duration_NOT_IN: [Duration] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index f143fc596b..0133fde42c 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -34,157 +34,157 @@ describe("Localdatetime", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -\\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" -scalar LocalDateTime - -type LocalDateTimeAggregateSelectionNullable { - max: LocalDateTime - min: LocalDateTime -} - -type Movie { - id: ID - localDT: LocalDateTime -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - localDT: LocalDateTimeAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID - localDT: LocalDateTime -} - -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 - localDT: SortDirection -} - -input MovieUpdateInput { - id: ID - localDT: LocalDateTime -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - localDT: LocalDateTime - localDT_GT: LocalDateTime - localDT_GTE: LocalDateTime - localDT_IN: [LocalDateTime] - localDT_LT: LocalDateTime - localDT_LTE: LocalDateTime - localDT_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - localDT_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelectionNullable { + max: LocalDateTime + min: LocalDateTime + } + + type Movie { + id: ID + localDT: LocalDateTime + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + localDT: LocalDateTimeAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + localDT: LocalDateTime + } + + 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 + localDT: SortDirection + } + + input MovieUpdateInput { + id: ID + localDT: LocalDateTime + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + localDT: LocalDateTime + localDT_GT: LocalDateTime + localDT_GTE: LocalDateTime + localDT_IN: [LocalDateTime] + localDT_LT: LocalDateTime + localDT_LTE: LocalDateTime + localDT_NOT: LocalDateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + localDT_NOT_IN: [LocalDateTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index e09387bbe0..33e83c9e78 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -34,159 +34,159 @@ describe("Localtime", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -\\"\\"\\" -A local time, represented as a time string without timezone information -\\"\\"\\" -scalar LocalTime - -type LocalTimeAggregateSelectionNullable { - max: LocalTime - min: LocalTime -} - -type Movie { - id: ID - time: LocalTime -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - time: LocalTimeAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID - time: LocalTime -} - -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 - time: SortDirection -} - -input MovieUpdateInput { - id: ID - time: LocalTime -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - time: LocalTime - time_GT: LocalTime - time_GTE: LocalTime - time_IN: [LocalTime] - time_LT: LocalTime - time_LTE: LocalTime - time_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - time_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelectionNullable { + max: LocalTime + min: LocalTime + } + + type Movie { + id: ID + time: LocalTime + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + time: LocalTimeAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + time: LocalTime + } + + 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 + time: SortDirection + } + + input MovieUpdateInput { + id: ID + time: LocalTime + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + time: LocalTime + time_GT: LocalTime + time_GTE: LocalTime + time_IN: [LocalTime] + time_LT: LocalTime + time_LTE: LocalTime + time_NOT: LocalTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + time_NOT_IN: [LocalTime] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index 5154838eb5..9427c3f4d7 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -33,153 +33,155 @@ describe("Point", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - filmedAt: Point! -} - -type MovieAggregateSelection { - count: Int! -} - -input MovieCreateInput { - filmedAt: PointInput! -} - -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 { - filmedAt: SortDirection -} - -input MovieUpdateInput { - filmedAt: PointInput -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - filmedAt: PointInput - filmedAt_DISTANCE: PointDistance - filmedAt_GT: PointDistance - filmedAt_GTE: PointDistance - filmedAt_IN: [PointInput!] - filmedAt_LT: PointDistance - filmedAt_LTE: PointDistance - filmedAt_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAt_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -\\"\\"\\"Point type\\"\\"\\" -type Point { - crs: String! - height: Float - latitude: Float! - longitude: Float! - srid: Int! -} - -\\"\\"\\"\\"\\"\\" -input PointDistance { - \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" - distance: Float! - point: PointInput! -} - -\\"\\"\\"\\"\\"\\" -input PointInput { - height: Float - latitude: Float! - longitude: Float! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + filmedAt: Point! + } + + type MovieAggregateSelection { + count: Int! + } + + input MovieCreateInput { + filmedAt: PointInput! + } + + 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 { + filmedAt: SortDirection + } + + input MovieUpdateInput { + filmedAt: PointInput + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + filmedAt: PointInput + filmedAt_DISTANCE: PointDistance + filmedAt_GT: PointDistance + filmedAt_GTE: PointDistance + filmedAt_IN: [PointInput!] + filmedAt_LT: PointDistance + filmedAt_LTE: PointDistance + filmedAt_NOT: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAt_NOT_IN: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + \\"\\"\\" + A point in a coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#point + \\"\\"\\" + type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! + } + + \\"\\"\\"\\"\\"\\" + input PointDistance { + \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" + distance: Float! + point: PointInput! + } + + \\"\\"\\"\\"\\"\\" + input PointInput { + height: Float + latitude: Float! + longitude: Float! + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("CartesianPoint", async () => { @@ -192,152 +194,154 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CartesianPoint type\\"\\"\\" -type CartesianPoint { - crs: String! - srid: Int! - x: Float! - y: Float! - z: Float -} - -\\"\\"\\"\\"\\"\\" -input CartesianPointDistance { - distance: Float! - point: CartesianPointInput! -} - -\\"\\"\\"\\"\\"\\" -input CartesianPointInput { - x: Float! - y: Float! - z: Float -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMachinesMutationResponse { - info: CreateInfo! - machines: [Machine!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Machine { - partLocation: CartesianPoint! -} - -type MachineAggregateSelection { - count: Int! -} - -input MachineCreateInput { - partLocation: CartesianPointInput! -} - -type MachineEdge { - cursor: String! - node: Machine! -} - -input MachineOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more MachineSort objects to sort Machines by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [MachineSort!] -} - -\\"\\"\\" -Fields to sort Machines by. The order in which sorts are applied is not guaranteed when specifying many fields in one MachineSort object. -\\"\\"\\" -input MachineSort { - partLocation: SortDirection -} - -input MachineUpdateInput { - partLocation: CartesianPointInput -} - -input MachineWhere { - AND: [MachineWhere!] - NOT: MachineWhere - OR: [MachineWhere!] - partLocation: CartesianPointInput - partLocation_DISTANCE: CartesianPointDistance - partLocation_GT: CartesianPointDistance - partLocation_GTE: CartesianPointDistance - partLocation_IN: [CartesianPointInput!] - partLocation_LT: CartesianPointDistance - partLocation_LTE: CartesianPointDistance - partLocation_NOT: CartesianPointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - partLocation_NOT_IN: [CartesianPointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MachinesConnection { - edges: [MachineEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMachines(input: [MachineCreateInput!]!): CreateMachinesMutationResponse! - deleteMachines(where: MachineWhere): DeleteInfo! - updateMachines(update: MachineUpdateInput, where: MachineWhere): UpdateMachinesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - machines(options: MachineOptions, where: MachineWhere): [Machine!]! - machinesAggregate(where: MachineWhere): MachineAggregateSelection! - machinesConnection(after: String, first: Int, sort: [MachineSort], where: MachineWhere): MachinesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMachinesMutationResponse { - info: UpdateInfo! - machines: [Machine!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A point in a two- or three-dimensional Cartesian coordinate system or in a three-dimensional cylindrical coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#cartesian-point + \\"\\"\\" + type CartesianPoint { + crs: String! + srid: Int! + x: Float! + y: Float! + z: Float + } + + \\"\\"\\"\\"\\"\\" + input CartesianPointDistance { + distance: Float! + point: CartesianPointInput! + } + + \\"\\"\\"\\"\\"\\" + input CartesianPointInput { + x: Float! + y: Float! + z: Float + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMachinesMutationResponse { + info: CreateInfo! + machines: [Machine!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Machine { + partLocation: CartesianPoint! + } + + type MachineAggregateSelection { + count: Int! + } + + input MachineCreateInput { + partLocation: CartesianPointInput! + } + + type MachineEdge { + cursor: String! + node: Machine! + } + + input MachineOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more MachineSort objects to sort Machines by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [MachineSort!] + } + + \\"\\"\\" + Fields to sort Machines by. The order in which sorts are applied is not guaranteed when specifying many fields in one MachineSort object. + \\"\\"\\" + input MachineSort { + partLocation: SortDirection + } + + input MachineUpdateInput { + partLocation: CartesianPointInput + } + + input MachineWhere { + AND: [MachineWhere!] + NOT: MachineWhere + OR: [MachineWhere!] + partLocation: CartesianPointInput + partLocation_DISTANCE: CartesianPointDistance + partLocation_GT: CartesianPointDistance + partLocation_GTE: CartesianPointDistance + partLocation_IN: [CartesianPointInput!] + partLocation_LT: CartesianPointDistance + partLocation_LTE: CartesianPointDistance + partLocation_NOT: CartesianPointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + partLocation_NOT_IN: [CartesianPointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MachinesConnection { + edges: [MachineEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMachines(input: [MachineCreateInput!]!): CreateMachinesMutationResponse! + deleteMachines(where: MachineWhere): DeleteInfo! + updateMachines(update: MachineUpdateInput, where: MachineWhere): UpdateMachinesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + machines(options: MachineOptions, where: MachineWhere): [Machine!]! + machinesAggregate(where: MachineWhere): MachineAggregateSelection! + machinesConnection(after: String, first: Int, sort: [MachineSort], where: MachineWhere): MachinesConnection! + } + + \\"\\"\\"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 + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMachinesMutationResponse { + info: UpdateInfo! + machines: [Machine!]! + }" + `); }); test("Points", async () => { @@ -350,124 +354,126 @@ type UpdateMachinesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Movie { - filmedAt: [Point!]! -} - -type MovieAggregateSelection { - count: Int! -} - -input MovieCreateInput { - filmedAt: [PointInput!]! -} - -type MovieEdge { - cursor: String! - node: Movie! -} - -input MovieOptions { - limit: Int - offset: Int -} - -input MovieUpdateInput { - filmedAt: [PointInput!] - filmedAt_POP: Int - filmedAt_PUSH: [PointInput!] -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - filmedAt: [PointInput!] - filmedAt_INCLUDES: PointInput - filmedAt_NOT: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - filmedAt_NOT_INCLUDES: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -\\"\\"\\"Point type\\"\\"\\" -type Point { - crs: String! - height: Float - latitude: Float! - longitude: Float! - srid: Int! -} - -\\"\\"\\"\\"\\"\\" -input PointInput { - height: Float - latitude: Float! - longitude: Float! -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Movie { + filmedAt: [Point!]! + } + + type MovieAggregateSelection { + count: Int! + } + + input MovieCreateInput { + filmedAt: [PointInput!]! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOptions { + limit: Int + offset: Int + } + + input MovieUpdateInput { + filmedAt: [PointInput!] + filmedAt_POP: Int + filmedAt_PUSH: [PointInput!] + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + filmedAt: [PointInput!] + filmedAt_INCLUDES: PointInput + filmedAt_NOT: [PointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + filmedAt_NOT_INCLUDES: PointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + \\"\\"\\" + A point in a coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#point + \\"\\"\\" + type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! + } + + \\"\\"\\"\\"\\"\\" + input PointInput { + height: Float + latitude: Float! + longitude: Float! + } + + type Query { + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); test("CartesianPoints", async () => { @@ -480,123 +486,125 @@ type UpdateMoviesMutationResponse { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CartesianPoint type\\"\\"\\" -type CartesianPoint { - crs: String! - srid: Int! - x: Float! - y: Float! - z: Float -} - -\\"\\"\\"\\"\\"\\" -input CartesianPointInput { - x: Float! - y: Float! - z: Float -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMachinesMutationResponse { - info: CreateInfo! - machines: [Machine!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Machine { - partLocations: [CartesianPoint!]! -} - -type MachineAggregateSelection { - count: Int! -} - -input MachineCreateInput { - partLocations: [CartesianPointInput!]! -} - -type MachineEdge { - cursor: String! - node: Machine! -} - -input MachineOptions { - limit: Int - offset: Int -} - -input MachineUpdateInput { - partLocations: [CartesianPointInput!] - partLocations_POP: Int - partLocations_PUSH: [CartesianPointInput!] -} - -input MachineWhere { - AND: [MachineWhere!] - NOT: MachineWhere - OR: [MachineWhere!] - partLocations: [CartesianPointInput!] - partLocations_INCLUDES: CartesianPointInput - partLocations_NOT: [CartesianPointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - partLocations_NOT_INCLUDES: CartesianPointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MachinesConnection { - edges: [MachineEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMachines(input: [MachineCreateInput!]!): CreateMachinesMutationResponse! - deleteMachines(where: MachineWhere): DeleteInfo! - updateMachines(update: MachineUpdateInput, where: MachineWhere): UpdateMachinesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - machines(options: MachineOptions, where: MachineWhere): [Machine!]! - machinesAggregate(where: MachineWhere): MachineAggregateSelection! - machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMachinesMutationResponse { - info: UpdateInfo! - machines: [Machine!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A point in a two- or three-dimensional Cartesian coordinate system or in a three-dimensional cylindrical coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#cartesian-point + \\"\\"\\" + type CartesianPoint { + crs: String! + srid: Int! + x: Float! + y: Float! + z: Float + } + + \\"\\"\\"\\"\\"\\" + input CartesianPointInput { + x: Float! + y: Float! + z: Float + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMachinesMutationResponse { + info: CreateInfo! + machines: [Machine!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Machine { + partLocations: [CartesianPoint!]! + } + + type MachineAggregateSelection { + count: Int! + } + + input MachineCreateInput { + partLocations: [CartesianPointInput!]! + } + + type MachineEdge { + cursor: String! + node: Machine! + } + + input MachineOptions { + limit: Int + offset: Int + } + + input MachineUpdateInput { + partLocations: [CartesianPointInput!] + partLocations_POP: Int + partLocations_PUSH: [CartesianPointInput!] + } + + input MachineWhere { + AND: [MachineWhere!] + NOT: MachineWhere + OR: [MachineWhere!] + partLocations: [CartesianPointInput!] + partLocations_INCLUDES: CartesianPointInput + partLocations_NOT: [CartesianPointInput!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + partLocations_NOT_INCLUDES: CartesianPointInput @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MachinesConnection { + edges: [MachineEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMachines(input: [MachineCreateInput!]!): CreateMachinesMutationResponse! + deleteMachines(where: MachineWhere): DeleteInfo! + updateMachines(update: MachineUpdateInput, where: MachineWhere): UpdateMachinesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + machines(options: MachineOptions, where: MachineWhere): [Machine!]! + machinesAggregate(where: MachineWhere): MachineAggregateSelection! + machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMachinesMutationResponse { + info: UpdateInfo! + machines: [Machine!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index 5fb5de8c15..4b2d38bc68 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -34,157 +34,157 @@ describe("Time", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID - time: Time -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! - time: TimeAggregateSelectionNullable! -} - -input MovieCreateInput { - id: ID - time: Time -} - -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 - time: SortDirection -} - -input MovieUpdateInput { - id: ID - time: Time -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - time: Time - time_GT: Time - time_GTE: Time - time_IN: [Time] - time_LT: Time - time_LTE: Time - time_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - time_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -\\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" -scalar Time - -type TimeAggregateSelectionNullable { - max: Time - min: Time -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + time: Time + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + time: TimeAggregateSelectionNullable! + } + + input MovieCreateInput { + id: ID + time: Time + } + + 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 + time: SortDirection + } + + input MovieUpdateInput { + id: ID + time: Time + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + time: Time + time_GT: Time + time_GTE: Time + time_IN: [Time] + time_LT: Time + time_LTE: Time + time_NOT: Time @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + time_NOT_IN: [Time] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(options: MovieOptions, 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 + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelectionNullable { + max: Time + min: Time + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 18d956d02b..cf698bac4c 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -41,405 +41,405 @@ describe("Unions", () => { const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); expect(printedSchema).toMatchInlineSnapshot(` -"schema { - query: Query - mutation: Mutation -} - -type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! -} - -\\"\\"\\"CreateInfo\\"\\"\\" -type CreateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - relationshipsCreated: Int! -} - -type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! -} - -\\"\\"\\"DeleteInfo\\"\\"\\" -type DeleteInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesDeleted: Int! - relationshipsDeleted: Int! -} - -type Genre { - id: ID -} - -type GenreAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input GenreConnectWhere { - node: GenreWhere! -} - -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 - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID -} - -type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type IDAggregateSelectionNullable { - longest: ID - shortest: ID -} - -type Movie { - id: ID - search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! - searchNoDirective: Search -} - -type MovieAggregateSelection { - count: Int! - id: IDAggregateSelectionNullable! -} - -input MovieConnectInput { - search: MovieSearchConnectInput -} - -input MovieConnectWhere { - node: MovieWhere! -} - -input MovieCreateInput { - id: ID - search: MovieSearchCreateInput -} - -input MovieDeleteInput { - search: MovieSearchDeleteInput -} - -input MovieDisconnectInput { - search: MovieSearchDisconnectInput -} - -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!] -} - -input MovieRelationInput { - search: MovieSearchCreateFieldInput -} - -input MovieSearchConnectInput { - Genre: [MovieSearchGenreConnectFieldInput!] - Movie: [MovieSearchMovieConnectFieldInput!] -} - -type MovieSearchConnection { - edges: [MovieSearchRelationship!]! - pageInfo: PageInfo! - totalCount: Int! -} - -input MovieSearchConnectionWhere { - Genre: MovieSearchGenreConnectionWhere - Movie: MovieSearchMovieConnectionWhere -} - -input MovieSearchCreateFieldInput { - Genre: [MovieSearchGenreCreateFieldInput!] - Movie: [MovieSearchMovieCreateFieldInput!] -} - -input MovieSearchCreateInput { - Genre: MovieSearchGenreFieldInput - Movie: MovieSearchMovieFieldInput -} - -input MovieSearchDeleteInput { - Genre: [MovieSearchGenreDeleteFieldInput!] - Movie: [MovieSearchMovieDeleteFieldInput!] -} - -input MovieSearchDisconnectInput { - Genre: [MovieSearchGenreDisconnectFieldInput!] - Movie: [MovieSearchMovieDisconnectFieldInput!] -} - -input MovieSearchGenreConnectFieldInput { - where: GenreConnectWhere -} - -input MovieSearchGenreConnectionWhere { - AND: [MovieSearchGenreConnectionWhere!] - NOT: MovieSearchGenreConnectionWhere - OR: [MovieSearchGenreConnectionWhere!] - node: GenreWhere - node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieSearchGenreCreateFieldInput { - node: GenreCreateInput! -} - -input MovieSearchGenreDeleteFieldInput { - where: MovieSearchGenreConnectionWhere -} - -input MovieSearchGenreDisconnectFieldInput { - where: MovieSearchGenreConnectionWhere -} - -input MovieSearchGenreFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] -} - -input MovieSearchGenreUpdateConnectionInput { - node: GenreUpdateInput -} - -input MovieSearchGenreUpdateFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] - delete: [MovieSearchGenreDeleteFieldInput!] - disconnect: [MovieSearchGenreDisconnectFieldInput!] - update: MovieSearchGenreUpdateConnectionInput - where: MovieSearchGenreConnectionWhere -} - -input MovieSearchMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere -} - -input MovieSearchMovieConnectionWhere { - AND: [MovieSearchMovieConnectionWhere!] - NOT: MovieSearchMovieConnectionWhere - OR: [MovieSearchMovieConnectionWhere!] - node: MovieWhere - node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") -} - -input MovieSearchMovieCreateFieldInput { - node: MovieCreateInput! -} - -input MovieSearchMovieDeleteFieldInput { - delete: MovieDeleteInput - where: MovieSearchMovieConnectionWhere -} - -input MovieSearchMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieSearchMovieConnectionWhere -} - -input MovieSearchMovieFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] -} - -input MovieSearchMovieUpdateConnectionInput { - node: MovieUpdateInput -} - -input MovieSearchMovieUpdateFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] - delete: [MovieSearchMovieDeleteFieldInput!] - disconnect: [MovieSearchMovieDisconnectFieldInput!] - update: MovieSearchMovieUpdateConnectionInput - where: MovieSearchMovieConnectionWhere -} - -type MovieSearchRelationship { - cursor: String! - node: Search! -} - -input MovieSearchUpdateInput { - Genre: [MovieSearchGenreUpdateFieldInput!] - Movie: [MovieSearchMovieUpdateFieldInput!] -} - -\\"\\"\\" -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 { - id: ID - search: MovieSearchUpdateInput -} - -input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_IN: [ID] - id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") - id_STARTS_WITH: ID - searchConnection: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_SOME\` instead.\\") - \\"\\"\\" - Return Movies where all of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_ALL: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_NONE: MovieSearchConnectionWhere - searchConnection_NOT: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_NONE\` instead.\\") - \\"\\"\\" - Return Movies where one of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SINGLE: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SOME: MovieSearchConnectionWhere -} - -type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! -} - -\\"\\"\\"Pagination information (Relay)\\"\\"\\" -type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String -} - -type Query { - genres(options: GenreOptions, where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! - movies(options: MovieOptions, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! -} - -\\"\\"\\"\\"\\"\\" -input QueryOptions { - limit: Int - offset: Int -} - -union Search = Genre | Movie - -input SearchWhere { - Genre: GenreWhere - Movie: MovieWhere -} - -\\"\\"\\"SortDirection\\"\\"\\" -enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC -} - -type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! -} - -\\"\\"\\"UpdateInfo\\"\\"\\" -type UpdateInfo { - bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! -} - -type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! -}" -`); + "schema { + query: Query + mutation: Mutation + } + + type CreateGenresMutationResponse { + genres: [Genre!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type Genre { + id: ID + } + + type GenreAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input GenreConnectWhere { + node: GenreWhere! + } + + 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 + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + } + + type GenresConnection { + edges: [GenreEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IDAggregateSelectionNullable { + longest: ID + shortest: ID + } + + type Movie { + id: ID + search(directed: Boolean = true, options: QueryOptions, where: SearchWhere): [Search!]! + searchConnection(after: String, directed: Boolean = true, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + searchNoDirective: Search + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelectionNullable! + } + + input MovieConnectInput { + search: MovieSearchConnectInput + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + id: ID + search: MovieSearchCreateInput + } + + input MovieDeleteInput { + search: MovieSearchDeleteInput + } + + input MovieDisconnectInput { + search: MovieSearchDisconnectInput + } + + 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!] + } + + input MovieRelationInput { + search: MovieSearchCreateFieldInput + } + + input MovieSearchConnectInput { + Genre: [MovieSearchGenreConnectFieldInput!] + Movie: [MovieSearchMovieConnectFieldInput!] + } + + type MovieSearchConnection { + edges: [MovieSearchRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieSearchConnectionWhere { + Genre: MovieSearchGenreConnectionWhere + Movie: MovieSearchMovieConnectionWhere + } + + input MovieSearchCreateFieldInput { + Genre: [MovieSearchGenreCreateFieldInput!] + Movie: [MovieSearchMovieCreateFieldInput!] + } + + input MovieSearchCreateInput { + Genre: MovieSearchGenreFieldInput + Movie: MovieSearchMovieFieldInput + } + + input MovieSearchDeleteInput { + Genre: [MovieSearchGenreDeleteFieldInput!] + Movie: [MovieSearchMovieDeleteFieldInput!] + } + + input MovieSearchDisconnectInput { + Genre: [MovieSearchGenreDisconnectFieldInput!] + Movie: [MovieSearchMovieDisconnectFieldInput!] + } + + input MovieSearchGenreConnectFieldInput { + where: GenreConnectWhere + } + + input MovieSearchGenreConnectionWhere { + AND: [MovieSearchGenreConnectionWhere!] + NOT: MovieSearchGenreConnectionWhere + OR: [MovieSearchGenreConnectionWhere!] + node: GenreWhere + node_NOT: GenreWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieSearchGenreCreateFieldInput { + node: GenreCreateInput! + } + + input MovieSearchGenreDeleteFieldInput { + where: MovieSearchGenreConnectionWhere + } + + input MovieSearchGenreDisconnectFieldInput { + where: MovieSearchGenreConnectionWhere + } + + input MovieSearchGenreFieldInput { + connect: [MovieSearchGenreConnectFieldInput!] + create: [MovieSearchGenreCreateFieldInput!] + } + + input MovieSearchGenreUpdateConnectionInput { + node: GenreUpdateInput + } + + input MovieSearchGenreUpdateFieldInput { + connect: [MovieSearchGenreConnectFieldInput!] + create: [MovieSearchGenreCreateFieldInput!] + delete: [MovieSearchGenreDeleteFieldInput!] + disconnect: [MovieSearchGenreDisconnectFieldInput!] + update: MovieSearchGenreUpdateConnectionInput + where: MovieSearchGenreConnectionWhere + } + + input MovieSearchMovieConnectFieldInput { + connect: [MovieConnectInput!] + where: MovieConnectWhere + } + + input MovieSearchMovieConnectionWhere { + AND: [MovieSearchMovieConnectionWhere!] + NOT: MovieSearchMovieConnectionWhere + OR: [MovieSearchMovieConnectionWhere!] + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieSearchMovieCreateFieldInput { + node: MovieCreateInput! + } + + input MovieSearchMovieDeleteFieldInput { + delete: MovieDeleteInput + where: MovieSearchMovieConnectionWhere + } + + input MovieSearchMovieDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: MovieSearchMovieConnectionWhere + } + + input MovieSearchMovieFieldInput { + connect: [MovieSearchMovieConnectFieldInput!] + create: [MovieSearchMovieCreateFieldInput!] + } + + input MovieSearchMovieUpdateConnectionInput { + node: MovieUpdateInput + } + + input MovieSearchMovieUpdateFieldInput { + connect: [MovieSearchMovieConnectFieldInput!] + create: [MovieSearchMovieCreateFieldInput!] + delete: [MovieSearchMovieDeleteFieldInput!] + disconnect: [MovieSearchMovieDisconnectFieldInput!] + update: MovieSearchMovieUpdateConnectionInput + where: MovieSearchMovieConnectionWhere + } + + type MovieSearchRelationship { + cursor: String! + node: Search! + } + + input MovieSearchUpdateInput { + Genre: [MovieSearchGenreUpdateFieldInput!] + Movie: [MovieSearchMovieUpdateFieldInput!] + } + + \\"\\"\\" + 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 { + id: ID + search: MovieSearchUpdateInput + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + searchConnection: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_ALL: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_NONE: MovieSearchConnectionWhere + searchConnection_NOT: MovieSearchConnectionWhere @deprecated(reason: \\"Use \`searchConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_SINGLE: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieSearchConnections match this filter + \\"\\"\\" + searchConnection_SOME: MovieSearchConnectionWhere + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteGenres(where: GenreWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! + updateMovies(connect: MovieConnectInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + genres(options: GenreOptions, where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresConnection(after: String, first: Int, sort: [GenreSort], where: GenreWhere): GenresConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"\\"\\"\\" + 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 UpdateGenresMutationResponse { + genres: [Genre!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); }); }); From 904aab6f95d6a9173c6cdeb31405d8900755677d Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 10:34:23 +0200 Subject: [PATCH 137/162] docs: add license headers --- .../graphql/src/schema/deprecation-map.ts | 19 +++++++++++++++++++ .../src/schema/generation/create-input.ts | 19 +++++++++++++++++++ .../graphql/src/schema/generation/utils.ts | 19 +++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/packages/graphql/src/schema/deprecation-map.ts b/packages/graphql/src/schema/deprecation-map.ts index 0b3732e49e..cd093e452e 100644 --- a/packages/graphql/src/schema/deprecation-map.ts +++ b/packages/graphql/src/schema/deprecation-map.ts @@ -1,3 +1,22 @@ +/* + * 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 { CreateInfo } from "../graphql/objects/CreateInfo"; import { DeleteInfo } from "../graphql/objects/DeleteInfo"; import { UpdateInfo } from "../graphql/objects/UpdateInfo"; diff --git a/packages/graphql/src/schema/generation/create-input.ts b/packages/graphql/src/schema/generation/create-input.ts index 82a0365c7a..293486f351 100644 --- a/packages/graphql/src/schema/generation/create-input.ts +++ b/packages/graphql/src/schema/generation/create-input.ts @@ -1,3 +1,22 @@ +/* + * 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 { DirectiveNode } from "graphql"; import type { Directive, diff --git a/packages/graphql/src/schema/generation/utils.ts b/packages/graphql/src/schema/generation/utils.ts index 93c298fcb0..939cc0230a 100644 --- a/packages/graphql/src/schema/generation/utils.ts +++ b/packages/graphql/src/schema/generation/utils.ts @@ -1,3 +1,22 @@ +/* + * 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 { RelationshipNestedOperationsOption } from "../../constants"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; From b6105403f819ab483d8c1510ca3bdfc1ed060ac0 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 10:40:47 +0200 Subject: [PATCH 138/162] test: update ogm generate snapshot --- packages/ogm/src/generate.test.ts | 246 +++++++++++++++--------------- 1 file changed, 123 insertions(+), 123 deletions(-) diff --git a/packages/ogm/src/generate.test.ts b/packages/ogm/src/generate.test.ts index 006b79f6bc..b857fd7c5d 100644 --- a/packages/ogm/src/generate.test.ts +++ b/packages/ogm/src/generate.test.ts @@ -126,7 +126,7 @@ describe("generate", () => { update?: InputMaybe; }; - /** SortDirection */ + /** An enum for sorting in either ascending or descending order. */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -134,7 +134,7 @@ describe("generate", () => { Desc = \\"DESC\\", } - /** CreateInfo */ + /** Information about the creation of a node or relationship. */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -149,7 +149,7 @@ describe("generate", () => { users: Array; }; - /** DeleteInfo */ + /** Information about the deletion of a node or relationship. */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -173,7 +173,7 @@ describe("generate", () => { longest?: Maybe; }; - /** UpdateInfo */ + /** Information about the update of a node or relationship. */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -219,10 +219,10 @@ describe("generate", () => { }; export type UserOptions = { - /** 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?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** 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?: InputMaybe>; }; /** Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. */ @@ -235,9 +235,6 @@ describe("generate", () => { }; export type UserWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; name?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT?: InputMaybe; @@ -253,6 +250,9 @@ describe("generate", () => { name_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; }; export interface StringAggregateInputNullable { @@ -423,7 +423,7 @@ describe("generate", () => { update?: InputMaybe; }; - /** SortDirection */ + /** An enum for sorting in either ascending or descending order. */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -431,7 +431,7 @@ describe("generate", () => { Desc = \\"DESC\\", } - /** CreateInfo */ + /** Information about the creation of a node or relationship. */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -446,7 +446,7 @@ describe("generate", () => { users: Array; }; - /** DeleteInfo */ + /** Information about the deletion of a node or relationship. */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -470,7 +470,7 @@ describe("generate", () => { longest?: Maybe; }; - /** UpdateInfo */ + /** Information about the update of a node or relationship. */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -545,10 +545,10 @@ describe("generate", () => { }; export type UserOptions = { - /** 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?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** 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?: InputMaybe>; }; /** Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. */ @@ -565,9 +565,6 @@ describe("generate", () => { }; export type UserWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; name?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT?: InputMaybe; @@ -583,6 +580,9 @@ describe("generate", () => { name_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; }; export interface StringAggregateInputNullable { @@ -748,7 +748,7 @@ describe("generate", () => { update?: InputMaybe; }; - /** SortDirection */ + /** An enum for sorting in either ascending or descending order. */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -756,7 +756,7 @@ describe("generate", () => { Desc = \\"DESC\\", } - /** CreateInfo */ + /** Information about the creation of a node or relationship. */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -771,7 +771,7 @@ describe("generate", () => { users: Array; }; - /** DeleteInfo */ + /** Information about the deletion of a node or relationship. */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -795,7 +795,7 @@ describe("generate", () => { longest?: Maybe; }; - /** UpdateInfo */ + /** Information about the update of a node or relationship. */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -841,10 +841,10 @@ describe("generate", () => { }; export type UserOptions = { - /** 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?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** 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?: InputMaybe>; }; /** Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. */ @@ -857,9 +857,6 @@ describe("generate", () => { }; export type UserWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; name?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT?: InputMaybe; @@ -875,6 +872,9 @@ describe("generate", () => { name_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; }; export interface StringAggregateInputNullable { @@ -1077,7 +1077,7 @@ describe("generate", () => { update?: InputMaybe; }; - /** SortDirection */ + /** An enum for sorting in either ascending or descending order. */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -1089,7 +1089,7 @@ describe("generate", () => { screenTime: Scalars[\\"Int\\"][\\"output\\"]; }; - /** CreateInfo */ + /** Information about the creation of a node or relationship. */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1110,7 +1110,7 @@ describe("generate", () => { people: Array; }; - /** DeleteInfo */ + /** Information about the deletion of a node or relationship. */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1130,19 +1130,19 @@ describe("generate", () => { export type Movie = { __typename?: \\"Movie\\"; title: Scalars[\\"String\\"][\\"output\\"]; - actors: Array; actorsAggregate?: Maybe; + actors: Array; actorsConnection: MovieActorsConnection; }; - export type MovieActorsArgs = { + export type MovieActorsAggregateArgs = { where?: InputMaybe; - options?: InputMaybe; directed?: InputMaybe; }; - export type MovieActorsAggregateArgs = { + export type MovieActorsArgs = { where?: InputMaybe; + options?: InputMaybe; directed?: InputMaybe; }; @@ -1243,7 +1243,7 @@ describe("generate", () => { longest: Scalars[\\"String\\"][\\"output\\"]; }; - /** UpdateInfo */ + /** Information about the update of a node or relationship. */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1281,9 +1281,6 @@ describe("generate", () => { }; export type ActedInWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; screenTime?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ screenTime_NOT?: InputMaybe; @@ -1294,6 +1291,9 @@ describe("generate", () => { screenTime_LTE?: InputMaybe; screenTime_GT?: InputMaybe; screenTime_GTE?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; }; export type MovieActorsAggregateInput = { @@ -1310,32 +1310,32 @@ describe("generate", () => { }; export type MovieActorsConnectFieldInput = { - where?: InputMaybe; edge: ActedInCreateInput; + where?: InputMaybe; /** Whether or not to overwrite any matching relationship with the new properties. */ overwrite?: Scalars[\\"Boolean\\"][\\"input\\"]; }; export type MovieActorsConnectionSort = { - edge?: InputMaybe; node?: InputMaybe; + edge?: InputMaybe; }; export type MovieActorsConnectionWhere = { - AND?: InputMaybe>; OR?: InputMaybe>; + AND?: InputMaybe>; NOT?: InputMaybe; - edge?: InputMaybe; - /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ - edge_NOT?: InputMaybe; node?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ node_NOT?: InputMaybe; + edge?: InputMaybe; + /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ + edge_NOT?: InputMaybe; }; export type MovieActorsCreateFieldInput = { - node: PersonCreateInput; edge: ActedInCreateInput; + node: PersonCreateInput; }; export type MovieActorsDeleteFieldInput = { @@ -1352,39 +1352,39 @@ describe("generate", () => { NOT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ screenTime_EQUAL?: InputMaybe; - screenTime_AVERAGE_EQUAL?: InputMaybe; screenTime_MIN_EQUAL?: InputMaybe; screenTime_MAX_EQUAL?: InputMaybe; screenTime_SUM_EQUAL?: InputMaybe; + screenTime_AVERAGE_EQUAL?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ screenTime_GT?: InputMaybe; - screenTime_AVERAGE_GT?: InputMaybe; screenTime_MIN_GT?: InputMaybe; screenTime_MAX_GT?: InputMaybe; screenTime_SUM_GT?: InputMaybe; + screenTime_AVERAGE_GT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ screenTime_GTE?: InputMaybe; - screenTime_AVERAGE_GTE?: InputMaybe; screenTime_MIN_GTE?: InputMaybe; screenTime_MAX_GTE?: InputMaybe; screenTime_SUM_GTE?: InputMaybe; + screenTime_AVERAGE_GTE?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ screenTime_LT?: InputMaybe; - screenTime_AVERAGE_LT?: InputMaybe; screenTime_MIN_LT?: InputMaybe; screenTime_MAX_LT?: InputMaybe; screenTime_SUM_LT?: InputMaybe; + screenTime_AVERAGE_LT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ screenTime_LTE?: InputMaybe; - screenTime_AVERAGE_LTE?: InputMaybe; screenTime_MIN_LTE?: InputMaybe; screenTime_MAX_LTE?: InputMaybe; screenTime_SUM_LTE?: InputMaybe; + screenTime_AVERAGE_LTE?: InputMaybe; }; export type MovieActorsFieldInput = { - create?: InputMaybe>; connect?: InputMaybe>; + create?: InputMaybe>; }; export type MovieActorsNodeAggregationWhereInput = { @@ -1455,11 +1455,11 @@ describe("generate", () => { export type MovieActorsUpdateFieldInput = { where?: InputMaybe; - create?: InputMaybe>; connect?: InputMaybe>; + disconnect?: InputMaybe>; + create?: InputMaybe>; update?: InputMaybe; delete?: InputMaybe>; - disconnect?: InputMaybe>; }; export type MovieConnectInput = { @@ -1480,10 +1480,10 @@ describe("generate", () => { }; export type MovieOptions = { - /** 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?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** 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?: InputMaybe>; }; export type MovieRelationInput = { @@ -1501,9 +1501,6 @@ describe("generate", () => { }; export type MovieWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; title?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ title_NOT?: InputMaybe; @@ -1519,11 +1516,13 @@ describe("generate", () => { title_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ title_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; /** @deprecated Use \`actors_SOME\` instead. */ actors?: InputMaybe; /** @deprecated Use \`actors_NONE\` instead. */ actors_NOT?: InputMaybe; - actorsAggregate?: InputMaybe; /** Return Movies where all of the related People match this filter */ actors_ALL?: InputMaybe; /** Return Movies where none of the related People match this filter */ @@ -1532,6 +1531,7 @@ describe("generate", () => { actors_SINGLE?: InputMaybe; /** Return Movies where some of the related People match this filter */ actors_SOME?: InputMaybe; + actorsAggregate?: InputMaybe; /** @deprecated Use \`actorsConnection_SOME\` instead. */ actorsConnection?: InputMaybe; /** @deprecated Use \`actorsConnection_NONE\` instead. */ @@ -1555,10 +1555,10 @@ describe("generate", () => { }; export type PersonOptions = { - /** Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. */ - sort?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. */ + sort?: InputMaybe>; }; /** Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. */ @@ -1571,9 +1571,6 @@ describe("generate", () => { }; export type PersonWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; name?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT?: InputMaybe; @@ -1589,6 +1586,9 @@ describe("generate", () => { name_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; }; export interface StringAggregateInputNonNullable { @@ -1881,7 +1881,7 @@ describe("generate", () => { connectOrCreate?: InputMaybe; }; - /** SortDirection */ + /** An enum for sorting in either ascending or descending order. */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -1905,7 +1905,7 @@ describe("generate", () => { faqs: Array; }; - /** CreateInfo */ + /** Information about the creation of a node or relationship. */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1914,7 +1914,7 @@ describe("generate", () => { relationshipsCreated: Scalars[\\"Int\\"][\\"output\\"]; }; - /** DeleteInfo */ + /** Information about the deletion of a node or relationship. */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1928,19 +1928,19 @@ describe("generate", () => { id: Scalars[\\"ID\\"][\\"output\\"]; activated: Scalars[\\"Boolean\\"][\\"output\\"]; name: Scalars[\\"String\\"][\\"output\\"]; - entries: Array; entriesAggregate?: Maybe; + entries: Array; entriesConnection: FaqEntriesConnection; }; - export type FaqEntriesArgs = { + export type FaqEntriesAggregateArgs = { where?: InputMaybe; - options?: InputMaybe; directed?: InputMaybe; }; - export type FaqEntriesAggregateArgs = { + export type FaqEntriesArgs = { where?: InputMaybe; + options?: InputMaybe; directed?: InputMaybe; }; @@ -1991,19 +1991,19 @@ describe("generate", () => { id: Scalars[\\"ID\\"][\\"output\\"]; title: Scalars[\\"String\\"][\\"output\\"]; body: Scalars[\\"String\\"][\\"output\\"]; - inFAQs: Array; inFAQsAggregate?: Maybe; + inFAQs: Array; inFAQsConnection: FaqEntryInFaQsConnection; }; - export type FaqEntryInFaQsArgs = { + export type FaqEntryInFaQsAggregateArgs = { where?: InputMaybe; - options?: InputMaybe; directed?: InputMaybe; }; - export type FaqEntryInFaQsAggregateArgs = { + export type FaqEntryInFaQsArgs = { where?: InputMaybe; + options?: InputMaybe; directed?: InputMaybe; }; @@ -2128,7 +2128,7 @@ describe("generate", () => { faqs: Array; }; - /** UpdateInfo */ + /** Information about the update of a node or relationship. */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -2183,28 +2183,28 @@ describe("generate", () => { }; export type FaqEntriesConnectFieldInput = { - where?: InputMaybe; - connect?: InputMaybe>; edge?: InputMaybe; + where?: InputMaybe; /** Whether or not to overwrite any matching relationship with the new properties. */ overwrite?: Scalars[\\"Boolean\\"][\\"input\\"]; + connect?: InputMaybe>; }; export type FaqEntriesConnectionSort = { - edge?: InputMaybe; node?: InputMaybe; + edge?: InputMaybe; }; export type FaqEntriesConnectionWhere = { - AND?: InputMaybe>; OR?: InputMaybe>; + AND?: InputMaybe>; NOT?: InputMaybe; - edge?: InputMaybe; - /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ - edge_NOT?: InputMaybe; node?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ node_NOT?: InputMaybe; + edge?: InputMaybe; + /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ + edge_NOT?: InputMaybe; }; export type FaqEntriesConnectOrCreateFieldInput = { @@ -2218,8 +2218,8 @@ describe("generate", () => { }; export type FaqEntriesCreateFieldInput = { - node: FaqEntryCreateInput; edge?: InputMaybe; + node: FaqEntryCreateInput; }; export type FaqEntriesDeleteFieldInput = { @@ -2238,40 +2238,40 @@ describe("generate", () => { NOT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_EQUAL?: InputMaybe; - position_AVERAGE_EQUAL?: InputMaybe; position_MIN_EQUAL?: InputMaybe; position_MAX_EQUAL?: InputMaybe; position_SUM_EQUAL?: InputMaybe; + position_AVERAGE_EQUAL?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_GT?: InputMaybe; - position_AVERAGE_GT?: InputMaybe; position_MIN_GT?: InputMaybe; position_MAX_GT?: InputMaybe; position_SUM_GT?: InputMaybe; + position_AVERAGE_GT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_GTE?: InputMaybe; - position_AVERAGE_GTE?: InputMaybe; position_MIN_GTE?: InputMaybe; position_MAX_GTE?: InputMaybe; position_SUM_GTE?: InputMaybe; + position_AVERAGE_GTE?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_LT?: InputMaybe; - position_AVERAGE_LT?: InputMaybe; position_MIN_LT?: InputMaybe; position_MAX_LT?: InputMaybe; position_SUM_LT?: InputMaybe; + position_AVERAGE_LT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_LTE?: InputMaybe; - position_AVERAGE_LTE?: InputMaybe; position_MIN_LTE?: InputMaybe; position_MAX_LTE?: InputMaybe; position_SUM_LTE?: InputMaybe; + position_AVERAGE_LTE?: InputMaybe; }; export type FaqEntriesFieldInput = { connectOrCreate?: InputMaybe>; - create?: InputMaybe>; connect?: InputMaybe>; + create?: InputMaybe>; }; export type FaqEntriesNodeAggregationWhereInput = { @@ -2400,11 +2400,11 @@ describe("generate", () => { export type FaqEntriesUpdateFieldInput = { where?: InputMaybe; connectOrCreate?: InputMaybe>; - create?: InputMaybe>; connect?: InputMaybe>; + disconnect?: InputMaybe>; + create?: InputMaybe>; update?: InputMaybe; delete?: InputMaybe>; - disconnect?: InputMaybe>; }; export type FaqEntryConnectInput = { @@ -2455,28 +2455,28 @@ describe("generate", () => { }; export type FaqEntryInFaQsConnectFieldInput = { - where?: InputMaybe; - connect?: InputMaybe>; edge?: InputMaybe; + where?: InputMaybe; /** Whether or not to overwrite any matching relationship with the new properties. */ overwrite?: Scalars[\\"Boolean\\"][\\"input\\"]; + connect?: InputMaybe>; }; export type FaqEntryInFaQsConnectionSort = { - edge?: InputMaybe; node?: InputMaybe; + edge?: InputMaybe; }; export type FaqEntryInFaQsConnectionWhere = { - AND?: InputMaybe>; OR?: InputMaybe>; + AND?: InputMaybe>; NOT?: InputMaybe; - edge?: InputMaybe; - /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ - edge_NOT?: InputMaybe; node?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ node_NOT?: InputMaybe; + edge?: InputMaybe; + /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ + edge_NOT?: InputMaybe; }; export type FaqEntryInFaQsConnectOrCreateFieldInput = { @@ -2490,8 +2490,8 @@ describe("generate", () => { }; export type FaqEntryInFaQsCreateFieldInput = { - node: FaqCreateInput; edge?: InputMaybe; + node: FaqCreateInput; }; export type FaqEntryInFaQsDeleteFieldInput = { @@ -2510,40 +2510,40 @@ describe("generate", () => { NOT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_EQUAL?: InputMaybe; - position_AVERAGE_EQUAL?: InputMaybe; position_MIN_EQUAL?: InputMaybe; position_MAX_EQUAL?: InputMaybe; position_SUM_EQUAL?: InputMaybe; + position_AVERAGE_EQUAL?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_GT?: InputMaybe; - position_AVERAGE_GT?: InputMaybe; position_MIN_GT?: InputMaybe; position_MAX_GT?: InputMaybe; position_SUM_GT?: InputMaybe; + position_AVERAGE_GT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_GTE?: InputMaybe; - position_AVERAGE_GTE?: InputMaybe; position_MIN_GTE?: InputMaybe; position_MAX_GTE?: InputMaybe; position_SUM_GTE?: InputMaybe; + position_AVERAGE_GTE?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_LT?: InputMaybe; - position_AVERAGE_LT?: InputMaybe; position_MIN_LT?: InputMaybe; position_MAX_LT?: InputMaybe; position_SUM_LT?: InputMaybe; + position_AVERAGE_LT?: InputMaybe; /** @deprecated Aggregation filters that are not relying on an aggregating function will be deprecated. */ position_LTE?: InputMaybe; - position_AVERAGE_LTE?: InputMaybe; position_MIN_LTE?: InputMaybe; position_MAX_LTE?: InputMaybe; position_SUM_LTE?: InputMaybe; + position_AVERAGE_LTE?: InputMaybe; }; export type FaqEntryInFaQsFieldInput = { connectOrCreate?: InputMaybe>; - create?: InputMaybe>; connect?: InputMaybe>; + create?: InputMaybe>; }; export type FaqEntryInFaQsNodeAggregationWhereInput = { @@ -2621,11 +2621,11 @@ describe("generate", () => { export type FaqEntryInFaQsUpdateFieldInput = { where?: InputMaybe; connectOrCreate?: InputMaybe>; - create?: InputMaybe>; connect?: InputMaybe>; + disconnect?: InputMaybe>; + create?: InputMaybe>; update?: InputMaybe; delete?: InputMaybe>; - disconnect?: InputMaybe>; }; export type FaqEntryInFaqUpdateInput = { @@ -2635,9 +2635,6 @@ describe("generate", () => { }; export type FaqEntryInFaqWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; position?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ position_NOT?: InputMaybe; @@ -2648,6 +2645,9 @@ describe("generate", () => { position_LTE?: InputMaybe; position_GT?: InputMaybe; position_GTE?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; }; export type FaqEntryOnCreateInput = { @@ -2656,10 +2656,10 @@ describe("generate", () => { }; export type FaqEntryOptions = { - /** Specify one or more FAQEntrySort objects to sort FaqEntries by. The sorts will be applied in the order in which they are arranged in the array. */ - sort?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** Specify one or more FAQEntrySort objects to sort FaqEntries by. The sorts will be applied in the order in which they are arranged in the array. */ + sort?: InputMaybe>; }; export type FaqEntryRelationInput = { @@ -2684,9 +2684,6 @@ describe("generate", () => { }; export type FaqEntryWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; id?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ id_NOT?: InputMaybe; @@ -2732,11 +2729,13 @@ describe("generate", () => { body_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ body_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; /** @deprecated Use \`inFAQs_SOME\` instead. */ inFAQs?: InputMaybe; /** @deprecated Use \`inFAQs_NONE\` instead. */ inFAQs_NOT?: InputMaybe; - inFAQsAggregate?: InputMaybe; /** Return FAQEntries where all of the related FAQS match this filter */ inFAQs_ALL?: InputMaybe; /** Return FAQEntries where none of the related FAQS match this filter */ @@ -2745,6 +2744,7 @@ describe("generate", () => { inFAQs_SINGLE?: InputMaybe; /** Return FAQEntries where some of the related FAQS match this filter */ inFAQs_SOME?: InputMaybe; + inFAQsAggregate?: InputMaybe; /** @deprecated Use \`inFAQsConnection_SOME\` instead. */ inFAQsConnection?: InputMaybe; /** @deprecated Use \`inFAQsConnection_NONE\` instead. */ @@ -2765,10 +2765,10 @@ describe("generate", () => { }; export type FaqOptions = { - /** Specify one or more FAQSort objects to sort Faqs by. The sorts will be applied in the order in which they are arranged in the array. */ - sort?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** Specify one or more FAQSort objects to sort Faqs by. The sorts will be applied in the order in which they are arranged in the array. */ + sort?: InputMaybe>; }; export type FaqRelationInput = { @@ -2793,9 +2793,6 @@ describe("generate", () => { }; export type FaqWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; id?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ id_NOT?: InputMaybe; @@ -2829,11 +2826,13 @@ describe("generate", () => { name_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; /** @deprecated Use \`entries_SOME\` instead. */ entries?: InputMaybe; /** @deprecated Use \`entries_NONE\` instead. */ entries_NOT?: InputMaybe; - entriesAggregate?: InputMaybe; /** Return FAQS where all of the related FAQEntries match this filter */ entries_ALL?: InputMaybe; /** Return FAQS where none of the related FAQEntries match this filter */ @@ -2842,6 +2841,7 @@ describe("generate", () => { entries_SINGLE?: InputMaybe; /** Return FAQS where some of the related FAQEntries match this filter */ entries_SOME?: InputMaybe; + entriesAggregate?: InputMaybe; /** @deprecated Use \`entriesConnection_SOME\` instead. */ entriesConnection?: InputMaybe; /** @deprecated Use \`entriesConnection_NONE\` instead. */ From 120e22f8ef63af0aa72d2f66841451bc457bfee9 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 11:29:49 +0200 Subject: [PATCH 139/162] docs: add changeset --- .changeset/great-toys-provide.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/great-toys-provide.md diff --git a/.changeset/great-toys-provide.md b/.changeset/great-toys-provide.md new file mode 100644 index 0000000000..9aa7b0cc20 --- /dev/null +++ b/.changeset/great-toys-provide.md @@ -0,0 +1,10 @@ +--- +"@neo4j/graphql": minor +"@neo4j/graphql-ogm": minor +--- + +Schema generation logic improved + +- allow operations on Interface relationships to Interfaces +- added descriptions to generated graphql types +- improved schema generation logic From ca06365a86c3271271ba9b5533c96db8a2303b9a Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 11:44:18 +0200 Subject: [PATCH 140/162] docs: use uniform tense in changeset --- .changeset/great-toys-provide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/great-toys-provide.md b/.changeset/great-toys-provide.md index 9aa7b0cc20..982ba29f3f 100644 --- a/.changeset/great-toys-provide.md +++ b/.changeset/great-toys-provide.md @@ -6,5 +6,5 @@ Schema generation logic improved - allow operations on Interface relationships to Interfaces -- added descriptions to generated graphql types -- improved schema generation logic +- add descriptions to generated graphql types +- improve schema generation logic From aeea37b81c4390417e4d9525c9cae82ee95728cc Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 12:05:49 +0200 Subject: [PATCH 141/162] test: update tck snapshots --- .../connections/filtering/composite.test.ts | 28 +++++------ .../delete/delete.test.ts | 50 +++++++++---------- .../interface-relationships/read.test.ts | 36 ++++++------- .../update/delete.test.ts | 50 +++++++++---------- .../update/disconnect.test.ts | 50 +++++++++---------- .../update/update.test.ts | 38 +++++++------- 6 files changed, 126 insertions(+), 126 deletions(-) diff --git a/packages/graphql/tests/tck/connections/filtering/composite.test.ts b/packages/graphql/tests/tck/connections/filtering/composite.test.ts index fcddb09f4b..be6eb2c94d 100644 --- a/packages/graphql/tests/tck/connections/filtering/composite.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/composite.test.ts @@ -17,10 +17,10 @@ * limitations under the License. */ -import { gql } from "graphql-tag"; import type { DocumentNode } from "graphql"; +import { gql } from "graphql-tag"; import { Neo4jGraphQL } from "../../../../src"; -import { formatCypher, translateQuery, formatParams } from "../../utils/tck-test-utils"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; describe("Cypher -> Connections -> Filtering -> Composite", () => { let typeDefs: DocumentNode; @@ -80,7 +80,7 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WHERE ((this0.screenTime > $param1 AND this0.screenTime < $param2) AND (this1.firstName = $param3 AND this1.lastName = $param4)) + WHERE ((this1.firstName = $param1 AND this1.lastName = $param2) AND (this0.screenTime > $param3 AND this0.screenTime < $param4)) WITH { screenTime: this0.screenTime, node: { firstName: this1.firstName, lastName: this1.lastName } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -92,16 +92,16 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"Forrest Gump\\", - \\"param1\\": { + \\"param1\\": \\"Tom\\", + \\"param2\\": \\"Hanks\\", + \\"param3\\": { \\"low\\": 30, \\"high\\": 0 }, - \\"param2\\": { + \\"param4\\": { \\"low\\": 90, \\"high\\": 0 - }, - \\"param3\\": \\"Tom\\", - \\"param4\\": \\"Hanks\\" + } }" `); }); @@ -137,7 +137,7 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WHERE (NOT (this0.screenTime < $param1 AND this0.screenTime > $param2) AND NOT (this1.firstName = $param3 AND this1.lastName = $param4)) + WHERE (NOT (this1.firstName = $param1 AND this1.lastName = $param2) AND NOT (this0.screenTime < $param3 AND this0.screenTime > $param4)) WITH { screenTime: this0.screenTime, node: { firstName: this1.firstName, lastName: this1.lastName } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -149,16 +149,16 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"Forrest Gump\\", - \\"param1\\": { + \\"param1\\": \\"Tom\\", + \\"param2\\": \\"Hanks\\", + \\"param3\\": { \\"low\\": 90, \\"high\\": 0 }, - \\"param2\\": { + \\"param4\\": { \\"low\\": 30, \\"high\\": 0 - }, - \\"param3\\": \\"Tom\\", - \\"param4\\": \\"Hanks\\" + } }" `); }); diff --git a/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts index c02bda532e..637b7b6456 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts @@ -203,6 +203,11 @@ describe("Interface Relationships - Delete delete", () => { \\"delete\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"delete\\": { \\"actors\\": [ { @@ -213,11 +218,6 @@ describe("Interface Relationships - Delete delete", () => { } } ] - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } } } ] @@ -299,6 +299,11 @@ describe("Interface Relationships - Delete delete", () => { \\"delete\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"delete\\": { \\"_on\\": { \\"Movie\\": [ @@ -315,11 +320,6 @@ describe("Interface Relationships - Delete delete", () => { } ] } - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } } } ] @@ -415,16 +415,12 @@ describe("Interface Relationships - Delete delete", () => { \\"delete\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"delete\\": { - \\"actors\\": [ - { - \\"where\\": { - \\"node\\": { - \\"name\\": \\"Actor\\" - } - } - } - ], \\"_on\\": { \\"Movie\\": [ { @@ -439,12 +435,16 @@ describe("Interface Relationships - Delete delete", () => { ] } ] - } - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } + }, + \\"actors\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name\\": \\"Actor\\" + } + } + } + ] } } ] diff --git a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts index 7980fdbe31..fe6932ec60 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts @@ -371,13 +371,13 @@ describe("Interface Relationships", () => { CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) - WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) + WHERE (this1.title STARTS WITH $param0 AND this0.screenTime > $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this MATCH (this)-[this2:ACTED_IN]->(this3:Series) - WHERE (this2.screenTime > $param2 AND this3.title STARTS WITH $param3) + WHERE (this3.title STARTS WITH $param2 AND this2.screenTime > $param3) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -390,16 +390,16 @@ describe("Interface Relationships", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": { + \\"param0\\": \\"The \\", + \\"param1\\": { \\"low\\": 60, \\"high\\": 0 }, - \\"param1\\": \\"The \\", - \\"param2\\": { + \\"param2\\": \\"The \\", + \\"param3\\": { \\"low\\": 60, \\"high\\": 0 - }, - \\"param3\\": \\"The \\" + } }" `); }); @@ -434,7 +434,7 @@ describe("Interface Relationships", () => { CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) - WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) + WHERE (this1.title STARTS WITH $param0 AND this0.screenTime > $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge } @@ -447,11 +447,11 @@ describe("Interface Relationships", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": { + \\"param0\\": \\"The \\", + \\"param1\\": { \\"low\\": 60, \\"high\\": 0 - }, - \\"param1\\": \\"The \\" + } }" `); }); @@ -492,13 +492,13 @@ describe("Interface Relationships", () => { CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) - WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) + WHERE (this1.title STARTS WITH $param0 AND this0.screenTime > $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this MATCH (this)-[this2:ACTED_IN]->(this3:Series) - WHERE (this2.screenTime > $param2 AND this3.title STARTS WITH $param3) + WHERE (this3.title STARTS WITH $param2 AND this2.screenTime > $param3) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -511,16 +511,16 @@ describe("Interface Relationships", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": { + \\"param0\\": \\"A \\", + \\"param1\\": { \\"low\\": 60, \\"high\\": 0 }, - \\"param1\\": \\"A \\", - \\"param2\\": { + \\"param2\\": \\"The \\", + \\"param3\\": { \\"low\\": 60, \\"high\\": 0 - }, - \\"param3\\": \\"The \\" + } }" `); }); diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts index acd920929b..496e3f4798 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts @@ -212,6 +212,11 @@ describe("Interface Relationships - Update delete", () => { \\"delete\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"delete\\": { \\"actors\\": [ { @@ -222,11 +227,6 @@ describe("Interface Relationships - Update delete", () => { } } ] - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } } } ] @@ -310,6 +310,11 @@ describe("Interface Relationships - Update delete", () => { \\"delete\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"delete\\": { \\"_on\\": { \\"Movie\\": [ @@ -326,11 +331,6 @@ describe("Interface Relationships - Update delete", () => { } ] } - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } } } ] @@ -430,16 +430,12 @@ describe("Interface Relationships - Update delete", () => { \\"delete\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"delete\\": { - \\"actors\\": [ - { - \\"where\\": { - \\"node\\": { - \\"name\\": \\"Actor\\" - } - } - } - ], \\"_on\\": { \\"Movie\\": [ { @@ -454,12 +450,16 @@ describe("Interface Relationships - Update delete", () => { ] } ] - } - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } + }, + \\"actors\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name\\": \\"Actor\\" + } + } + } + ] } } ] diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts index 1189a8b0e1..02ca10cdac 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts @@ -213,6 +213,11 @@ describe("Interface Relationships - Update disconnect", () => { \\"disconnect\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"disconnect\\": { \\"actors\\": [ { @@ -223,11 +228,6 @@ describe("Interface Relationships - Update disconnect", () => { } } ] - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } } } ] @@ -312,6 +312,11 @@ describe("Interface Relationships - Update disconnect", () => { \\"disconnect\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"disconnect\\": { \\"_on\\": { \\"Movie\\": [ @@ -328,11 +333,6 @@ describe("Interface Relationships - Update disconnect", () => { } ] } - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } } } ] @@ -433,16 +433,12 @@ describe("Interface Relationships - Update disconnect", () => { \\"disconnect\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title_STARTS_WITH\\": \\"The \\" + } + }, \\"disconnect\\": { - \\"actors\\": [ - { - \\"where\\": { - \\"node\\": { - \\"name\\": \\"Actor\\" - } - } - } - ], \\"_on\\": { \\"Movie\\": [ { @@ -457,12 +453,16 @@ describe("Interface Relationships - Update disconnect", () => { ] } ] - } - }, - \\"where\\": { - \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" - } + }, + \\"actors\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name\\": \\"Actor\\" + } + } + } + ] } } ] 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 21128b2114..cbf3dd0edc 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 @@ -116,14 +116,14 @@ describe("Interface Relationships - Update update", () => { \\"update\\": { \\"actedIn\\": [ { - \\"update\\": { + \\"where\\": { \\"node\\": { - \\"title\\": \\"New Title\\" + \\"title\\": \\"Old Title\\" } }, - \\"where\\": { + \\"update\\": { \\"node\\": { - \\"title\\": \\"Old Title\\" + \\"title\\": \\"New Title\\" } } } @@ -207,6 +207,11 @@ describe("Interface Relationships - Update update", () => { \\"update\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title\\": \\"Old Title\\" + } + }, \\"update\\": { \\"node\\": { \\"actors\\": [ @@ -219,11 +224,6 @@ describe("Interface Relationships - Update update", () => { } ] } - }, - \\"where\\": { - \\"node\\": { - \\"title\\": \\"Old Title\\" - } } } ] @@ -301,6 +301,11 @@ describe("Interface Relationships - Update update", () => { \\"update\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title\\": \\"Old Title\\" + } + }, \\"update\\": { \\"node\\": { \\"_on\\": { @@ -317,11 +322,6 @@ describe("Interface Relationships - Update update", () => { } } } - }, - \\"where\\": { - \\"node\\": { - \\"title\\": \\"Old Title\\" - } } } ] @@ -410,6 +410,11 @@ describe("Interface Relationships - Update update", () => { \\"update\\": { \\"actedIn\\": [ { + \\"where\\": { + \\"node\\": { + \\"title\\": \\"Old Title\\" + } + }, \\"update\\": { \\"node\\": { \\"_on\\": { @@ -435,11 +440,6 @@ describe("Interface Relationships - Update update", () => { } ] } - }, - \\"where\\": { - \\"node\\": { - \\"title\\": \\"Old Title\\" - } } } ] From 35d1e1fad0b0b1ac5f04afb6cd9946d5565f5a33 Mon Sep 17 00:00:00 2001 From: a-alle Date: Wed, 27 Sep 2023 11:15:16 +0100 Subject: [PATCH 142/162] cleanup --- .../model-adapters/AttributeAdapter.ts | 33 ---------- .../model-adapters/ConcreteEntityAdapter.ts | 7 --- .../model-adapters/RelationshipOperations.ts | 5 +- .../augment/add-relationship-array-filters.ts | 63 ------------------- .../src/schema/generation/object-type.ts | 3 +- .../src/schema/make-augmented-schema.test.ts | 44 ------------- 6 files changed, 4 insertions(+), 151 deletions(-) delete mode 100644 packages/graphql/src/schema/augment/add-relationship-array-filters.ts diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index c3ea38ad17..8d530d4cad 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -495,39 +495,6 @@ export class AttributeAdapter { isCustomResolvable(): boolean { return !!this.annotations.customResolver; } - - isPartOfUpdateInputType(): boolean { - if (this.isScalar() || this.isEnum() || this.isSpatial()) { - return true; - } - if (this.isGraphQLBuiltInScalar()) { - const isAutogenerated = !!this.annotations.id; - const isCallback = !!this.annotations.populatedBy; - return !isAutogenerated && !isCallback; // && !readonly - } - if (this.isTemporal()) { - return !this.annotations.timestamp; - } - return false; - } - - isPartOfCreateInputType(): boolean { - if (this.isScalar() || this.isEnum() || this.isSpatial() || this.isTemporal()) { - return true; - } - if (this.isGraphQLBuiltInScalar()) { - const isAutogenerated = !!this.annotations.id; - const isCallback = !!this.annotations.populatedBy; - return !isAutogenerated && !isCallback; - } - return false; - } - - isPartOfWhereInputType(): boolean { - return ( - this.isScalar() || this.isEnum() || this.isTemporal() || this.isSpatial() || this.isGraphQLBuiltInScalar() - ); - } } type InputTypeNames = Record<"where" | "create" | "update", { type: string; pretty: string }>; diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts index beca0acb00..bb2e4d0500 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts @@ -149,13 +149,6 @@ export class ConcreteEntityAdapter { public get onCreateInputFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isOnCreateField()); } - // public get scalarFields(): AttributeAdapter[] { - // return Array.from(this.attributes.values()).filter((attribute) => attribute.isScalarField()); - // } - - // public get enumFields(): AttributeAdapter[] { - // return Array.from(this.attributes.values()).filter((attribute) => attribute.isEnumField()); - // } public get temporalFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isTemporal()); diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts index b8286e5528..11ebaf126b 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts @@ -45,10 +45,9 @@ export class RelationshipOperations { } public get prefixForTypename(): string { - // TODO: if relationship field is inherited by source (part of a implemented Interface, not necessarily annotated as rel) + // if relationship field is inherited by source + // (part of a implemented Interface, not necessarily annotated as rel) // then return this.interface.name - // TODO: how to get implemented interfaces here?? - // console.log(this.inheritedFrom, this.source.name, this.name); return this.relationshipEntityAdapter.inheritedFrom || this.relationshipEntityAdapter.source.name; } diff --git a/packages/graphql/src/schema/augment/add-relationship-array-filters.ts b/packages/graphql/src/schema/augment/add-relationship-array-filters.ts deleted file mode 100644 index 999da9c93d..0000000000 --- a/packages/graphql/src/schema/augment/add-relationship-array-filters.ts +++ /dev/null @@ -1,63 +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, InputTypeComposer } from "graphql-compose"; -import pluralize from "pluralize"; -import { DEPRECATED } from "../../constants"; - -export function addRelationshipArrayFilters({ - whereInput, - fieldName, - sourceName, - relatedType, - whereType, - directives, -}: { - whereInput: InputTypeComposer; - fieldName: string; - sourceName: string; - relatedType: string; - whereType: InputTypeComposer | string; - directives: Directive[]; -}) { - whereInput.addFields( - (["ALL", "NONE", "SINGLE", "SOME"] as const).reduce( - (acc, filter) => ({ - ...acc, - [`${fieldName}_${filter}`]: { - type: whereType, - directives: directives, - // e.g. "Return Movies where all of the related Actors match this filter" - description: `Return ${pluralize(sourceName)} where ${ - filter !== "SINGLE" ? filter.toLowerCase() : "one" - } of the related ${pluralize(relatedType)} match this filter`, - }, - }), - {} - ) - ); - - whereInput.setFieldDirectiveByName(fieldName, DEPRECATED, { - reason: `Use \`${fieldName}_SOME\` instead.`, - }); - - whereInput.setFieldDirectiveByName(`${fieldName}_NOT`, DEPRECATED, { - reason: `Use \`${fieldName}_NONE\` instead.`, - }); -} diff --git a/packages/graphql/src/schema/generation/object-type.ts b/packages/graphql/src/schema/generation/object-type.ts index cdc90d110e..6c79ebbba8 100644 --- a/packages/graphql/src/schema/generation/object-type.ts +++ b/packages/graphql/src/schema/generation/object-type.ts @@ -18,7 +18,7 @@ */ import type { DirectiveNode } from "graphql"; import { GraphQLID, GraphQLNonNull } from "graphql"; -import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; +import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import { InterfaceEntity } from "../../schema-model/entity/InterfaceEntity"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "../to-compose"; @@ -55,6 +55,7 @@ export function withObjectType({ return concreteEntityAdapter.toGlobalId(value.toString()); }, }); + composeNode.addInterface("Node"); } return composeNode; diff --git a/packages/graphql/src/schema/make-augmented-schema.test.ts b/packages/graphql/src/schema/make-augmented-schema.test.ts index a0c53fc3c0..4c74cda985 100644 --- a/packages/graphql/src/schema/make-augmented-schema.test.ts +++ b/packages/graphql/src/schema/make-augmented-schema.test.ts @@ -305,48 +305,4 @@ describe("makeAugmentedSchema", () => { ); }); }); - - describe("@unique", () => { - test.skip("should throw error if @unique is used on relationship property", () => { - const typeDefs = gql` - type Movie { - actors: Actor! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") - } - - type Actor { - name: String - } - - interface ActedIn @relationshipProperties { - id: ID @unique - roles: [String] - } - `; - - const schemaModel = generateModel(mergeTypeDefs(typeDefs)); - expect(() => makeAugmentedSchema(typeDefs, {}, schemaModel)).toThrow( - "@unique directive cannot be used on interface type fields: ActedIn.id" - ); - }); - - // TODO: validation PR - test.skip("should throw error if @unique is used on interface field", () => { - const typeDefs = gql` - interface Production { - id: ID! @unique - title: String! - } - - type Movie implements Production { - id: ID! - title: String! - } - `; - - const schemaModel = generateModel(mergeTypeDefs(typeDefs)); - expect(() => makeAugmentedSchema(typeDefs, {}, schemaModel)).toThrow( - "@unique directive cannot be used on interface type fields: Production.id" - ); - }); - }); }); From 762df8c13a6abef49113a39ded9561de6ba26ead Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 12:23:25 +0200 Subject: [PATCH 143/162] fix: remove unused import --- packages/graphql/src/schema/generation/object-type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graphql/src/schema/generation/object-type.ts b/packages/graphql/src/schema/generation/object-type.ts index 6c79ebbba8..47c1df1052 100644 --- a/packages/graphql/src/schema/generation/object-type.ts +++ b/packages/graphql/src/schema/generation/object-type.ts @@ -18,7 +18,7 @@ */ import type { DirectiveNode } from "graphql"; import { GraphQLID, GraphQLNonNull } from "graphql"; -import type { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; +import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; import { InterfaceEntity } from "../../schema-model/entity/InterfaceEntity"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "../to-compose"; From 0b0d3fe437480455d6be9c5135aad4acc5b16b2d Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 13:47:02 +0200 Subject: [PATCH 144/162] test: update tck snapshots --- .../relationship_properties/create.test.ts | 6 +- .../tests/tck/directives/alias.test.ts | 8 +- .../implementation-allow.test.ts | 10 +- .../implementation-bind.test.ts | 10 +- .../graphql/tests/tck/issues/1783.test.ts | 10 +- .../graphql/tests/tck/issues/2249.test.ts | 12 +- .../graphql/tests/tck/issues/2803.test.ts | 166 +++++++++--------- packages/graphql/tests/tck/issues/901.test.ts | 10 +- packages/graphql/tests/tck/issues/988.test.ts | 14 +- .../batch/batch-create-auth.test.ts | 12 +- .../batch/batch-create-fields.test.ts | 24 +-- .../tck/operations/batch/batch-create.test.ts | 24 +-- .../tests/tck/operations/update.test.ts | 12 +- .../tests/tck/subscriptions/create.test.ts | 20 +-- packages/graphql/tests/tck/where.test.ts | 8 +- 15 files changed, 170 insertions(+), 176 deletions(-) diff --git a/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts index 03c418b43e..9f4e43789e 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts @@ -117,14 +117,14 @@ describe("Relationship Properties Create Cypher", () => { \\"actors\\": { \\"create\\": [ { - \\"node\\": { - \\"name\\": \\"Tom Hanks\\" - }, \\"edge\\": { \\"screenTime\\": { \\"low\\": 60, \\"high\\": 0 } + }, + \\"node\\": { + \\"name\\": \\"Tom Hanks\\" } } ] diff --git a/packages/graphql/tests/tck/directives/alias.test.ts b/packages/graphql/tests/tck/directives/alias.test.ts index 58d1e4daf3..93a75dff91 100644 --- a/packages/graphql/tests/tck/directives/alias.test.ts +++ b/packages/graphql/tests/tck/directives/alias.test.ts @@ -210,16 +210,16 @@ describe("Cypher alias directive", () => { \\"actedIn\\": { \\"create\\": [ { - \\"node\\": { - \\"title\\": \\"Molly's game\\", - \\"rating\\": 5 - }, \\"edge\\": { \\"character\\": \\"Molly\\", \\"screenTime\\": { \\"low\\": 120, \\"high\\": 0 } + }, + \\"node\\": { + \\"title\\": \\"Molly's game\\", + \\"rating\\": 5 } } ] 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 5a79a5e0ea..26247dcfa8 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 @@ -564,6 +564,11 @@ describe("@auth allow on specific interface implementation", () => { \\"disconnect\\": { \\"content\\": [ { + \\"where\\": { + \\"node\\": { + \\"id\\": \\"post-id\\" + } + }, \\"disconnect\\": { \\"_on\\": { \\"Post\\": [ @@ -580,11 +585,6 @@ describe("@auth allow on specific interface implementation", () => { } ] } - }, - \\"where\\": { - \\"node\\": { - \\"id\\": \\"post-id\\" - } } } ] diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/bind/interface-relationships/implementation-bind.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/bind/interface-relationships/implementation-bind.test.ts index eb72504078..babf9cd759 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/bind/interface-relationships/implementation-bind.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/bind/interface-relationships/implementation-bind.test.ts @@ -358,6 +358,11 @@ describe("Cypher Auth Allow", () => { \\"update\\": { \\"content\\": [ { + \\"where\\": { + \\"node\\": { + \\"id\\": \\"post-id\\" + } + }, \\"update\\": { \\"node\\": { \\"creator\\": { @@ -368,11 +373,6 @@ describe("Cypher Auth Allow", () => { } } } - }, - \\"where\\": { - \\"node\\": { - \\"id\\": \\"post-id\\" - } } } ] diff --git a/packages/graphql/tests/tck/issues/1783.test.ts b/packages/graphql/tests/tck/issues/1783.test.ts index eea6675254..e898dd519b 100644 --- a/packages/graphql/tests/tck/issues/1783.test.ts +++ b/packages/graphql/tests/tck/issues/1783.test.ts @@ -121,7 +121,7 @@ describe("https://github.com/neo4j/graphql/issues/1783", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Series) - WHERE (this.current = $param0 AND single(this3 IN [(this)-[this0:ARCHITECTURE]->(this3:MasterData) WHERE (this0.current = $param1 AND single(this2 IN [(this3)-[this1:HAS_NAME]->(this2:NameDetails) WHERE (this1.current = $param2 AND this2.fullName = $param3) | 1] WHERE true)) | 1] WHERE true) AND single(this5 IN [(this)-[this4:HAS_NAME]->(this5:NameDetails) WHERE (this4.current = $param4 AND this5.fullName CONTAINS $param5) | 1] WHERE true)) + WHERE (this.current = $param0 AND single(this2 IN [(this)-[this3:ARCHITECTURE]->(this2:MasterData) WHERE (single(this0 IN [(this2)-[this1:HAS_NAME]->(this0:NameDetails) WHERE (this0.fullName = $param1 AND this1.current = $param2) | 1] WHERE true) AND this3.current = $param3) | 1] WHERE true) AND single(this4 IN [(this)-[this5:HAS_NAME]->(this4:NameDetails) WHERE (this4.fullName CONTAINS $param4 AND this5.current = $param5) | 1] WHERE true)) CALL { WITH this MATCH (this)-[this6:HAS_NAME]->(this7:NameDetails) @@ -155,11 +155,11 @@ describe("https://github.com/neo4j/graphql/issues/1783", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": true, - \\"param1\\": true, + \\"param1\\": \\"MHA\\", \\"param2\\": true, - \\"param3\\": \\"MHA\\", - \\"param4\\": true, - \\"param5\\": \\"1\\", + \\"param3\\": true, + \\"param4\\": \\"1\\", + \\"param5\\": true, \\"param6\\": true, \\"param7\\": true, \\"param8\\": true diff --git a/packages/graphql/tests/tck/issues/2249.test.ts b/packages/graphql/tests/tck/issues/2249.test.ts index f00ec5f2a6..c18ea7e1af 100644 --- a/packages/graphql/tests/tck/issues/2249.test.ts +++ b/packages/graphql/tests/tck/issues/2249.test.ts @@ -140,6 +140,12 @@ describe("https://github.com/neo4j/graphql/issues/2249", () => { { \\"create\\": [ { + \\"edge\\": { + \\"score\\": { + \\"low\\": 10, + \\"high\\": 0 + } + }, \\"node\\": { \\"Person\\": { \\"name\\": \\"Ana\\", @@ -148,12 +154,6 @@ describe("https://github.com/neo4j/graphql/issues/2249", () => { \\"high\\": 0 } } - }, - \\"edge\\": { - \\"score\\": { - \\"low\\": 10, - \\"high\\": 0 - } } } ] diff --git a/packages/graphql/tests/tck/issues/2803.test.ts b/packages/graphql/tests/tck/issues/2803.test.ts index c55a99bf78..449d6f970a 100644 --- a/packages/graphql/tests/tck/issues/2803.test.ts +++ b/packages/graphql/tests/tck/issues/2803.test.ts @@ -132,35 +132,35 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) - RETURN count(this2) = $param0 AS var3 - } - CALL { - WITH this0 - MATCH (this0)<-[:ACTED_IN]-(this4:Actor) + MATCH (this0)<-[:ACTED_IN]-(this1:Actor) CALL { - WITH this4 - MATCH (this4)-[this5:ACTED_IN]->(this6:Movie) - RETURN count(this6) > $param1 AS var7 + WITH this1 + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) + RETURN count(this3) > $param0 AS var4 } WITH * - WHERE var7 = true - RETURN count(this4) > 0 AS var8 + WHERE var4 = true + RETURN count(this1) > 0 AS var5 } CALL { WITH this0 - MATCH (this0)<-[:ACTED_IN]-(this4:Actor) + MATCH (this0)<-[:ACTED_IN]-(this1:Actor) CALL { - WITH this4 - MATCH (this4)-[this9:ACTED_IN]->(this10:Movie) - RETURN count(this10) > $param2 AS var11 + WITH this1 + MATCH (this1)-[this6:ACTED_IN]->(this7:Movie) + RETURN count(this7) > $param1 AS var8 } WITH * - WHERE NOT (var11 = true) - RETURN count(this4) > 0 AS var12 + WHERE NOT (var8 = true) + RETURN count(this1) > 0 AS var9 + } + CALL { + WITH this0 + MATCH (this0)<-[this10:ACTED_IN]-(this11:Actor) + RETURN count(this11) = $param2 AS var12 } WITH * - WHERE (var3 = true AND (var12 = false AND var8 = true)) + WHERE ((var9 = false AND var5 = true) AND var12 = true) RETURN count(this0) > 0 AS var13 } WITH * @@ -282,75 +282,75 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - RETURN avg(size(this1.name)) >= $param0 AS var2 - } - CALL { - WITH this - MATCH (this)<-[:ACTED_IN]-(this3:Actor) - CALL { - WITH this3 - MATCH (this3)-[this4:ACTED_IN]->(this5:Movie) - RETURN avg(this5.released) = $param1 AS var6 - } + MATCH (this)<-[:ACTED_IN]-(this0:Actor) CALL { - WITH this3 - MATCH (this3)-[:ACTED_IN]->(this7:Movie) - CALL { - WITH this7 - MATCH (this7)<-[this8:ACTED_IN]-(this9:Actor) - RETURN avg(size(this9.name)) < $param2 AS var10 - } + WITH this0 + MATCH (this0)-[:ACTED_IN]->(this1:Movie) CALL { - WITH this7 - MATCH (this7)<-[:ACTED_IN]-(this11:Actor) + WITH this1 + MATCH (this1)<-[:ACTED_IN]-(this2:Actor) CALL { - WITH this11 - MATCH (this11)-[this12:ACTED_IN]->(this13:Movie) - RETURN count(this13) > $param3 AS var14 + WITH this2 + MATCH (this2)-[this3:ACTED_IN]->(this4:Movie) + RETURN count(this4) > $param0 AS var5 } WITH * - WHERE var14 = true - RETURN count(this11) > 0 AS var15 + WHERE var5 = true + RETURN count(this2) > 0 AS var6 } CALL { - WITH this7 - MATCH (this7)<-[:ACTED_IN]-(this11:Actor) + WITH this1 + MATCH (this1)<-[:ACTED_IN]-(this2:Actor) CALL { - WITH this11 - MATCH (this11)-[this16:ACTED_IN]->(this17:Movie) - RETURN count(this17) > $param4 AS var18 + WITH this2 + MATCH (this2)-[this7:ACTED_IN]->(this8:Movie) + RETURN count(this8) > $param1 AS var9 } WITH * - WHERE NOT (var18 = true) - RETURN count(this11) > 0 AS var19 + WHERE NOT (var9 = true) + RETURN count(this2) > 0 AS var10 + } + CALL { + WITH this1 + MATCH (this1)<-[this11:ACTED_IN]-(this12:Actor) + RETURN avg(size(this12.name)) < $param2 AS var13 } WITH * - WHERE (var10 = true AND (var19 = false AND var15 = true)) - RETURN count(this7) > 0 AS var20 + WHERE ((var10 = false AND var6 = true) AND var13 = true) + RETURN count(this1) > 0 AS var14 + } + CALL { + WITH this0 + MATCH (this0)-[this15:ACTED_IN]->(this16:Movie) + RETURN avg(this16.released) = $param3 AS var17 } WITH * - WHERE (var6 = true AND var20 = true) - RETURN count(this3) = 1 AS var21 + WHERE (var14 = true AND var17 = true) + RETURN count(this0) = 1 AS var18 + } + CALL { + WITH this + MATCH (this)<-[this19:ACTED_IN]-(this20:Actor) + RETURN avg(size(this20.name)) >= $param4 AS var21 } WITH * - WHERE (var2 = true AND var21 = true) + WHERE (var18 = true AND var21 = true) RETURN this { .released } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": 3, - \\"param1\\": 25, - \\"param2\\": 10, - \\"param3\\": { + \\"param0\\": { \\"low\\": 1, \\"high\\": 0 }, - \\"param4\\": { + \\"param1\\": { \\"low\\": 1, \\"high\\": 0 - } + }, + \\"param2\\": 10, + \\"param3\\": 25, + \\"param4\\": 3 }" `); }); @@ -903,23 +903,23 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) - RETURN avg(this1.screenTime) <= $param0 AS var3 - } - CALL { - WITH this0 - MATCH (this0)<-[:ACTED_IN]-(this4:Actor) + MATCH (this0)<-[:ACTED_IN]-(this1:Actor) CALL { - WITH this4 - MATCH (this4)-[this5:ACTED_IN]->(this6:Movie) - RETURN avg(this5.screenTime) <= $param1 AS var7 + WITH this1 + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) + RETURN avg(this2.screenTime) <= $param0 AS var4 } WITH * - WHERE var7 = true - RETURN count(this4) > 0 AS var8 + WHERE var4 = true + RETURN count(this1) > 0 AS var5 + } + CALL { + WITH this0 + MATCH (this0)<-[this6:ACTED_IN]-(this7:Actor) + RETURN avg(this6.screenTime) <= $param1 AS var8 } WITH * - WHERE (var3 = true AND var8 = false) + WHERE (var5 = false AND var8 = true) RETURN count(this0) = 1 AS var9 } WITH * @@ -972,11 +972,11 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { RETURN count(this5) > $param0 AS var6 } WITH * - WHERE ($param1 IN this2.roles AND var6 = true) + WHERE (var6 = true AND $param1 IN this2.roles) RETURN count(this3) > 0 AS var7 } WITH * - WHERE ($param2 IN this0.roles AND var7 = false) + WHERE (var7 = false AND $param2 IN this0.roles) RETURN count(this1) = 1 AS var8 } WITH * @@ -1032,7 +1032,7 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { RETURN count(this5) > $param0 AS var6 } WITH * - WHERE ($param1 IN this2.roles AND (this3.name = $param2 AND var6 = true)) + WHERE ((this3.name = $param1 AND var6 = true) AND $param2 IN this2.roles) RETURN count(this3) > 0 AS var7 } WITH * @@ -1050,8 +1050,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { \\"low\\": 1, \\"high\\": 0 }, - \\"param1\\": \\"actor role\\", - \\"param2\\": \\"actor name\\" + \\"param1\\": \\"actor name\\", + \\"param2\\": \\"actor role\\" }" `); }); @@ -1324,11 +1324,11 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { RETURN count(this5) > $param0 AS var6 } WITH * - WHERE ($param1 IN this2.roles AND var6 = true) + WHERE (var6 = true AND $param1 IN this2.roles) RETURN count(this3) > 0 AS var7 } WITH * - WHERE ($param2 IN this0.roles AND var7 = false) + WHERE (var7 = false AND $param2 IN this0.roles) RETURN count(this1) = 1 AS var8 } WITH * @@ -1387,7 +1387,7 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { RETURN count(this5) > $param0 AS var6 } WITH * - WHERE ($param1 IN this2.roles AND (this3.name = $param2 AND var6 = true)) + WHERE ((this3.name = $param1 AND var6 = true) AND $param2 IN this2.roles) RETURN count(this3) > 0 AS var7 } WITH * @@ -1405,8 +1405,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { \\"low\\": 1, \\"high\\": 0 }, - \\"param1\\": \\"some-role\\", - \\"param2\\": \\"a name\\" + \\"param1\\": \\"a name\\", + \\"param2\\": \\"some-role\\" }" `); }); diff --git a/packages/graphql/tests/tck/issues/901.test.ts b/packages/graphql/tests/tck/issues/901.test.ts index 4825053993..e0f28afe1e 100644 --- a/packages/graphql/tests/tck/issues/901.test.ts +++ b/packages/graphql/tests/tck/issues/901.test.ts @@ -91,7 +91,7 @@ describe("https://github.com/neo4j/graphql/issues/901", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Series) - WHERE (single(this1 IN [(this)-[this0:HAS_MANUFACTURER]->(this1:Series) WHERE (this0.current = $param0 AND this1.name = $param1) | 1] WHERE true) OR single(this3 IN [(this)-[this2:HAS_BRAND]->(this3:Series) WHERE (this2.current = $param2 AND this3.name = $param3) | 1] WHERE true)) + WHERE (single(this0 IN [(this)-[this1:HAS_MANUFACTURER]->(this0:Series) WHERE (this0.name = $param0 AND this1.current = $param1) | 1] WHERE true) OR single(this2 IN [(this)-[this3:HAS_BRAND]->(this2:Series) WHERE (this2.name = $param2 AND this3.current = $param3) | 1] WHERE true)) CALL { WITH this MATCH (this)-[this4:HAS_BRAND]->(this5:Series) @@ -109,10 +109,10 @@ describe("https://github.com/neo4j/graphql/issues/901", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": true, - \\"param1\\": \\"abc\\", - \\"param2\\": true, - \\"param3\\": \\"smart\\" + \\"param0\\": \\"abc\\", + \\"param1\\": true, + \\"param2\\": \\"smart\\", + \\"param3\\": true }" `); }); diff --git a/packages/graphql/tests/tck/issues/988.test.ts b/packages/graphql/tests/tck/issues/988.test.ts index 14a57c4d64..60547daece 100644 --- a/packages/graphql/tests/tck/issues/988.test.ts +++ b/packages/graphql/tests/tck/issues/988.test.ts @@ -132,16 +132,16 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Series) - WHERE (((EXISTS { + WHERE (this.current = $param0 AND ((EXISTS { MATCH (this)-[this0:MANUFACTURER]->(this1:Manufacturer) - WHERE (this0.current = $param0 AND this1.name = $param1) + WHERE (this1.name = $param1 AND this0.current = $param2) } OR EXISTS { MATCH (this)-[this2:MANUFACTURER]->(this3:Manufacturer) - WHERE (this2.current = $param2 AND this3.name = $param3) + WHERE (this3.name = $param3 AND this2.current = $param4) }) AND EXISTS { MATCH (this)-[this4:BRAND]->(this5:Brand) - WHERE (this4.current = $param4 AND this5.name = $param5) - }) AND this.current = $param6) + WHERE (this5.name = $param5 AND this4.current = $param6) + })) CALL { WITH this MATCH (this)-[this6:MANUFACTURER]->(this7:Manufacturer) @@ -164,9 +164,9 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { "{ \\"param0\\": true, \\"param1\\": \\"C\\", - \\"param2\\": false, + \\"param2\\": true, \\"param3\\": \\"AM\\", - \\"param4\\": true, + \\"param4\\": false, \\"param5\\": \\"smart\\", \\"param6\\": true }" diff --git a/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts index 4f7e6d38d1..a3c89f311d 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts @@ -209,14 +209,14 @@ describe("Batch Create, Auth", () => { \\"actors\\": { \\"create\\": [ { - \\"node\\": { - \\"name\\": \\"actor 1\\" - }, \\"edge\\": { \\"year\\": { \\"low\\": 2022, \\"high\\": 0 } + }, + \\"node\\": { + \\"name\\": \\"actor 1\\" } } ] @@ -227,14 +227,14 @@ describe("Batch Create, Auth", () => { \\"actors\\": { \\"create\\": [ { - \\"node\\": { - \\"name\\": \\"actor 2\\" - }, \\"edge\\": { \\"year\\": { \\"low\\": 2022, \\"high\\": 0 } + }, + \\"node\\": { + \\"name\\": \\"actor 2\\" } } ] diff --git a/packages/graphql/tests/tck/operations/batch/batch-create-fields.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create-fields.test.ts index e83b2388ab..32bc40bbca 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create-fields.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create-fields.test.ts @@ -237,6 +237,12 @@ describe("Batch Create, Scalar types", () => { \\"actors\\": { \\"create\\": [ { + \\"edge\\": { + \\"year\\": { + \\"low\\": 2022, + \\"high\\": 0 + } + }, \\"node\\": { \\"name\\": \\"actor 1\\", \\"website\\": { @@ -246,12 +252,6 @@ describe("Batch Create, Scalar types", () => { } } } - }, - \\"edge\\": { - \\"year\\": { - \\"low\\": 2022, - \\"high\\": 0 - } } } ] @@ -352,14 +352,14 @@ describe("Batch Create, Scalar types", () => { \\"actors\\": { \\"create\\": [ { - \\"node\\": { - \\"name\\": \\"actor 1\\" - }, \\"edge\\": { \\"year\\": { \\"low\\": 2022, \\"high\\": 0 } + }, + \\"node\\": { + \\"name\\": \\"actor 1\\" } } ] @@ -370,14 +370,14 @@ describe("Batch Create, Scalar types", () => { \\"actors\\": { \\"create\\": [ { - \\"node\\": { - \\"name\\": \\"actor 1\\" - }, \\"edge\\": { \\"year\\": { \\"low\\": 2022, \\"high\\": 0 } + }, + \\"node\\": { + \\"name\\": \\"actor 1\\" } } ] diff --git a/packages/graphql/tests/tck/operations/batch/batch-create.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create.test.ts index 509d8e05d2..064b8b9c04 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create.test.ts @@ -206,6 +206,12 @@ describe("Batch Create", () => { \\"actors\\": { \\"create\\": [ { + \\"edge\\": { + \\"year\\": { + \\"low\\": 2022, + \\"high\\": 0 + } + }, \\"node\\": { \\"name\\": \\"actor 1\\", \\"website\\": { @@ -215,12 +221,6 @@ describe("Batch Create", () => { } } } - }, - \\"edge\\": { - \\"year\\": { - \\"low\\": 2022, - \\"high\\": 0 - } } } ] @@ -319,14 +319,14 @@ describe("Batch Create", () => { \\"actors\\": { \\"create\\": [ { - \\"node\\": { - \\"name\\": \\"actor 1\\" - }, \\"edge\\": { \\"year\\": { \\"low\\": 2022, \\"high\\": 0 } + }, + \\"node\\": { + \\"name\\": \\"actor 1\\" } } ] @@ -337,14 +337,14 @@ describe("Batch Create", () => { \\"actors\\": { \\"create\\": [ { - \\"node\\": { - \\"name\\": \\"actor 1\\" - }, \\"edge\\": { \\"year\\": { \\"low\\": 2022, \\"high\\": 0 } + }, + \\"node\\": { + \\"name\\": \\"actor 1\\" } } ] diff --git a/packages/graphql/tests/tck/operations/update.test.ts b/packages/graphql/tests/tck/operations/update.test.ts index b46cdd0368..5d6e4f5de0 100644 --- a/packages/graphql/tests/tck/operations/update.test.ts +++ b/packages/graphql/tests/tck/operations/update.test.ts @@ -675,7 +675,7 @@ describe("Cypher Update", () => { CALL { WITH * OPTIONAL MATCH (this)<-[this_delete_actors0_relationship:ACTED_IN]-(this_delete_actors0:Actor) - WHERE (this_delete_actors0_relationship.screenTime = $updateMovies_args_delete_actors0_where_this_delete_actors0param0 AND this_delete_actors0.name = $updateMovies_args_delete_actors0_where_this_delete_actors0param1) + WHERE (this_delete_actors0.name = $updateMovies_args_delete_actors0_where_this_delete_actors0param0 AND this_delete_actors0_relationship.screenTime = $updateMovies_args_delete_actors0_where_this_delete_actors0param1) WITH this_delete_actors0_relationship, collect(DISTINCT this_delete_actors0) AS this_delete_actors0_to_delete CALL { WITH this_delete_actors0_to_delete @@ -690,25 +690,25 @@ describe("Cypher Update", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"updateMovies_args_delete_actors0_where_this_delete_actors0param0\\": { + \\"updateMovies_args_delete_actors0_where_this_delete_actors0param0\\": \\"Actor to delete\\", + \\"updateMovies_args_delete_actors0_where_this_delete_actors0param1\\": { \\"low\\": 60, \\"high\\": 0 }, - \\"updateMovies_args_delete_actors0_where_this_delete_actors0param1\\": \\"Actor to delete\\", \\"updateMovies\\": { \\"args\\": { \\"delete\\": { \\"actors\\": [ { \\"where\\": { + \\"node\\": { + \\"name\\": \\"Actor to delete\\" + }, \\"edge\\": { \\"screenTime\\": { \\"low\\": 60, \\"high\\": 0 } - }, - \\"node\\": { - \\"name\\": \\"Actor to delete\\" } } } diff --git a/packages/graphql/tests/tck/subscriptions/create.test.ts b/packages/graphql/tests/tck/subscriptions/create.test.ts index 3bb69cb437..c3b7256380 100644 --- a/packages/graphql/tests/tck/subscriptions/create.test.ts +++ b/packages/graphql/tests/tck/subscriptions/create.test.ts @@ -399,18 +399,18 @@ describe("Subscriptions metadata on create", () => { WITH [] AS meta CREATE (this0:Movie) SET this0.title = $this0_title - CREATE (this0_directors_Actor0_node:Actor) - SET this0_directors_Actor0_node.name = $this0_directors_Actor0_node_name - WITH *, meta + { event: \\"create\\", id: id(this0_directors_Actor0_node), properties: { old: null, new: this0_directors_Actor0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta - MERGE (this0)<-[this0_directors_Actor0_relationship:DIRECTED]-(this0_directors_Actor0_node) - SET this0_directors_Actor0_relationship.year = $this0_directors_Actor0_relationship_year - WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0), id: id(this0_directors_Actor0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0 { .* }, relationship: this0_directors_Actor0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node CREATE (this0_directors_Person0_node:Person) SET this0_directors_Person0_node.name = $this0_directors_Person0_node_name WITH *, meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta MERGE (this0)<-[this0_directors_Person0_relationship:DIRECTED]-(this0_directors_Person0_node) SET this0_directors_Person0_relationship.year = $this0_directors_Person0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Person0_node), id_to: id(this0), id: id(this0_directors_Person0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Person\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Person0_node { .* }, to: this0 { .* }, relationship: this0_directors_Person0_relationship { .* } } } AS meta, this0, this0_directors_Person0_node + CREATE (this0_directors_Actor0_node:Actor) + SET this0_directors_Actor0_node.name = $this0_directors_Actor0_node_name + WITH *, meta + { event: \\"create\\", id: id(this0_directors_Actor0_node), properties: { old: null, new: this0_directors_Actor0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta + MERGE (this0)<-[this0_directors_Actor0_relationship:DIRECTED]-(this0_directors_Actor0_node) + SET this0_directors_Actor0_relationship.year = $this0_directors_Actor0_relationship_year + WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0), id: id(this0_directors_Actor0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0 { .* }, relationship: this0_directors_Actor0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node WITH *, meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta RETURN this0, meta AS this0_meta } @@ -541,7 +541,7 @@ describe("Subscriptions metadata on create", () => { SET this0.title = $this0_title CREATE (this0_directors_Person0_node:Person) SET this0_directors_Person0_node.name = $this0_directors_Person0_node_name - WITH meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta, this0, this0_directors_Person0_node + WITH *, meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta MERGE (this0)<-[this0_directors_Person0_relationship:DIRECTED]-(this0_directors_Person0_node) SET this0_directors_Person0_relationship.year = $this0_directors_Person0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Person0_node), id_to: id(this0), id: id(this0_directors_Person0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Person\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Person0_node { .* }, to: this0 { .* }, relationship: this0_directors_Person0_relationship { .* } } } AS meta, this0, this0_directors_Person0_node @@ -557,12 +557,6 @@ describe("Subscriptions metadata on create", () => { MERGE (this0)<-[this0_directors_Actor0_relationship:DIRECTED]-(this0_directors_Actor0_node) SET this0_directors_Actor0_relationship.year = $this0_directors_Actor0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0), id: id(this0_directors_Actor0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0 { .* }, relationship: this0_directors_Actor0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node - CREATE (this0_directors_Person0_node:Person) - SET this0_directors_Person0_node.name = $this0_directors_Person0_node_name - WITH *, meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta - MERGE (this0)<-[this0_directors_Person0_relationship:DIRECTED]-(this0_directors_Person0_node) - SET this0_directors_Person0_relationship.year = $this0_directors_Person0_relationship_year - WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Person0_node), id_to: id(this0), id: id(this0_directors_Person0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Person\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Person0_node { .* }, to: this0 { .* }, relationship: this0_directors_Person0_relationship { .* } } } AS meta, this0, this0_directors_Person0_node WITH *, meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta RETURN this0, meta AS this0_meta } diff --git a/packages/graphql/tests/tck/where.test.ts b/packages/graphql/tests/tck/where.test.ts index 97cdcd07a4..38859089fc 100644 --- a/packages/graphql/tests/tck/where.test.ts +++ b/packages/graphql/tests/tck/where.test.ts @@ -184,15 +184,15 @@ describe("Cypher WHERE", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) - WHERE ((this.title = $param0 OR this.isFavorite = $param1) AND this.id = $param2) + WHERE (this.id = $param0 AND (this.title = $param1 OR this.isFavorite = $param2)) RETURN this { .title } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": \\"some title\\", - \\"param1\\": true, - \\"param2\\": \\"2\\" + \\"param0\\": \\"2\\", + \\"param1\\": \\"some title\\", + \\"param2\\": true }" `); }); From 67982342624980f84c38d458c99152241a2d3f86 Mon Sep 17 00:00:00 2001 From: a-alle Date: Wed, 27 Sep 2023 13:23:16 +0100 Subject: [PATCH 145/162] refactor adapters --- .../attribute/AttributeTypeHelper.ts | 196 ++++++++ .../model-adapters/AggregationAdapter.ts | 12 +- .../model-adapters/AttributeAdapter.test.ts | 78 ++-- .../model-adapters/AttributeAdapter.ts | 427 ++++++------------ .../attribute/model-adapters/ListAdapter.ts | 2 +- .../attribute/model-adapters/MathAdapter.ts | 10 +- .../model-adapters/ConcreteEntityAdapter.ts | 164 +++---- .../model-adapters/InterfaceEntityAdapter.ts | 17 +- .../src/schema-model/generate-model.test.ts | 58 +-- .../model-adapters/RelationshipAdapter.ts | 51 +-- .../model-adapters/RelationshipOperations.ts | 122 +++-- .../field-aggregation-composer.ts | 8 +- .../src/schema/generation/aggregate-types.ts | 14 +- .../generation/augment-object-or-interface.ts | 2 +- .../graphql/src/schema/get-where-fields.ts | 8 +- .../src/schema/make-augmented-schema.ts | 8 +- .../src/schema/resolvers/field/cypher.ts | 2 +- .../where/filters/filter-by-properties.ts | 6 +- packages/graphql/src/schema/to-compose.ts | 15 +- 19 files changed, 612 insertions(+), 588 deletions(-) create mode 100644 packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts diff --git a/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts b/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts new file mode 100644 index 0000000000..8a50040c5a --- /dev/null +++ b/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts @@ -0,0 +1,196 @@ +import type { AttributeType } from "./AttributeType"; +import { + Neo4jGraphQLSpatialType, + EnumType, + GraphQLBuiltInScalarType, + InputType, + InterfaceType, + ListType, + Neo4jCartesianPointType, + Neo4jGraphQLNumberType, + Neo4jGraphQLTemporalType, + Neo4jPointType, + ObjectType, + ScalarType, + UnionType, + UserScalarType, +} from "./AttributeType"; + +export class AttributeTypeHelper { + _type: AttributeType; + private assertionOptions: { + includeLists: boolean; + } = { includeLists: true }; + + constructor(type: AttributeType) { + this._type = type; + } + /** + * Just an helper to get the wrapped type in case of a list, useful for the assertions + */ + + private getTypeForAssertion(includeLists: boolean) { + if (includeLists) { + if (!this.isList()) { + return this._type; + } + if (this._type.ofType instanceof ListType) { + return this._type.ofType.ofType; + } + return this._type.ofType; + // return this.isList() ? this.type.ofType : this.type; + } + return this._type; + } + + isBoolean(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Boolean; + } + + isID(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.ID; + } + + isInt(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Int; + } + + isFloat(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Float; + } + + isString(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.String; + } + + isCartesianPoint(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof Neo4jCartesianPointType; + } + + isPoint(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof Neo4jPointType; + } + + isBigInt(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === Neo4jGraphQLNumberType.BigInt; + } + + isDate(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.Date; + } + + isDateTime(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.DateTime; + } + + isLocalDateTime(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.LocalDateTime; + } + + isTime(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.Time; + } + + isLocalTime(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return (type.name as Neo4jGraphQLTemporalType) === Neo4jGraphQLTemporalType.LocalTime; + } + + isDuration(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return (type.name as Neo4jGraphQLTemporalType) === Neo4jGraphQLTemporalType.Duration; + } + + isObject(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof ObjectType; + } + + isEnum(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof EnumType; + } + + isInterface(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof InterfaceType; + } + + isUnion(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof UnionType; + } + + isList(): this is this & { _type: ListType } { + return this._type instanceof ListType; + } + + isInput(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof InputType; + } + + isUserScalar(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type instanceof UserScalarType; + } + + isTemporal(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type.name in Neo4jGraphQLTemporalType; + } + + isListElementRequired(): boolean { + if (!(this._type instanceof ListType)) { + return false; + } + return this._type.ofType.isRequired; + } + + isRequired(): boolean { + return this._type.isRequired; + } + + isGraphQLBuiltInScalar(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type.name in GraphQLBuiltInScalarType; + } + + isSpatial(options = this.assertionOptions): boolean { + const type = this.getTypeForAssertion(options.includeLists); + return type.name in Neo4jGraphQLSpatialType; + } + + isAbstract(options = this.assertionOptions): boolean { + return this.isInterface(options) || this.isUnion(options); + } + + isNumeric(options = this.assertionOptions): boolean { + return this.isBigInt(options) || this.isFloat(options) || this.isInt(options); + } + + /** + * Returns true for both built-in and user-defined scalars + **/ + isScalar(options = this.assertionOptions): boolean { + return ( + this.isGraphQLBuiltInScalar(options) || + this.isTemporal(options) || + this.isBigInt(options) || + this.isUserScalar(options) || + this.isInput(options) + ); + } +} diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AggregationAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AggregationAdapter.ts index bde5aa4fc9..a049a41a47 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AggregationAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AggregationAdapter.ts @@ -26,7 +26,7 @@ type ComparisonOperator = (typeof AGGREGATION_COMPARISON_OPERATORS)[number]; export class AggregationAdapter { readonly AttributeAdapter: AttributeAdapter; constructor(AttributeAdapter: AttributeAdapter) { - if (!AttributeAdapter.isScalar()) { + if (!AttributeAdapter.typeHelper.isScalar()) { throw new Error("Aggregation model available only for scalar attributes"); } this.AttributeAdapter = AttributeAdapter; @@ -38,7 +38,7 @@ export class AggregationAdapter { aggregationList.push(this.getAverageComparator(comparator)); aggregationList.push(this.getMinComparator(comparator)); aggregationList.push(this.getMaxComparator(comparator)); - if (this.AttributeAdapter.isNumeric()) { + if (this.AttributeAdapter.typeHelper.isNumeric()) { aggregationList.push(this.getSumComparator(comparator)); } return aggregationList; @@ -46,25 +46,25 @@ export class AggregationAdapter { } getAverageComparator(comparator: ComparisonOperator): string { - return this.AttributeAdapter.isString() + return this.AttributeAdapter.typeHelper.isString() ? `${this.AttributeAdapter.name}_AVERAGE_LENGTH_${comparator}` : `${this.AttributeAdapter.name}_AVERAGE_${comparator}`; } getMinComparator(comparator: ComparisonOperator): string { - return this.AttributeAdapter.isString() + return this.AttributeAdapter.typeHelper.isString() ? `${this.AttributeAdapter.name}_SHORTEST_LENGTH_${comparator}` : `${this.AttributeAdapter.name}_MIN_${comparator}`; } getMaxComparator(comparator: ComparisonOperator): string { - return this.AttributeAdapter.isString() + return this.AttributeAdapter.typeHelper.isString() ? `${this.AttributeAdapter.name}_LONGEST_LENGTH_${comparator}` : `${this.AttributeAdapter.name}_MAX_${comparator}`; } getSumComparator(comparator: ComparisonOperator): string { - if (!this.AttributeAdapter.isNumeric()) { + if (!this.AttributeAdapter.typeHelper.isNumeric()) { throw new Error("Sum aggregation is available only for numeric attributes"); } return `${this.AttributeAdapter.name}_SUM_${comparator}`; diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts index d2665cde14..f224fa2591 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.test.ts @@ -96,7 +96,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isID()).toBe(true); + expect(attribute.typeHelper.isID()).toBe(true); }); test("isBoolean", () => { @@ -109,7 +109,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isBoolean()).toBe(true); + expect(attribute.typeHelper.isBoolean()).toBe(true); }); test("isInt", () => { @@ -122,7 +122,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isInt()).toBe(true); + expect(attribute.typeHelper.isInt()).toBe(true); }); test("isFloat", () => { @@ -134,7 +134,7 @@ describe("Attribute", () => { args: [], }) ); - expect(attribute.isFloat()).toBe(true); + expect(attribute.typeHelper.isFloat()).toBe(true); }); test("isString", () => { @@ -146,7 +146,7 @@ describe("Attribute", () => { args: [], }) ); - expect(attribute.isString()).toBe(true); + expect(attribute.typeHelper.isString()).toBe(true); }); test("isCartesianPoint", () => { @@ -159,7 +159,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isCartesianPoint()).toBe(true); + expect(attribute.typeHelper.isCartesianPoint()).toBe(true); }); test("isPoint", () => { @@ -172,7 +172,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isPoint()).toBe(true); + expect(attribute.typeHelper.isPoint()).toBe(true); }); test("isBigInt", () => { @@ -185,7 +185,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isBigInt()).toBe(true); + expect(attribute.typeHelper.isBigInt()).toBe(true); }); test("isDate", () => { @@ -198,7 +198,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isDate()).toBe(true); + expect(attribute.typeHelper.isDate()).toBe(true); }); test("isDateTime", () => { @@ -211,7 +211,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isDateTime()).toBe(true); + expect(attribute.typeHelper.isDateTime()).toBe(true); }); test("isLocalDateTime", () => { @@ -224,7 +224,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isLocalDateTime()).toBe(true); + expect(attribute.typeHelper.isLocalDateTime()).toBe(true); }); test("isTime", () => { @@ -237,7 +237,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isTime()).toBe(true); + expect(attribute.typeHelper.isTime()).toBe(true); }); test("isLocalTime", () => { @@ -250,7 +250,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isLocalTime()).toBe(true); + expect(attribute.typeHelper.isLocalTime()).toBe(true); }); test("isDuration", () => { @@ -263,7 +263,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isDuration()).toBe(true); + expect(attribute.typeHelper.isDuration()).toBe(true); }); test("isObject", () => { @@ -276,7 +276,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isObject()).toBe(true); + expect(attribute.typeHelper.isObject()).toBe(true); }); test("isEnum", () => { @@ -289,7 +289,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isEnum()).toBe(true); + expect(attribute.typeHelper.isEnum()).toBe(true); }); test("isUserScalar", () => { @@ -302,7 +302,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isUserScalar()).toBe(true); + expect(attribute.typeHelper.isUserScalar()).toBe(true); }); test("isInterface", () => { @@ -314,7 +314,7 @@ describe("Attribute", () => { args: [], }) ); - expect(attribute.isInterface()).toBe(true); + expect(attribute.typeHelper.isInterface()).toBe(true); }); test("isUnion", () => { @@ -326,7 +326,7 @@ describe("Attribute", () => { args: [], }) ); - expect(attribute.isUnion()).toBe(true); + expect(attribute.typeHelper.isUnion()).toBe(true); }); describe("List", () => { @@ -342,7 +342,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isList()).toBe(true); + expect(attribute.typeHelper.isList()).toBe(true); }); test("isList should return false if attribute is not a list", () => { @@ -357,7 +357,7 @@ describe("Attribute", () => { }) ); - expect(attribute.isList()).toBe(false); + expect(attribute.typeHelper.isList()).toBe(false); }); test("type assertion, should return true if it's a list of a the same type.", () => { @@ -371,8 +371,8 @@ describe("Attribute", () => { args: [], }) ); - expect(attribute.isString({ includeLists: true })).toBe(true); - expect(attribute.isString({ includeLists: false })).toBe(false); + expect(attribute.typeHelper.isString({ includeLists: true })).toBe(true); + expect(attribute.typeHelper.isString({ includeLists: false })).toBe(false); }); test("type assertion, should return false if it's a list of a different type", () => { @@ -386,8 +386,8 @@ describe("Attribute", () => { args: [], }) ); - expect(attribute.isInt({ includeLists: true })).toBe(false); - expect(attribute.isInt({ includeLists: false })).toBe(false); + expect(attribute.typeHelper.isInt({ includeLists: true })).toBe(false); + expect(attribute.typeHelper.isInt({ includeLists: false })).toBe(false); }); }); }); @@ -412,8 +412,8 @@ describe("Attribute", () => { }) ); - expect(attribute.isGraphQLBuiltInScalar()).toBe(true); - expect(nonBuiltInScalar.isGraphQLBuiltInScalar()).toBe(false); + expect(attribute.typeHelper.isGraphQLBuiltInScalar()).toBe(true); + expect(nonBuiltInScalar.typeHelper.isGraphQLBuiltInScalar()).toBe(false); }); test("isSpatial", () => { @@ -434,8 +434,8 @@ describe("Attribute", () => { }) ); - expect(attribute.isSpatial()).toBe(true); - expect(nonSpatial.isSpatial()).toBe(false); + expect(attribute.typeHelper.isSpatial()).toBe(true); + expect(nonSpatial.typeHelper.isSpatial()).toBe(false); }); test("isTemporal", () => { @@ -457,8 +457,8 @@ describe("Attribute", () => { }) ); - expect(attribute.isTemporal()).toBe(true); - expect(nonTemporal.isTemporal()).toBe(false); + expect(attribute.typeHelper.isTemporal()).toBe(true); + expect(nonTemporal.typeHelper.isTemporal()).toBe(false); }); test("isAbstract", () => { @@ -480,8 +480,8 @@ describe("Attribute", () => { }) ); - expect(attribute.isAbstract()).toBe(true); - expect(nonAbstract.isAbstract()).toBe(false); + expect(attribute.typeHelper.isAbstract()).toBe(true); + expect(nonAbstract.typeHelper.isAbstract()).toBe(false); }); }); @@ -504,8 +504,8 @@ describe("Attribute", () => { }) ); - expect(attributeRequired.isRequired()).toBe(true); - expect(attributeNotRequired.isRequired()).toBe(false); + expect(attributeRequired.typeHelper.isRequired()).toBe(true); + expect(attributeNotRequired.typeHelper.isRequired()).toBe(false); }); test("isRequired - List", () => { @@ -527,8 +527,8 @@ describe("Attribute", () => { }) ); - expect(attributeRequired.isRequired()).toBe(true); - expect(attributeNotRequired.isRequired()).toBe(false); + expect(attributeRequired.typeHelper.isRequired()).toBe(true); + expect(attributeNotRequired.typeHelper.isRequired()).toBe(false); }); test("isListElementRequired", () => { @@ -550,8 +550,8 @@ describe("Attribute", () => { }) ); - expect(listElementRequired.isListElementRequired()).toBe(true); - expect(listElementNotRequired.isListElementRequired()).toBe(false); + expect(listElementRequired.typeHelper.isListElementRequired()).toBe(true); + expect(listElementNotRequired.typeHelper.isListElementRequired()).toBe(false); }); describe("annotation assertions", () => { diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 8d530d4cad..cc7fee66ae 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -21,22 +21,8 @@ import type { Annotations } from "../../annotation/Annotation"; import type { Argument } from "../../argument/Argument"; import type { Attribute } from "../Attribute"; import type { AttributeType } from "../AttributeType"; -import { - EnumType, - GraphQLBuiltInScalarType, - InputType, - InterfaceType, - ListType, - Neo4jCartesianPointType, - Neo4jGraphQLNumberType, - Neo4jGraphQLSpatialType, - Neo4jGraphQLTemporalType, - Neo4jPointType, - ObjectType, - ScalarType, - UnionType, - UserScalarType, -} from "../AttributeType"; +import { ListType } from "../AttributeType"; +import { AttributeTypeHelper } from "../AttributeTypeHelper"; import { AggregationAdapter } from "./AggregationAdapter"; import { ListAdapter } from "./ListAdapter"; import { MathAdapter } from "./MathAdapter"; @@ -45,15 +31,15 @@ export class AttributeAdapter { private _listModel: ListAdapter | undefined; private _mathModel: MathAdapter | undefined; private _aggregationModel: AggregationAdapter | undefined; + + public typeHelper: AttributeTypeHelper; public readonly name: string; public readonly annotations: Partial; public readonly type: AttributeType; public readonly args: Argument[]; public readonly databaseName: string; public readonly description?: string; - private assertionOptions: { - includeLists: boolean; - }; + constructor(attribute: Attribute) { this.name = attribute.name; this.type = attribute.type; @@ -61,14 +47,49 @@ export class AttributeAdapter { this.annotations = attribute.annotations; this.databaseName = attribute.databaseName; this.description = attribute.description; - this.assertionOptions = { - includeLists: true, - }; + this.typeHelper = new AttributeTypeHelper(attribute.type); + } + + get listModel(): ListAdapter | undefined { + if (!this._listModel) { + if (!this.isArrayMethodField()) { + return; + } + this._listModel = new ListAdapter(this); + } + return this._listModel; + } + + get mathModel(): MathAdapter | undefined { + if (!this._mathModel) { + if (!this.typeHelper.isNumeric() || this.typeHelper.isList()) { + return; + } + this._mathModel = new MathAdapter(this); + } + return this._mathModel; + } + + get aggregationModel(): AggregationAdapter { + if (!this._aggregationModel) { + this._aggregationModel = new AggregationAdapter(this); + } + return this._aggregationModel; } + /** + * Categories Filters + * each Attribute has the knowledge of whether it is part of a category + * + */ + isMutable(): boolean { return ( - (this.isEnum() || this.isAbstract() || this.isSpatial() || this.isScalar() || this.isObject()) && + (this.typeHelper.isEnum() || + this.typeHelper.isAbstract() || + this.typeHelper.isSpatial() || + this.typeHelper.isScalar() || + this.typeHelper.isObject()) && !this.isCypher() ); } @@ -83,42 +104,35 @@ export class AttributeAdapter { isConstrainable(): boolean { return ( - this.isGraphQLBuiltInScalar() || - this.isUserScalar() || - this.isEnum() || - this.isTemporal() || - this.isSpatial() + this.typeHelper.isGraphQLBuiltInScalar() || + this.typeHelper.isUserScalar() || + this.typeHelper.isEnum() || + this.typeHelper.isTemporal() || + this.typeHelper.isSpatial() ); } isObjectField(): boolean { - return this.isScalar() || this.isEnum() || this.isAbstract() || this.isObject() || this.isSpatial(); - } - - isRootTypeObjectField(): boolean { return ( - this.isGraphQLBuiltInScalar() || - this.isEnum() || - this.isUserScalar() || - this.isInterface() || - this.isObject() || - this.isUnion() || - this.isTemporal() || - this.isBigInt() + this.typeHelper.isScalar() || + this.typeHelper.isEnum() || + this.typeHelper.isAbstract() || + this.typeHelper.isObject() || + this.typeHelper.isSpatial() ); } isSortableField(): boolean { return ( - !this.isList() && + !this.typeHelper.isList() && !this.isCustomResolvable() && - (this.isScalar() || this.isEnum() || this.isSpatial() || this.isCypher()) + (this.typeHelper.isScalar() || this.typeHelper.isEnum() || this.typeHelper.isSpatial() || this.isCypher()) ); } isWhereField(): boolean { return ( - (this.isEnum() || this.isSpatial() || this.isScalar()) && + (this.typeHelper.isEnum() || this.typeHelper.isSpatial() || this.typeHelper.isScalar()) && this.isFilterable() && !this.isCustomResolvable() && !this.isCypher() @@ -126,37 +140,53 @@ export class AttributeAdapter { } isEventPayloadField(): boolean { - return this.isEnum() || this.isSpatial() || this.isScalar(); + return this.typeHelper.isEnum() || this.typeHelper.isSpatial() || this.typeHelper.isScalar(); } isSubscriptionWhereField(): boolean { - return (this.isEnum() || this.isSpatial() || this.isScalar()) && !this.isCypher(); + return ( + (this.typeHelper.isEnum() || this.typeHelper.isSpatial() || this.typeHelper.isScalar()) && !this.isCypher() + ); } isSubscriptionConnectedRelationshipField(): boolean { - return (this.isEnum() || this.isSpatial() || this.isScalar()) && !this.isCypher(); + return ( + (this.typeHelper.isEnum() || this.typeHelper.isSpatial() || this.typeHelper.isScalar()) && !this.isCypher() + ); } isOnCreateField(): boolean { return ( - this.isNonGeneratedField() && (this.isScalar() || this.isSpatial() || this.isEnum() || this.isAbstract()) + this.isNonGeneratedField() && + (this.typeHelper.isScalar() || + this.typeHelper.isSpatial() || + this.typeHelper.isEnum() || + this.typeHelper.isAbstract()) ); } isNumericalOrTemporal(): boolean { - return this.isFloat() || this.isInt() || this.isBigInt() || this.isTemporal(); + return ( + this.typeHelper.isFloat() || + this.typeHelper.isInt() || + this.typeHelper.isBigInt() || + this.typeHelper.isTemporal() + ); } isAggregableField(): boolean { - return !this.isList() && (this.isScalar() || this.isEnum()) && this.isAggregable(); + return ( + !this.typeHelper.isList() && (this.typeHelper.isScalar() || this.typeHelper.isEnum()) && this.isAggregable() + ); } isAggregationWhereField(): boolean { - const isGraphQLBuiltInScalarWithoutBoolean = this.isGraphQLBuiltInScalar() && !this.isBoolean(); - const isTemporalWithoutDate = this.isTemporal() && !this.isDate(); + const isGraphQLBuiltInScalarWithoutBoolean = + this.typeHelper.isGraphQLBuiltInScalar() && !this.typeHelper.isBoolean(); + const isTemporalWithoutDate = this.typeHelper.isTemporal() && !this.typeHelper.isDate(); return ( - !this.isList() && - (isGraphQLBuiltInScalarWithoutBoolean || isTemporalWithoutDate || this.isBigInt()) && + !this.typeHelper.isList() && + (isGraphQLBuiltInScalarWithoutBoolean || isTemporalWithoutDate || this.typeHelper.isBigInt()) && this.isAggregationFilterable() ); } @@ -169,7 +199,7 @@ export class AttributeAdapter { return ( this.isCypher() === false && this.isCustomResolvable() === false && - (this.isEnum() || this.isScalar() || this.isSpatial()) && + (this.typeHelper.isEnum() || this.typeHelper.isScalar() || this.typeHelper.isSpatial()) && !this.annotations.id && !this.annotations.populatedBy && !this.annotations.timestamp @@ -181,250 +211,92 @@ export class AttributeAdapter { } isArrayMethodField(): boolean { - return this.isList() && !this.isUserScalar() && (this.isScalar() || this.isSpatial()); - } - - get listModel(): ListAdapter | undefined { - if (!this._listModel) { - if (!this.isArrayMethodField()) { - return; - } - this._listModel = new ListAdapter(this); - } - return this._listModel; - } - - get mathModel(): MathAdapter | undefined { - if (!this._mathModel) { - if (!this.isNumeric() || this.isList()) { - return; - } - this._mathModel = new MathAdapter(this); - } - return this._mathModel; - } - - get aggregationModel(): AggregationAdapter { - if (!this._aggregationModel) { - this._aggregationModel = new AggregationAdapter(this); - } - return this._aggregationModel; - } - /** - * Just an helper to get the wrapped type in case of a list, useful for the assertions - */ - - private getTypeForAssertion(includeLists: boolean) { - if (includeLists) { - if (!this.isList()) { - return this.type; - } - if (this.type.ofType instanceof ListType) { - return this.type.ofType.ofType; - } - return this.type.ofType; - // return this.isList() ? this.type.ofType : this.type; - } - return this.type; - } - - isBoolean(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Boolean; - } - - isID(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.ID; - } - - isInt(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Int; - } - - isFloat(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Float; - } - - isString(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.String; - } - - isCartesianPoint(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof Neo4jCartesianPointType; - } - - isPoint(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof Neo4jPointType; - } - - isBigInt(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === Neo4jGraphQLNumberType.BigInt; - } - - isDate(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.Date; - } - - isDateTime(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.DateTime; - } - - isLocalDateTime(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.LocalDateTime; - } - - isTime(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.Time; - } - - isLocalTime(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return (type.name as Neo4jGraphQLTemporalType) === Neo4jGraphQLTemporalType.LocalTime; - } - - isDuration(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return (type.name as Neo4jGraphQLTemporalType) === Neo4jGraphQLTemporalType.Duration; - } - - isObject(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof ObjectType; - } - - isEnum(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof EnumType; - } - - isInterface(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof InterfaceType; - } - - isUnion(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof UnionType; - } - - isList(): this is this & { type: ListType } { - return this.type instanceof ListType; - } - - isInput(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof InputType; - } - - isUserScalar(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type instanceof UserScalarType; - } - - isTemporal(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type.name in Neo4jGraphQLTemporalType; - } - - isListElementRequired(): boolean { - if (!(this.type instanceof ListType)) { - return false; - } - return this.type.ofType.isRequired; - } - - isRequired(): boolean { - return this.type.isRequired; + return ( + this.typeHelper.isList() && + !this.typeHelper.isUserScalar() && + (this.typeHelper.isScalar() || this.typeHelper.isSpatial()) + ); } /** - * - * Schema Generator Stuff + * Category Helpers * */ - isGraphQLBuiltInScalar(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type.name in GraphQLBuiltInScalarType; + getDefaultValue() { + return this.annotations.default?.value; } - isSpatial(options = this.assertionOptions): boolean { - const type = this.getTypeForAssertion(options.includeLists); - return type.name in Neo4jGraphQLSpatialType; + isReadable(): boolean { + return this.annotations.selectable?.onRead !== false; } - isAbstract(options = this.assertionOptions): boolean { - return this.isInterface(options) || this.isUnion(options); + isAggregable(): boolean { + return ( + this.annotations.selectable?.onAggregate !== false && + this.isCustomResolvable() === false && + this.isCypher() === false + ); } - /** - * Returns true for both built-in and user-defined scalars - **/ - isScalar(options = this.assertionOptions): boolean { + isAggregationFilterable(): boolean { return ( - this.isGraphQLBuiltInScalar(options) || - this.isTemporal(options) || - this.isBigInt(options) || - this.isUserScalar(options) || - this.isInput(options) + this.annotations.filterable?.byAggregate !== false && + this.isCustomResolvable() === false && + this.isCypher() === false ); } - isNumeric(options = this.assertionOptions): boolean { - return this.isBigInt(options) || this.isFloat(options) || this.isInt(options); + isFilterable(): boolean { + return this.annotations.filterable?.byValue !== false; } - /** - * END of category assertions - */ + isCustomResolvable(): boolean { + return !!this.annotations.customResolver; + } isGlobalIDAttribute(): boolean { return !!this.annotations.relayId; } /** - * - * Schema Generator Stuff - * + * Type names + * used to create different types for the Attribute or Entity that contains the Attributes */ getTypePrettyName(): string { - if (!this.isList()) { - return `${this.getTypeName()}${this.isRequired() ? "!" : ""}`; + if (!this.typeHelper.isList()) { + return `${this.getTypeName()}${this.typeHelper.isRequired() ? "!" : ""}`; } - if (this.type.ofType instanceof ListType) { + const listType = this.type as ListType; + if (listType.ofType instanceof ListType) { // matrix case - return `[[${this.getTypeName()}${this.isListElementRequired() ? "!" : ""}]]${this.isRequired() ? "!" : ""}`; + return `[[${this.getTypeName()}${this.typeHelper.isListElementRequired() ? "!" : ""}]]${ + this.typeHelper.isRequired() ? "!" : "" + }`; } - return `[${this.getTypeName()}${this.isListElementRequired() ? "!" : ""}]${this.isRequired() ? "!" : ""}`; + return `[${this.getTypeName()}${this.typeHelper.isListElementRequired() ? "!" : ""}]${ + this.typeHelper.isRequired() ? "!" : "" + }`; } getTypeName(): string { - if (!this.isList()) { + if (!this.typeHelper.isList()) { return this.type.name; } - if (this.type.ofType instanceof ListType) { + const listType = this.type as ListType; + if (listType.ofType instanceof ListType) { // matrix case - return this.type.ofType.ofType.name; + return listType.ofType.ofType.name; } - return this.type.ofType.name; + return listType.ofType.name; // return this.isList() ? this.type.ofType.name : this.type.name; } getFieldTypeName(): string { - if (!this.isList()) { + if (!this.typeHelper.isList()) { return this.getTypeName(); } - if (this.type.ofType instanceof ListType) { + const listType = this.type as ListType; + if (listType.ofType instanceof ListType) { // matrix case return `[[${this.getTypeName()}]]`; } @@ -432,7 +304,7 @@ export class AttributeAdapter { } getInputTypeName(): string { - if (this.isSpatial()) { + if (this.typeHelper.isSpatial()) { if (this.getTypeName() === "Point") { return "PointInput"; } else { @@ -444,19 +316,19 @@ export class AttributeAdapter { // TODO: We should probably have this live in a different, more specific adapter getFilterableInputTypeName(): string { - return `[${this.getInputTypeName()}${this.isRequired() ? "!" : ""}]`; + return `[${this.getInputTypeName()}${this.typeHelper.isRequired() ? "!" : ""}]`; } getInputTypeNames(): InputTypeNames { - const pretty = this.isList() - ? `[${this.getInputTypeName()}${this.isListElementRequired() ? "!" : ""}]` + const pretty = this.typeHelper.isList() + ? `[${this.getInputTypeName()}${this.typeHelper.isListElementRequired() ? "!" : ""}]` : this.getInputTypeName(); return { where: { type: this.getInputTypeName(), pretty }, create: { type: this.getTypeName(), - pretty: `${pretty}${this.isRequired() ? "!" : ""}`, + pretty: `${pretty}${this.typeHelper.isRequired() ? "!" : ""}`, }, update: { type: this.getTypeName(), @@ -464,37 +336,6 @@ export class AttributeAdapter { }, }; } - - getDefaultValue() { - return this.annotations.default?.value; - } - - isReadable(): boolean { - return this.annotations.selectable?.onRead !== false; - } - - isAggregable(): boolean { - return ( - this.annotations.selectable?.onAggregate !== false && - this.isCustomResolvable() === false && - this.isCypher() === false - ); - } - isAggregationFilterable(): boolean { - return ( - this.annotations.filterable?.byAggregate !== false && - this.isCustomResolvable() === false && - this.isCypher() === false - ); - } - - isFilterable(): boolean { - return this.annotations.filterable?.byValue !== false; - } - - isCustomResolvable(): boolean { - return !!this.annotations.customResolver; - } } type InputTypeNames = Record<"where" | "create" | "update", { type: string; pretty: string }>; diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/ListAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/ListAdapter.ts index 795077b5ff..2f440377d6 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/ListAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/ListAdapter.ts @@ -23,7 +23,7 @@ export class ListAdapter { readonly AttributeAdapter: AttributeAdapter; constructor(AttributeAdapter: AttributeAdapter) { - if (!AttributeAdapter.isList()) { + if (!AttributeAdapter.typeHelper.isList()) { throw new Error("Attribute is not a list"); } this.AttributeAdapter = AttributeAdapter; diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/MathAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/MathAdapter.ts index d016375e98..7915b7b87e 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/MathAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/MathAdapter.ts @@ -23,7 +23,7 @@ export class MathAdapter { readonly AttributeAdapter: AttributeAdapter; constructor(AttributeAdapter: AttributeAdapter) { - if (!AttributeAdapter.isNumeric()) { + if (!AttributeAdapter.typeHelper.isNumeric()) { throw new Error("Math model available only for numeric attributes"); } this.AttributeAdapter = AttributeAdapter; @@ -31,19 +31,19 @@ export class MathAdapter { getMathOperations(): string[] { const operations = [this.getAdd(), this.getSubtract()]; - this.AttributeAdapter.isFloat() && operations.push(this.getMultiply()); - this.AttributeAdapter.isFloat() && operations.push(this.getDivide()); + this.AttributeAdapter.typeHelper.isFloat() && operations.push(this.getMultiply()); + this.AttributeAdapter.typeHelper.isFloat() && operations.push(this.getDivide()); return operations; } getAdd(): string { - return this.AttributeAdapter.isInt() || this.AttributeAdapter.isBigInt() + return this.AttributeAdapter.typeHelper.isInt() || this.AttributeAdapter.typeHelper.isBigInt() ? `${this.AttributeAdapter.name}_INCREMENT` : `${this.AttributeAdapter.name}_ADD`; } getSubtract(): string { - return this.AttributeAdapter.isInt() || this.AttributeAdapter.isBigInt() + return this.AttributeAdapter.typeHelper.isInt() || this.AttributeAdapter.typeHelper.isBigInt() ? `${this.AttributeAdapter.name}_DECREMENT` : `${this.AttributeAdapter.name}_SUBTRACT`; } diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts index bb2e4d0500..2eecb5943f 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ConcreteEntityAdapter.ts @@ -95,73 +95,6 @@ export class ConcreteEntityAdapter { } } - public get mutableFields(): AttributeAdapter[] { - return this.mutableFieldsKeys.map((key) => getFromMap(this.attributes, key)); - } - - public get uniqueFields(): AttributeAdapter[] { - return this.uniqueFieldsKeys.map((key) => getFromMap(this.attributes, key)); - } - - public get constrainableFields(): AttributeAdapter[] { - return this.constrainableFieldsKeys.map((key) => getFromMap(this.attributes, key)); - } - - public get relatedEntities(): (ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter)[] { - if (!this._relatedEntities) { - this._relatedEntities = [...this.relationships.values()].map((relationship) => relationship.target); - } - return this._relatedEntities; - } - - public get objectFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isObjectField()); - } - - public get sortableFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isSortableField()); - } - - public get whereFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isWhereField()); - } - - public get aggregableFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregableField()); - } - - public get aggregationWhereFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregationWhereField()); - } - - public get createInputFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isCreateInputField()); - } - - public get updateInputFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); - } - - public get arrayMethodFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isArrayMethodField()); - } - - public get onCreateInputFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isOnCreateField()); - } - - public get temporalFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isTemporal()); - } - - public get subscriptionEventPayloadFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isEventPayloadField()); - } - - public get subscriptionWhereFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isSubscriptionWhereField()); - } - public findAttribute(name: string): AttributeAdapter | undefined { return this.attributes.get(name); } @@ -170,13 +103,11 @@ export class ConcreteEntityAdapter { return this.relationships.get(name); } - // TODO: identify usage of old Node.[getLabels | getLabelsString] and migrate them if needed - public getLabels(): string[] { - return Array.from(this.labels); - } - - public getMainLabel(): string { - return this.getLabels()[0] as string; + get operations(): ConcreteEntityOperations { + if (!this._operations) { + return new ConcreteEntityOperations(this); + } + return this._operations; } public get singular(): string { @@ -201,11 +132,13 @@ export class ConcreteEntityAdapter { return upperFirst(this.plural); } - get operations(): ConcreteEntityOperations { - if (!this._operations) { - return new ConcreteEntityOperations(this); - } - return this._operations; + // TODO: identify usage of old Node.[getLabels | getLabelsString] and migrate them if needed + public getLabels(): string[] { + return Array.from(this.labels); + } + + public getMainLabel(): string { + return this.getLabels()[0] as string; } get isReadable(): boolean { @@ -286,4 +219,77 @@ export class ConcreteEntityAdapter { id, }); } + + /** + * Categories + * = a grouping of attributes + * used to generate different types for the Entity that contains these Attributes + */ + + public get mutableFields(): AttributeAdapter[] { + return this.mutableFieldsKeys.map((key) => getFromMap(this.attributes, key)); + } + + public get uniqueFields(): AttributeAdapter[] { + return this.uniqueFieldsKeys.map((key) => getFromMap(this.attributes, key)); + } + + public get constrainableFields(): AttributeAdapter[] { + return this.constrainableFieldsKeys.map((key) => getFromMap(this.attributes, key)); + } + + public get relatedEntities(): (ConcreteEntityAdapter | InterfaceEntityAdapter | UnionEntityAdapter)[] { + if (!this._relatedEntities) { + this._relatedEntities = [...this.relationships.values()].map((relationship) => relationship.target); + } + return this._relatedEntities; + } + + public get objectFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isObjectField()); + } + + public get sortableFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isSortableField()); + } + + public get whereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isWhereField()); + } + + public get aggregableFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregableField()); + } + + public get aggregationWhereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregationWhereField()); + } + + public get createInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isCreateInputField()); + } + + public get updateInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isUpdateInputField()); + } + + public get arrayMethodFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isArrayMethodField()); + } + + public get onCreateInputFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isOnCreateField()); + } + + public get temporalFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.typeHelper.isTemporal()); + } + + public get subscriptionEventPayloadFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isEventPayloadField()); + } + + public get subscriptionWhereFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => attribute.isSubscriptionWhereField()); + } } diff --git a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts index 210060dacb..68a306a03b 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/InterfaceEntityAdapter.ts @@ -79,6 +79,12 @@ export class InterfaceEntityAdapter { this.relationships.set(relationshipName, new RelationshipAdapter(relationship, this)); } } + get operations(): InterfaceEntityOperations { + if (!this._operations) { + return new InterfaceEntityOperations(this); + } + return this._operations; + } public get singular(): string { if (!this._singular) { @@ -102,12 +108,11 @@ export class InterfaceEntityAdapter { return upperFirst(this.plural); } - get operations(): InterfaceEntityOperations { - if (!this._operations) { - return new InterfaceEntityOperations(this); - } - return this._operations; - } + /** + * Categories + * = a grouping of attributes + * used to generate different types for the Entity that contains these Attributes + */ public get uniqueFields(): AttributeAdapter[] { return this.uniqueFieldsKeys.map((key) => getFromMap(this.attributes, key)); diff --git a/packages/graphql/src/schema-model/generate-model.test.ts b/packages/graphql/src/schema-model/generate-model.test.ts index 1a9f936bc4..ff24275a63 100644 --- a/packages/graphql/src/schema-model/generate-model.test.ts +++ b/packages/graphql/src/schema-model/generate-model.test.ts @@ -28,13 +28,13 @@ import { generateModel } from "./generate-model"; import type { Neo4jGraphQLSchemaModel } from "./Neo4jGraphQLSchemaModel"; import { SubscriptionsAuthorizationFilterEventRule } from "./annotation/SubscriptionsAuthorizationAnnotation"; import { AuthenticationAnnotation } from "./annotation/AuthenticationAnnotation"; -import type { AttributeAdapter } from "./attribute/model-adapters/AttributeAdapter"; import type { ConcreteEntityAdapter } from "./entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "./relationship/model-adapters/RelationshipAdapter"; import type { ConcreteEntity } from "./entity/ConcreteEntity"; import { InterfaceEntity } from "./entity/InterfaceEntity"; import { UnionEntity } from "./entity/UnionEntity"; import { GraphQLBuiltInScalarType, ListType, ObjectType } from "./attribute/AttributeType"; +import type { AttributeTypeHelper } from "./attribute/AttributeTypeHelper"; describe("Schema model generation", () => { test("parses @authentication directive with no arguments", () => { @@ -809,24 +809,24 @@ describe("GraphQL adapters", () => { let userAccounts: RelationshipAdapter; // user attributes - let id: AttributeAdapter; - let name: AttributeAdapter; - let createdAt: AttributeAdapter; - let releaseDate: AttributeAdapter; - let runningTime: AttributeAdapter; - let accountSize: AttributeAdapter; - let favoriteColors: AttributeAdapter; - let password: AttributeAdapter; + let id: AttributeTypeHelper; + let name: AttributeTypeHelper; + let createdAt: AttributeTypeHelper; + let releaseDate: AttributeTypeHelper; + let runningTime: AttributeTypeHelper; + let accountSize: AttributeTypeHelper; + let favoriteColors: AttributeTypeHelper; + let password: AttributeTypeHelper; // hasAccount relationship attributes - let creationTime: AttributeAdapter; + let creationTime: AttributeTypeHelper; // account attributes - let status: AttributeAdapter; - let aOrB: AttributeAdapter; - let point: AttributeAdapter; - let points: AttributeAdapter; - let cartesianPoint: AttributeAdapter; + let status: AttributeTypeHelper; + let aOrB: AttributeTypeHelper; + let point: AttributeTypeHelper; + let points: AttributeTypeHelper; + let cartesianPoint: AttributeTypeHelper; beforeAll(() => { const typeDefs = gql` @@ -882,26 +882,26 @@ describe("GraphQL adapters", () => { accountEntity = userAccounts.target as ConcreteEntityAdapter; // it's possible to obtain accountEntity using schemaModel.getConcreteEntityAdapter("Account") as well // user attributes - id = userEntity?.attributes.get("id") as AttributeAdapter; - name = userEntity?.attributes.get("name") as AttributeAdapter; - createdAt = userEntity?.attributes.get("createdAt") as AttributeAdapter; - releaseDate = userEntity?.attributes.get("releaseDate") as AttributeAdapter; - runningTime = userEntity?.attributes.get("runningTime") as AttributeAdapter; - accountSize = userEntity?.attributes.get("accountSize") as AttributeAdapter; - favoriteColors = userEntity?.attributes.get("favoriteColors") as AttributeAdapter; + id = userEntity?.attributes.get("id")?.typeHelper as AttributeTypeHelper; + name = userEntity?.attributes.get("name")?.typeHelper as AttributeTypeHelper; + createdAt = userEntity?.attributes.get("createdAt")?.typeHelper as AttributeTypeHelper; + releaseDate = userEntity?.attributes.get("releaseDate")?.typeHelper as AttributeTypeHelper; + runningTime = userEntity?.attributes.get("runningTime")?.typeHelper as AttributeTypeHelper; + accountSize = userEntity?.attributes.get("accountSize")?.typeHelper as AttributeTypeHelper; + favoriteColors = userEntity?.attributes.get("favoriteColors")?.typeHelper as AttributeTypeHelper; // extended attributes - password = userEntity?.attributes.get("password") as AttributeAdapter; + password = userEntity?.attributes.get("password")?.typeHelper as AttributeTypeHelper; // hasAccount relationship attributes - creationTime = userAccounts?.attributes.get("creationTime") as AttributeAdapter; + creationTime = userAccounts?.attributes.get("creationTime")?.typeHelper as AttributeTypeHelper; // account attributes - status = accountEntity?.attributes.get("status") as AttributeAdapter; - aOrB = accountEntity?.attributes.get("aOrB") as AttributeAdapter; - point = accountEntity?.attributes.get("point") as AttributeAdapter; - points = accountEntity?.attributes.get("points") as AttributeAdapter; - cartesianPoint = accountEntity?.attributes.get("cartesianPoint") as AttributeAdapter; + status = accountEntity?.attributes.get("status")?.typeHelper as AttributeTypeHelper; + aOrB = accountEntity?.attributes.get("aOrB")?.typeHelper as AttributeTypeHelper; + point = accountEntity?.attributes.get("point")?.typeHelper as AttributeTypeHelper; + points = accountEntity?.attributes.get("points")?.typeHelper as AttributeTypeHelper; + cartesianPoint = accountEntity?.attributes.get("cartesianPoint")?.typeHelper as AttributeTypeHelper; }); describe("attribute types", () => { 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 95ebef375a..4b5dabce48 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -17,7 +17,6 @@ * limitations under the License. */ -import { upperFirst } from "graphql-compose"; import type { Annotations } from "../../annotation/Annotation"; import type { Argument } from "../../argument/Argument"; import type { Attribute } from "../../attribute/Attribute"; @@ -143,15 +142,6 @@ export class RelationshipAdapter { return this._plural; } - /**Note: Required for now to infer the types without ResolveTree */ - public getAggregationFieldTypename(nestedField?: "node" | "edge"): string { - const nestedFieldStr = upperFirst(nestedField || ""); - const aggregationStr = nestedField ? "Aggregate" : "Aggregation"; - return `${this.source.name}${this.target.name}${upperFirst( - this.name - )}${nestedFieldStr}${aggregationStr}Selection`; - } - private initAttributes(attributes: Map) { for (const [attributeName, attribute] of attributes.entries()) { const attributeAdapter = new AttributeAdapter(attribute); @@ -211,13 +201,6 @@ export class RelationshipAdapter { return this._target; } - getTargetTypePrettyName(): string { - if (this.isList) { - return `[${this.target.name}!]${this.isNullable === false ? "!" : ""}`; - } - return `${this.target.name}${this.isNullable === false ? "!" : ""}`; - } - isReadable(): boolean { return this.annotations.selectable?.onRead !== false; } @@ -277,29 +260,19 @@ export class RelationshipAdapter { return this.nestedOperations.size > 0 && !onlyConnectOrCreateAndNoUniqueFields; } - /* - const nonGeneratedProperties = [ - ...objectFields.primitiveFields.filter((field) => !field.autogenerate), - ...objectFields.scalarFields, - ...objectFields.enumFields, - ...objectFields.temporalFields.filter((field) => !field.timestamps), - ...objectFields.pointFields, - ]; - result.hasNonGeneratedProperties = nonGeneratedProperties.length > 0; - */ public get nonGeneratedProperties(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isNonGeneratedField()); } - public get subscriptionConnectedRelationshipFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => - attribute.isSubscriptionConnectedRelationshipField() - ); - } - public get hasNonNullNonGeneratedProperties(): boolean { - return this.nonGeneratedProperties.some((property) => property.isRequired()); + return this.nonGeneratedProperties.some((property) => property.typeHelper.isRequired()); } + /** + * Categories + * = a grouping of attributes + * used to generate different types for the Entity that contains these Attributes + */ + public get aggregableFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isAggregableField()); } @@ -324,11 +297,13 @@ export class RelationshipAdapter { return Array.from(this.attributes.values()).filter((attribute) => attribute.isWhereField()); } - public get arrayMethodFields(): AttributeAdapter[] { - return Array.from(this.attributes.values()).filter((attribute) => attribute.isArrayMethodField()); - } - public get subscriptionWhereFields(): AttributeAdapter[] { return Array.from(this.attributes.values()).filter((attribute) => attribute.isSubscriptionWhereField()); } + + public get subscriptionConnectedRelationshipFields(): AttributeAdapter[] { + return Array.from(this.attributes.values()).filter((attribute) => + attribute.isSubscriptionConnectedRelationshipField() + ); + } } diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts index 11ebaf126b..9584e41a77 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts @@ -38,10 +38,10 @@ export type CreateMutationArgumentNames = { }; export class RelationshipOperations { - private readonly relationshipEntityAdapter: RelationshipAdapter; + private readonly relationship: RelationshipAdapter; - constructor(relationshipEntityAdapter: RelationshipAdapter) { - this.relationshipEntityAdapter = relationshipEntityAdapter; + constructor(relationship: RelationshipAdapter) { + this.relationship = relationship; } public get prefixForTypename(): string { @@ -49,24 +49,40 @@ export class RelationshipOperations { // (part of a implemented Interface, not necessarily annotated as rel) // then return this.interface.name - return this.relationshipEntityAdapter.inheritedFrom || this.relationshipEntityAdapter.source.name; + return this.relationship.inheritedFrom || this.relationship.source.name; } public get fieldInputPrefixForTypename(): string { - const isTargetInterface = this.relationshipEntityAdapter.target instanceof InterfaceEntityAdapter; + const isTargetInterface = this.relationship.target instanceof InterfaceEntityAdapter; if (isTargetInterface) { - return this.relationshipEntityAdapter.source.name; + return this.relationship.source.name; } return this.prefixForTypename; } /**Note: Required for now to infer the types without ResolveTree */ public get connectionFieldTypename(): string { - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}Connection`; + return `${this.prefixForTypename}${upperFirst(this.relationship.name)}Connection`; + } + + /**Note: Required for now to infer the types without ResolveTree */ + public getAggregationFieldTypename(nestedField?: "node" | "edge"): string { + const nestedFieldStr = upperFirst(nestedField || ""); + const aggregationStr = nestedField ? "Aggregate" : "Aggregation"; + return `${this.relationship.source.name}${this.relationship.target.name}${upperFirst( + this.relationship.name + )}${nestedFieldStr}${aggregationStr}Selection`; + } + + getTargetTypePrettyName(): string { + if (this.relationship.isList) { + return `[${this.relationship.target.name}!]${this.relationship.isNullable === false ? "!" : ""}`; + } + return `${this.relationship.target.name}${this.relationship.isNullable === false ? "!" : ""}`; } public getConnectionUnionWhereInputTypename(concreteEntityAdapter: ConcreteEntityAdapter): string { - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.prefixForTypename}${upperFirst(this.relationship.name)}${ concreteEntityAdapter.name }ConnectionWhere`; } @@ -81,65 +97,65 @@ export class RelationshipOperations { /**Note: Required for now to infer the types without ResolveTree */ public get relationshipFieldTypename(): string { - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}Relationship`; + return `${this.prefixForTypename}${upperFirst(this.relationship.name)}Relationship`; } public getFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.prefixForTypename}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity?.name || "" }FieldInput`; } public getToUnionFieldInputTypeName(ifUnionRelationshipTargetEntity: ConcreteEntityAdapter): string { - return `${this.relationshipEntityAdapter.source.name}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.relationship.source.name}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity.name }FieldInput`; } public getUpdateFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity?.name || "" }UpdateFieldInput`; } public getCreateFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity?.name || "" }CreateFieldInput`; } public getDeleteFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity?.name || "" }DeleteFieldInput`; } public getConnectFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity?.name || "" }ConnectFieldInput`; } public getDisconnectFieldInputTypeName(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity?.name || "" }DisconnectFieldInput`; } public getConnectOrCreateInputTypeName(): string { - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectOrCreateInput`; + return `${this.prefixForTypename}${upperFirst(this.relationship.name)}ConnectOrCreateInput`; } public getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter?: ConcreteEntityAdapter): string { - if (this.relationshipEntityAdapter.target instanceof UnionEntityAdapter) { + if (this.relationship.target instanceof UnionEntityAdapter) { if (!concreteTargetEntityAdapter) { throw new Error("missing concreteTargetEntityAdapter"); } - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.prefixForTypename}${upperFirst(this.relationship.name)}${ concreteTargetEntityAdapter.name }ConnectOrCreateFieldInput`; } - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}ConnectOrCreateFieldInput`; + return `${this.prefixForTypename}${upperFirst(this.relationship.name)}ConnectOrCreateFieldInput`; } public getConnectOrCreateOnCreateFieldInputTypeName(concreteTargetEntityAdapter: ConcreteEntityAdapter): string { @@ -147,118 +163,98 @@ export class RelationshipOperations { } public get connectionFieldName(): string { - return `${this.relationshipEntityAdapter.name}Connection`; + return `${this.relationship.name}Connection`; } public getConnectionWhereTypename(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { - return `${this.prefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.prefixForTypename}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity?.name || "" }ConnectionWhere`; } public getUpdateConnectionInputTypename(ifUnionRelationshipTargetEntity?: ConcreteEntityAdapter): string { - return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.fieldInputPrefixForTypename}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity?.name || "" }UpdateConnectionInput`; } public get aggregateInputTypeName(): string { - return `${this.relationshipEntityAdapter.source.name}${upperFirst( - this.relationshipEntityAdapter.name - )}AggregateInput`; + return `${this.relationship.source.name}${upperFirst(this.relationship.name)}AggregateInput`; } public get aggregateTypeName(): string { - return `${this.relationshipEntityAdapter.name}Aggregate`; + return `${this.relationship.name}Aggregate`; } public getAggregationWhereInputTypeName(isA: "Node" | "Edge"): string { - return `${this.relationshipEntityAdapter.source.name}${upperFirst( - this.relationshipEntityAdapter.name - )}${isA}AggregationWhereInput`; + return `${this.relationship.source.name}${upperFirst(this.relationship.name)}${isA}AggregationWhereInput`; } public get subscriptionWhereInputTypeName(): string { - return `${this.relationshipEntityAdapter.source.name}${upperFirst( - this.relationshipEntityAdapter.name - )}RelationshipSubscriptionWhere`; + return `${this.relationship.source.name}${upperFirst(this.relationship.name)}RelationshipSubscriptionWhere`; } public getToUnionSubscriptionWhereInputTypeName(ifUnionRelationshipTargetEntity: ConcreteEntityAdapter): string { - return `${this.relationshipEntityAdapter.source.name}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.relationship.source.name}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity.name }SubscriptionWhere`; } public get unionConnectInputTypeName(): string { - return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( - this.relationshipEntityAdapter.name - )}ConnectInput`; + return `${upperFirst(this.relationship.source.name)}${upperFirst(this.relationship.name)}ConnectInput`; } public get unionDeleteInputTypeName(): string { - return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( - this.relationshipEntityAdapter.name - )}DeleteInput`; + return `${upperFirst(this.relationship.source.name)}${upperFirst(this.relationship.name)}DeleteInput`; } public get unionDisconnectInputTypeName(): string { - return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( - this.relationshipEntityAdapter.name - )}DisconnectInput`; + return `${upperFirst(this.relationship.source.name)}${upperFirst(this.relationship.name)}DisconnectInput`; } public get unionCreateInputTypeName(): string { - return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( - this.relationshipEntityAdapter.name - )}CreateInput`; + return `${upperFirst(this.relationship.source.name)}${upperFirst(this.relationship.name)}CreateInput`; } public get unionCreateFieldInputTypeName(): string { - return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( - this.relationshipEntityAdapter.name - )}CreateFieldInput`; + return `${upperFirst(this.relationship.source.name)}${upperFirst(this.relationship.name)}CreateFieldInput`; } public get unionUpdateInputTypeName(): string { - return `${upperFirst(this.relationshipEntityAdapter.source.name)}${upperFirst( - this.relationshipEntityAdapter.name - )}UpdateInput`; + return `${upperFirst(this.relationship.source.name)}${upperFirst(this.relationship.name)}UpdateInput`; } public getToUnionUpdateInputTypeName(ifUnionRelationshipTargetEntity: ConcreteEntityAdapter): string { - return `${this.relationshipEntityAdapter.source.name}${upperFirst(this.relationshipEntityAdapter.name)}${ + return `${this.relationship.source.name}${upperFirst(this.relationship.name)}${ ifUnionRelationshipTargetEntity.name }UpdateInput`; } public get subscriptionConnectedRelationshipTypeName(): string { - return `${this.relationshipEntityAdapter.source.name}${upperFirst( - this.relationshipEntityAdapter.name - )}ConnectedRelationship`; + return `${this.relationship.source.name}${upperFirst(this.relationship.name)}ConnectedRelationship`; } public get edgeCreateInputTypeName(): string { - return `${this.relationshipEntityAdapter.propertiesTypeName}CreateInput${ - this.relationshipEntityAdapter.hasNonNullNonGeneratedProperties ? `!` : "" + return `${this.relationship.propertiesTypeName}CreateInput${ + this.relationship.hasNonNullNonGeneratedProperties ? `!` : "" }`; } public get createInputTypeName(): string { - return `${this.relationshipEntityAdapter.propertiesTypeName}CreateInput`; + return `${this.relationship.propertiesTypeName}CreateInput`; } public get edgeUpdateInputTypeName(): string { - return `${this.relationshipEntityAdapter.propertiesTypeName}UpdateInput`; + return `${this.relationship.propertiesTypeName}UpdateInput`; } public get whereInputTypeName(): string { - return `${this.relationshipEntityAdapter.propertiesTypeName}Where`; + return `${this.relationship.propertiesTypeName}Where`; } public get edgeSubscriptionWhereInputTypeName(): string { - return `${this.relationshipEntityAdapter.propertiesTypeName}SubscriptionWhere`; + return `${this.relationship.propertiesTypeName}SubscriptionWhere`; } public get sortInputTypeName(): string { - return `${this.relationshipEntityAdapter.propertiesTypeName}Sort`; + return `${this.relationship.propertiesTypeName}Sort`; } public getConnectOrCreateInputFields(target: ConcreteEntityAdapter) { diff --git a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts index 360f69ee0a..fdb71b2348 100644 --- a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts +++ b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts @@ -61,7 +61,7 @@ export class FieldAggregationComposer { const aggregateSelectionNodeFields = this.getAggregationFields( relationshipAdapter.target as ConcreteEntityAdapter ); // TODO: fix ts - const aggregateSelectionNodeName = relationshipAdapter.getAggregationFieldTypename("node"); + const aggregateSelectionNodeName = relationshipAdapter.operations.getAggregationFieldTypename("node"); const aggregateSelectionNode = this.createAggregationField( aggregateSelectionNodeName, @@ -70,7 +70,7 @@ export class FieldAggregationComposer { if (relationshipAdapter.attributes.size > 0) { const aggregateSelectionEdgeFields = this.getAggregationFields(relationshipAdapter); - const aggregateSelectionEdgeName = relationshipAdapter.getAggregationFieldTypename("edge"); + const aggregateSelectionEdgeName = relationshipAdapter.operations.getAggregationFieldTypename("edge"); aggregateSelectionEdge = this.createAggregationField( aggregateSelectionEdgeName, @@ -79,7 +79,7 @@ export class FieldAggregationComposer { } return this.composer.createObjectTC({ - name: relationshipAdapter.getAggregationFieldTypename(), + name: relationshipAdapter.operations.getAggregationFieldTypename(), fields: { count: { type: new GraphQLNonNull(GraphQLInt), @@ -98,7 +98,7 @@ export class FieldAggregationComposer { return entity.aggregableFields.reduce((res, field) => { const objectTypeComposer = this.aggregationTypesMapper.getAggregationType({ fieldName: field.getTypeName(), - nullable: !field.isRequired(), + nullable: !field.typeHelper.isRequired(), }); if (!objectTypeComposer) return res; diff --git a/packages/graphql/src/schema/generation/aggregate-types.ts b/packages/graphql/src/schema/generation/aggregate-types.ts index 04acff946e..ab4ecb1864 100644 --- a/packages/graphql/src/schema/generation/aggregate-types.ts +++ b/packages/graphql/src/schema/generation/aggregate-types.ts @@ -72,7 +72,7 @@ function makeAggregableFields({ for (const attribute of aggregableAttributes) { const objectTypeComposer = aggregationTypesMapper.getAggregationType({ fieldName: attribute.getTypeName(), - nullable: !attribute.isRequired(), + nullable: !attribute.typeHelper.isRequired(), }); if (objectTypeComposer) { aggregableFields[attribute.name] = objectTypeComposer.NonNull; @@ -171,14 +171,14 @@ function makeAggregationFields(attributes: AttributeAdapter[]): InputTypeCompose // TODO: refactor this by introducing specialized Adapters function getAggregationFieldsByType(attribute: AttributeAdapter): InputTypeComposerFieldConfigMapDefinition { const fields: InputTypeComposerFieldConfigMapDefinition = {}; - if (attribute.isID()) { + if (attribute.typeHelper.isID()) { fields[`${attribute.name}_EQUAL`] = { type: GraphQLID, directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], }; return fields; } - if (attribute.isString()) { + if (attribute.typeHelper.isString()) { for (const operator of AGGREGATION_COMPARISON_OPERATORS) { fields[`${attribute.name}_${operator}`] = { type: `${operator === "EQUAL" ? GraphQLString : GraphQLInt}`, @@ -202,7 +202,7 @@ function getAggregationFieldsByType(attribute: AttributeAdapter): InputTypeCompo } return fields; } - if (attribute.isNumeric() || attribute.isDuration()) { + if (attribute.typeHelper.isNumeric() || attribute.typeHelper.isDuration()) { // Types that you can average // https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-avg // https://neo4j.com/docs/cypher-manual/current/functions/aggregating/#functions-avg-duration @@ -217,7 +217,11 @@ function getAggregationFieldsByType(attribute: AttributeAdapter): InputTypeCompo if (attribute.getTypeName() !== "Duration") { fields[`${attribute.name}_SUM_${operator}`] = attribute.getTypeName(); } - const averageType = attribute.isBigInt() ? "BigInt" : attribute.isDuration() ? "Duration" : GraphQLFloat; + const averageType = attribute.typeHelper.isBigInt() + ? "BigInt" + : attribute.typeHelper.isDuration() + ? "Duration" + : GraphQLFloat; fields[`${attribute.name}_AVERAGE_${operator}`] = averageType; } return fields; 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 918514c92a..b1185d2929 100644 --- a/packages/graphql/src/schema/generation/augment-object-or-interface.ts +++ b/packages/graphql/src/schema/generation/augment-object-or-interface.ts @@ -32,7 +32,7 @@ export function augmentObjectOrInterfaceTypeWithRelationshipField( ): Record { const fields = {}; const relationshipField: { type: string; description?: string; directives: Directive[]; args?: any } = { - type: relationshipAdapter.getTargetTypePrettyName(), + type: relationshipAdapter.operations.getTargetTypePrettyName(), description: relationshipAdapter.description, directives: graphqlDirectivesToCompose(userDefinedFieldDirectives.get(relationshipAdapter.name) || []), }; diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index d3f1a5dd34..7f4f9e62ff 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -213,13 +213,13 @@ export function getWhereFieldsForAttributes({ // If the field is a boolean, skip it // This is done here because the previous additions are still added for boolean fields - if (field.isBoolean()) { + if (field.typeHelper.isBoolean()) { continue; } // If the field is an array, add the includes and not includes fields // if (field.isArray()) { - if (field.isList()) { + if (field.typeHelper.isList()) { result[`${field.name}_INCLUDES`] = { type: field.getInputTypeNames().where.type, directives: deprecatedDirectives, @@ -254,7 +254,7 @@ export function getWhereFieldsForAttributes({ } // If the field is spatial, add the point comparison operators - if (field.isSpatial()) { + if (field.typeHelper.isSpatial()) { ["_DISTANCE", "_LT", "_LTE", "_GT", "_GTE"].forEach((comparator) => { result[`${field.name}${comparator}`] = { type: `${field.getTypeName()}Distance`, @@ -265,7 +265,7 @@ export function getWhereFieldsForAttributes({ } // If the field is a string, add the string comparison operators - if (field.isString() || field.isID()) { + if (field.typeHelper.isString() || field.typeHelper.isID()) { const stringWhereOperators: Array<{ comparator: string; typeName: string }> = [ { comparator: "_CONTAINS", typeName: field.getInputTypeNames().where.type }, { comparator: "_STARTS_WITH", typeName: field.getInputTypeNames().where.type }, diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 80b7dd6884..3343e896b6 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -130,10 +130,10 @@ class AugmentedSchemaGenerator { // TODO: check if these can be created ad-hoc if (model instanceof ConcreteEntityAdapter || model instanceof InterfaceEntityAdapter) { for (const attribute of model.attributes.values()) { - if (attribute.isPoint()) { + if (attribute.typeHelper.isPoint()) { pointInTypeDefs = true; } - if (attribute.isCartesianPoint()) { + if (attribute.typeHelper.isCartesianPoint()) { cartesianPointInTypeDefs = true; } } @@ -143,10 +143,10 @@ class AugmentedSchemaGenerator { if (model instanceof ConcreteEntityAdapter) { for (const relationship of model.relationships.values()) { for (const attribute of relationship.attributes.values()) { - if (attribute.isPoint()) { + if (attribute.typeHelper.isPoint()) { pointInTypeDefs = true; } - if (attribute.isCartesianPoint()) { + if (attribute.typeHelper.isCartesianPoint()) { cartesianPointInTypeDefs = true; } } diff --git a/packages/graphql/src/schema/resolvers/field/cypher.ts b/packages/graphql/src/schema/resolvers/field/cypher.ts index 876089806a..6106e37818 100644 --- a/packages/graphql/src/schema/resolvers/field/cypher.ts +++ b/packages/graphql/src/schema/resolvers/field/cypher.ts @@ -81,7 +81,7 @@ export function cypherResolver({ return value; }); - if (!attributeAdapter.isList()) { + if (!attributeAdapter.typeHelper.isList()) { return values[0]; } diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts index b9f4764639..8d47d54ff8 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/filters/filter-by-properties.ts @@ -70,9 +70,9 @@ export function filterByProperties({ } const isFloatOrStringOrIDAsString = (attributeAdapter: AttributeAdapter | undefined, value: string | number) => - attributeAdapter?.isFloat() || - attributeAdapter?.isString() || - (attributeAdapter?.isID() && int(value).toString() !== value); + attributeAdapter?.typeHelper.isFloat() || + attributeAdapter?.typeHelper.isString() || + (attributeAdapter?.typeHelper.isID() && int(value).toString() !== value); const operatorMapOverrides = { INCLUDES: (received: [string | number], filtered: string | number, fieldMeta: AttributeAdapter | undefined) => { diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index 90c7fd9312..d2f02b2a4f 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -127,7 +127,7 @@ export function relationshipAdapterToComposeFields( const relationshipFields = [ { - typeName: field.getTargetTypePrettyName(), + typeName: field.operations.getTargetTypePrettyName(), fieldName: field.name, }, { @@ -175,11 +175,11 @@ export function attributeAdapterToComposeFields( newField.directives = graphqlDirectivesToCompose(userDefinedDirectivesOnField); } - if (field.isInt() || field.isFloat()) { + if (field.typeHelper.isInt() || field.typeHelper.isFloat()) { newField.resolve = numericalResolver; } - if (field.isID()) { + if (field.typeHelper.isID()) { newField.resolve = idResolver; } @@ -335,10 +335,11 @@ export function attributesToSubscriptionsWhereInputFields( : entityWithAttributes.name; const fieldType = attribute.getInputTypeNames().where.pretty; - const ifArrayOfAnyTypeExceptBoolean = attribute.isList() && attribute.getTypeName() !== "Boolean"; - const ifAnyTypeExceptArrayAndBoolean = !attribute.isList() && attribute.getTypeName() !== "Boolean"; - const isOneOfNumberTypes = ["Int", "Float", "BigInt"].includes(attribute.getTypeName()) && !attribute.isList(); - const isOneOfStringTypes = ["String", "ID"].includes(attribute.getTypeName()) && !attribute.isList(); + const ifArrayOfAnyTypeExceptBoolean = attribute.typeHelper.isList() && attribute.getTypeName() !== "Boolean"; + const ifAnyTypeExceptArrayAndBoolean = !attribute.typeHelper.isList() && attribute.getTypeName() !== "Boolean"; + const isOneOfNumberTypes = + ["Int", "Float", "BigInt"].includes(attribute.getTypeName()) && !attribute.typeHelper.isList(); + const isOneOfStringTypes = ["String", "ID"].includes(attribute.getTypeName()) && !attribute.typeHelper.isList(); const isOneOfSpatialTypes = ["Point", "CartesianPoint"].includes(attribute.getTypeName()); let inputTypeName = attribute.getTypeName(); From 52fcb009ccb33b6b1473ed51b56cc60ea59fe03d Mon Sep 17 00:00:00 2001 From: a-alle Date: Wed, 27 Sep 2023 13:25:27 +0100 Subject: [PATCH 146/162] add license header --- .../attribute/AttributeTypeHelper.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts b/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts index 8a50040c5a..d6eb5bcdd3 100644 --- a/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts +++ b/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts @@ -1,3 +1,21 @@ +/* + * 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 { AttributeType } from "./AttributeType"; import { Neo4jGraphQLSpatialType, From bfadfb07277c25f627ceccdacc7a567ed80233d4 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 14:20:31 +0200 Subject: [PATCH 147/162] refactor: remove console.log --- .../tests/e2e/neo4jgraphql/neo4j-database-info.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/graphql/tests/e2e/neo4jgraphql/neo4j-database-info.test.ts b/packages/graphql/tests/e2e/neo4jgraphql/neo4j-database-info.test.ts index e144931679..b02d3228d0 100644 --- a/packages/graphql/tests/e2e/neo4jgraphql/neo4j-database-info.test.ts +++ b/packages/graphql/tests/e2e/neo4jgraphql/neo4j-database-info.test.ts @@ -21,11 +21,11 @@ import type { Driver } from "neo4j-driver"; import type { Response } from "supertest"; import supertest from "supertest"; import { Neo4jGraphQL } from "../../../src/"; +import { Neo4jDatabaseInfo } from "../../../src/classes"; import { UniqueType } from "../../utils/graphql-types"; import type { TestGraphQLServer } from "../setup/apollo-server"; import { ApolloTestServer } from "../setup/apollo-server"; import Neo4j from "../setup/neo4j"; -import { Neo4jDatabaseInfo } from "../../../src/classes"; describe("Create with specific neo4jDatabaseInfo set correctly", () => { let neo4j: Neo4j; @@ -65,8 +65,6 @@ describe("Create with specific neo4jDatabaseInfo set correctly", () => { test("simple mutation", async () => { const result = await createMovie("dsa"); - console.log(result.body); - expect(result.body).toEqual({ data: { [typeMovie.operations.create]: { [typeMovie.plural]: [{ title: "dsa" }] } }, }); From 7e246068fefe294add1055a7a92ada8253707891 Mon Sep 17 00:00:00 2001 From: a-alle Date: Wed, 27 Sep 2023 14:45:28 +0100 Subject: [PATCH 148/162] fix e2e tests --- .../src/schema/generation/connect-or-create-input.ts | 8 ++++---- .../tests/e2e/subscriptions/delete-complex.e2e.test.ts | 3 ++- ...relationship-via-delete-with-relationships.e2e.test.ts | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/graphql/src/schema/generation/connect-or-create-input.ts b/packages/graphql/src/schema/generation/connect-or-create-input.ts index 69d828c356..8d7095fd52 100644 --- a/packages/graphql/src/schema/generation/connect-or-create-input.ts +++ b/packages/graphql/src/schema/generation/connect-or-create-input.ts @@ -106,9 +106,6 @@ export function withConnectOrCreateInputType({ throw new Error("Unexpected union source"); } const typeName = relationshipAdapter.source.operations.connectOrCreateInputTypeName; - if (composer.has(typeName)) { - return composer.getITC(typeName); - } const fieldInput = makeConnectOrCreateInputType({ relationshipAdapter, @@ -125,7 +122,10 @@ export function withConnectOrCreateInputType({ fieldInput, deprecatedDirectives, }); - const connectOrCreateInput = composer.createInputTC({ name: typeName, fields }); + const connectOrCreateInput = composer.getOrCreateITC(typeName); + + connectOrCreateInput.addFields(fields); + return connectOrCreateInput; } function makeConnectOrCreateInputType({ diff --git a/packages/graphql/tests/e2e/subscriptions/delete-complex.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/delete-complex.e2e.test.ts index cae1c63c96..defb598ac1 100644 --- a/packages/graphql/tests/e2e/subscriptions/delete-complex.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/delete-complex.e2e.test.ts @@ -83,7 +83,8 @@ describe("Delete Subscriptions - with interfaces, unions and nested operations", url: String! } - union Director = ${typePerson} | ${typeActor} + #union Director = ${typePerson} | ${typeActor} + union Director = ${typeActor} | ${typePerson} interface Reviewer { reputation: Int! diff --git a/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete-with-relationships.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete-with-relationships.e2e.test.ts index a23f612d7e..fc7820e25b 100644 --- a/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete-with-relationships.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete-with-relationships.e2e.test.ts @@ -83,7 +83,8 @@ describe("Delete Subscriptions when relationships are targeted- with interfaces, url: String! } - union Director = ${typePerson} | ${typeActor} + #union Director = ${typePerson} | ${typeActor} + union Director = ${typeActor} | ${typePerson} interface Reviewer { reputation: Int! From c428d01cac8e458d512f56bd9410fbb38353879f Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Wed, 27 Sep 2023 16:13:58 +0200 Subject: [PATCH 149/162] test: add schema test for change in connect-or-create --- .../union-interface-relationship.test.ts | 1901 +++++++++++++++++ 1 file changed, 1901 insertions(+) create mode 100644 packages/graphql/tests/schema/union-interface-relationship.test.ts diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts new file mode 100644 index 0000000000..d25797bbb2 --- /dev/null +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -0,0 +1,1901 @@ +/* + * 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"; +import { Neo4jGraphQL } from "../../src"; + +describe("Union Interface Relationships", () => { + test("Union Interface Relationships", async () => { + const typeDefs = ` + type Movie { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + directors: [Director!]! @relationship(type: "DIRECTED", properties: "Directed", direction: IN) + reviewers: [Reviewer!]! @relationship(type: "REVIEWED", properties: "Review", direction: IN) + imdbId: Int @unique + } + + type Actor { + name: String! + id: Int @unique + movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + interface ActedIn @relationshipProperties { + screenTime: Int! + } + + interface Directed @relationshipProperties { + year: Int! + } + + interface Review @relationshipProperties { + score: Int! + } + + type Person implements Reviewer { + name: String! + reputation: Int! + id: Int @unique + reviewerId: Int @unique + movies: [Movie!]! @relationship(type: "REVIEWED", direction: OUT, properties: "Review") + } + + type Influencer implements Reviewer { + reputation: Int! + url: String! + reviewerId: Int + } + + union Director = Person | Actor + + interface Reviewer { + reputation: Int! + reviewerId: Int + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + interface ActedIn { + screenTime: Int! + } + + input ActedInCreateInput { + screenTime: Int! + } + + input ActedInSort { + screenTime: SortDirection + } + + input ActedInUpdateInput { + screenTime: Int + screenTime_DECREMENT: Int + screenTime_INCREMENT: Int + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + screenTime: Int + screenTime_GT: Int + screenTime_GTE: Int + screenTime_IN: [Int!] + screenTime_LT: Int + screenTime_LTE: Int + screenTime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + screenTime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Actor { + id: Int + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String! + } + + type ActorAggregateSelection { + count: Int! + id: IntAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectOrCreateInput { + movies: [ActorMoviesConnectOrCreateFieldInput!] + } + + input ActorConnectOrCreateWhere { + node: ActorUniqueWhere! + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + id: Int + 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: IntAggregateSelectionNonNullable! + } + + type ActorMovieMoviesNodeAggregateSelection { + imdbId: IntAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActorMoviesEdgeAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + input ActorMoviesConnectOrCreateFieldInput { + onCreate: ActorMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! + } + + input ActorMoviesConnectOrCreateFieldInputOnCreate { + edge: ActedInCreateInput! + node: MovieOnCreateInput! + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + edge: ActedInSort + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input ActorMoviesCreateFieldInput { + edge: ActedInCreateInput! + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesEdgeAggregationWhereInput { + AND: [ActorMoviesEdgeAggregationWhereInput!] + NOT: ActorMoviesEdgeAggregationWhereInput + OR: [ActorMoviesEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + imdbId_AVERAGE_EQUAL: Float + imdbId_AVERAGE_GT: Float + imdbId_AVERAGE_GTE: Float + imdbId_AVERAGE_LT: Float + imdbId_AVERAGE_LTE: Float + imdbId_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_MAX_EQUAL: Int + imdbId_MAX_GT: Int + imdbId_MAX_GTE: Int + imdbId_MAX_LT: Int + imdbId_MAX_LTE: Int + imdbId_MIN_EQUAL: Int + imdbId_MIN_GT: Int + imdbId_MIN_GTE: Int + imdbId_MIN_LT: Int + imdbId_MIN_LTE: Int + imdbId_SUM_EQUAL: Int + imdbId_SUM_GT: Int + imdbId_SUM_GTE: Int + imdbId_SUM_LT: Int + imdbId_SUM_LTE: Int + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type ActorMoviesRelationship implements ActedIn { + cursor: String! + node: Movie! + screenTime: Int! + } + + input ActorMoviesUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput + } + + input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + connectOrCreate: [ActorMoviesConnectOrCreateFieldInput!] + create: [ActorMoviesCreateFieldInput!] + delete: [ActorMoviesDeleteFieldInput!] + disconnect: [ActorMoviesDisconnectFieldInput!] + update: ActorMoviesUpdateConnectionInput + where: ActorMoviesConnectionWhere + } + + input ActorOnCreateInput { + id: Int + name: String! + } + + 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!] + } + + input ActorRelationInput { + movies: [ActorMoviesCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: SortDirection + name: SortDirection + } + + input ActorUniqueWhere { + id: Int + } + + input ActorUpdateInput { + id: Int + id_DECREMENT: Int + id_INCREMENT: Int + movies: [ActorMoviesUpdateFieldInput!] + name: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + id: Int + id_GT: Int + id_GTE: Int + id_IN: [Int] + id_LT: Int + id_LTE: Int + id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + moviesConnection_NOT: ActorMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"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 + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + type CreateInfluencersMutationResponse { + influencers: [Influencer!]! + info: CreateInfo! + } + + \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + type CreateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreatePeopleMutationResponse { + info: CreateInfo! + people: [Person!]! + } + + \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + type DeleteInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + interface Directed { + year: Int! + } + + input DirectedCreateInput { + year: Int! + } + + input DirectedSort { + year: SortDirection + } + + input DirectedUpdateInput { + year: Int + year_DECREMENT: Int + year_INCREMENT: Int + } + + input DirectedWhere { + AND: [DirectedWhere!] + NOT: DirectedWhere + OR: [DirectedWhere!] + year: Int + year_GT: Int + year_GTE: Int + year_IN: [Int!] + year_LT: Int + year_LTE: Int + year_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + year_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + union Director = Actor | Person + + input DirectorWhere { + Actor: ActorWhere + Person: PersonWhere + } + + type Influencer implements Reviewer { + reputation: Int! + reviewerId: Int + url: String! + } + + type InfluencerAggregateSelection { + count: Int! + reputation: IntAggregateSelectionNonNullable! + reviewerId: IntAggregateSelectionNullable! + url: StringAggregateSelectionNonNullable! + } + + input InfluencerCreateInput { + reputation: Int! + reviewerId: Int + url: String! + } + + type InfluencerEdge { + cursor: String! + node: Influencer! + } + + input InfluencerOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more InfluencerSort objects to sort Influencers by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [InfluencerSort!] + } + + \\"\\"\\" + Fields to sort Influencers by. The order in which sorts are applied is not guaranteed when specifying many fields in one InfluencerSort object. + \\"\\"\\" + input InfluencerSort { + reputation: SortDirection + reviewerId: SortDirection + url: SortDirection + } + + input InfluencerUpdateInput { + reputation: Int + reputation_DECREMENT: Int + reputation_INCREMENT: Int + reviewerId: Int + reviewerId_DECREMENT: Int + reviewerId_INCREMENT: Int + url: String + } + + input InfluencerWhere { + AND: [InfluencerWhere!] + NOT: InfluencerWhere + OR: [InfluencerWhere!] + reputation: Int + reputation_GT: Int + reputation_GTE: Int + reputation_IN: [Int!] + reputation_LT: Int + reputation_LTE: Int + reputation_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reputation_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reviewerId: Int + reviewerId_GT: Int + reviewerId_GTE: Int + reviewerId_IN: [Int] + reviewerId_LT: Int + reviewerId_LTE: Int + reviewerId_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reviewerId_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + url: String + url_CONTAINS: String + url_ENDS_WITH: String + url_IN: [String!] + url_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + url_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + url_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + url_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + url_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + url_STARTS_WITH: String + } + + type InfluencersConnection { + edges: [InfluencerEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type IntAggregateSelectionNonNullable { + average: Float! + max: Int! + min: Int! + sum: Int! + } + + type IntAggregateSelectionNullable { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie { + actors(directed: Boolean = true, options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true, where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + directors(directed: Boolean = true, options: QueryOptions, where: DirectorWhere): [Director!]! + directorsConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectorsConnectionSort!], where: MovieDirectorsConnectionWhere): MovieDirectorsConnection! + imdbId: Int + reviewers(directed: Boolean = true, options: ReviewerOptions, where: ReviewerWhere): [Reviewer!]! + reviewersConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieReviewersConnectionSort!], where: MovieReviewersConnectionWhere): MovieReviewersConnection! + title: String! + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + screenTime: IntAggregateSelectionNonNullable! + } + + type MovieActorActorsNodeAggregateSelection { + id: IntAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: MovieActorsEdgeAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: ActorConnectWhere + } + + input MovieActorsConnectOrCreateFieldInput { + onCreate: MovieActorsConnectOrCreateFieldInputOnCreate! + where: ActorConnectOrCreateWhere! + } + + input MovieActorsConnectOrCreateFieldInputOnCreate { + edge: ActedInCreateInput! + node: ActorOnCreateInput! + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + edge: ActedInSort + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + edge: ActedInWhere + edge_NOT: ActedInWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieActorsCreateFieldInput { + edge: ActedInCreateInput! + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsEdgeAggregationWhereInput { + AND: [MovieActorsEdgeAggregationWhereInput!] + NOT: MovieActorsEdgeAggregationWhereInput + OR: [MovieActorsEdgeAggregationWhereInput!] + screenTime_AVERAGE_EQUAL: Float + screenTime_AVERAGE_GT: Float + screenTime_AVERAGE_GTE: Float + screenTime_AVERAGE_LT: Float + screenTime_AVERAGE_LTE: Float + screenTime_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + screenTime_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + 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 MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + id_AVERAGE_EQUAL: Float + id_AVERAGE_GT: Float + id_AVERAGE_GTE: Float + id_AVERAGE_LT: Float + id_AVERAGE_LTE: Float + id_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + id_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + id_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + id_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + id_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + id_MAX_EQUAL: Int + id_MAX_GT: Int + id_MAX_GTE: Int + id_MAX_LT: Int + id_MAX_LTE: Int + id_MIN_EQUAL: Int + id_MIN_GT: Int + id_MIN_GTE: Int + id_MIN_LT: Int + id_MIN_LTE: Int + id_SUM_EQUAL: Int + id_SUM_GT: Int + id_SUM_GTE: Int + id_SUM_LT: Int + id_SUM_LTE: Int + name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type MovieActorsRelationship implements ActedIn { + cursor: String! + node: Actor! + screenTime: Int! + } + + input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + connectOrCreate: [MovieActorsConnectOrCreateFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + imdbId: IntAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + directors: MovieDirectorsConnectInput + reviewers: [MovieReviewersConnectFieldInput!] + } + + input MovieConnectOrCreateInput { + actors: [MovieActorsConnectOrCreateFieldInput!] + directors: MovieDirectorsConnectOrCreateInput + } + + input MovieConnectOrCreateWhere { + node: MovieUniqueWhere! + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + directors: MovieDirectorsCreateInput + imdbId: Int + reviewers: MovieReviewersFieldInput + title: String! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + directors: MovieDirectorsDeleteInput + reviewers: [MovieReviewersDeleteFieldInput!] + } + + input MovieDirectorsActorConnectFieldInput { + connect: [ActorConnectInput!] + edge: DirectedCreateInput! + where: ActorConnectWhere + } + + input MovieDirectorsActorConnectOrCreateFieldInput { + onCreate: MovieDirectorsActorConnectOrCreateFieldInputOnCreate! + where: ActorConnectOrCreateWhere! + } + + input MovieDirectorsActorConnectOrCreateFieldInputOnCreate { + edge: DirectedCreateInput! + node: ActorOnCreateInput! + } + + input MovieDirectorsActorConnectionWhere { + AND: [MovieDirectorsActorConnectionWhere!] + NOT: MovieDirectorsActorConnectionWhere + OR: [MovieDirectorsActorConnectionWhere!] + edge: DirectedWhere + edge_NOT: DirectedWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ActorWhere + node_NOT: ActorWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieDirectorsActorCreateFieldInput { + edge: DirectedCreateInput! + node: ActorCreateInput! + } + + input MovieDirectorsActorDeleteFieldInput { + delete: ActorDeleteInput + where: MovieDirectorsActorConnectionWhere + } + + input MovieDirectorsActorDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieDirectorsActorConnectionWhere + } + + input MovieDirectorsActorFieldInput { + connect: [MovieDirectorsActorConnectFieldInput!] + connectOrCreate: [MovieDirectorsActorConnectOrCreateFieldInput!] + create: [MovieDirectorsActorCreateFieldInput!] + } + + input MovieDirectorsActorUpdateConnectionInput { + edge: DirectedUpdateInput + node: ActorUpdateInput + } + + input MovieDirectorsActorUpdateFieldInput { + connect: [MovieDirectorsActorConnectFieldInput!] + connectOrCreate: [MovieDirectorsActorConnectOrCreateFieldInput!] + create: [MovieDirectorsActorCreateFieldInput!] + delete: [MovieDirectorsActorDeleteFieldInput!] + disconnect: [MovieDirectorsActorDisconnectFieldInput!] + update: MovieDirectorsActorUpdateConnectionInput + where: MovieDirectorsActorConnectionWhere + } + + input MovieDirectorsConnectInput { + Actor: [MovieDirectorsActorConnectFieldInput!] + Person: [MovieDirectorsPersonConnectFieldInput!] + } + + input MovieDirectorsConnectOrCreateInput { + Actor: [MovieDirectorsActorConnectOrCreateFieldInput!] + Person: [MovieDirectorsPersonConnectOrCreateFieldInput!] + } + + type MovieDirectorsConnection { + edges: [MovieDirectorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieDirectorsConnectionSort { + edge: DirectedSort + } + + input MovieDirectorsConnectionWhere { + Actor: MovieDirectorsActorConnectionWhere + Person: MovieDirectorsPersonConnectionWhere + } + + input MovieDirectorsCreateFieldInput { + Actor: [MovieDirectorsActorCreateFieldInput!] + Person: [MovieDirectorsPersonCreateFieldInput!] + } + + input MovieDirectorsCreateInput { + Actor: MovieDirectorsActorFieldInput + Person: MovieDirectorsPersonFieldInput + } + + input MovieDirectorsDeleteInput { + Actor: [MovieDirectorsActorDeleteFieldInput!] + Person: [MovieDirectorsPersonDeleteFieldInput!] + } + + input MovieDirectorsDisconnectInput { + Actor: [MovieDirectorsActorDisconnectFieldInput!] + Person: [MovieDirectorsPersonDisconnectFieldInput!] + } + + input MovieDirectorsPersonConnectFieldInput { + connect: [PersonConnectInput!] + edge: DirectedCreateInput! + where: PersonConnectWhere + } + + input MovieDirectorsPersonConnectOrCreateFieldInput { + onCreate: MovieDirectorsPersonConnectOrCreateFieldInputOnCreate! + where: PersonConnectOrCreateWhere! + } + + input MovieDirectorsPersonConnectOrCreateFieldInputOnCreate { + edge: DirectedCreateInput! + node: PersonOnCreateInput! + } + + input MovieDirectorsPersonConnectionWhere { + AND: [MovieDirectorsPersonConnectionWhere!] + NOT: MovieDirectorsPersonConnectionWhere + OR: [MovieDirectorsPersonConnectionWhere!] + edge: DirectedWhere + edge_NOT: DirectedWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: PersonWhere + node_NOT: PersonWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieDirectorsPersonCreateFieldInput { + edge: DirectedCreateInput! + node: PersonCreateInput! + } + + input MovieDirectorsPersonDeleteFieldInput { + delete: PersonDeleteInput + where: MovieDirectorsPersonConnectionWhere + } + + input MovieDirectorsPersonDisconnectFieldInput { + disconnect: PersonDisconnectInput + where: MovieDirectorsPersonConnectionWhere + } + + input MovieDirectorsPersonFieldInput { + connect: [MovieDirectorsPersonConnectFieldInput!] + connectOrCreate: [MovieDirectorsPersonConnectOrCreateFieldInput!] + create: [MovieDirectorsPersonCreateFieldInput!] + } + + input MovieDirectorsPersonUpdateConnectionInput { + edge: DirectedUpdateInput + node: PersonUpdateInput + } + + input MovieDirectorsPersonUpdateFieldInput { + connect: [MovieDirectorsPersonConnectFieldInput!] + connectOrCreate: [MovieDirectorsPersonConnectOrCreateFieldInput!] + create: [MovieDirectorsPersonCreateFieldInput!] + delete: [MovieDirectorsPersonDeleteFieldInput!] + disconnect: [MovieDirectorsPersonDisconnectFieldInput!] + update: MovieDirectorsPersonUpdateConnectionInput + where: MovieDirectorsPersonConnectionWhere + } + + type MovieDirectorsRelationship implements Directed { + cursor: String! + node: Director! + year: Int! + } + + input MovieDirectorsUpdateInput { + Actor: [MovieDirectorsActorUpdateFieldInput!] + Person: [MovieDirectorsPersonUpdateFieldInput!] + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + directors: MovieDirectorsDisconnectInput + reviewers: [MovieReviewersDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOnCreateInput { + imdbId: Int + title: String! + } + + 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!] + } + + input MovieRelationInput { + actors: [MovieActorsCreateFieldInput!] + directors: MovieDirectorsCreateFieldInput + reviewers: [MovieReviewersCreateFieldInput!] + } + + input MovieReviewersConnectFieldInput { + connect: ReviewerConnectInput + edge: ReviewCreateInput! + where: ReviewerConnectWhere + } + + type MovieReviewersConnection { + edges: [MovieReviewersRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieReviewersConnectionSort { + edge: ReviewSort + node: ReviewerSort + } + + input MovieReviewersConnectionWhere { + AND: [MovieReviewersConnectionWhere!] + NOT: MovieReviewersConnectionWhere + OR: [MovieReviewersConnectionWhere!] + edge: ReviewWhere + edge_NOT: ReviewWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: ReviewerWhere + node_NOT: ReviewerWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input MovieReviewersCreateFieldInput { + edge: ReviewCreateInput! + node: ReviewerCreateInput! + } + + input MovieReviewersDeleteFieldInput { + delete: ReviewerDeleteInput + where: MovieReviewersConnectionWhere + } + + input MovieReviewersDisconnectFieldInput { + disconnect: ReviewerDisconnectInput + where: MovieReviewersConnectionWhere + } + + input MovieReviewersFieldInput { + connect: [MovieReviewersConnectFieldInput!] + create: [MovieReviewersCreateFieldInput!] + } + + type MovieReviewersRelationship implements Review { + cursor: String! + node: Reviewer! + score: Int! + } + + input MovieReviewersUpdateConnectionInput { + edge: ReviewUpdateInput + node: ReviewerUpdateInput + } + + input MovieReviewersUpdateFieldInput { + connect: [MovieReviewersConnectFieldInput!] + create: [MovieReviewersCreateFieldInput!] + delete: [MovieReviewersDeleteFieldInput!] + disconnect: [MovieReviewersDisconnectFieldInput!] + update: MovieReviewersUpdateConnectionInput + where: MovieReviewersConnectionWhere + } + + \\"\\"\\" + 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 { + imdbId: SortDirection + title: SortDirection + } + + input MovieUniqueWhere { + imdbId: Int + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + directors: MovieDirectorsUpdateInput + imdbId: Int + imdbId_DECREMENT: Int + imdbId_INCREMENT: Int + reviewers: [MovieReviewersUpdateFieldInput!] + title: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorWhere @deprecated(reason: \\"Use \`actors_SOME\` instead.\\") + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_SOME\` instead.\\") + \\"\\"\\" + 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 + actorsConnection_NOT: MovieActorsConnectionWhere @deprecated(reason: \\"Use \`actorsConnection_NONE\` instead.\\") + \\"\\"\\" + 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 + actors_NOT: ActorWhere @deprecated(reason: \\"Use \`actors_NONE\` instead.\\") + \\"\\"\\"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 + directorsConnection: MovieDirectorsConnectionWhere @deprecated(reason: \\"Use \`directorsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieDirectorsConnections match this filter + \\"\\"\\" + directorsConnection_ALL: MovieDirectorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieDirectorsConnections match this filter + \\"\\"\\" + directorsConnection_NONE: MovieDirectorsConnectionWhere + directorsConnection_NOT: MovieDirectorsConnectionWhere @deprecated(reason: \\"Use \`directorsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieDirectorsConnections match this filter + \\"\\"\\" + directorsConnection_SINGLE: MovieDirectorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieDirectorsConnections match this filter + \\"\\"\\" + directorsConnection_SOME: MovieDirectorsConnectionWhere + imdbId: Int + imdbId_GT: Int + imdbId_GTE: Int + imdbId_IN: [Int] + imdbId_LT: Int + imdbId_LTE: Int + imdbId_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + imdbId_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reviewersConnection: MovieReviewersConnectionWhere @deprecated(reason: \\"Use \`reviewersConnection_SOME\` instead.\\") + \\"\\"\\" + Return Movies where all of the related MovieReviewersConnections match this filter + \\"\\"\\" + reviewersConnection_ALL: MovieReviewersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieReviewersConnections match this filter + \\"\\"\\" + reviewersConnection_NONE: MovieReviewersConnectionWhere + reviewersConnection_NOT: MovieReviewersConnectionWhere @deprecated(reason: \\"Use \`reviewersConnection_NONE\` instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieReviewersConnections match this filter + \\"\\"\\" + reviewersConnection_SINGLE: MovieReviewersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieReviewersConnections match this filter + \\"\\"\\" + reviewersConnection_SOME: MovieReviewersConnectionWhere + title: String + title_CONTAINS: String + title_ENDS_WITH: String + title_IN: [String!] + title_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createInfluencers(input: [InfluencerCreateInput!]!): CreateInfluencersMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createPeople(input: [PersonCreateInput!]!): CreatePeopleMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteInfluencers(where: InfluencerWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + deletePeople(delete: PersonDeleteInput, where: PersonWhere): DeleteInfo! + updateActors(connect: ActorConnectInput, connectOrCreate: ActorConnectOrCreateInput, create: ActorRelationInput, delete: ActorDeleteInput, disconnect: ActorDisconnectInput, update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateInfluencers(update: InfluencerUpdateInput, where: InfluencerWhere): UpdateInfluencersMutationResponse! + updateMovies(connect: MovieConnectInput, connectOrCreate: MovieConnectOrCreateInput, create: MovieRelationInput, delete: MovieDeleteInput, disconnect: MovieDisconnectInput, update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updatePeople(connect: PersonConnectInput, connectOrCreate: PersonConnectOrCreateInput, create: PersonRelationInput, delete: PersonDeleteInput, disconnect: PersonDisconnectInput, update: PersonUpdateInput, where: PersonWhere): UpdatePeopleMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type PeopleConnection { + edges: [PersonEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Person implements Reviewer { + id: Int + movies(directed: Boolean = true, options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true, where: MovieWhere): PersonMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! + name: String! + reputation: Int! + reviewerId: Int + } + + type PersonAggregateSelection { + count: Int! + id: IntAggregateSelectionNullable! + name: StringAggregateSelectionNonNullable! + reputation: IntAggregateSelectionNonNullable! + reviewerId: IntAggregateSelectionNullable! + } + + input PersonConnectInput { + movies: [PersonMoviesConnectFieldInput!] + } + + input PersonConnectOrCreateInput { + movies: [PersonMoviesConnectOrCreateFieldInput!] + } + + input PersonConnectOrCreateWhere { + node: PersonUniqueWhere! + } + + input PersonConnectWhere { + node: PersonWhere! + } + + input PersonCreateInput { + id: Int + movies: PersonMoviesFieldInput + name: String! + reputation: Int! + reviewerId: Int + } + + input PersonDeleteInput { + movies: [PersonMoviesDeleteFieldInput!] + } + + input PersonDisconnectInput { + movies: [PersonMoviesDisconnectFieldInput!] + } + + type PersonEdge { + cursor: String! + node: Person! + } + + type PersonMovieMoviesAggregationSelection { + count: Int! + edge: PersonMovieMoviesEdgeAggregateSelection + node: PersonMovieMoviesNodeAggregateSelection + } + + type PersonMovieMoviesEdgeAggregateSelection { + score: IntAggregateSelectionNonNullable! + } + + type PersonMovieMoviesNodeAggregateSelection { + imdbId: IntAggregateSelectionNullable! + title: StringAggregateSelectionNonNullable! + } + + input PersonMoviesAggregateInput { + AND: [PersonMoviesAggregateInput!] + NOT: PersonMoviesAggregateInput + OR: [PersonMoviesAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: PersonMoviesEdgeAggregationWhereInput + node: PersonMoviesNodeAggregationWhereInput + } + + input PersonMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ReviewCreateInput! + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true + where: MovieConnectWhere + } + + input PersonMoviesConnectOrCreateFieldInput { + onCreate: PersonMoviesConnectOrCreateFieldInputOnCreate! + where: MovieConnectOrCreateWhere! + } + + input PersonMoviesConnectOrCreateFieldInputOnCreate { + edge: ReviewCreateInput! + node: MovieOnCreateInput! + } + + type PersonMoviesConnection { + edges: [PersonMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PersonMoviesConnectionSort { + edge: ReviewSort + node: MovieSort + } + + input PersonMoviesConnectionWhere { + AND: [PersonMoviesConnectionWhere!] + NOT: PersonMoviesConnectionWhere + OR: [PersonMoviesConnectionWhere!] + edge: ReviewWhere + edge_NOT: ReviewWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + node: MovieWhere + node_NOT: MovieWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PersonMoviesCreateFieldInput { + edge: ReviewCreateInput! + node: MovieCreateInput! + } + + input PersonMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: PersonMoviesConnectionWhere + } + + input PersonMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: PersonMoviesConnectionWhere + } + + input PersonMoviesEdgeAggregationWhereInput { + AND: [PersonMoviesEdgeAggregationWhereInput!] + NOT: PersonMoviesEdgeAggregationWhereInput + OR: [PersonMoviesEdgeAggregationWhereInput!] + score_AVERAGE_EQUAL: Float + score_AVERAGE_GT: Float + score_AVERAGE_GTE: Float + score_AVERAGE_LT: Float + score_AVERAGE_LTE: Float + score_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + score_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + score_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + score_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + score_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + score_MAX_EQUAL: Int + score_MAX_GT: Int + score_MAX_GTE: Int + score_MAX_LT: Int + score_MAX_LTE: Int + score_MIN_EQUAL: Int + score_MIN_GT: Int + score_MIN_GTE: Int + score_MIN_LT: Int + score_MIN_LTE: Int + score_SUM_EQUAL: Int + score_SUM_GT: Int + score_SUM_GTE: Int + score_SUM_LT: Int + score_SUM_LTE: Int + } + + input PersonMoviesFieldInput { + connect: [PersonMoviesConnectFieldInput!] + connectOrCreate: [PersonMoviesConnectOrCreateFieldInput!] + create: [PersonMoviesCreateFieldInput!] + } + + input PersonMoviesNodeAggregationWhereInput { + AND: [PersonMoviesNodeAggregationWhereInput!] + NOT: PersonMoviesNodeAggregationWhereInput + OR: [PersonMoviesNodeAggregationWhereInput!] + imdbId_AVERAGE_EQUAL: Float + imdbId_AVERAGE_GT: Float + imdbId_AVERAGE_GTE: Float + imdbId_AVERAGE_LT: Float + imdbId_AVERAGE_LTE: Float + imdbId_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + imdbId_MAX_EQUAL: Int + imdbId_MAX_GT: Int + imdbId_MAX_GTE: Int + imdbId_MAX_LT: Int + imdbId_MAX_LTE: Int + imdbId_MIN_EQUAL: Int + imdbId_MIN_GT: Int + imdbId_MIN_GTE: Int + imdbId_MIN_LT: Int + imdbId_MIN_LTE: Int + imdbId_SUM_EQUAL: Int + imdbId_SUM_GT: Int + imdbId_SUM_GTE: Int + imdbId_SUM_LT: Int + imdbId_SUM_LTE: Int + title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + 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 + title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type PersonMoviesRelationship implements Review { + cursor: String! + node: Movie! + score: Int! + } + + input PersonMoviesUpdateConnectionInput { + edge: ReviewUpdateInput + node: MovieUpdateInput + } + + input PersonMoviesUpdateFieldInput { + connect: [PersonMoviesConnectFieldInput!] + connectOrCreate: [PersonMoviesConnectOrCreateFieldInput!] + create: [PersonMoviesCreateFieldInput!] + delete: [PersonMoviesDeleteFieldInput!] + disconnect: [PersonMoviesDisconnectFieldInput!] + update: PersonMoviesUpdateConnectionInput + where: PersonMoviesConnectionWhere + } + + input PersonOnCreateInput { + id: Int + name: String! + reputation: Int! + reviewerId: Int + } + + input PersonOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PersonSort objects to sort People by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PersonSort!] + } + + input PersonRelationInput { + movies: [PersonMoviesCreateFieldInput!] + } + + \\"\\"\\" + Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. + \\"\\"\\" + input PersonSort { + id: SortDirection + name: SortDirection + reputation: SortDirection + reviewerId: SortDirection + } + + input PersonUniqueWhere { + id: Int + reviewerId: Int + } + + input PersonUpdateInput { + id: Int + id_DECREMENT: Int + id_INCREMENT: Int + movies: [PersonMoviesUpdateFieldInput!] + name: String + reputation: Int + reputation_DECREMENT: Int + reputation_INCREMENT: Int + reviewerId: Int + reviewerId_DECREMENT: Int + reviewerId_INCREMENT: Int + } + + input PersonWhere { + AND: [PersonWhere!] + NOT: PersonWhere + OR: [PersonWhere!] + id: Int + id_GT: Int + id_GTE: Int + id_IN: [Int] + id_LT: Int + id_LTE: Int + id_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + movies: MovieWhere @deprecated(reason: \\"Use \`movies_SOME\` instead.\\") + moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_SOME\` instead.\\") + \\"\\"\\" + Return People where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NOT: PersonMoviesConnectionWhere @deprecated(reason: \\"Use \`moviesConnection_NONE\` instead.\\") + \\"\\"\\" + Return People where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: PersonMoviesConnectionWhere + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + movies_NOT: MovieWhere @deprecated(reason: \\"Use \`movies_NONE\` instead.\\") + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + reputation: Int + reputation_GT: Int + reputation_GTE: Int + reputation_IN: [Int!] + reputation_LT: Int + reputation_LTE: Int + reputation_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reputation_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reviewerId: Int + reviewerId_GT: Int + reviewerId_GTE: Int + reviewerId_IN: [Int] + reviewerId_LT: Int + reviewerId_LTE: Int + reviewerId_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reviewerId_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + type Query { + actors(options: ActorOptions, where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort], where: ActorWhere): ActorsConnection! + influencers(options: InfluencerOptions, where: InfluencerWhere): [Influencer!]! + influencersAggregate(where: InfluencerWhere): InfluencerAggregateSelection! + influencersConnection(after: String, first: Int, sort: [InfluencerSort], where: InfluencerWhere): InfluencersConnection! + movies(options: MovieOptions, where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! + people(options: PersonOptions, where: PersonWhere): [Person!]! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! + } + + \\"\\"\\"\\"\\"\\" + input QueryOptions { + limit: Int + offset: Int + } + + interface Review { + score: Int! + } + + input ReviewCreateInput { + score: Int! + } + + input ReviewSort { + score: SortDirection + } + + input ReviewUpdateInput { + score: Int + score_DECREMENT: Int + score_INCREMENT: Int + } + + input ReviewWhere { + AND: [ReviewWhere!] + NOT: ReviewWhere + OR: [ReviewWhere!] + score: Int + score_GT: Int + score_GTE: Int + score_IN: [Int!] + score_LT: Int + score_LTE: Int + score_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + score_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + interface Reviewer { + reputation: Int! + reviewerId: Int + } + + input ReviewerConnectInput { + _on: ReviewerImplementationsConnectInput + } + + input ReviewerConnectWhere { + node: ReviewerWhere! + } + + input ReviewerCreateInput { + Influencer: InfluencerCreateInput + Person: PersonCreateInput + } + + input ReviewerDeleteInput { + _on: ReviewerImplementationsDeleteInput + } + + input ReviewerDisconnectInput { + _on: ReviewerImplementationsDisconnectInput + } + + input ReviewerImplementationsConnectInput { + Person: [PersonConnectInput!] + } + + input ReviewerImplementationsDeleteInput { + Person: [PersonDeleteInput!] + } + + input ReviewerImplementationsDisconnectInput { + Person: [PersonDisconnectInput!] + } + + input ReviewerImplementationsUpdateInput { + Influencer: InfluencerUpdateInput + Person: PersonUpdateInput + } + + input ReviewerImplementationsWhere { + Influencer: InfluencerWhere + Person: PersonWhere + } + + input ReviewerOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ReviewerSort objects to sort Reviewers by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ReviewerSort] + } + + \\"\\"\\" + Fields to sort Reviewers by. The order in which sorts are applied is not guaranteed when specifying many fields in one ReviewerSort object. + \\"\\"\\" + input ReviewerSort { + reputation: SortDirection + reviewerId: SortDirection + } + + input ReviewerUpdateInput { + _on: ReviewerImplementationsUpdateInput + reputation: Int + reputation_DECREMENT: Int + reputation_INCREMENT: Int + reviewerId: Int + reviewerId_DECREMENT: Int + reviewerId_INCREMENT: Int + } + + input ReviewerWhere { + _on: ReviewerImplementationsWhere + reputation: Int + reputation_GT: Int + reputation_GTE: Int + reputation_IN: [Int!] + reputation_LT: Int + reputation_LTE: Int + reputation_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reputation_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reviewerId: Int + reviewerId_GT: Int + reviewerId_GTE: Int + reviewerId_IN: [Int] + reviewerId_LT: Int + reviewerId_LTE: Int + reviewerId_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + reviewerId_NOT_IN: [Int] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + \\"\\"\\"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 StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + type UpdateInfluencersMutationResponse { + influencers: [Influencer!]! + info: UpdateInfo! + } + + \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + type UpdateInfo { + bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdatePeopleMutationResponse { + info: UpdateInfo! + people: [Person!]! + }" + `); + }); +}); From 22ced1be5223d65e3a2dd0cb3595164667df2bad Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 28 Sep 2023 10:42:04 +0200 Subject: [PATCH 150/162] docs: update type descriptions --- .../graphql/src/graphql/objects/CreateInfo.ts | 2 +- .../graphql/src/graphql/objects/DeleteInfo.ts | 2 +- .../graphql/src/graphql/objects/UpdateInfo.ts | 3 +- .../src/schema/make-augmented-schema.ts | 2 +- .../graphql/tests/schema/aggregations.test.ts | 24 +- .../tests/schema/array-methods.test.ts | 12 +- packages/graphql/tests/schema/arrays.test.ts | 12 +- .../tests/schema/authorization.test.ts | 12 +- .../graphql/tests/schema/comments.test.ts | 48 ++- .../tests/schema/connect-or-create-id.test.ts | 24 +- .../schema/connect-or-create-unions.test.ts | 12 +- .../tests/schema/connect-or-create.test.ts | 24 +- .../tests/schema/connections/enums.test.ts | 12 +- .../tests/schema/connections/sort.test.ts | 12 +- .../tests/schema/connections/unions.test.ts | 12 +- .../tests/schema/custom-mutations.test.ts | 12 +- .../tests/schema/directive-preserve.test.ts | 60 +++- .../tests/schema/directives/alias.test.ts | 12 +- .../schema/directives/autogenerate.test.ts | 12 +- .../schema/directives/customResolver.test.ts | 12 +- .../tests/schema/directives/cypher.test.ts | 24 +- .../tests/schema/directives/default.test.ts | 12 +- .../schema/directives/filterable.test.ts | 156 ++++++-- .../tests/schema/directives/plural.test.ts | 84 +++-- .../schema/directives/populatedBy.test.ts | 48 ++- .../tests/schema/directives/private.test.ts | 12 +- .../directives/relationship-aggregate.test.ts | 72 +++- .../relationship-nested-operations.test.ts | 336 +++++++++++++----- .../relationship-properties.test.ts | 36 +- .../schema/directives/relationship.test.ts | 24 +- .../schema/directives/selectable.test.ts | 120 +++++-- .../tests/schema/directives/settable.test.ts | 180 +++++++--- .../schema/directives/timestamps.test.ts | 12 +- packages/graphql/tests/schema/enum.test.ts | 12 +- packages/graphql/tests/schema/extend.test.ts | 12 +- .../graphql/tests/schema/federation.test.ts | 24 +- .../graphql/tests/schema/fulltext.test.ts | 12 +- .../graphql/tests/schema/global-node.test.ts | 12 +- .../graphql/tests/schema/inheritance.test.ts | 12 +- packages/graphql/tests/schema/inputs.test.ts | 12 +- .../schema/interface-relationships.test.ts | 48 ++- .../graphql/tests/schema/interfaces.test.ts | 24 +- .../graphql/tests/schema/issues/1038.test.ts | 12 +- .../graphql/tests/schema/issues/1182.test.ts | 12 +- .../graphql/tests/schema/issues/162.test.ts | 12 +- .../graphql/tests/schema/issues/200.test.ts | 12 +- .../graphql/tests/schema/issues/2187.test.ts | 12 +- .../graphql/tests/schema/issues/2377.test.ts | 12 +- .../graphql/tests/schema/issues/2969.test.ts | 12 +- .../graphql/tests/schema/issues/2981.test.ts | 12 +- .../graphql/tests/schema/issues/2993.test.ts | 12 +- .../graphql/tests/schema/issues/3428.test.ts | 24 +- .../graphql/tests/schema/issues/3439.test.ts | 36 +- .../graphql/tests/schema/issues/3537.test.ts | 24 +- .../graphql/tests/schema/issues/3541.test.ts | 12 +- .../graphql/tests/schema/issues/3816.test.ts | 24 +- .../graphql/tests/schema/issues/609.test.ts | 12 +- .../graphql/tests/schema/issues/872.test.ts | 12 +- .../tests/schema/lowercase-type-names.test.ts | 12 +- packages/graphql/tests/schema/math.test.ts | 72 +++- packages/graphql/tests/schema/null.test.ts | 12 +- .../schema/pluralize-consistency.test.ts | 12 +- .../tests/schema/query-direction.test.ts | 36 +- packages/graphql/tests/schema/scalar.test.ts | 12 +- packages/graphql/tests/schema/simple.test.ts | 12 +- .../tests/schema/string-comparators.test.ts | 48 ++- .../tests/schema/subscriptions.test.ts | 96 +++-- .../graphql/tests/schema/types/bigint.test.ts | 12 +- .../graphql/tests/schema/types/date.test.ts | 12 +- .../tests/schema/types/datetime.test.ts | 12 +- .../tests/schema/types/duration.test.ts | 12 +- .../tests/schema/types/localdatetime.test.ts | 12 +- .../tests/schema/types/localtime.test.ts | 12 +- .../graphql/tests/schema/types/point.test.ts | 48 ++- .../graphql/tests/schema/types/time.test.ts | 12 +- .../union-interface-relationship.test.ts | 12 +- packages/graphql/tests/schema/unions.test.ts | 12 +- 77 files changed, 1742 insertions(+), 583 deletions(-) diff --git a/packages/graphql/src/graphql/objects/CreateInfo.ts b/packages/graphql/src/graphql/objects/CreateInfo.ts index c7d7f60cb1..87f1c2888f 100644 --- a/packages/graphql/src/graphql/objects/CreateInfo.ts +++ b/packages/graphql/src/graphql/objects/CreateInfo.ts @@ -21,7 +21,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const CreateInfo = new GraphQLObjectType({ name: "CreateInfo", - description: "Information about the creation of a node or relationship.", + description: "Information about the number of nodes and relationships created during a create mutation", fields: { bookmark: { type: GraphQLString, diff --git a/packages/graphql/src/graphql/objects/DeleteInfo.ts b/packages/graphql/src/graphql/objects/DeleteInfo.ts index b70290ee08..e0ed968372 100644 --- a/packages/graphql/src/graphql/objects/DeleteInfo.ts +++ b/packages/graphql/src/graphql/objects/DeleteInfo.ts @@ -21,7 +21,7 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const DeleteInfo = new GraphQLObjectType({ name: "DeleteInfo", - description: "Information about the deletion of a node or relationship.", + description: "Information about the number of nodes and relationships deleted during a delete mutation", fields: { bookmark: { type: GraphQLString, diff --git a/packages/graphql/src/graphql/objects/UpdateInfo.ts b/packages/graphql/src/graphql/objects/UpdateInfo.ts index 3b07da4dec..a6414f0ef9 100644 --- a/packages/graphql/src/graphql/objects/UpdateInfo.ts +++ b/packages/graphql/src/graphql/objects/UpdateInfo.ts @@ -21,7 +21,8 @@ import { GraphQLInt, GraphQLNonNull, GraphQLObjectType, GraphQLString } from "gr export const UpdateInfo = new GraphQLObjectType({ name: "UpdateInfo", - description: "Information about the update of a node or relationship.", + description: + "Information about the number of nodes and relationships created and deleted during an update mutation", fields: { bookmark: { type: GraphQLString, diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 3343e896b6..7b40e9d134 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -96,8 +96,8 @@ import { withUniqueWhereInputType, withWhereInputType } from "./generation/where import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; -import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; import { getUserDefinedDirectives } from "./make-augmented-schema/user-defined-directives"; +import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index d8977d4149..476f9dc805 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -60,7 +60,9 @@ describe("Aggregations", () => { sum: BigInt } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -80,7 +82,9 @@ describe("Aggregations", () => { min: DateTime } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -380,7 +384,9 @@ describe("Aggregations", () => { min: Time } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -450,7 +456,9 @@ describe("Aggregations", () => { sum: BigInt } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -475,7 +483,9 @@ describe("Aggregations", () => { min: DateTime } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1350,7 +1360,9 @@ describe("Aggregations", () => { min: Time } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index cf3a0f6683..9b43374aff 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -322,7 +322,9 @@ describe("Arrays Methods", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -334,7 +336,9 @@ describe("Arrays Methods", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -670,7 +674,9 @@ describe("Arrays Methods", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index 207ffb3d34..005bf898d5 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -40,7 +40,9 @@ describe("Arrays", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -52,7 +54,9 @@ describe("Arrays", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -185,7 +189,9 @@ describe("Arrays", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index b117d4bcd4..cf9a473736 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -47,7 +47,9 @@ describe("Authorization", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -64,7 +66,9 @@ describe("Authorization", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -344,7 +348,9 @@ describe("Authorization", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 473682e1d4..201eeb6b73 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -65,7 +65,9 @@ describe("Comments", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -80,7 +82,9 @@ describe("Comments", () => { \\"\\"\\"A custom scalar.\\"\\"\\" scalar CustomScalar - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -263,7 +267,9 @@ describe("Comments", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -370,7 +376,9 @@ describe("Comments", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -382,7 +390,9 @@ describe("Comments", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -672,7 +682,9 @@ describe("Comments", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -923,7 +935,9 @@ describe("Comments", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -940,7 +954,9 @@ describe("Comments", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1212,7 +1228,9 @@ describe("Comments", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1261,7 +1279,9 @@ describe("Comments", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1273,7 +1293,9 @@ describe("Comments", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1637,7 +1659,9 @@ describe("Comments", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connect-or-create-id.test.ts b/packages/graphql/tests/schema/connect-or-create-id.test.ts index be7f217c2e..05a63913fc 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -299,7 +299,9 @@ describe("connect or create with id", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -311,7 +313,9 @@ describe("connect or create with id", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -456,7 +460,9 @@ describe("connect or create with id", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -496,7 +502,9 @@ describe("connect or create with id", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -521,7 +529,9 @@ describe("connect or create with id", () => { min: DateTime! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -847,7 +857,9 @@ describe("connect or create with id", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index 192aca0548..92af0fe812 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -368,7 +368,9 @@ describe("Connect Or Create", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -385,7 +387,9 @@ describe("Connect Or Create", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -639,7 +643,9 @@ describe("Connect Or Create", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index 9c006ce9f0..08aabf0d52 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -333,7 +333,9 @@ describe("Connect Or Create", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -345,7 +347,9 @@ describe("Connect Or Create", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -488,7 +492,9 @@ describe("Connect Or Create", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -947,7 +953,9 @@ describe("Connect Or Create", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -959,7 +967,9 @@ describe("Connect Or Create", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1114,7 +1124,9 @@ describe("Connect Or Create", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index 187fd80fa5..3f56c259c3 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -331,7 +331,9 @@ describe("Enums", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -343,7 +345,9 @@ describe("Enums", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -646,7 +650,9 @@ describe("Enums", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index fa3ee1f93f..a772226445 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -43,7 +43,9 @@ describe("Sort", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -60,7 +62,9 @@ describe("Sort", () => { node2s: [Node2!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -510,7 +514,9 @@ describe("Sort", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 848df6c84f..3b9f3c95ed 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -602,7 +602,9 @@ describe("Unions", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -614,7 +616,9 @@ describe("Unions", () => { journals: [Journal!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -980,7 +984,9 @@ describe("Unions", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index 9fce96bc73..d5789ab51d 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -58,7 +58,9 @@ describe("Custom-mutations", () => { subscription: Subscription } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -70,7 +72,9 @@ describe("Custom-mutations", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -182,7 +186,9 @@ describe("Custom-mutations", () => { testSubscription(input: ExampleInput): String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index a16e3670ab..321ad7bca1 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -45,7 +45,9 @@ describe("Directive-preserve", () => { directive @preservedTopLevel(boolean: Boolean, float: Float, int: Int, string: String) on OBJECT - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -57,7 +59,9 @@ describe("Directive-preserve", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -157,7 +161,9 @@ describe("Directive-preserve", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -201,7 +207,9 @@ describe("Directive-preserve", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -213,7 +221,9 @@ describe("Directive-preserve", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -842,7 +852,9 @@ describe("Directive-preserve", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1103,7 +1115,9 @@ describe("Directive-preserve", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1120,7 +1134,9 @@ describe("Directive-preserve", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1809,7 +1825,9 @@ describe("Directive-preserve", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2073,7 +2091,9 @@ describe("Directive-preserve", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2090,7 +2110,9 @@ describe("Directive-preserve", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2779,7 +2801,9 @@ describe("Directive-preserve", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3078,7 +3102,9 @@ describe("Directive-preserve", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3095,7 +3121,9 @@ describe("Directive-preserve", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3222,7 +3250,9 @@ describe("Directive-preserve", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 1e0112331e..8800f18c6d 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -456,7 +456,9 @@ describe("Alias", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -468,7 +470,9 @@ describe("Alias", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -619,7 +623,9 @@ describe("Alias", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index 9afd72cc70..305fdf9f9e 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -39,7 +39,9 @@ describe("Autogenerate", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -51,7 +53,9 @@ describe("Autogenerate", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -169,7 +173,9 @@ describe("Autogenerate", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 47b7446890..d2f29a9814 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -54,7 +54,9 @@ describe("@customResolver directive", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -66,7 +68,9 @@ describe("@customResolver directive", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -111,7 +115,9 @@ describe("@customResolver directive", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index 2566189465..994162554d 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -116,7 +116,9 @@ describe("Cypher", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -128,7 +130,9 @@ describe("Cypher", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -245,7 +249,9 @@ describe("Cypher", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -364,7 +370,9 @@ describe("Cypher", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -376,7 +384,9 @@ describe("Cypher", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -493,7 +503,9 @@ describe("Cypher", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index 7f167767cb..a296274ea5 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -57,7 +57,9 @@ describe("@default directive", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -77,7 +79,9 @@ describe("@default directive", () => { min: DateTime! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -142,7 +146,9 @@ describe("@default directive", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 7ee9917e39..d22bad9740 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -1233,7 +1233,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1245,7 +1247,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1685,7 +1689,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2087,7 +2093,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2099,7 +2107,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2539,7 +2549,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2931,7 +2943,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2943,7 +2957,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3355,7 +3371,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3760,7 +3778,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3772,7 +3792,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4123,7 +4145,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4527,7 +4551,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4539,7 +4565,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4979,7 +5007,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5383,7 +5413,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5395,7 +5427,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5807,7 +5841,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6211,7 +6247,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6223,7 +6261,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6574,7 +6614,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6979,7 +7021,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6991,7 +7035,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7421,7 +7467,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7826,7 +7874,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7838,7 +7888,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -8268,7 +8320,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8673,7 +8727,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8685,7 +8741,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -9115,7 +9173,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9886,7 +9946,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9898,7 +9960,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -10340,7 +10404,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -11111,7 +11177,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -11123,7 +11191,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -11565,7 +11635,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -12336,7 +12408,9 @@ describe("@filterable directive", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -12348,7 +12422,9 @@ describe("@filterable directive", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -12790,7 +12866,9 @@ describe("@filterable directive", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index b7d50a718c..8f4167bd21 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -42,7 +42,9 @@ describe("Plural option", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -54,7 +56,9 @@ describe("Plural option", () => { techs: [Tech!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -169,7 +173,9 @@ describe("Plural option", () => { totalCount: Int! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -204,7 +210,9 @@ describe("Plural option", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -216,7 +224,9 @@ describe("Plural option", () => { techs: [Tech!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -331,7 +341,9 @@ describe("Plural option", () => { totalCount: Int! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -366,7 +378,9 @@ describe("Plural option", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -378,7 +392,9 @@ describe("Plural option", () => { technologies: [Tech!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -493,7 +509,9 @@ describe("Plural option", () => { totalCount: Int! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -528,7 +546,9 @@ describe("Plural option", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -540,7 +560,9 @@ describe("Plural option", () => { techs: [Techs!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -640,7 +662,9 @@ describe("Plural option", () => { value_STARTS_WITH: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -675,7 +699,9 @@ describe("Plural option", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -687,7 +713,9 @@ describe("Plural option", () => { techs: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -733,7 +761,9 @@ describe("Plural option", () => { totalCount: Int! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -822,7 +852,9 @@ describe("Plural option", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -834,7 +866,9 @@ describe("Plural option", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -874,7 +908,9 @@ describe("Plural option", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -969,7 +1005,9 @@ describe("Plural option", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -981,7 +1019,9 @@ describe("Plural option", () => { users: [Users!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1021,7 +1061,9 @@ describe("Plural option", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 95ecf6fe91..0edf13d014 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -162,7 +162,9 @@ describe("@populatedBy tests", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -174,7 +176,9 @@ describe("@populatedBy tests", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -318,7 +322,9 @@ describe("@populatedBy tests", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -369,7 +375,9 @@ describe("@populatedBy tests", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -381,7 +389,9 @@ describe("@populatedBy tests", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -521,7 +531,9 @@ describe("@populatedBy tests", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -721,7 +733,9 @@ describe("@populatedBy tests", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -733,7 +747,9 @@ describe("@populatedBy tests", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1256,7 +1272,9 @@ describe("@populatedBy tests", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1321,7 +1339,9 @@ describe("@populatedBy tests", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1333,7 +1353,9 @@ describe("@populatedBy tests", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1822,7 +1844,9 @@ describe("@populatedBy tests", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index 8af51a33d8..c5001b93b9 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -45,7 +45,9 @@ describe("@private directive", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -57,7 +59,9 @@ describe("@private directive", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -97,7 +101,9 @@ describe("@private directive", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index f1f92e5291..432e02cb25 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -311,7 +311,9 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -323,7 +325,9 @@ describe("@relationship directive, aggregate argument", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -637,7 +641,9 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -759,7 +765,9 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -771,7 +779,9 @@ describe("@relationship directive, aggregate argument", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1096,7 +1106,9 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1220,7 +1232,9 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1232,7 +1246,9 @@ describe("@relationship directive, aggregate argument", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1511,7 +1527,9 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1633,7 +1651,9 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1645,7 +1665,9 @@ describe("@relationship directive, aggregate argument", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1924,7 +1946,9 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2061,7 +2085,9 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2078,7 +2104,9 @@ describe("@relationship directive, aggregate argument", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2438,7 +2466,9 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2577,7 +2607,9 @@ describe("@relationship directive, aggregate argument", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2594,7 +2626,9 @@ describe("@relationship directive, aggregate argument", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2954,7 +2988,9 @@ describe("@relationship directive, aggregate argument", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! 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 5f1f155392..72543343c1 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -50,7 +50,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -67,7 +69,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -355,7 +359,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -396,7 +402,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -413,7 +421,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -720,7 +730,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -761,7 +773,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -778,7 +792,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1093,7 +1109,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1134,7 +1152,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1151,7 +1171,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1449,7 +1471,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1490,7 +1514,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1507,7 +1533,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1809,7 +1837,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1850,7 +1880,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1867,7 +1899,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2169,7 +2203,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2211,7 +2247,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2228,7 +2266,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2516,7 +2556,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2559,7 +2601,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2576,7 +2620,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2920,7 +2966,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2962,7 +3010,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2979,7 +3029,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3455,7 +3507,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3497,7 +3551,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3514,7 +3570,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3952,7 +4010,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4006,7 +4066,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4028,7 +4090,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4330,7 +4394,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4382,7 +4448,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4404,7 +4472,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4753,7 +4823,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4805,7 +4877,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4827,7 +4901,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5184,7 +5260,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5236,7 +5314,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5258,7 +5338,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5584,7 +5666,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5636,7 +5720,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5658,7 +5744,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5993,7 +6081,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6045,7 +6135,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6067,7 +6159,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6402,7 +6496,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6455,7 +6551,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6477,7 +6575,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6779,7 +6879,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6834,7 +6936,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6856,7 +6960,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7270,7 +7376,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7323,7 +7431,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7345,7 +7455,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7853,7 +7965,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7906,7 +8020,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7928,7 +8044,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -8362,7 +8480,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8424,7 +8544,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8446,7 +8568,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -8774,7 +8898,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8829,7 +8955,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -8851,7 +8979,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -9203,7 +9333,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9258,7 +9390,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9280,7 +9414,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -9631,7 +9767,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9686,7 +9824,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -9708,7 +9848,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -10056,7 +10198,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10111,7 +10255,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10133,7 +10279,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -10475,7 +10623,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10530,7 +10680,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10552,7 +10704,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -10894,7 +11048,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10950,7 +11106,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -10972,7 +11130,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -11425,7 +11585,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -11482,7 +11644,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -11504,7 +11668,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -11922,7 +12088,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index 226a907da1..a154895dd0 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -391,7 +391,9 @@ describe("Relationship-properties", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -406,7 +408,9 @@ describe("Relationship-properties", () => { \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" scalar Date - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -750,7 +754,9 @@ describe("Relationship-properties", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1156,7 +1162,9 @@ describe("Relationship-properties", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1176,7 +1184,9 @@ describe("Relationship-properties", () => { min: DateTime! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1543,7 +1553,9 @@ describe("Relationship-properties", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1898,7 +1910,9 @@ describe("Relationship-properties", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1918,7 +1932,9 @@ describe("Relationship-properties", () => { min: DateTime! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2248,7 +2264,9 @@ describe("Relationship-properties", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index 3fe621b6c4..0cabaf527c 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -112,7 +112,9 @@ describe("Relationship", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -124,7 +126,9 @@ describe("Relationship", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -413,7 +417,9 @@ describe("Relationship", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -661,7 +667,9 @@ describe("Relationship", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -673,7 +681,9 @@ describe("Relationship", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -969,7 +979,9 @@ describe("Relationship", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index bf6bc890c6..4ad856e16e 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -45,7 +45,9 @@ describe("@selectable", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -57,7 +59,9 @@ describe("@selectable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -176,7 +180,9 @@ describe("@selectable", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -207,7 +213,9 @@ describe("@selectable", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -219,7 +227,9 @@ describe("@selectable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -333,7 +343,9 @@ describe("@selectable", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -364,7 +376,9 @@ describe("@selectable", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -376,7 +390,9 @@ describe("@selectable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -489,7 +505,9 @@ describe("@selectable", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -521,7 +539,9 @@ describe("@selectable", () => { subscription: Subscription } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -533,7 +553,9 @@ describe("@selectable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -715,7 +737,9 @@ describe("@selectable", () => { movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1011,7 +1035,9 @@ describe("@selectable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1023,7 +1049,9 @@ describe("@selectable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1158,7 +1186,9 @@ describe("@selectable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1469,7 +1499,9 @@ describe("@selectable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1481,7 +1513,9 @@ describe("@selectable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1616,7 +1650,9 @@ describe("@selectable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1883,7 +1919,9 @@ describe("@selectable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1900,7 +1938,9 @@ describe("@selectable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2120,7 +2160,9 @@ describe("@selectable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2402,7 +2444,9 @@ describe("@selectable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2419,7 +2463,9 @@ describe("@selectable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2652,7 +2698,9 @@ describe("@selectable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2850,7 +2898,9 @@ describe("@selectable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2867,7 +2917,9 @@ describe("@selectable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3133,7 +3185,9 @@ describe("@selectable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3345,7 +3399,9 @@ describe("@selectable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3362,7 +3418,9 @@ describe("@selectable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3645,7 +3703,9 @@ describe("@selectable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 159c64bf96..283e236bb4 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -45,7 +45,9 @@ describe("@settable", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -57,7 +59,9 @@ describe("@settable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -176,7 +180,9 @@ describe("@settable", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -207,7 +213,9 @@ describe("@settable", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -219,7 +227,9 @@ describe("@settable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -338,7 +348,9 @@ describe("@settable", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -370,7 +382,9 @@ describe("@settable", () => { subscription: Subscription } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -382,7 +396,9 @@ describe("@settable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -564,7 +580,9 @@ describe("@settable", () => { movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -871,7 +889,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -883,7 +903,9 @@ describe("@settable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1018,7 +1040,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1316,7 +1340,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1328,7 +1354,9 @@ describe("@settable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1463,7 +1491,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1767,7 +1797,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1779,7 +1811,9 @@ describe("@settable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2090,7 +2124,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2402,7 +2438,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2414,7 +2452,9 @@ describe("@settable", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2725,7 +2765,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2988,7 +3030,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3005,7 +3049,9 @@ describe("@settable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3238,7 +3284,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3489,7 +3537,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3506,7 +3556,9 @@ describe("@settable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3739,7 +3791,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3996,7 +4050,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4013,7 +4069,9 @@ describe("@settable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4422,7 +4480,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4695,7 +4755,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4712,7 +4774,9 @@ describe("@settable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5121,7 +5185,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5330,7 +5396,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5347,7 +5415,9 @@ describe("@settable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5630,7 +5700,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5829,7 +5901,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5846,7 +5920,9 @@ describe("@settable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6118,7 +6194,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6325,7 +6403,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -6342,7 +6422,9 @@ describe("@settable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7016,7 +7098,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7231,7 +7315,9 @@ describe("@settable", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -7248,7 +7334,9 @@ describe("@settable", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -7934,7 +8022,9 @@ describe("@settable", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 31ce15e289..496f763617 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -40,7 +40,9 @@ describe("Timestamps", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -60,7 +62,9 @@ describe("Timestamps", () => { min: DateTime! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -182,7 +186,9 @@ describe("Timestamps", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/enum.test.ts b/packages/graphql/tests/schema/enum.test.ts index 86912522a8..f2d8904133 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -44,7 +44,9 @@ describe("Enum", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -56,7 +58,9 @@ describe("Enum", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -150,7 +154,9 @@ describe("Enum", () => { PENDING } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index 87ed620bd1..b20d5eb8f5 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -42,7 +42,9 @@ describe("Extend", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -54,7 +56,9 @@ describe("Extend", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -174,7 +178,9 @@ describe("Extend", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index 59a749ac74..1e51a7d494 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -69,7 +69,9 @@ describe("Apollo Federation", () => { directive @shareable on FIELD_DEFINITION | OBJECT - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -86,7 +88,9 @@ describe("Apollo Federation", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -349,7 +353,9 @@ describe("Apollo Federation", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -676,7 +682,9 @@ describe("Apollo Federation", () => { directive @link(as: String, for: link__Purpose, import: [link__Import], url: String) repeatable on SCHEMA - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo @federation__shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -693,7 +701,9 @@ describe("Apollo Federation", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo @federation__shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -950,7 +960,9 @@ describe("Apollo Federation", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo @federation__shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index cec530deee..8ad3408fea 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -46,7 +46,9 @@ describe("@fulltext schema", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -58,7 +60,9 @@ describe("@fulltext schema", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -240,7 +244,9 @@ describe("@fulltext schema", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index 791aed5718..99d122c65c 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -39,7 +39,9 @@ describe("Node Interface Types", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -51,7 +53,9 @@ describe("Node Interface Types", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -184,7 +188,9 @@ describe("Node Interface Types", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index 56af4e18d2..6f44aaac94 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -198,14 +198,18 @@ describe("inheritance", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -452,7 +456,9 @@ describe("inheritance", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index 216598dd0c..6f5cbb3fae 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -46,7 +46,9 @@ describe("Inputs", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -58,7 +60,9 @@ describe("Inputs", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -163,7 +167,9 @@ describe("Inputs", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index b3441484ce..a0b262ae56 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -256,7 +256,9 @@ describe("Interface Relationships", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -273,7 +275,9 @@ describe("Interface Relationships", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -545,7 +549,9 @@ describe("Interface Relationships", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -820,7 +826,9 @@ describe("Interface Relationships", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -837,7 +845,9 @@ describe("Interface Relationships", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2036,7 +2046,9 @@ describe("Interface Relationships", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2101,7 +2113,9 @@ describe("Interface Relationships", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2133,7 +2147,9 @@ describe("Interface Relationships", () => { type2Interface2s: [Type2Interface2!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2953,7 +2969,9 @@ describe("Interface Relationships", () => { totalCount: Int! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3575,7 +3593,9 @@ describe("Interface Relationships", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3592,7 +3612,9 @@ describe("Interface Relationships", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3989,7 +4011,9 @@ describe("Interface Relationships", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 0d478d94d4..af9326b1c2 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -61,7 +61,9 @@ describe("Interfaces", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -73,7 +75,9 @@ describe("Interfaces", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -328,7 +332,9 @@ describe("Interfaces", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -385,7 +391,9 @@ describe("Interfaces", () => { directive @something(something: String) on INTERFACE - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -397,7 +405,9 @@ describe("Interfaces", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -652,7 +662,9 @@ describe("Interfaces", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/1038.test.ts b/packages/graphql/tests/schema/issues/1038.test.ts index ec3befb0af..e1579b928b 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -129,7 +129,9 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -205,7 +207,9 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { zoneType_STARTS_WITH: String } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -267,7 +271,9 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index 481796deff..cf583c6050 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -169,7 +169,9 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -189,7 +191,9 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { min: DateTime! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -549,7 +553,9 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index ee90315740..de471f8181 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -48,7 +48,9 @@ describe("162", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -70,7 +72,9 @@ describe("162", () => { tigers: [Tiger!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -574,7 +578,9 @@ describe("162", () => { totalCount: Int! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index 35515f29db..dd2be63227 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -143,14 +143,18 @@ describe("200", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -200,7 +204,9 @@ describe("200", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index ee972aeb21..272bbd241a 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -53,7 +53,9 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -65,7 +67,9 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -694,7 +698,9 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 823fc1e6cb..6a1291292f 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -84,7 +84,9 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -104,7 +106,9 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { min: DateTime! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -555,7 +559,9 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { TagC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index e1f58f1c06..02e455ca0d 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -45,7 +45,9 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -62,7 +64,9 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -331,7 +335,9 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index bb4b3fdd8f..7119a17232 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -815,14 +815,18 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -895,7 +899,9 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 01ece2ae39..b12aba88cb 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -50,7 +50,9 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -65,7 +67,9 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" scalar DateTime - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -223,7 +227,9 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 133acf25e4..0afc2fa787 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -44,7 +44,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -61,7 +63,9 @@ describe("Relationship nested operations", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -369,7 +373,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -416,7 +422,9 @@ describe("Relationship nested operations", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -438,7 +446,9 @@ describe("Relationship nested operations", () => { personTwos: [PersonTwo!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -740,7 +750,9 @@ describe("Relationship nested operations", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index d1400af969..6a00c7dd8b 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -79,7 +79,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -96,7 +98,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1260,7 +1264,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1331,7 +1337,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1348,7 +1356,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2433,7 +2443,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2504,7 +2516,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2521,7 +2535,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { series: [Series!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3203,7 +3219,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index 46ae56fac4..74a1b518f5 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -143,7 +143,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -155,7 +157,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -255,7 +259,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -677,7 +683,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -689,7 +697,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -846,7 +856,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index eb7853d1b8..7dc73e8423 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -456,7 +456,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -468,7 +470,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -732,7 +736,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo @shareable { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/3816.test.ts b/packages/graphql/tests/schema/issues/3816.test.ts index 3f30f62c81..a64faf9cd0 100644 --- a/packages/graphql/tests/schema/issues/3816.test.ts +++ b/packages/graphql/tests/schema/issues/3816.test.ts @@ -50,7 +50,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -62,7 +64,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -543,7 +547,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -586,7 +592,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -598,7 +606,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1039,7 +1049,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/609.test.ts b/packages/graphql/tests/schema/issues/609.test.ts index 1fcf3f6340..670755b829 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -43,14 +43,18 @@ describe("609", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -155,7 +159,9 @@ describe("609", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index 7dae149c68..29640e8727 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -559,7 +559,9 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -571,7 +573,9 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -727,7 +731,9 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index 61e8db0050..fde6548f77 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -61,7 +61,9 @@ describe("lower case type names", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -81,7 +83,9 @@ describe("lower case type names", () => { min: DateTime } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -145,7 +149,9 @@ describe("lower case type names", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index d04891f349..67b89a508c 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -38,7 +38,9 @@ describe("Algebraic", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -50,7 +52,9 @@ describe("Algebraic", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -172,7 +176,9 @@ describe("Algebraic", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -215,7 +221,9 @@ describe("Algebraic", () => { sum: BigInt! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -227,7 +235,9 @@ describe("Algebraic", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -342,7 +352,9 @@ describe("Algebraic", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -374,7 +386,9 @@ describe("Algebraic", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -386,7 +400,9 @@ describe("Algebraic", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -510,7 +526,9 @@ describe("Algebraic", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -552,7 +570,9 @@ describe("Algebraic", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -564,7 +584,9 @@ describe("Algebraic", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1090,7 +1112,9 @@ describe("Algebraic", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1131,7 +1155,9 @@ describe("Algebraic", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1148,7 +1174,9 @@ describe("Algebraic", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1698,7 +1726,9 @@ describe("Algebraic", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1789,7 +1819,9 @@ describe("Algebraic", () => { roles_NOT_INCLUDES: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1806,7 +1838,9 @@ describe("Algebraic", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2429,7 +2463,9 @@ describe("Algebraic", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index cf9938cc0a..0f1ff816fd 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -50,7 +50,9 @@ describe("Null", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -70,7 +72,9 @@ describe("Null", () => { min: DateTime! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -348,7 +352,9 @@ describe("Null", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index f1d1bd3397..a308fb2081 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -43,7 +43,9 @@ describe("Pluralize consistency", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -60,7 +62,9 @@ describe("Pluralize consistency", () => { superUsers: [super_user!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -118,7 +122,9 @@ describe("Pluralize consistency", () => { totalCount: Int! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index b044881e09..effbe1da72 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -40,7 +40,9 @@ describe("Query Direction", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -52,7 +54,9 @@ describe("Query Direction", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -92,7 +96,9 @@ describe("Query Direction", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -364,7 +370,9 @@ describe("Query Direction", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -376,7 +384,9 @@ describe("Query Direction", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -416,7 +426,9 @@ describe("Query Direction", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -688,7 +700,9 @@ describe("Query Direction", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -700,7 +714,9 @@ describe("Query Direction", () => { users: [User!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -740,7 +756,9 @@ describe("Query Direction", () => { shortest: String! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index f4e4698d30..80a138cf33 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -43,7 +43,9 @@ describe("Scalar", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -57,7 +59,9 @@ describe("Scalar", () => { scalar CustomScalar - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -179,7 +183,9 @@ describe("Scalar", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index 3c120261f7..aeeec3d022 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -41,7 +41,9 @@ describe("Simple", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -53,7 +55,9 @@ describe("Simple", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -205,7 +209,9 @@ describe("Simple", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index be2831c926..4e7b4cbda6 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -50,7 +50,9 @@ describe("String Comparators", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -62,7 +64,9 @@ describe("String Comparators", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -166,7 +170,9 @@ describe("String Comparators", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -199,7 +205,9 @@ describe("String Comparators", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -211,7 +219,9 @@ describe("String Comparators", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -311,7 +321,9 @@ describe("String Comparators", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -353,7 +365,9 @@ describe("String Comparators", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -365,7 +379,9 @@ describe("String Comparators", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -467,7 +483,9 @@ describe("String Comparators", () => { shortest: String } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -860,7 +878,9 @@ describe("String Comparators", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -872,7 +892,9 @@ describe("String Comparators", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1221,7 +1243,9 @@ describe("String Comparators", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 5937b2acf1..80a7695d03 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -167,7 +167,9 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -179,7 +181,9 @@ describe("Subscriptions", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -647,7 +651,9 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -989,7 +995,9 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1001,7 +1009,9 @@ describe("Subscriptions", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1402,7 +1412,9 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1461,7 +1473,9 @@ describe("Subscriptions", () => { Star: StarWhere } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -1483,7 +1497,9 @@ describe("Subscriptions", () => { stars: [Star!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -2525,7 +2541,9 @@ describe("Subscriptions", () => { starUpdated: StarUpdatedEvent! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2927,7 +2945,9 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -2939,7 +2959,9 @@ describe("Subscriptions", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3414,7 +3436,9 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3567,7 +3591,9 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -3579,7 +3605,9 @@ describe("Subscriptions", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -3934,7 +3962,9 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4338,14 +4368,18 @@ describe("Subscriptions", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -4421,7 +4455,9 @@ describe("Subscriptions", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4585,7 +4621,9 @@ describe("Subscriptions", () => { Star: StarWhere } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -4607,7 +4645,9 @@ describe("Subscriptions", () => { stars: [Star!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -5587,7 +5627,9 @@ describe("Subscriptions", () => { personUpdated: PersonUpdatedEvent! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5658,7 +5700,9 @@ describe("Subscriptions", () => { subscription: Subscription } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -5804,7 +5848,9 @@ describe("Subscriptions", () => { moviesConnection_NOT: CreatureMoviesConnectionWhere } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -6598,7 +6644,9 @@ describe("Subscriptions", () => { seriesUpdated(where: SeriesSubscriptionWhere): SeriesUpdatedEvent! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index cca4b5939e..cd331ffb8b 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -56,14 +56,18 @@ describe("Bigint", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! relationshipsCreated: Int! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -183,7 +187,9 @@ describe("Bigint", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index ce6ac84d10..a59eb79963 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -39,7 +39,9 @@ describe("Date", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -54,7 +56,9 @@ describe("Date", () => { \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" scalar Date - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -166,7 +170,9 @@ describe("Date", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index 307126522e..6e5c633ff2 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -39,7 +39,9 @@ describe("Datetime", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -59,7 +61,9 @@ describe("Datetime", () => { min: DateTime } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -172,7 +176,9 @@ describe("Datetime", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index 52ba9d7b04..dc8ebd74e3 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -39,7 +39,9 @@ describe("Duration", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -51,7 +53,9 @@ describe("Duration", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -172,7 +176,9 @@ describe("Duration", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index 0133fde42c..ad30de38b3 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -39,7 +39,9 @@ describe("Localdatetime", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -51,7 +53,9 @@ describe("Localdatetime", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -172,7 +176,9 @@ describe("Localdatetime", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index 33e83c9e78..d1bbc1d6fa 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -39,7 +39,9 @@ describe("Localtime", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -51,7 +53,9 @@ describe("Localtime", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -174,7 +178,9 @@ describe("Localtime", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index 9427c3f4d7..327663d016 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -38,7 +38,9 @@ describe("Point", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -50,7 +52,9 @@ describe("Point", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -168,7 +172,9 @@ describe("Point", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -223,7 +229,9 @@ describe("Point", () => { z: Float } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -235,7 +243,9 @@ describe("Point", () => { machines: [Machine!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -328,7 +338,9 @@ describe("Point", () => { DESC } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -359,7 +371,9 @@ describe("Point", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -371,7 +385,9 @@ describe("Point", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -460,7 +476,9 @@ describe("Point", () => { moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -509,7 +527,9 @@ describe("Point", () => { z: Float } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -521,7 +541,9 @@ describe("Point", () => { machines: [Machine!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -592,7 +614,9 @@ describe("Point", () => { machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index 4b2d38bc68..ec657ce1af 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -39,7 +39,9 @@ describe("Time", () => { mutation: Mutation } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -51,7 +53,9 @@ describe("Time", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -172,7 +176,9 @@ describe("Time", () => { min: Time } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index d25797bbb2..6bd44d2e13 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -476,7 +476,9 @@ describe("Union Interface Relationships", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -493,7 +495,9 @@ describe("Union Interface Relationships", () => { people: [Person!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -1878,7 +1882,9 @@ describe("Union Interface Relationships", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index cf698bac4c..724ba1aab1 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -51,7 +51,9 @@ describe("Unions", () => { info: CreateInfo! } - \\"\\"\\"Information about the creation of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" type CreateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! @@ -63,7 +65,9 @@ describe("Unions", () => { movies: [Movie!]! } - \\"\\"\\"Information about the deletion of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" type DeleteInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesDeleted: Int! @@ -427,7 +431,9 @@ describe("Unions", () => { info: UpdateInfo! } - \\"\\"\\"Information about the update of a node or relationship.\\"\\"\\" + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" type UpdateInfo { bookmark: String @deprecated(reason: \\"This field has been deprecated because bookmarks are now handled by the driver.\\") nodesCreated: Int! From 091480dedfc007908f6ae64839058985b7203301 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 28 Sep 2023 10:46:09 +0200 Subject: [PATCH 151/162] test: update test snapshot --- packages/ogm/src/generate.test.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/ogm/src/generate.test.ts b/packages/ogm/src/generate.test.ts index b857fd7c5d..e25bd2cf95 100644 --- a/packages/ogm/src/generate.test.ts +++ b/packages/ogm/src/generate.test.ts @@ -134,7 +134,7 @@ describe("generate", () => { Desc = \\"DESC\\", } - /** Information about the creation of a node or relationship. */ + /** Information about the number of nodes and relationships created during a create mutation */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -149,7 +149,7 @@ describe("generate", () => { users: Array; }; - /** Information about the deletion of a node or relationship. */ + /** Information about the number of nodes and relationships deleted during a delete mutation */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -173,7 +173,7 @@ describe("generate", () => { longest?: Maybe; }; - /** Information about the update of a node or relationship. */ + /** Information about the number of nodes and relationships created and deleted during an update mutation */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -431,7 +431,7 @@ describe("generate", () => { Desc = \\"DESC\\", } - /** Information about the creation of a node or relationship. */ + /** Information about the number of nodes and relationships created during a create mutation */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -446,7 +446,7 @@ describe("generate", () => { users: Array; }; - /** Information about the deletion of a node or relationship. */ + /** Information about the number of nodes and relationships deleted during a delete mutation */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -470,7 +470,7 @@ describe("generate", () => { longest?: Maybe; }; - /** Information about the update of a node or relationship. */ + /** Information about the number of nodes and relationships created and deleted during an update mutation */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -756,7 +756,7 @@ describe("generate", () => { Desc = \\"DESC\\", } - /** Information about the creation of a node or relationship. */ + /** Information about the number of nodes and relationships created during a create mutation */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -771,7 +771,7 @@ describe("generate", () => { users: Array; }; - /** Information about the deletion of a node or relationship. */ + /** Information about the number of nodes and relationships deleted during a delete mutation */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -795,7 +795,7 @@ describe("generate", () => { longest?: Maybe; }; - /** Information about the update of a node or relationship. */ + /** Information about the number of nodes and relationships created and deleted during an update mutation */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1089,7 +1089,7 @@ describe("generate", () => { screenTime: Scalars[\\"Int\\"][\\"output\\"]; }; - /** Information about the creation of a node or relationship. */ + /** Information about the number of nodes and relationships created during a create mutation */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1110,7 +1110,7 @@ describe("generate", () => { people: Array; }; - /** Information about the deletion of a node or relationship. */ + /** Information about the number of nodes and relationships deleted during a delete mutation */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1243,7 +1243,7 @@ describe("generate", () => { longest: Scalars[\\"String\\"][\\"output\\"]; }; - /** Information about the update of a node or relationship. */ + /** Information about the number of nodes and relationships created and deleted during an update mutation */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1905,7 +1905,7 @@ describe("generate", () => { faqs: Array; }; - /** Information about the creation of a node or relationship. */ + /** Information about the number of nodes and relationships created during a create mutation */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -1914,7 +1914,7 @@ describe("generate", () => { relationshipsCreated: Scalars[\\"Int\\"][\\"output\\"]; }; - /** Information about the deletion of a node or relationship. */ + /** Information about the number of nodes and relationships deleted during a delete mutation */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -2128,7 +2128,7 @@ describe("generate", () => { faqs: Array; }; - /** Information about the update of a node or relationship. */ + /** Information about the number of nodes and relationships created and deleted during an update mutation */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ From 424686004220b968361900043d3ef5175a3013f4 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 28 Sep 2023 13:36:01 +0200 Subject: [PATCH 152/162] refactor: use attribute.typeHelper --- .../AggregationAttributeField.ts | 8 +-- .../fields/attribute-fields/DateTimeField.ts | 2 +- .../attribute-fields/PointAttributeField.ts | 4 +- .../aggregation/AggregationPropertyFilter.ts | 8 +-- .../filters/property-filters/PointFilter.ts | 4 +- .../CypherAnnotationSubqueryGenerator.ts | 10 +-- .../queryAST/factory/FieldFactory.ts | 45 +++++++------- .../queryAST/factory/FilterFactory.ts | 48 +++++++------- .../queryAST/factory/OperationFactory.ts | 62 +++++++++++-------- 9 files changed, 101 insertions(+), 90 deletions(-) diff --git a/packages/graphql/src/translate/queryAST/ast/fields/aggregation-fields/AggregationAttributeField.ts b/packages/graphql/src/translate/queryAST/ast/fields/aggregation-fields/AggregationAttributeField.ts index 2737064a5e..90190323fb 100644 --- a/packages/graphql/src/translate/queryAST/ast/fields/aggregation-fields/AggregationAttributeField.ts +++ b/packages/graphql/src/translate/queryAST/ast/fields/aggregation-fields/AggregationAttributeField.ts @@ -18,9 +18,9 @@ */ import Cypher from "@neo4j/cypher-builder"; -import { AggregationField } from "./AggregationField"; import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { QueryASTNode } from "../../QueryASTNode"; +import { AggregationField } from "./AggregationField"; export class AggregationAttributeField extends AggregationField { private attribute: AttributeAdapter; @@ -43,7 +43,7 @@ export class AggregationAttributeField extends AggregationField { } public getAggregationProjection(target: Cypher.Variable, returnVar: Cypher.Variable): Cypher.Clause { - if (this.attribute.isString()) { + if (this.attribute.typeHelper.isString()) { const aggrProp = target.property(this.attribute.databaseName); const listVar = new Cypher.NamedVariable("list"); return new Cypher.With(target) @@ -57,7 +57,7 @@ export class AggregationAttributeField extends AggregationField { returnVar, ]); } - if (this.attribute.isInt() || this.attribute.isFloat()) { + if (this.attribute.typeHelper.isInt() || this.attribute.typeHelper.isFloat()) { const aggrProp = target.property(this.attribute.databaseName); return new Cypher.Return([ new Cypher.Map({ @@ -70,7 +70,7 @@ export class AggregationAttributeField extends AggregationField { ]); } - if (this.attribute.isDateTime()) { + if (this.attribute.typeHelper.isDateTime()) { const aggrProp = target.property(this.attribute.databaseName); return new Cypher.Return([ new Cypher.Map({ diff --git a/packages/graphql/src/translate/queryAST/ast/fields/attribute-fields/DateTimeField.ts b/packages/graphql/src/translate/queryAST/ast/fields/attribute-fields/DateTimeField.ts index 28349fecb0..23a5d5762e 100644 --- a/packages/graphql/src/translate/queryAST/ast/fields/attribute-fields/DateTimeField.ts +++ b/packages/graphql/src/translate/queryAST/ast/fields/attribute-fields/DateTimeField.ts @@ -34,7 +34,7 @@ export class DateTimeField extends AttributeField { } private createDateTimeProjection(targetProperty: Cypher.Property): Cypher.Expr { - if (this.attribute.isList()) { + if (this.attribute.typeHelper.isList()) { return this.createArrayProjection(targetProperty); } return this.createApocConvertFormat(targetProperty); diff --git a/packages/graphql/src/translate/queryAST/ast/fields/attribute-fields/PointAttributeField.ts b/packages/graphql/src/translate/queryAST/ast/fields/attribute-fields/PointAttributeField.ts index f53dacc330..3838d6924d 100644 --- a/packages/graphql/src/translate/queryAST/ast/fields/attribute-fields/PointAttributeField.ts +++ b/packages/graphql/src/translate/queryAST/ast/fields/attribute-fields/PointAttributeField.ts @@ -18,8 +18,8 @@ */ import Cypher from "@neo4j/cypher-builder"; -import { AttributeField } from "./AttributeField"; import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; +import { AttributeField } from "./AttributeField"; export class PointAttributeField extends AttributeField { private crs: boolean; @@ -45,7 +45,7 @@ export class PointAttributeField extends AttributeField { // Sadly need to select the whole point object due to the risk of height/z // being selected on a 2D point, to which the database will throw an error - if (this.attribute.isList()) { + if (this.attribute.typeHelper.isList()) { const arrayProjection = this.createPointArrayProjection(pointProperty); return caseStatement.then(arrayProjection).else(Cypher.Null); } else { diff --git a/packages/graphql/src/translate/queryAST/ast/filters/aggregation/AggregationPropertyFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/aggregation/AggregationPropertyFilter.ts index 50ac35e74e..55be8af2e9 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/aggregation/AggregationPropertyFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/aggregation/AggregationPropertyFilter.ts @@ -18,11 +18,11 @@ */ import Cypher from "@neo4j/cypher-builder"; +import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { AggregationLogicalOperator, AggregationOperator } from "../../../factory/parsers/parse-where-field"; -import { Filter } from "../Filter"; import type { QueryASTContext } from "../../QueryASTContext"; -import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { QueryASTNode } from "../../QueryASTNode"; +import { Filter } from "../Filter"; export class AggregationPropertyFilter extends Filter { protected attribute: AttributeAdapter; @@ -64,7 +64,7 @@ export class AggregationPropertyFilter extends Filter { if (this.aggregationOperator) { let propertyExpr: Cypher.Expr = property; - if (this.attribute.isString()) { + if (this.attribute.typeHelper.isString()) { propertyExpr = Cypher.size(property); } @@ -73,7 +73,7 @@ export class AggregationPropertyFilter extends Filter { } else { let listExpr: Cypher.Expr; - if (this.logicalOperator !== "EQUAL" && this.attribute.isString()) { + if (this.logicalOperator !== "EQUAL" && this.attribute.typeHelper.isString()) { listExpr = Cypher.collect(Cypher.size(property)); } else { listExpr = Cypher.collect(property); diff --git a/packages/graphql/src/translate/queryAST/ast/filters/property-filters/PointFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/property-filters/PointFilter.ts index 2570d124a4..529e267b40 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/property-filters/PointFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/property-filters/PointFilter.ts @@ -18,9 +18,9 @@ */ import Cypher from "@neo4j/cypher-builder"; +import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { WhereOperator } from "../Filter"; import { PropertyFilter } from "./PropertyFilter"; -import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; export class PointFilter extends PropertyFilter { protected getOperation(prop: Cypher.Property): Cypher.ComparisonOp { @@ -58,7 +58,7 @@ export class PointFilter extends PropertyFilter { case "DISTANCE": return Cypher.eq(pointDistance, distanceRef); case "EQ": { - if (attribute.isList()) { + if (attribute.typeHelper.isList()) { const pointList = this.createPointListComprehension(param); return Cypher.eq(property, pointList); } diff --git a/packages/graphql/src/translate/queryAST/cypher-generators/CypherAnnotationSubqueryGenerator.ts b/packages/graphql/src/translate/queryAST/cypher-generators/CypherAnnotationSubqueryGenerator.ts index 4fa20b2f04..1d26ae0dc1 100644 --- a/packages/graphql/src/translate/queryAST/cypher-generators/CypherAnnotationSubqueryGenerator.ts +++ b/packages/graphql/src/translate/queryAST/cypher-generators/CypherAnnotationSubqueryGenerator.ts @@ -18,9 +18,9 @@ */ import Cypher from "@neo4j/cypher-builder"; -import { QueryASTContext } from "../ast/QueryASTContext"; -import type { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { CypherAnnotation } from "../../../schema-model/annotation/CypherAnnotation"; +import type { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; +import { QueryASTContext } from "../ast/QueryASTContext"; import type { Field } from "../ast/fields/Field"; import type { CypherUnionAttributePartial } from "../ast/fields/attribute-fields/CypherUnionAttributePartial"; import { assertIsCypherNode } from "../utils/is-cypher-node"; @@ -134,7 +134,7 @@ export class CypherAnnotationSubqueryGenerator { const callStatement = new Cypher.Call(statementSubquery).innerWith(target); - if (this.attribute.isScalar() || this.attribute.isEnum()) { + if (this.attribute.typeHelper.isScalar() || this.attribute.typeHelper.isEnum()) { callStatement.unwind([this.columnName, this.returnVariable]); } else { callStatement.with([this.columnName, this.returnVariable]); @@ -199,7 +199,7 @@ export class CypherAnnotationSubqueryGenerator { const collectedProjection = Cypher.collect(projection); - if (!this.attribute.isList()) { + if (!this.attribute.typeHelper.isList()) { return Cypher.head(collectedProjection); } return collectedProjection; @@ -215,7 +215,7 @@ export class CypherAnnotationSubqueryGenerator { } const collectedProjection = Cypher.collect(caseClause); - if (!this.attribute.isList()) { + if (!this.attribute.typeHelper.isList()) { return Cypher.head(collectedProjection); } return collectedProjection; diff --git a/packages/graphql/src/translate/queryAST/factory/FieldFactory.ts b/packages/graphql/src/translate/queryAST/factory/FieldFactory.ts index 722eb1f1d3..50f049e6d8 100644 --- a/packages/graphql/src/translate/queryAST/factory/FieldFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/FieldFactory.ts @@ -17,28 +17,29 @@ * limitations under the License. */ +import { mergeDeep } from "@graphql-tools/utils"; import type { ResolveTree } from "graphql-parse-resolve-info"; +import type { ListType } from "../../../schema-model/attribute/AttributeType"; +import type { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; +import { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { RelationshipAdapter } from "../../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; +import { filterTruthy } from "../../../utils/utils"; +import { checkEntityAuthentication } from "../../authorization/check-authentication"; import type { Field } from "../ast/fields/Field"; -import { parseSelectionSetField } from "./parsers/parse-selection-set-fields"; -import type { QueryASTFactory } from "./QueryASTFactory"; -import { PointAttributeField } from "../ast/fields/attribute-fields/PointAttributeField"; -import { AttributeField } from "../ast/fields/attribute-fields/AttributeField"; -import { DateTimeField } from "../ast/fields/attribute-fields/DateTimeField"; +import { OperationField } from "../ast/fields/OperationField"; +import { AggregationAttributeField } from "../ast/fields/aggregation-fields/AggregationAttributeField"; import type { AggregationField } from "../ast/fields/aggregation-fields/AggregationField"; import { CountField } from "../ast/fields/aggregation-fields/CountField"; -import { filterTruthy } from "../../../utils/utils"; -import { AggregationAttributeField } from "../ast/fields/aggregation-fields/AggregationAttributeField"; -import { OperationField } from "../ast/fields/OperationField"; +import { AttributeField } from "../ast/fields/attribute-fields/AttributeField"; import { CypherAttributeField } from "../ast/fields/attribute-fields/CypherAttributeField"; -import type { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; -import { RelationshipAdapter } from "../../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; -import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; -import { isConcreteEntity } from "../utils/is-concrete-entity"; -import { mergeDeep } from "@graphql-tools/utils"; -import { CypherUnionAttributePartial } from "../ast/fields/attribute-fields/CypherUnionAttributePartial"; import { CypherUnionAttributeField } from "../ast/fields/attribute-fields/CypherUnionAttributeField"; -import { checkEntityAuthentication } from "../../authorization/check-authentication"; +import { CypherUnionAttributePartial } from "../ast/fields/attribute-fields/CypherUnionAttributePartial"; +import { DateTimeField } from "../ast/fields/attribute-fields/DateTimeField"; +import { PointAttributeField } from "../ast/fields/attribute-fields/PointAttributeField"; +import { isConcreteEntity } from "../utils/is-concrete-entity"; +import type { QueryASTFactory } from "./QueryASTFactory"; +import { parseSelectionSetField } from "./parsers/parse-selection-set-fields"; export class FieldFactory { private queryASTFactory: QueryASTFactory; @@ -199,8 +200,10 @@ export class FieldFactory { }); } - if (attribute.isPoint() || attribute.isCartesianPoint()) { - const typeName = attribute.isList() ? attribute.type.ofType.name : attribute.type.name; + if (attribute.typeHelper.isPoint() || attribute.typeHelper.isCartesianPoint()) { + const typeName = attribute.typeHelper.isList() + ? (attribute.type as ListType).ofType.name + : attribute.type.name; const { crs } = field.fieldsByTypeName[typeName] as any; return new PointAttributeField({ attribute, @@ -209,7 +212,7 @@ export class FieldFactory { }); } - if (attribute.isDateTime()) { + if (attribute.typeHelper.isDateTime()) { return new DateTimeField({ attribute, alias: field.alias, @@ -230,7 +233,7 @@ export class FieldFactory { }): CypherAttributeField { const cypherAnnotation = attribute.annotations.cypher; if (!cypherAnnotation) throw new Error("@Cypher directive missing"); - const typeName = attribute.isList() ? attribute.type.ofType.name : attribute.type.name; + const typeName = attribute.typeHelper.isList() ? (attribute.type as ListType).ofType.name : attribute.type.name; const rawFields = field.fieldsByTypeName[typeName]; let cypherProjection: Record | undefined; let nestedFields: Field[] | undefined; @@ -246,7 +249,7 @@ export class FieldFactory { return acc; }, {}); // if the attribute is an object or an abstract type we may have nested fields - if (attribute.isAbstract() || attribute.isObject()) { + if (attribute.typeHelper.isAbstract() || attribute.typeHelper.isObject()) { // TODO: this code block could be handled directly in the schema model or in some schema model helper const targetEntity = this.queryASTFactory.schemaModel.getEntity(typeName); // Raise an error as we expect that any complex attributes type are always entities diff --git a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts index 7f51c6f422..d454046041 100644 --- a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts @@ -17,34 +17,34 @@ * limitations under the License. */ -import { PropertyFilter } from "../ast/filters/property-filters/PropertyFilter"; -import type { Filter } from "../ast/filters/Filter"; -import { isRelationshipOperator } from "../ast/filters/Filter"; -import type { QueryASTFactory } from "./QueryASTFactory"; -import { parseAggregationWhereFields, parseConnectionWhereFields, parseWhereField } from "./parsers/parse-where-field"; -import type { ConnectionWhereArg, GraphQLWhereArg } from "../../../types"; -import { RelationshipFilter } from "../ast/filters/RelationshipFilter"; -import type { RelationshipWhereOperator, WhereOperator } from "../../where/types"; -import { LogicalFilter } from "../ast/filters/LogicalFilter"; -import { asArray, filterTruthy, isObject } from "../../../utils/utils"; -import { ConnectionFilter } from "../ast/filters/ConnectionFilter"; -import { DurationFilter } from "../ast/filters/property-filters/DurationFilter"; -import { PointFilter } from "../ast/filters/property-filters/PointFilter"; -import { AggregationFilter } from "../ast/filters/aggregation/AggregationFilter"; -import { CountFilter } from "../ast/filters/aggregation/CountFilter"; -import { AggregationPropertyFilter } from "../ast/filters/aggregation/AggregationPropertyFilter"; import type { AttributeAdapter } from "../../../schema-model/attribute/model-adapters/AttributeAdapter"; import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import type { UnionEntityAdapter } from "../../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { ConnectionWhereArg, GraphQLWhereArg } from "../../../types"; +import { fromGlobalId } from "../../../utils/global-ids"; +import { asArray, filterTruthy, isObject } from "../../../utils/utils"; import { isLogicalOperator } from "../../utils/logical-operators"; +import type { RelationshipWhereOperator, WhereOperator } from "../../where/types"; +import { ConnectionFilter } from "../ast/filters/ConnectionFilter"; +import type { Filter } from "../ast/filters/Filter"; +import { isRelationshipOperator } from "../ast/filters/Filter"; +import { LogicalFilter } from "../ast/filters/LogicalFilter"; +import { RelationshipFilter } from "../ast/filters/RelationshipFilter"; import { AggregationDurationFilter } from "../ast/filters/aggregation/AggregationDurationPropertyFilter"; -import type { InterfaceEntityAdapter } from "../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { AggregationFilter } from "../ast/filters/aggregation/AggregationFilter"; +import { AggregationPropertyFilter } from "../ast/filters/aggregation/AggregationPropertyFilter"; +import { CountFilter } from "../ast/filters/aggregation/CountFilter"; +import { DurationFilter } from "../ast/filters/property-filters/DurationFilter"; +import { PointFilter } from "../ast/filters/property-filters/PointFilter"; +import { PropertyFilter } from "../ast/filters/property-filters/PropertyFilter"; import { getConcreteEntities } from "../utils/get-concrete-entities"; import { isConcreteEntity } from "../utils/is-concrete-entity"; -import { fromGlobalId } from "../../../utils/global-ids"; -import type { UnionEntityAdapter } from "../../../schema-model/entity/model-adapters/UnionEntityAdapter"; -import { isUnionEntity } from "../utils/is-union-entity"; import { isInterfaceEntity } from "../utils/is-interface-entity"; +import { isUnionEntity } from "../utils/is-union-entity"; +import type { QueryASTFactory } from "./QueryASTFactory"; +import { parseAggregationWhereFields, parseConnectionWhereFields, parseWhereField } from "./parsers/parse-where-field"; type AggregateWhereInput = { count: number; @@ -157,7 +157,7 @@ export class FilterFactory { attachedTo?: "node" | "relationship"; }): PropertyFilter { const filterOperator = operator || "EQ"; - if (attribute.isDuration()) { + if (attribute.typeHelper.isDuration()) { return new DurationFilter({ attribute, comparisonValue, @@ -166,7 +166,7 @@ export class FilterFactory { attachedTo, }); } - if (attribute.isPoint() || attribute.isCartesianPoint()) { + if (attribute.typeHelper.isPoint() || attribute.typeHelper.isCartesianPoint()) { return new PointFilter({ attribute, comparisonValue, @@ -308,7 +308,7 @@ export class FilterFactory { const idAttribute = entity.findAttribute(field); if (!idAttribute) throw new Error(`Attribute ${field} not found`); - if (idAttribute.isNumeric()) { + if (idAttribute.typeHelper.isNumeric()) { id = Number(id); if (Number.isNaN(id)) { throw new Error("Can't parse non-numeric relay id"); @@ -457,7 +457,7 @@ export class FilterFactory { const attachedTo = entity instanceof RelationshipAdapter ? "relationship" : "node"; - if (attr.isDuration()) { + if (attr.typeHelper.isDuration()) { return new AggregationDurationFilter({ attribute: attr, comparisonValue: value, diff --git a/packages/graphql/src/translate/queryAST/factory/OperationFactory.ts b/packages/graphql/src/translate/queryAST/factory/OperationFactory.ts index b8d352e93f..3e45275905 100644 --- a/packages/graphql/src/translate/queryAST/factory/OperationFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/OperationFactory.ts @@ -17,38 +17,38 @@ * limitations under the License. */ +import { mergeDeep } from "@graphql-tools/utils"; import type { ResolveTree } from "graphql-parse-resolve-info"; -import { FilterFactory } from "./FilterFactory"; -import { FieldFactory } from "./FieldFactory"; -import type { QueryASTFactory } from "./QueryASTFactory"; -import { ConnectionReadOperation } from "../ast/operations/ConnectionReadOperation"; -import { ReadOperation } from "../ast/operations/ReadOperation"; -import type { ConnectionQueryArgs, GraphQLOptionsArg } from "../../../types"; -import { SortAndPaginationFactory } from "./SortAndPaginationFactory"; +import { cursorToOffset } from "graphql-relay"; import { Integer } from "neo4j-driver"; -import { AggregationOperation } from "../ast/operations/AggregationOperation"; import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import type { UnionEntityAdapter } from "../../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { AuthorizationFactory } from "./AuthorizationFactory"; -import { AuthFilterFactory } from "./AuthFilterFactory"; +import type { ConnectionQueryArgs, GraphQLOptionsArg } from "../../../types"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; -import { CompositeConnectionReadOperation } from "../ast/operations/composite/CompositeConnectionReadOperation"; -import { isConcreteEntity } from "../utils/is-concrete-entity"; +import { filterTruthy, isObject, isString } from "../../../utils/utils"; +import { checkEntityAuthentication } from "../../authorization/check-authentication"; +import type { AuthorizationFilters } from "../ast/filters/authorization-filters/AuthorizationFilters"; +import { AggregationOperation } from "../ast/operations/AggregationOperation"; +import { ConnectionReadOperation } from "../ast/operations/ConnectionReadOperation"; +import { ReadOperation } from "../ast/operations/ReadOperation"; import { CompositeConnectionPartial } from "../ast/operations/composite/CompositeConnectionPartial"; -import type { UnionEntityAdapter } from "../../../schema-model/entity/model-adapters/UnionEntityAdapter"; -import type { InterfaceEntityAdapter } from "../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { CompositeConnectionReadOperation } from "../ast/operations/composite/CompositeConnectionReadOperation"; import { CompositeReadOperation } from "../ast/operations/composite/CompositeReadOperation"; import { CompositeReadPartial } from "../ast/operations/composite/CompositeReadPartial"; -import { isUnionEntity } from "../utils/is-union-entity"; +import { getConcreteEntitiesInOnArgumentOfWhere } from "../utils/get-concrete-entities-in-on-argument-of-where"; import { getConcreteWhere } from "../utils/get-concrete-where"; -import { filterTruthy, isObject, isString } from "../../../utils/utils"; -import { parseSelectionSetField } from "./parsers/parse-selection-set-fields"; -import type { AuthorizationFilters } from "../ast/filters/authorization-filters/AuthorizationFilters"; +import { isConcreteEntity } from "../utils/is-concrete-entity"; import { isInterfaceEntity } from "../utils/is-interface-entity"; -import { getConcreteEntitiesInOnArgumentOfWhere } from "../utils/get-concrete-entities-in-on-argument-of-where"; -import { checkEntityAuthentication } from "../../authorization/check-authentication"; -import { mergeDeep } from "@graphql-tools/utils"; -import { cursorToOffset } from "graphql-relay"; +import { isUnionEntity } from "../utils/is-union-entity"; +import { AuthFilterFactory } from "./AuthFilterFactory"; +import { AuthorizationFactory } from "./AuthorizationFactory"; +import { FieldFactory } from "./FieldFactory"; +import { FilterFactory } from "./FilterFactory"; +import type { QueryASTFactory } from "./QueryASTFactory"; +import { SortAndPaginationFactory } from "./SortAndPaginationFactory"; +import { parseSelectionSetField } from "./parsers/parse-selection-set-fields"; export class OperationsFactory { private filterFactory: FilterFactory; @@ -139,15 +139,21 @@ export class OperationsFactory { }); } - const rawProjectionFields = { ...resolveTree.fieldsByTypeName[relationship.getAggregationFieldTypename()] }; + const rawProjectionFields = { + ...resolveTree.fieldsByTypeName[relationship.operations.getAggregationFieldTypename()], + }; const parsedProjectionFields = this.splitConnectionFields(rawProjectionFields); const projectionFields = parsedProjectionFields.fields; const edgeRawFields = { - ...parsedProjectionFields.edge?.fieldsByTypeName[relationship.getAggregationFieldTypename("edge")], + ...parsedProjectionFields.edge?.fieldsByTypeName[ + relationship.operations.getAggregationFieldTypename("edge") + ], }; const nodeRawFields = { - ...parsedProjectionFields.node?.fieldsByTypeName[relationship.getAggregationFieldTypename("node")], + ...parsedProjectionFields.node?.fieldsByTypeName[ + relationship.operations.getAggregationFieldTypename("node") + ], }; const whereArgs = (resolveTree.args.where || {}) as Record; @@ -326,14 +332,16 @@ export class OperationsFactory { operation: T; whereArgs: Record; }): T { - const resolveTreeConnectionFields = { ...resolveTree.fieldsByTypeName[relationship.connectionFieldTypename] }; + const resolveTreeConnectionFields = { + ...resolveTree.fieldsByTypeName[relationship.operations.connectionFieldTypename], + }; const edgeFieldsRaw = this.findFieldsByNameInResolveTree(resolveTreeConnectionFields, "edges"); const resolveTreeEdgeFields: Record = mergeDeep( filterTruthy( edgeFieldsRaw.map( - (edgeField) => edgeField?.fieldsByTypeName[relationship.relationshipFieldTypename] + (edgeField) => edgeField?.fieldsByTypeName[relationship.operations.relationshipFieldTypename] ) ) ) ?? {}; From 169f2901ebd37f1ea950ccb5f6c94ddd9dd27f93 Mon Sep 17 00:00:00 2001 From: a-alle Date: Thu, 28 Sep 2023 12:50:50 +0100 Subject: [PATCH 153/162] update remaining tests post translation layer merge --- .../interface-relationships/read.test.ts | 36 ++++----- packages/ogm/tests/issues/3591.test.ts | 74 +++++++++---------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts index 3734c67155..271bc79fe6 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts @@ -371,13 +371,13 @@ describe("Interface Relationships", () => { CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) - WHERE (this1.title STARTS WITH $param0 AND this0.screenTime > $param1) + WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this MATCH (this)-[this2:ACTED_IN]->(this3:Series) - WHERE (this3.title STARTS WITH $param2 AND this2.screenTime > $param3) + WHERE (this2.screenTime > $param2 AND this3.title STARTS WITH $param3) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -390,16 +390,16 @@ describe("Interface Relationships", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": \\"The \\", - \\"param1\\": { + \\"param0\\": { \\"low\\": 60, \\"high\\": 0 }, - \\"param2\\": \\"The \\", - \\"param3\\": { + \\"param1\\": \\"The \\", + \\"param2\\": { \\"low\\": 60, \\"high\\": 0 - } + }, + \\"param3\\": \\"The \\" }" `); }); @@ -434,7 +434,7 @@ describe("Interface Relationships", () => { CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) - WHERE (this1.title STARTS WITH $param0 AND this0.screenTime > $param1) + WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge } @@ -447,11 +447,11 @@ describe("Interface Relationships", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": \\"The \\", - \\"param1\\": { + \\"param0\\": { \\"low\\": 60, \\"high\\": 0 - } + }, + \\"param1\\": \\"The \\" }" `); }); @@ -492,13 +492,13 @@ describe("Interface Relationships", () => { CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) - WHERE (this1.title STARTS WITH $param0 AND this0.screenTime > $param1) + WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this MATCH (this)-[this2:ACTED_IN]->(this3:Series) - WHERE (this3.title STARTS WITH $param2 AND this2.screenTime > $param3) + WHERE (this2.screenTime > $param2 AND this3.title STARTS WITH $param3) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -511,16 +511,16 @@ describe("Interface Relationships", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": \\"A \\", - \\"param1\\": { + \\"param0\\": { \\"low\\": 60, \\"high\\": 0 }, - \\"param2\\": \\"The \\", - \\"param3\\": { + \\"param1\\": \\"A \\", + \\"param2\\": { \\"low\\": 60, \\"high\\": 0 - } + }, + \\"param3\\": \\"The \\" }" `); }); diff --git a/packages/ogm/tests/issues/3591.test.ts b/packages/ogm/tests/issues/3591.test.ts index 855387378b..5ce25e50b5 100644 --- a/packages/ogm/tests/issues/3591.test.ts +++ b/packages/ogm/tests/issues/3591.test.ts @@ -203,7 +203,7 @@ describe("issues/3591", () => { update?: InputMaybe; }; - /** SortDirection */ + /** An enum for sorting in either ascending or descending order. */ export enum SortDirection { /** Sort by field values in ascending order. */ Asc = \\"ASC\\", @@ -247,7 +247,7 @@ describe("issues/3591", () => { companies: Array; }; - /** CreateInfo */ + /** Information about the number of nodes and relationships created during a create mutation */ export type CreateInfo = { __typename?: \\"CreateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -268,7 +268,7 @@ describe("issues/3591", () => { users: Array; }; - /** DeleteInfo */ + /** Information about the number of nodes and relationships deleted during a delete mutation */ export type DeleteInfo = { __typename?: \\"DeleteInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -328,7 +328,7 @@ describe("issues/3591", () => { companies: Array; }; - /** UpdateInfo */ + /** Information about the number of nodes and relationships created and deleted during an update mutation */ export type UpdateInfo = { __typename?: \\"UpdateInfo\\"; /** @deprecated This field has been deprecated because bookmarks are now handled by the driver. */ @@ -354,33 +354,33 @@ describe("issues/3591", () => { export type User = { __typename?: \\"User\\"; id: Scalars[\\"ID\\"][\\"output\\"]; - company: Array; companyAggregate?: Maybe; - favoriteRestaurants: Array; + company: Array; favoriteRestaurantsAggregate?: Maybe; + favoriteRestaurants: Array; companyConnection: UserCompanyConnection; favoriteRestaurantsConnection: UserFavoriteRestaurantsConnection; }; - export type UserCompanyArgs = { + export type UserCompanyAggregateArgs = { where?: InputMaybe; - options?: InputMaybe; directed?: InputMaybe; }; - export type UserCompanyAggregateArgs = { + export type UserCompanyArgs = { where?: InputMaybe; + options?: InputMaybe; directed?: InputMaybe; }; - export type UserFavoriteRestaurantsArgs = { + export type UserFavoriteRestaurantsAggregateArgs = { where?: InputMaybe; - options?: InputMaybe; directed?: InputMaybe; }; - export type UserFavoriteRestaurantsAggregateArgs = { + export type UserFavoriteRestaurantsArgs = { where?: InputMaybe; + options?: InputMaybe; directed?: InputMaybe; }; @@ -481,10 +481,10 @@ describe("issues/3591", () => { }; export type CompanyOptions = { - /** Specify one or more CompanySort objects to sort Companies by. The sorts will be applied in the order in which they are arranged in the array. */ - sort?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** Specify one or more CompanySort objects to sort Companies by. The sorts will be applied in the order in which they are arranged in the array. */ + sort?: InputMaybe>; }; /** Fields to sort Companies by. The order in which sorts are applied is not guaranteed when specifying many fields in one CompanySort object. */ @@ -502,9 +502,6 @@ describe("issues/3591", () => { }; export type CompanyWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; id?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ id_NOT?: InputMaybe; @@ -565,6 +562,9 @@ describe("issues/3591", () => { field3_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ field3_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; }; export type RestaurantConnectWhere = { @@ -576,10 +576,10 @@ describe("issues/3591", () => { }; export type RestaurantOptions = { - /** Specify one or more RestaurantSort objects to sort Restaurants by. The sorts will be applied in the order in which they are arranged in the array. */ - sort?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** Specify one or more RestaurantSort objects to sort Restaurants by. The sorts will be applied in the order in which they are arranged in the array. */ + sort?: InputMaybe>; }; /** Fields to sort Restaurants by. The order in which sorts are applied is not guaranteed when specifying many fields in one RestaurantSort object. */ @@ -592,9 +592,6 @@ describe("issues/3591", () => { }; export type RestaurantWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; name?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT?: InputMaybe; @@ -610,6 +607,9 @@ describe("issues/3591", () => { name_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ name_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; }; export type UserCompanyAggregateInput = { @@ -635,8 +635,8 @@ describe("issues/3591", () => { }; export type UserCompanyConnectionWhere = { - AND?: InputMaybe>; OR?: InputMaybe>; + AND?: InputMaybe>; NOT?: InputMaybe; node?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ @@ -656,8 +656,8 @@ describe("issues/3591", () => { }; export type UserCompanyFieldInput = { - create?: InputMaybe>; connect?: InputMaybe>; + create?: InputMaybe>; }; export type UserCompanyNodeAggregationWhereInput = { @@ -839,11 +839,11 @@ describe("issues/3591", () => { export type UserCompanyUpdateFieldInput = { where?: InputMaybe; - create?: InputMaybe>; connect?: InputMaybe>; + disconnect?: InputMaybe>; + create?: InputMaybe>; update?: InputMaybe; delete?: InputMaybe>; - disconnect?: InputMaybe>; }; export type UserConnectInput = { @@ -895,8 +895,8 @@ describe("issues/3591", () => { }; export type UserFavoriteRestaurantsConnectionWhere = { - AND?: InputMaybe>; OR?: InputMaybe>; + AND?: InputMaybe>; NOT?: InputMaybe; node?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ @@ -916,8 +916,8 @@ describe("issues/3591", () => { }; export type UserFavoriteRestaurantsFieldInput = { - create?: InputMaybe>; connect?: InputMaybe>; + create?: InputMaybe>; }; export type UserFavoriteRestaurantsNodeAggregationWhereInput = { @@ -987,18 +987,18 @@ describe("issues/3591", () => { export type UserFavoriteRestaurantsUpdateFieldInput = { where?: InputMaybe; - create?: InputMaybe>; connect?: InputMaybe>; + disconnect?: InputMaybe>; + create?: InputMaybe>; update?: InputMaybe; delete?: InputMaybe>; - disconnect?: InputMaybe>; }; export type UserOptions = { - /** 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?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; + /** 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?: InputMaybe>; }; export type UserRelationInput = { @@ -1021,9 +1021,6 @@ describe("issues/3591", () => { }; export type UserWhere = { - OR?: InputMaybe>; - AND?: InputMaybe>; - NOT?: InputMaybe; id?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ id_NOT?: InputMaybe; @@ -1039,11 +1036,13 @@ describe("issues/3591", () => { id_NOT_STARTS_WITH?: InputMaybe; /** @deprecated Negation filters will be deprecated, use the NOT operator to achieve the same behavior */ id_NOT_ENDS_WITH?: InputMaybe; + OR?: InputMaybe>; + AND?: InputMaybe>; + NOT?: InputMaybe; /** @deprecated Use \`company_SOME\` instead. */ company?: InputMaybe; /** @deprecated Use \`company_NONE\` instead. */ company_NOT?: InputMaybe; - companyAggregate?: InputMaybe; /** Return Users where all of the related Companies match this filter */ company_ALL?: InputMaybe; /** Return Users where none of the related Companies match this filter */ @@ -1052,11 +1051,11 @@ describe("issues/3591", () => { company_SINGLE?: InputMaybe; /** Return Users where some of the related Companies match this filter */ company_SOME?: InputMaybe; + companyAggregate?: InputMaybe; /** @deprecated Use \`favoriteRestaurants_SOME\` instead. */ favoriteRestaurants?: InputMaybe; /** @deprecated Use \`favoriteRestaurants_NONE\` instead. */ favoriteRestaurants_NOT?: InputMaybe; - favoriteRestaurantsAggregate?: InputMaybe; /** Return Users where all of the related Restaurants match this filter */ favoriteRestaurants_ALL?: InputMaybe; /** Return Users where none of the related Restaurants match this filter */ @@ -1065,6 +1064,7 @@ describe("issues/3591", () => { favoriteRestaurants_SINGLE?: InputMaybe; /** Return Users where some of the related Restaurants match this filter */ favoriteRestaurants_SOME?: InputMaybe; + favoriteRestaurantsAggregate?: InputMaybe; /** @deprecated Use \`companyConnection_SOME\` instead. */ companyConnection?: InputMaybe; /** @deprecated Use \`companyConnection_NONE\` instead. */ From fd8d73d30f680b199cd1e9a20859249fe582aa3c Mon Sep 17 00:00:00 2001 From: a-alle Date: Thu, 28 Sep 2023 12:51:25 +0100 Subject: [PATCH 154/162] remove deprecated directives from codebase: readonly, writeonly, queryOptions --- packages/graphql/src/constants.ts | 4 ---- .../utils/invalid-directive-combinations.ts | 14 +++----------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/graphql/src/constants.ts b/packages/graphql/src/constants.ts index f7a9f5bdb2..4ccd96ca35 100644 --- a/packages/graphql/src/constants.ts +++ b/packages/graphql/src/constants.ts @@ -112,7 +112,6 @@ export const FIELD_DIRECTIVES = [ "alias", "authentication", "authorization", - "callback", "coalesce", "customResolver", "cypher", @@ -121,7 +120,6 @@ export const FIELD_DIRECTIVES = [ "id", "jwtClaim", "populatedBy", - "readonly", "relationship", "relayId", "selectable", @@ -129,7 +127,6 @@ export const FIELD_DIRECTIVES = [ "subscriptionsAuthorization", "timestamp", "unique", - "writeonly", ] as const; export type FieldDirective = (typeof FIELD_DIRECTIVES)[number]; @@ -144,7 +141,6 @@ export const OBJECT_DIRECTIVES = [ "node", "plural", "query", - "queryOptions", "limit", "shareable", "subscription", diff --git a/packages/graphql/src/schema/validation/utils/invalid-directive-combinations.ts b/packages/graphql/src/schema/validation/utils/invalid-directive-combinations.ts index 6dec7d0dbd..4efb1da9f8 100644 --- a/packages/graphql/src/schema/validation/utils/invalid-directive-combinations.ts +++ b/packages/graphql/src/schema/validation/utils/invalid-directive-combinations.ts @@ -26,7 +26,6 @@ export const invalidFieldCombinations: InvalidFieldCombinations = { alias: ["jwtClaim", "cypher", "customResolver", "relationship"], authentication: ["jwtClaim", "customResolver", "relationship"], authorization: ["jwtClaim", "customResolver", "relationship"], - callback: ["jwtClaim", "id", "default", "relationship"], coalesce: ["jwtClaim", "relationship"], customResolver: [ "jwtClaim", @@ -35,38 +34,32 @@ export const invalidFieldCombinations: InvalidFieldCombinations = { "authorization", "subscriptionsAuthorization", "id", - "readonly", "relationship", "unique", - "writeonly", "filterable", "settable", "selectable", ], - cypher: ["jwtClaim", "alias", "id", "readonly", "relationship", "unique", "writeonly"], - default: ["jwtClaim", "callback", "populatedBy", "relationship"], - id: ["jwtClaim", "cypher", "populatedBy", "callback", "customResolver", "relationship", "timestamp"], + cypher: ["jwtClaim", "alias", "id", "relationship", "unique"], + default: ["jwtClaim", "populatedBy", "relationship"], + id: ["jwtClaim", "cypher", "populatedBy", "customResolver", "relationship", "timestamp"], populatedBy: ["jwtClaim", "id", "default", "relationship"], - readonly: ["jwtClaim", "cypher", "customResolver", "relationship"], relationship: [ "jwtClaim", "alias", "authentication", "authorization", "subscriptionsAuthorization", - "callback", "coalesce", "cypher", "default", "id", "customResolver", - "readonly", "populatedBy", "unique", ], timestamp: ["jwtClaim", "id", "unique"], unique: ["jwtClaim", "cypher", "customResolver", "relationship", "timestamp"], - writeonly: ["jwtClaim", "cypher", "customResolver"], jwtClaim: FIELD_DIRECTIVES, relayId: ["jwtClaim"], subscriptionsAuthorization: ["jwtClaim", "customResolver", "relationship"], @@ -93,7 +86,6 @@ export const invalidObjectCombinations: InvalidObjectCombinations = { node: [], plural: [], query: [], - queryOptions: [], shareable: [], subscription: [], subscriptionsAuthorization: [], From dd5b10877842a45fe2311c35bb7d7c3dceea3729 Mon Sep 17 00:00:00 2001 From: a-alle Date: Thu, 28 Sep 2023 15:18:03 +0100 Subject: [PATCH 155/162] refactor AttributeTypeHelper --- .../attribute/AttributeTypeHelper.ts | 83 +++++++++---------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts b/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts index d6eb5bcdd3..bd440dd93a 100644 --- a/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts +++ b/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts @@ -35,174 +35,173 @@ import { } from "./AttributeType"; export class AttributeTypeHelper { - _type: AttributeType; + public type: AttributeType; private assertionOptions: { includeLists: boolean; } = { includeLists: true }; constructor(type: AttributeType) { - this._type = type; + this.type = type; } + /** * Just an helper to get the wrapped type in case of a list, useful for the assertions */ - private getTypeForAssertion(includeLists: boolean) { if (includeLists) { if (!this.isList()) { - return this._type; + return this.type; } - if (this._type.ofType instanceof ListType) { - return this._type.ofType.ofType; + if (this.type.ofType instanceof ListType) { + return this.type.ofType.ofType; } - return this._type.ofType; - // return this.isList() ? this.type.ofType : this.type; + return this.type.ofType; } - return this._type; + return this.type; } - isBoolean(options = this.assertionOptions): boolean { + public isBoolean(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Boolean; } - isID(options = this.assertionOptions): boolean { + public isID(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.ID; } - isInt(options = this.assertionOptions): boolean { + public isInt(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Int; } - isFloat(options = this.assertionOptions): boolean { + public isFloat(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.Float; } - isString(options = this.assertionOptions): boolean { + public isString(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === GraphQLBuiltInScalarType.String; } - isCartesianPoint(options = this.assertionOptions): boolean { + public isCartesianPoint(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof Neo4jCartesianPointType; } - isPoint(options = this.assertionOptions): boolean { + public isPoint(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof Neo4jPointType; } - isBigInt(options = this.assertionOptions): boolean { + public isBigInt(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === Neo4jGraphQLNumberType.BigInt; } - isDate(options = this.assertionOptions): boolean { + public isDate(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.Date; } - isDateTime(options = this.assertionOptions): boolean { + public isDateTime(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.DateTime; } - isLocalDateTime(options = this.assertionOptions): boolean { + public isLocalDateTime(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.LocalDateTime; } - isTime(options = this.assertionOptions): boolean { + public isTime(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ScalarType && type.name === Neo4jGraphQLTemporalType.Time; } - isLocalTime(options = this.assertionOptions): boolean { + public isLocalTime(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return (type.name as Neo4jGraphQLTemporalType) === Neo4jGraphQLTemporalType.LocalTime; } - isDuration(options = this.assertionOptions): boolean { + public isDuration(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return (type.name as Neo4jGraphQLTemporalType) === Neo4jGraphQLTemporalType.Duration; } - isObject(options = this.assertionOptions): boolean { + public isObject(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof ObjectType; } - isEnum(options = this.assertionOptions): boolean { + public isEnum(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof EnumType; } - isInterface(options = this.assertionOptions): boolean { + public isInterface(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof InterfaceType; } - isUnion(options = this.assertionOptions): boolean { + public isUnion(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof UnionType; } - isList(): this is this & { _type: ListType } { - return this._type instanceof ListType; + public isList(): this is this & { type: ListType } { + return this.type instanceof ListType; } - isInput(options = this.assertionOptions): boolean { + public isInput(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof InputType; } - isUserScalar(options = this.assertionOptions): boolean { + public isUserScalar(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type instanceof UserScalarType; } - isTemporal(options = this.assertionOptions): boolean { + public isTemporal(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type.name in Neo4jGraphQLTemporalType; } - isListElementRequired(): boolean { - if (!(this._type instanceof ListType)) { + public isListElementRequired(): boolean { + if (!(this.type instanceof ListType)) { return false; } - return this._type.ofType.isRequired; + return this.type.ofType.isRequired; } - isRequired(): boolean { - return this._type.isRequired; + public isRequired(): boolean { + return this.type.isRequired; } - isGraphQLBuiltInScalar(options = this.assertionOptions): boolean { + public isGraphQLBuiltInScalar(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type.name in GraphQLBuiltInScalarType; } - isSpatial(options = this.assertionOptions): boolean { + public isSpatial(options = this.assertionOptions): boolean { const type = this.getTypeForAssertion(options.includeLists); return type.name in Neo4jGraphQLSpatialType; } - isAbstract(options = this.assertionOptions): boolean { + public isAbstract(options = this.assertionOptions): boolean { return this.isInterface(options) || this.isUnion(options); } - isNumeric(options = this.assertionOptions): boolean { + public isNumeric(options = this.assertionOptions): boolean { return this.isBigInt(options) || this.isFloat(options) || this.isInt(options); } /** * Returns true for both built-in and user-defined scalars **/ - isScalar(options = this.assertionOptions): boolean { + public isScalar(options = this.assertionOptions): boolean { return ( this.isGraphQLBuiltInScalar(options) || this.isTemporal(options) || From e8bcbe2042fdc1eda8aac133f0115022be28b35d Mon Sep 17 00:00:00 2001 From: a-alle Date: Thu, 28 Sep 2023 15:25:35 +0100 Subject: [PATCH 156/162] remove comment --- packages/graphql/src/classes/Neo4jGraphQL.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/graphql/src/classes/Neo4jGraphQL.ts b/packages/graphql/src/classes/Neo4jGraphQL.ts index c89e959309..bfbe715897 100644 --- a/packages/graphql/src/classes/Neo4jGraphQL.ts +++ b/packages/graphql/src/classes/Neo4jGraphQL.ts @@ -339,8 +339,6 @@ class Neo4jGraphQL { } private generateSchemaModel(document: DocumentNode): Neo4jGraphQLSchemaModel { - // This can be run several times but it will always be the same result, - // so we memoize the schemaModel. if (!this.schemaModel) { return generateModel(document); } From b47eaf68fb5a08b8f6f24d69395ea06edecd6835 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 28 Sep 2023 16:53:39 +0200 Subject: [PATCH 157/162] refactor: make type protected readonly in AttributTypeHelper --- .../src/schema-model/attribute/AttributeTypeHelper.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts b/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts index bd440dd93a..8b56681082 100644 --- a/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts +++ b/packages/graphql/src/schema-model/attribute/AttributeTypeHelper.ts @@ -18,7 +18,6 @@ */ import type { AttributeType } from "./AttributeType"; import { - Neo4jGraphQLSpatialType, EnumType, GraphQLBuiltInScalarType, InputType, @@ -26,6 +25,7 @@ import { ListType, Neo4jCartesianPointType, Neo4jGraphQLNumberType, + Neo4jGraphQLSpatialType, Neo4jGraphQLTemporalType, Neo4jPointType, ObjectType, @@ -35,17 +35,14 @@ import { } from "./AttributeType"; export class AttributeTypeHelper { - public type: AttributeType; private assertionOptions: { includeLists: boolean; } = { includeLists: true }; - constructor(type: AttributeType) { - this.type = type; - } + constructor(protected readonly type: AttributeType) {} /** - * Just an helper to get the wrapped type in case of a list, useful for the assertions + * Just an helper to get the wrapped type in readonlyase of a list, useful for the assertions */ private getTypeForAssertion(includeLists: boolean) { if (includeLists) { From 67eaac23feddd23b976f34ebec65960880e607de Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 28 Sep 2023 17:30:16 +0200 Subject: [PATCH 158/162] feat: add descriptions to input objects --- .../graphql/src/graphql/input-objects/CartesianPointDistance.ts | 1 + .../graphql/src/graphql/input-objects/CartesianPointInput.ts | 1 + packages/graphql/src/graphql/input-objects/PointDistance.ts | 1 + packages/graphql/src/graphql/input-objects/PointInput.ts | 1 + packages/graphql/src/graphql/input-objects/QueryOptions.ts | 1 + 5 files changed, 5 insertions(+) diff --git a/packages/graphql/src/graphql/input-objects/CartesianPointDistance.ts b/packages/graphql/src/graphql/input-objects/CartesianPointDistance.ts index dc8aa713ba..c0f8e43bc5 100644 --- a/packages/graphql/src/graphql/input-objects/CartesianPointDistance.ts +++ b/packages/graphql/src/graphql/input-objects/CartesianPointDistance.ts @@ -22,6 +22,7 @@ import { CartesianPointInput } from "./CartesianPointInput"; export const CartesianPointDistance = new GraphQLInputObjectType({ name: "CartesianPointDistance", + description: "Input type for a cartesian point with a distance", fields: { point: { type: new GraphQLNonNull(CartesianPointInput), diff --git a/packages/graphql/src/graphql/input-objects/CartesianPointInput.ts b/packages/graphql/src/graphql/input-objects/CartesianPointInput.ts index 0fa27087d7..cddd492fd9 100644 --- a/packages/graphql/src/graphql/input-objects/CartesianPointInput.ts +++ b/packages/graphql/src/graphql/input-objects/CartesianPointInput.ts @@ -21,6 +21,7 @@ import { GraphQLFloat, GraphQLInputObjectType, GraphQLNonNull } from "graphql"; export const CartesianPointInput = new GraphQLInputObjectType({ name: "CartesianPointInput", + description: "Input type for a cartesian point", fields: { x: { type: new GraphQLNonNull(GraphQLFloat), diff --git a/packages/graphql/src/graphql/input-objects/PointDistance.ts b/packages/graphql/src/graphql/input-objects/PointDistance.ts index f7f34aa8f8..8d74198f20 100644 --- a/packages/graphql/src/graphql/input-objects/PointDistance.ts +++ b/packages/graphql/src/graphql/input-objects/PointDistance.ts @@ -22,6 +22,7 @@ import { PointInput } from "./PointInput"; export const PointDistance = new GraphQLInputObjectType({ name: "PointDistance", + description: "Input type for a point with a distance", fields: { point: { type: new GraphQLNonNull(PointInput), diff --git a/packages/graphql/src/graphql/input-objects/PointInput.ts b/packages/graphql/src/graphql/input-objects/PointInput.ts index 1cfc94edcd..9adeb44063 100644 --- a/packages/graphql/src/graphql/input-objects/PointInput.ts +++ b/packages/graphql/src/graphql/input-objects/PointInput.ts @@ -21,6 +21,7 @@ import { GraphQLFloat, GraphQLInputObjectType, GraphQLNonNull } from "graphql"; export const PointInput = new GraphQLInputObjectType({ name: "PointInput", + description: "Input type for a point", fields: { longitude: { type: new GraphQLNonNull(GraphQLFloat), diff --git a/packages/graphql/src/graphql/input-objects/QueryOptions.ts b/packages/graphql/src/graphql/input-objects/QueryOptions.ts index 6ebbb7106b..5c5f830864 100644 --- a/packages/graphql/src/graphql/input-objects/QueryOptions.ts +++ b/packages/graphql/src/graphql/input-objects/QueryOptions.ts @@ -21,6 +21,7 @@ import { GraphQLInputObjectType, GraphQLInt } from "graphql"; export const QueryOptions = new GraphQLInputObjectType({ name: "QueryOptions", + description: "Input type for query options", fields: { offset: { type: GraphQLInt, From 5cf9843c45888dfa1882642af93a6d78b4ab2cac Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 28 Sep 2023 17:34:37 +0200 Subject: [PATCH 159/162] test: update snapshots --- .../graphql/tests/schema/comments.test.ts | 2 +- .../schema/connect-or-create-unions.test.ts | 2 +- .../tests/schema/connections/unions.test.ts | 2 +- .../tests/schema/directive-preserve.test.ts | 2 +- .../schema/directives/filterable.test.ts | 6 +++--- .../directives/relationship-aggregate.test.ts | 4 ++-- .../relationship-nested-operations.test.ts | 20 +++++++++---------- .../schema/directives/selectable.test.ts | 2 +- .../tests/schema/directives/settable.test.ts | 8 ++++---- .../graphql/tests/schema/issues/1182.test.ts | 4 ++-- .../graphql/tests/schema/issues/2981.test.ts | 2 +- .../graphql/tests/schema/issues/3428.test.ts | 2 +- packages/graphql/tests/schema/null.test.ts | 4 ++-- .../tests/schema/subscriptions.test.ts | 4 ++-- .../graphql/tests/schema/types/point.test.ts | 12 +++++------ .../union-interface-relationship.test.ts | 2 +- packages/graphql/tests/schema/unions.test.ts | 2 +- 17 files changed, 40 insertions(+), 40 deletions(-) diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 201eeb6b73..f2b01f272c 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -1633,7 +1633,7 @@ describe("Comments", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index 92af0fe812..d27e3fbcf7 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -527,7 +527,7 @@ describe("Connect Or Create", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 3b9f3c95ed..ed244b4e6d 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -955,7 +955,7 @@ describe("Unions", () => { journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 321ad7bca1..09d837fe08 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -3226,7 +3226,7 @@ describe("Directive-preserve", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index d22bad9740..66c7a7caae 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -10352,7 +10352,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -11583,7 +11583,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -12814,7 +12814,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index 432e02cb25..a865e14746 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -2437,7 +2437,7 @@ describe("@relationship directive, aggregate argument", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -2959,7 +2959,7 @@ describe("@relationship directive, aggregate argument", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int 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 72543343c1..9f72712b23 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -4375,7 +4375,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -4804,7 +4804,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -5241,7 +5241,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -5647,7 +5647,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -6062,7 +6062,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -6477,7 +6477,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -6860,7 +6860,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -7357,7 +7357,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -7946,7 +7946,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -8461,7 +8461,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 4ad856e16e..e36426032c 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -2590,7 +2590,7 @@ describe("@selectable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 283e236bb4..59da00a9b6 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -3176,7 +3176,7 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -3683,7 +3683,7 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -4372,7 +4372,7 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -5077,7 +5077,7 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index cf583c6050..8941f98d76 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -512,14 +512,14 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { srid: Int! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a point with a distance\\"\\"\\" input PointDistance { \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" distance: Float! point: PointInput! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float latitude: Float! diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index 7119a17232..8c71369808 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -865,7 +865,7 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 0afc2fa787..ac897a0d2a 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -731,7 +731,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index 0f1ff816fd..6eb9b5a029 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -319,14 +319,14 @@ describe("Null", () => { srid: Int! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a point with a distance\\"\\"\\" input PointDistance { \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" distance: Float! point: PointInput! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float latitude: Float! diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 80a7695d03..752f7a6efa 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -2219,7 +2219,7 @@ describe("Subscriptions", () => { starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -5367,7 +5367,7 @@ describe("Subscriptions", () => { starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index 327663d016..0e91a312ec 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -144,14 +144,14 @@ describe("Point", () => { srid: Int! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a point with a distance\\"\\"\\" input PointDistance { \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" distance: Float! point: PointInput! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float latitude: Float! @@ -216,13 +216,13 @@ describe("Point", () => { z: Float } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a cartesian point with a distance\\"\\"\\" input CartesianPointDistance { distance: Float! point: CartesianPointInput! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a cartesian point\\"\\"\\" input CartesianPointInput { x: Float! y: Float! @@ -463,7 +463,7 @@ describe("Point", () => { srid: Int! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float latitude: Float! @@ -520,7 +520,7 @@ describe("Point", () => { z: Float } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for a cartesian point\\"\\"\\" input CartesianPointInput { x: Float! y: Float! diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index 6bd44d2e13..b28ec44f39 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -1726,7 +1726,7 @@ describe("Union Interface Relationships", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 724ba1aab1..807dfdd280 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -405,7 +405,7 @@ describe("Unions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"\\"\\"\\" + \\"\\"\\"Input type for query options\\"\\"\\" input QueryOptions { limit: Int offset: Int From c8b33a53f378c30b2ef1fe94a21fa49d848606dc Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Thu, 28 Sep 2023 17:38:43 +0200 Subject: [PATCH 160/162] refactor: apply suggestions from review --- .../graphql/src/schema/make-augmented-schema.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 7b40e9d134..139dee7010 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -81,6 +81,7 @@ import { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/In import { UnionEntityAdapter } from "../schema-model/entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { CypherField, Neo4jFeaturesSettings } from "../types"; +import { filterTruthy } from "../utils/utils"; import { createConnectionFields } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; import { createRelationshipFields } from "./create-relationship-fields/create-relationship-fields"; @@ -137,7 +138,7 @@ class AugmentedSchemaGenerator { cartesianPointInTypeDefs = true; } } - if ("annotations" in model && model.annotations.fulltext) { + if (model.annotations.fulltext) { floatWhereInTypeDefs = true; } if (model instanceof ConcreteEntityAdapter) { @@ -289,10 +290,12 @@ function makeAugmentedSchema( ...definitionNodes.inputObjectTypes, ...definitionNodes.unionTypes, ...definitionNodes.directives, - ...[customResolvers.customQuery, customResolvers.customMutation, customResolvers.customSubscription].filter( - (x): x is ObjectTypeDefinitionNode => Boolean(x) - ), - ].filter(Boolean); + ...filterTruthy([ + customResolvers.customQuery, + customResolvers.customMutation, + customResolvers.customSubscription, + ]), + ]; if (pipedDefs.length) { composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); } From 74d38dcbd0a386cbeb44153a457a74ce08f8d002 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 29 Sep 2023 11:10:31 +0100 Subject: [PATCH 161/162] extract schema generator to different file --- .../model-adapters/RelationshipOperations.ts | 8 +- .../generation/AugmentedSchemaGenerator.ts | 195 ++++++++++++++++++ .../src/schema/make-augmented-schema.ts | 155 +------------- 3 files changed, 200 insertions(+), 158 deletions(-) create mode 100644 packages/graphql/src/schema/generation/AugmentedSchemaGenerator.ts diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts index 9584e41a77..345b8b2fb8 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts @@ -17,10 +17,10 @@ * limitations under the License. */ +import { isInterfaceEntity } from "../../../translate/queryAST/utils/is-interface-entity"; +import { isUnionEntity } from "../../../translate/queryAST/utils/is-union-entity"; import { upperFirst } from "../../../utils/upper-first"; import type { ConcreteEntityAdapter } from "../../entity/model-adapters/ConcreteEntityAdapter"; -import { InterfaceEntityAdapter } from "../../entity/model-adapters/InterfaceEntityAdapter"; -import { UnionEntityAdapter } from "../../entity/model-adapters/UnionEntityAdapter"; import type { RelationshipAdapter } from "./RelationshipAdapter"; export type UpdateMutationArgumentNames = { @@ -53,7 +53,7 @@ export class RelationshipOperations { } public get fieldInputPrefixForTypename(): string { - const isTargetInterface = this.relationship.target instanceof InterfaceEntityAdapter; + const isTargetInterface = isInterfaceEntity(this.relationship.target); if (isTargetInterface) { return this.relationship.source.name; } @@ -147,7 +147,7 @@ export class RelationshipOperations { } public getConnectOrCreateFieldInputTypeName(concreteTargetEntityAdapter?: ConcreteEntityAdapter): string { - if (this.relationship.target instanceof UnionEntityAdapter) { + if (isUnionEntity(this.relationship.target)) { if (!concreteTargetEntityAdapter) { throw new Error("missing concreteTargetEntityAdapter"); } diff --git a/packages/graphql/src/schema/generation/AugmentedSchemaGenerator.ts b/packages/graphql/src/schema/generation/AugmentedSchemaGenerator.ts new file mode 100644 index 0000000000..1917525dda --- /dev/null +++ b/packages/graphql/src/schema/generation/AugmentedSchemaGenerator.ts @@ -0,0 +1,195 @@ +/* + * 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 { + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLInterfaceType, + GraphQLObjectType, + GraphQLScalarType, + ObjectTypeDefinitionNode, +} from "graphql"; +import { Kind, print } from "graphql"; +import { SchemaComposer } from "graphql-compose"; +import { SortDirection } from "../../graphql/enums/SortDirection"; +import { CartesianPointDistance } from "../../graphql/input-objects/CartesianPointDistance"; +import { CartesianPointInput } from "../../graphql/input-objects/CartesianPointInput"; +import { FloatWhere } from "../../graphql/input-objects/FloatWhere"; +import { PointDistance } from "../../graphql/input-objects/PointDistance"; +import { PointInput } from "../../graphql/input-objects/PointInput"; +import { QueryOptions } from "../../graphql/input-objects/QueryOptions"; +import { CartesianPoint } from "../../graphql/objects/CartesianPoint"; +import { CreateInfo } from "../../graphql/objects/CreateInfo"; +import { DeleteInfo } from "../../graphql/objects/DeleteInfo"; +import { PageInfo } from "../../graphql/objects/PageInfo"; +import { Point } from "../../graphql/objects/Point"; +import { UpdateInfo } from "../../graphql/objects/UpdateInfo"; +import { ConcreteEntity } from "../../schema-model/entity/ConcreteEntity"; +import { InterfaceEntity } from "../../schema-model/entity/InterfaceEntity"; +import { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; +import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; +import type { UnionEntity } from "../../schema-model/entity/UnionEntity"; +import type { Neo4jGraphQLSchemaModel } from "../../schema-model/Neo4jGraphQLSchemaModel"; +import type { DefinitionNodes } from "../get-definition-nodes"; +import * as Scalars from "../../graphql/scalars"; + +export class AugmentedSchemaGenerator { + private composer: SchemaComposer; + + constructor( + private schemaModel: Neo4jGraphQLSchemaModel, + private definitionNodes: DefinitionNodes, + private rootTypesCustomResolvers: ObjectTypeDefinitionNode[] + ) { + this.composer = new SchemaComposer(); + } + + /** + * This function will replace make-augmented-schema in orchestrating the creation of the types for each schemaModel construct + * + * @returns graphql-compose composer representing the augmented schema + */ + generate() { + let pointInTypeDefs = false; + let cartesianPointInTypeDefs = false; + let floatWhereInTypeDefs = false; + + for (const entity of this.schemaModel.entities.values()) { + const model = + entity instanceof ConcreteEntity + ? new ConcreteEntityAdapter(entity) + : entity instanceof InterfaceEntity + ? new InterfaceEntityAdapter(entity) + : new UnionEntityAdapter(entity as UnionEntity); // fixme + + // TODO: check if these can be created ad-hoc + if (model instanceof ConcreteEntityAdapter || model instanceof InterfaceEntityAdapter) { + for (const attribute of model.attributes.values()) { + if (attribute.typeHelper.isPoint()) { + pointInTypeDefs = true; + } + if (attribute.typeHelper.isCartesianPoint()) { + cartesianPointInTypeDefs = true; + } + } + if (model.annotations.fulltext) { + floatWhereInTypeDefs = true; + } + if (model instanceof ConcreteEntityAdapter) { + for (const relationship of model.relationships.values()) { + for (const attribute of relationship.attributes.values()) { + if (attribute.typeHelper.isPoint()) { + pointInTypeDefs = true; + } + if (attribute.typeHelper.isCartesianPoint()) { + cartesianPointInTypeDefs = true; + } + } + } + } + } + } + + // this.pipeDefs(); + this.addToComposer(this.getStaticTypes()); + this.addToComposer(this.getSpatialTypes(pointInTypeDefs, cartesianPointInTypeDefs)); + this.addToComposer(this.getTemporalTypes(floatWhereInTypeDefs)); + + return this.composer; + } + + private pipeDefs() { + const pipedDefs = [ + ...this.definitionNodes.enumTypes, + ...this.definitionNodes.scalarTypes, + ...this.definitionNodes.inputObjectTypes, + ...this.definitionNodes.unionTypes, + ...this.definitionNodes.directives, + ...this.rootTypesCustomResolvers, + ].filter(Boolean); + if (pipedDefs.length) { + this.composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); + } + } + + private getStaticTypes() { + return { + objects: [CreateInfo, DeleteInfo, UpdateInfo, PageInfo], + inputs: [QueryOptions], + enums: [SortDirection], + scalars: Object.values(Scalars), + }; + } + + private getSpatialTypes( + pointInTypeDefs: boolean, + cartesianPointInTypeDefs: boolean + ): { + objects: GraphQLObjectType[]; + inputs: GraphQLInputObjectType[]; + } { + const objects: GraphQLObjectType[] = []; + const inputs: GraphQLInputObjectType[] = []; + if (pointInTypeDefs) { + objects.push(Point); + inputs.push(PointInput, PointDistance); + } + if (cartesianPointInTypeDefs) { + objects.push(CartesianPoint); + inputs.push(CartesianPointInput, CartesianPointDistance); + } + return { + objects, + inputs, + }; + } + + private getTemporalTypes(floatWhereInTypeDefs: boolean): { + inputs: GraphQLInputObjectType[]; + } { + const inputs: GraphQLInputObjectType[] = []; + if (floatWhereInTypeDefs) { + inputs.push(FloatWhere); + } + return { + inputs, + }; + } + + private addToComposer({ + objects = [], + inputs = [], + enums = [], + scalars = [], + interfaces = [], + }: { + objects?: GraphQLObjectType[]; + inputs?: GraphQLInputObjectType[]; + enums?: GraphQLEnumType[]; + scalars?: GraphQLScalarType[]; + interfaces?: GraphQLInterfaceType[]; + }) { + objects.forEach((x) => this.composer.createObjectTC(x)); + inputs.forEach((x) => this.composer.createInputTC(x)); + enums.forEach((x) => this.composer.createEnumTC(x)); + interfaces.forEach((x) => this.composer.createInterfaceTC(x)); + scalars.forEach((scalar) => this.composer.addTypeDefs(`scalar ${scalar.name}`)); + } +} diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 139dee7010..23eaf69ea8 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -22,10 +22,6 @@ import type { DefinitionNode, DirectiveNode, DocumentNode, - GraphQLEnumType, - GraphQLInputObjectType, - GraphQLInterfaceType, - GraphQLObjectType, GraphQLScalarType, NameNode, ObjectTypeDefinitionNode, @@ -41,7 +37,6 @@ import { AggregationTypesMapper } from "./aggregations/aggregation-types-mapper" import { augmentFulltextSchema } from "./augment/fulltext"; import { ensureNonEmptyInput } from "./ensure-non-empty-input"; import getCustomResolvers from "./get-custom-resolvers"; -import type { DefinitionNodes } from "./get-definition-nodes"; import { getDefinitionNodes } from "./get-definition-nodes"; import type { ObjectFields } from "./get-obj-field-meta"; import getObjFieldMeta from "./get-obj-field-meta"; @@ -57,23 +52,13 @@ import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "./t // GraphQL type imports import type { GraphQLToolsResolveMethods } from "graphql-compose/lib/SchemaComposer"; import type { Subgraph } from "../classes/Subgraph"; -import { SortDirection } from "../graphql/enums/SortDirection"; -import { CartesianPointDistance } from "../graphql/input-objects/CartesianPointDistance"; -import { CartesianPointInput } from "../graphql/input-objects/CartesianPointInput"; -import { FloatWhere } from "../graphql/input-objects/FloatWhere"; -import { PointDistance } from "../graphql/input-objects/PointDistance"; -import { PointInput } from "../graphql/input-objects/PointInput"; -import { QueryOptions } from "../graphql/input-objects/QueryOptions"; -import { CartesianPoint } from "../graphql/objects/CartesianPoint"; import { CreateInfo } from "../graphql/objects/CreateInfo"; import { DeleteInfo } from "../graphql/objects/DeleteInfo"; import { PageInfo } from "../graphql/objects/PageInfo"; -import { Point } from "../graphql/objects/Point"; import { UpdateInfo } from "../graphql/objects/UpdateInfo"; import type { Neo4jGraphQLSchemaModel } from "../schema-model/Neo4jGraphQLSchemaModel"; import type { Operation } from "../schema-model/Operation"; import { OperationAdapter } from "../schema-model/OperationAdapter"; -import { ConcreteEntity } from "../schema-model/entity/ConcreteEntity"; import { InterfaceEntity } from "../schema-model/entity/InterfaceEntity"; import { UnionEntity } from "../schema-model/entity/UnionEntity"; import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; @@ -99,150 +84,12 @@ import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; import { getUserDefinedDirectives } from "./make-augmented-schema/user-defined-directives"; import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; +import { AugmentedSchemaGenerator } from "./generation/AugmentedSchemaGenerator"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; } -class AugmentedSchemaGenerator { - private composer: SchemaComposer; - - constructor( - private schemaModel: Neo4jGraphQLSchemaModel, - private definitionNodes: DefinitionNodes, - private rootTypesCustomResolvers: ObjectTypeDefinitionNode[] - ) { - this.composer = new SchemaComposer(); - } - - generate() { - let pointInTypeDefs = false; - let cartesianPointInTypeDefs = false; - let floatWhereInTypeDefs = false; - - for (const entity of this.schemaModel.entities.values()) { - const model = - entity instanceof ConcreteEntity - ? new ConcreteEntityAdapter(entity) - : entity instanceof InterfaceEntity - ? new InterfaceEntityAdapter(entity) - : new UnionEntityAdapter(entity as UnionEntity); // fixme - - // TODO: check if these can be created ad-hoc - if (model instanceof ConcreteEntityAdapter || model instanceof InterfaceEntityAdapter) { - for (const attribute of model.attributes.values()) { - if (attribute.typeHelper.isPoint()) { - pointInTypeDefs = true; - } - if (attribute.typeHelper.isCartesianPoint()) { - cartesianPointInTypeDefs = true; - } - } - if (model.annotations.fulltext) { - floatWhereInTypeDefs = true; - } - if (model instanceof ConcreteEntityAdapter) { - for (const relationship of model.relationships.values()) { - for (const attribute of relationship.attributes.values()) { - if (attribute.typeHelper.isPoint()) { - pointInTypeDefs = true; - } - if (attribute.typeHelper.isCartesianPoint()) { - cartesianPointInTypeDefs = true; - } - } - } - } - } - } - - // this.pipeDefs(); - this.addToComposer(this.getStaticTypes()); - this.addToComposer(this.getSpatialTypes(pointInTypeDefs, cartesianPointInTypeDefs)); - this.addToComposer(this.getTemporalTypes(floatWhereInTypeDefs)); - - return this.composer; - } - - private pipeDefs() { - const pipedDefs = [ - ...this.definitionNodes.enumTypes, - ...this.definitionNodes.scalarTypes, - ...this.definitionNodes.inputObjectTypes, - ...this.definitionNodes.unionTypes, - ...this.definitionNodes.directives, - ...this.rootTypesCustomResolvers, - ].filter(Boolean); - if (pipedDefs.length) { - this.composer.addTypeDefs(print({ kind: Kind.DOCUMENT, definitions: pipedDefs })); - } - } - - private getStaticTypes() { - return { - objects: [CreateInfo, DeleteInfo, UpdateInfo, PageInfo], - inputs: [QueryOptions], - enums: [SortDirection], - scalars: Object.values(Scalars), - }; - } - - private getSpatialTypes( - pointInTypeDefs: boolean, - cartesianPointInTypeDefs: boolean - ): { - objects: GraphQLObjectType[]; - inputs: GraphQLInputObjectType[]; - } { - const objects: GraphQLObjectType[] = []; - const inputs: GraphQLInputObjectType[] = []; - if (pointInTypeDefs) { - objects.push(Point); - inputs.push(PointInput, PointDistance); - } - if (cartesianPointInTypeDefs) { - objects.push(CartesianPoint); - inputs.push(CartesianPointInput, CartesianPointDistance); - } - return { - objects, - inputs, - }; - } - - private getTemporalTypes(floatWhereInTypeDefs: boolean): { - inputs: GraphQLInputObjectType[]; - } { - const inputs: GraphQLInputObjectType[] = []; - if (floatWhereInTypeDefs) { - inputs.push(FloatWhere); - } - return { - inputs, - }; - } - - private addToComposer({ - objects = [], - inputs = [], - enums = [], - scalars = [], - interfaces = [], - }: { - objects?: GraphQLObjectType[]; - inputs?: GraphQLInputObjectType[]; - enums?: GraphQLEnumType[]; - scalars?: GraphQLScalarType[]; - interfaces?: GraphQLInterfaceType[]; - }) { - objects.forEach((x) => this.composer.createObjectTC(x)); - inputs.forEach((x) => this.composer.createInputTC(x)); - enums.forEach((x) => this.composer.createEnumTC(x)); - interfaces.forEach((x) => this.composer.createInterfaceTC(x)); - scalars.forEach((scalar) => this.composer.addTypeDefs(`scalar ${scalar.name}`)); - } -} - function makeAugmentedSchema( document: DocumentNode, { From 7342feda553c018f869a0cef4a070409155766d2 Mon Sep 17 00:00:00 2001 From: a-alle Date: Fri, 29 Sep 2023 11:14:31 +0100 Subject: [PATCH 162/162] update type description for QueryOptions --- .../src/graphql/input-objects/QueryOptions.ts | 2 +- .../graphql/tests/schema/comments.test.ts | 2 +- .../schema/connect-or-create-unions.test.ts | 2 +- .../tests/schema/connections/unions.test.ts | 2 +- .../tests/schema/directive-preserve.test.ts | 2 +- .../schema/directives/filterable.test.ts | 6 +++--- .../directives/relationship-aggregate.test.ts | 4 ++-- .../relationship-nested-operations.test.ts | 20 +++++++++---------- .../schema/directives/selectable.test.ts | 2 +- .../tests/schema/directives/settable.test.ts | 8 ++++---- .../graphql/tests/schema/issues/2981.test.ts | 2 +- .../graphql/tests/schema/issues/3428.test.ts | 2 +- .../tests/schema/subscriptions.test.ts | 4 ++-- .../union-interface-relationship.test.ts | 2 +- packages/graphql/tests/schema/unions.test.ts | 2 +- 15 files changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/graphql/src/graphql/input-objects/QueryOptions.ts b/packages/graphql/src/graphql/input-objects/QueryOptions.ts index 5c5f830864..5465833188 100644 --- a/packages/graphql/src/graphql/input-objects/QueryOptions.ts +++ b/packages/graphql/src/graphql/input-objects/QueryOptions.ts @@ -21,7 +21,7 @@ import { GraphQLInputObjectType, GraphQLInt } from "graphql"; export const QueryOptions = new GraphQLInputObjectType({ name: "QueryOptions", - description: "Input type for query options", + description: "Input type for options that can be specified on a query operation.", fields: { offset: { type: GraphQLInt, diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index f2b01f272c..2761906c7a 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -1633,7 +1633,7 @@ describe("Comments", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index d27e3fbcf7..eed061ee15 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -527,7 +527,7 @@ describe("Connect Or Create", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index ed244b4e6d..fdb346c428 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -955,7 +955,7 @@ describe("Unions", () => { journalsConnection(after: String, first: Int, sort: [JournalSort], where: JournalWhere): JournalsConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 09d837fe08..b207cd377c 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -3226,7 +3226,7 @@ describe("Directive-preserve", () => { usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 66c7a7caae..8fac9bce81 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -10352,7 +10352,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -11583,7 +11583,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -12814,7 +12814,7 @@ describe("@filterable directive", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index a865e14746..0219659619 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -2437,7 +2437,7 @@ describe("@relationship directive, aggregate argument", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -2959,7 +2959,7 @@ describe("@relationship directive, aggregate argument", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int 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 9f72712b23..ba4aae0eac 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -4375,7 +4375,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -4804,7 +4804,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -5241,7 +5241,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -5647,7 +5647,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -6062,7 +6062,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -6477,7 +6477,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -6860,7 +6860,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -7357,7 +7357,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -7946,7 +7946,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -8461,7 +8461,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index e36426032c..d53f5baabb 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -2590,7 +2590,7 @@ describe("@selectable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 59da00a9b6..fca91ad047 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -3176,7 +3176,7 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -3683,7 +3683,7 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -4372,7 +4372,7 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -5077,7 +5077,7 @@ describe("@settable", () => { seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index 8c71369808..1977c66c05 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -865,7 +865,7 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { booksConnection(after: String, first: Int, sort: [BookSort], where: BookWhere): BooksConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index ac897a0d2a..9d19e82d68 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -731,7 +731,7 @@ describe("Relationship nested operations", () => { personTwosConnection(after: String, first: Int, sort: [PersonTwoSort], where: PersonTwoWhere): PersonTwosConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 752f7a6efa..216c72157d 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -2219,7 +2219,7 @@ describe("Subscriptions", () => { starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int @@ -5367,7 +5367,7 @@ describe("Subscriptions", () => { starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index b28ec44f39..5ee958ae31 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -1726,7 +1726,7 @@ describe("Union Interface Relationships", () => { peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 807dfdd280..229dd889b7 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -405,7 +405,7 @@ describe("Unions", () => { moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection! } - \\"\\"\\"Input type for query options\\"\\"\\" + \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" input QueryOptions { limit: Int offset: Int